s6.app.pipeline.t1_contractsΒΆ
Internal data contracts for the T1 inference pipeline.
- class s6.app.pipeline.t1_contracts.T1ContractModel
Bases:
BaseModelBase model for internal T1 stage contracts.
- class Config
Bases:
object- arbitrary_types_allowed = True
- class s6.app.pipeline.t1_contracts.T1CameraFrame(*, camera_key: str, image: ndarray, bgr_image: ndarray, mask: ndarray | None = None)
Bases:
T1ContractModelPrepared per-camera frame buffers used by the T1 algorithm.
- camera_key: str
- image: ndarray
- bgr_image: ndarray
- mask: ndarray | None
- class s6.app.pipeline.t1_contracts.T1RoiInput(*, camera_key: str, roi: BoundingBox2D, roi_image: ndarray, ema_active: bool = False)
Bases:
T1ContractModelROI crop prepared for one detector view.
- camera_key: str
- roi: BoundingBox2D
- roi_image: ndarray
- ema_active: bool
- class s6.app.pipeline.t1_contracts.T1RoiDetectorOutput(*, camera_key: str, keypoints: List[Vector2D] = None, mask: ndarray | None = None)
Bases:
T1ContractModelRaw model output for one detector view.
- camera_key: str
- keypoints: List[Vector2D]
- mask: ndarray | None
- class s6.app.pipeline.t1_contracts.T1RoiDetection(*, camera_key: str, roi: BoundingBox2D, roi_image: ndarray, keypoints: List[Vector2D] = None, keypoints_global: List[Vector2D] = None, mask: ndarray | None = None, tip_point: Vector2D, tip_point_refine: Vector2D, pred_mask: ndarray, pred_mask_erased: ndarray, mask_line_segment: MaskLineSegment2D | None = None, mask_line_segment_global: MaskLineSegment2D | None = None)
Bases:
T1ContractModelPostprocessed detector result for one T1 camera.
- camera_key: str
- roi: BoundingBox2D
- roi_image: ndarray
- keypoints: List[Vector2D]
- keypoints_global: List[Vector2D]
- mask: ndarray | None
- tip_point: Vector2D
- tip_point_refine: Vector2D
- pred_mask: ndarray
- pred_mask_erased: ndarray
- mask_line_segment: MaskLineSegment2D | None
- mask_line_segment_global: MaskLineSegment2D | None
- class s6.app.pipeline.t1_contracts.T1LineFit(*, camera_key: str, mask_line_segment: MaskLineSegment2D | None = None, mask_line_segment_global: MaskLineSegment2D | None = None, pred_mask_erased: ndarray | None = None)
Bases:
T1ContractModelMask-derived support-line fit for one T1 camera.
- camera_key: str
- mask_line_segment: MaskLineSegment2D | None
- mask_line_segment_global: MaskLineSegment2D | None
- pred_mask_erased: ndarray | None
- class s6.app.pipeline.t1_contracts.T1StereoDetections(*, ll: T1RoiDetection, lr: T1RoiDetection, line_fits: Dict[str, T1LineFit] = None)
Bases:
T1ContractModelStereo detector and line-fit inputs for the T1 solver.
- ll: T1RoiDetection
- lr: T1RoiDetection
- line_fits: Dict[str, T1LineFit]
- property tip_ll_refine: Vector2D
Refined LL tip in full-image coordinates.
- property tip_lr_refine: Vector2D
Refined LR tip in full-image coordinates.
- class s6.app.pipeline.t1_contracts.T1SolveResult(*, instrument_pose: Pose3DRecoveryResult | None = None, line_world: LineSegment3D | None = None, tip_point: Vector3D | None = None, tip_point_raw: Vector3D | None = None, tip_tracking_filtered: bool = False, tip_z_valid: bool | None = None, turn_point: Vector3D | None = None, end_point: Vector3D | None = None, tip_solve_valid: bool = False, pose_solve_valid: bool = False, tip_line_distance: float | None = None, tip_line_distance_valid: bool | None = None)
Bases:
T1ContractModelTyped result produced by the T1 geometric solver.
- instrument_pose: Pose3DRecoveryResult | None
- line_world: LineSegment3D | None
- tip_point: Vector3D | None
- tip_point_raw: Vector3D | None
- tip_tracking_filtered: bool
- tip_z_valid: bool | None
- turn_point: Vector3D | None
- end_point: Vector3D | None
- tip_solve_valid: bool
- pose_solve_valid: bool
- tip_line_distance: float | None
- tip_line_distance_valid: bool | None
- to_solver_debug() Dict[str, Any]
Return the legacy solver-shaped debug dictionary.
- class s6.app.pipeline.t1_contracts.T1FrameComputation(*, camera_frames: Dict[str, T1CameraFrame], roi_inputs: Dict[str, T1RoiInput], roi_detections: Dict[str, T1RoiDetection], line_fits: Dict[str, T1LineFit] = None, solve_result: T1SolveResult | None = None, export: Dict[str, Any] = None)
Bases:
T1ContractModelComplete typed result for one T1 working frame.
- camera_frames: Dict[str, T1CameraFrame]
- roi_inputs: Dict[str, T1RoiInput]
- roi_detections: Dict[str, T1RoiDetection]
- line_fits: Dict[str, T1LineFit]
- solve_result: T1SolveResult | None
- export: Dict[str, Any]