s6.app.pipeline.t1ΒΆ

s6.app.pipeline.t1.load_instrument_model_points() Dict[str, Vector3D]

Load fixed instrument model points into the native T1 pose-solver basis.

Notes

configs/instrument-model-points-2.json stores points in the Three.js/model-inspection frame. The loader reads the JSON units metadata, rescales the positions into millimeters, then converts them into the native Sense/OpenCV-style basis before pose recovery.

s6.app.pipeline.t1.load_instrument_model_vertices() List[Vector3D]

Load the instrument OBJ vertices into the native T1 pose-solver basis.

class s6.app.pipeline.t1.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.app.pipeline.t1.TrackingConfigT1(*, 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, roi_prediction_use_extrapolation: bool = True, roi_prediction_recenter_timeout_sec: ConstrainedFloatValue = 0.15, roi_prediction_recenter_invalid_frames: ConstrainedIntValue | None = None, tracking_volume_radius: ConstrainedFloatValue = 3.0, output_pose_gate: OutputPoseGateConfig = None)

Bases: TrackingConfig

T1 tracking config with export-pose gating controls.

roi_prediction_use_extrapolation: bool
roi_prediction_recenter_timeout_sec: float
roi_prediction_recenter_invalid_frames: int | None
tracking_volume_radius: float
output_pose_gate: OutputPoseGateConfig
class s6.app.pipeline.t1.PipelineT1(config: Any = None)

Bases: BasePipeline

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

config_model

alias of PipelineConfigT1

instrument_model_vertices: List[Vector3D]
debug_context: Dict[str, Any]
load_models() None

Load the T1 ROI detector model for the current host platform.

Notes

The detector asset is resolved through asset_path() so the same pipeline code can select the correct ONNX or TensorRT release artifact on macOS and Linux.

load_calibrations() None

Load calibrated cameras and add the derived virtual B camera.

Notes

PipelineT1 operates directly on the physical LL and LR cameras, but export synthesis still expects a bottom-view transform. When both lower cameras are present, this method constructs a virtual B camera from them after loading the calibration bundle.

refine_tip_point_by_peak_intensity(image: ndarray, fallback: Vector2D | None = None) Vector2D

Refine a local tip estimate by choosing the brightest pixel.

Parameters:
  • image (numpy.ndarray) – Local grayscale crop around an already-detected tip candidate.

  • fallback (Vector2D, optional) – Coordinate to return when image is empty.

Returns:

Pixel coordinate within image of the maximum-intensity sample. If the crop is empty, returns fallback when provided or the origin otherwise.

Return type:

Vector2D

draw_tracking_status_overlay(camera_frames: Dict[str, T1CameraFrame], timestamp: float | None) None

Draw debug-only frame status panels on the LL and LR views.

Parameters:
  • camera_frames (dict[str, T1CameraFrame]) – Prepared camera render buffers.

  • timestamp (float, optional) – Current frame timestamp in seconds.

Notes

The overlay reports timestamp, displacement, velocity, and acceleration derived from the pipeline-owned TrajectoryV2. It is emitted only at RunLevel.DEV and above.

draw_output_pose_gate_overlay(camera_frames: Dict[str, T1CameraFrame], solve_result: T1SolveResult) None

Draw the output-pose gate state on the LL frame.