s6.app._pipelineΒΆ

Compatibility exports for the pipeline package.

class s6.app._pipeline.BasePipeline(config: str | PipelineConfigBase | None = None)

Bases: ABC

Base class for callable tracking pipelines.

config_model

alias of PipelineConfigBase

property calibration_file: str | None

Absolute path of the calibration file resolved from config.

abstractmethod load_models() Any
abstractmethod load_calibrations() Any
run_level_at_least(level: RunLevel | str) bool

Return whether the current run level includes level features.

property produces_visual_frames: bool

Whether this run should generate user-facing preview frames.

property allows_debug_overlays: bool

Whether developer-oriented overlays and drawings should run.

property allows_extra_debug: bool

Whether the heaviest diagnostics for debugging should run.

viewport(view: Any, visual_tree: Any) None
s6.app._pipeline.PipelineConfig

alias of PipelineConfigV1

class s6.app._pipeline.PipelineConfigBase(*, pipeline_name: str = 'PipelineV1', 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.

default_config_candidates: ClassVar[Tuple[str, ...]] = ('configs/pipeline.config.yaml', 'configs/pipeline.config.yml')
pipeline_name: str
platform: PlatformConfig
run_cpp: bool
run_level: RunLevel
calibration_file: str
classmethod load_default_data() dict[str, Any]

Load raw default config data, preferring YAML when available.

class s6.app._pipeline.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: TrackingConfig = None, tip: TipConfig = None, export: ExportConfig = None)

Bases: PipelineConfigBase

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

default_config_candidates: ClassVar[Tuple[str, ...]] = ('configs/pipeline_t1.config.yaml', 'configs/pipeline_t1.config.yml', 'configs/pipeline.config.t1.yaml', 'configs/pipeline.config.t1.yml', 'configs/pipeline.config.yaml', 'configs/pipeline.config.yml')
pipeline_name: str
platform: PlatformConfig
tracking: TrackingConfig
tip: TipConfig
export: ExportConfig
static load_default() PipelineConfigT1
class s6.app._pipeline.PipelineConfigV1(*, pipeline_name: str = 'PipelineV1', platform: PlatformConfig = None, run_cpp: bool = False, run_level: RunLevel = RunLevel.NORMAL, calibration_file: str = 'configs/calibration.config.json', tracking: TrackingConfig = None, solver: SolverConfig = None, detection: DetectionConfig = None, refine: RefineConfig = None, boundary: BoundaryConfig = None, tip: TipConfig = None, export: ExportConfig = None, demo_mode: bool = False)

Bases: PipelineConfigBase

Root configuration for s6.app.pipeline.v1.PipelineV1.

tracking: TrackingConfig
solver: SolverConfig
detection: DetectionConfig
refine: RefineConfig
boundary: BoundaryConfig
tip: TipConfig
export: ExportConfig
demo_mode: bool
static load_default() PipelineConfigV1
class s6.app._pipeline.PipelineConfigV2(*, pipeline_name: str = 'PipelineV2', platform: PlatformConfig = None, run_cpp: bool = False, run_level: RunLevel = RunLevel.NORMAL, calibration_file: str = 'configs/calibration.config.json', tracking: TrackingConfig = None, solver: SolverConfig = None, detection: DetectionConfig = None, refine: RefineConfig = None, boundary: BoundaryConfig = None, tip: TipConfig = None, export: ExportConfig = None, demo_mode: bool = False)

Bases: PipelineConfigBase

Root configuration for s6.app.pipeline.v2.PipelineV2.

default_config_candidates: ClassVar[Tuple[str, ...]] = ('configs/pipeline_v2.config.yaml', 'configs/pipeline_v2.config.yml', 'configs/pipeline.config.v2.yaml', 'configs/pipeline.config.v2.yml', 'configs/pipeline.config.yaml', 'configs/pipeline.config.yml')
pipeline_name: str
platform: PlatformConfig
tracking: TrackingConfig
solver: SolverConfig
detection: DetectionConfig
refine: RefineConfig
boundary: BoundaryConfig
tip: TipConfig
export: ExportConfig
demo_mode: bool
static load_default() PipelineConfigV2
class s6.app._pipeline.PipelineLoader

Bases: object

Load validated pipeline config and instantiate pipeline classes.

static load_config(config: str | PipelineConfigBase | None, pipeline_cls: type[BasePipeline] | None = None, run_level_override: RunLevel | str | None = None) PipelineConfigBase
static resolve_pipeline_class(pipeline_name: str) type[BasePipeline]
static load(config: str | PipelineConfigBase | None = None, run_level_override: RunLevel | str | None = None) BasePipeline
class s6.app._pipeline.PipelineT1(config: str | PipelineConfigBase | None = None)

Bases: BasePipeline

Two-camera lower stereo pipeline that triangulates directly from LL/LR tips.

config_model

alias of PipelineConfigT1

static second_largest_threshold_component_mask(image: ndarray, percentile: float = 80.0) ndarray

Return the dilated second-largest threshold component as a binary mask.

load_models() None
load_calibrations() None
static bgr2gray(image: ndarray) ndarray
array_copy(context: Dict[str, Any]) None
viewport(view: Any, visual_tree: Any) None
point_refine_median_filter(image)
preprocess_roi_det(context: Dict[str, Any], context_key: str) None
inference_roi_det(context: Dict[str, Any], camera_keys: Tuple[str, ...]) None
postprocess_roi_det(context: Dict[str, Any], context_key: str) None
roi_det(context: Dict[str, Any]) None
roi_solve(context)
class s6.app._pipeline.PipelineV1(config: str | PipelineConfigBase | None = None)

Bases: BasePipeline

Main Sense Core inference pipeline implementation.

config_model

alias of PipelineConfigV1

viewport(view: Any, visual_tree: Any) None
load_models() None
load_calibrations() None
static bgr2gray(image: ndarray) ndarray
array_copy(context: Dict[str, Any]) None
detect_markers(context: Dict[str, Any], context_key: str, prev_context: Dict[str, Any] | None = None) List[Vector2D]
refine_markers(context: Dict[str, Any], context_key: str) None
boundary_stage(context: Dict[str, Any], prev_context: Dict[str, Any] | None = None) None
triangulate_markers(context: Dict[str, Any], prev_context: Dict[str, Any] | None = None) List[Vector3D]
tips_search(context: Dict[str, Any]) None
tips_solve(context: Dict[str, Any]) None
experimental_prong_tip_detection(context: Dict[str, Any]) None
class s6.app._pipeline.PipelineV2(config: str | PipelineConfigBase | None = None)

Bases: BasePipeline

Four-camera pipeline using upper stereo for markers and lower stereo for tips.

config_model

alias of PipelineConfigV2

load_models() None
load_calibrations() None
static bgr2gray(image: ndarray) ndarray
array_copy(context: Dict[str, Any]) None
detect_markers(context: Dict[str, Any], context_key: str, prev_context: Dict[str, Any] | None = None) List[Vector2D]
triangulate_markers(context: Dict[str, Any], prev_context: Dict[str, Any] | None = None) List[Vector3D]
viewport(view: Any, visual_tree: Any) None
tips_search_stereo(context: Dict[str, Any], prev_context: Dict[str, Any] | None = None) None
tips_solve_stereo(context: Dict[str, Any], prev_context: Dict[str, Any] | None = None) None
class s6.app._pipeline.RunLevel(*values)

Bases: str, Enum

Ordered runtime modes for trading diagnostics against throughput.

PERFORMANCE = 'performance'
NORMAL = 'normal'
DEV = 'dev'
DEBUG = 'debug'