s6.app.pipeline.baseΒΆ

class s6.app.pipeline.base.RunLevel(*values)

Bases: str, Enum

Ordered runtime modes for trading diagnostics against throughput.

PERFORMANCE = 'performance'
NORMAL = 'normal'
DEV = 'dev'
DEBUG = 'debug'
s6.app.pipeline.base.numpy_image_to_base64(image: ndarray, size: tuple[int, int] = (128, 128), fmt: str = '.jpg') str

Resize a numpy image and return a base64-encoded string.

class s6.app.pipeline.base.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.app.pipeline.base.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.app.pipeline.base.BasePipeline(config: str | PipelineConfigBase | None = None)

Bases: ABC

Base class for callable tracking pipelines.

config_model

alias of PipelineConfigBase

cameras: Dict[str, Camera]
board_transform: Any
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.

close() None

Release optional runtime resources held by a pipeline.

viewport(view: Any, visual_tree: Any) None
class s6.app.pipeline.base.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