s6.schema.pipeline_configΒΆ

Compatibility exports for Sense Core pipeline configuration models.

class s6.schema.pipeline_config.BoundaryConfig(*, smoothing_window: ConstrainedIntValue = 3, max_radius_change_frac: ConstrainedFloatValue = 0.05, max_center_change_frac: ConstrainedFloatValue = 0.05, default_center: Tuple[float, float] = (640.0, 480.0), default_radius: ConstrainedFloatValue = 600.0)

Bases: BaseModel

Outer boundary detection/smoothing configuration.

smoothing_window: int
max_radius_change_frac: float
max_center_change_frac: float
default_center: Tuple[float, float]
default_radius: float
class s6.schema.pipeline_config.CameraMappingsConfig(*, client: dict[int, str] | None = None, local: dict[int, str] | None = None)

Bases: BaseModel

Built-in device-id to camera-key mappings for live capture sources.

client: dict[int, str] | None
local: dict[int, str] | None
class Config

Bases: object

extra = 'forbid'
class s6.schema.pipeline_config.DetectionConfig(*, components_area_thresholds: Tuple[int, int] = (600, 5000), fallback_margin_frac: ConstrainedFloatValue = 0.05)

Bases: BaseModel

Coarse component detection parameters.

components_area_thresholds: Tuple[int, int]
fallback_margin_frac: float
class s6.schema.pipeline_config.ExportConfig(*, preview_size: Tuple[int, int] = (320, 240), preview_format: str = '.jpg')

Bases: BaseModel

Export/telemetry configuration.

preview_size: Tuple[int, int]
preview_format: str
s6.schema.pipeline_config.PipelineConfig

alias of PipelineConfigT1

class s6.schema.pipeline_config.PipelineConfigBase(*, pipeline_name: str = 'PipelineT1', platform: PlatformConfig = None, run_cpp: bool = False, run_level: RunLevel = RunLevel.NORMAL, calibration_file: str = 'configs/calibration.config.json')

Bases: BaseModel

Common pipeline configuration shared across implementations.

pipeline_name: str
platform: PlatformConfig
run_cpp: bool
run_level: RunLevel
calibration_file: str
class s6.schema.pipeline_config.PipelineFrameOutput(*, export: Dict[str, Any] = None, debug: Dict[str, Any] = None)

Bases: BaseModel

Serializable pipeline output published onto a frame context.

Pipelines may read the input context supplied by context generators, but the only top-level context keys they are allowed to add or replace are export and debug. Values must remain compatible with StructuredDataset persistence: Pydantic models, primitives, containers, and NumPy arrays.

export: Dict[str, Any]
debug: Dict[str, Any]
class Config

Bases: object

arbitrary_types_allowed = True
class s6.schema.pipeline_config.PipelineConfigT1(*, pipeline_name: str = 'PipelineT1', platform: PlatformConfig = None, run_cpp: bool = False, run_level: RunLevel = RunLevel.NORMAL, calibration_file: str = 'configs/calibration.config.json', tracking: TrackingConfigT1 = None, solver: SolverConfig = None, tip: TipConfig = None, export: ExportConfig = None)

Bases: PipelineConfigBase

Root configuration for s6.app.pipeline.t1.PipelineT1.

pipeline_name: str
platform: PlatformConfig
tracking: TrackingConfigT1
solver: SolverConfig
tip: TipConfig
export: ExportConfig
class s6.schema.pipeline_config.PlatformConfig(*, prototype: str = 'T1', gstreamer: VideoCaptureConfig = None, camera_mappings: CameraMappingsConfig = None)

Bases: BaseModel

Selector for concrete platform implementations.

prototype: str
gstreamer: VideoCaptureConfig
camera_mappings: CameraMappingsConfig
property implementation: Platform
property camera_names: Tuple[str, ...]
property camera_count: int
camera_mapping_for_source(source_name: str) dict[int, str] | None

Return the configured built-in mapping for a live capture source.

class s6.schema.pipeline_config.RefineConfig(*, zoom_factor: ConstrainedFloatValue = 4.5, patch_size: Tuple[int, int] = (128, 128))

Bases: BaseModel

Local refinement (patch warp) configuration.

zoom_factor: float
patch_size: Tuple[int, int]
class s6.schema.pipeline_config.RunLevel(*values)

Bases: str, Enum

Ordered runtime modes for trading diagnostics against throughput.

PERFORMANCE = 'performance'
NORMAL = 'normal'
DEV = 'dev'
DEBUG = 'debug'
class s6.schema.pipeline_config.SolverConfig(*, instrument_length: ConstrainedFloatValue = 0.135, tip_mask_erase_radius: ConstrainedFloatValue | None = None, tip_line_distance_expected: ConstrainedFloatValue = 1.4, tip_line_distance_tolerance: ConstrainedFloatValue = 0.2, tip_valid_z_min_mm: float = 40.0, tip_valid_z_max_mm: float = 60.0)

Bases: BaseModel

Configuration for geometric solver behaviour.

class Config

Bases: object

extra = 'forbid'
instrument_length: float
tip_mask_erase_radius: float | None
tip_line_distance_expected: float
tip_line_distance_tolerance: float
tip_valid_z_min_mm: float
tip_valid_z_max_mm: float
class s6.schema.pipeline_config.TipConfig(*, boundary_margin_px: ConstrainedIntValue = 0, tracking_box_radius_px: ConstrainedIntValue = 80, tracking_box_next_radius_px: ConstrainedIntValue = 100, refine_area_thresholds: Tuple[int, int] = (20, 1200), suppression_radius_px: ConstrainedIntValue = 30, triplet_tip_source: str = 'model')

Bases: BaseModel

Tip detection settings for ROI and refinement.

class Config

Bases: object

extra = 'forbid'
boundary_margin_px: int
tracking_box_radius_px: int
tracking_box_next_radius_px: int
refine_area_thresholds: Tuple[int, int]
suppression_radius_px: int
triplet_tip_source: str
class s6.schema.pipeline_config.TrackingConfig(*, enable_prediction: bool = True, search_radius_px: ConstrainedIntValue = 150, trajectory_maxlen: ConstrainedIntValue = 20, search_radius_m: ConstrainedFloatValue = 0.05, prediction_jitter_velocity_threshold: ConstrainedFloatValue | None = 120.0, acceleration_rejection_threshold: ConstrainedFloatValue | None = None, prediction_displacement_ema_alpha: ConstrainedFloatValue = 0.4)

Bases: BaseModel

Per-frame tracking/search configuration.

enable_prediction: bool
search_radius_px: int
trajectory_maxlen: int
search_radius_m: float
prediction_jitter_velocity_threshold: float | None
acceleration_rejection_threshold: float | None
prediction_displacement_ema_alpha: float
s6.schema.pipeline_config.available_platforms() Tuple[str, ...]

Return the supported platform identifiers.

s6.schema.pipeline_config.create_platform(prototype: str) Platform

Create a platform implementation for prototype.