scene_service.ingest.perception_concept_graphs

ConceptGraphs perception and persistent object-map integration.

Classes

ConceptGraphsDetector(*, rgb_fetcher_msg, ...)

Per-frame detector that runs the canonical concept-graphs merge pipeline.

class scene_service.ingest.perception_concept_graphs.ConceptGraphsDetector(*, rgb_fetcher_msg: Callable[[], Any | None], depth_fetcher_msg: Callable[[], Any | None], camera_info_fetcher: Callable[[], _CamIntrinsics | None], on_detections: Callable[[list[Detection]], Awaitable[None]], registry: ObjectRegistry, world_frame_fn: Callable[[], str] | None = None, robot_base_frame_fn: Callable[[], str] | None = None, period_s: float = 0.6, pose_max_age_s: float = 2.0, confidence_threshold: float = 0.3, max_detections: int = 30, yolo_weights_path: str | None = None, sam_weights_path: str | None = None, clip_model_name: str | None = None, clip_pretrained: str | None = None, cfg_overrides: dict | None = None, hub: Any = None, camera_frame: str = '', base_frame: str | None = None, profile: str = 'lite')[source]

Bases: object

Per-frame detector that runs the canonical concept-graphs merge pipeline.

async delete_object(object_id: str) → None[source]

Drop the CG map entries whose uuid is bound to object_id.

embed_text(texts: list[str]) → list[list[float]] | None[source]

Encode texts with CLIP, normalized to match object image features.

export_3d_snapshot(max_points_per_obj: int = 256) → dict[source]
latest_depth_metres()[source]

The current depth image in metres, or None.

latest_detection_views(max_age_s: float = 3.0)[source]

(rgb_bgr, [(object_id, (u0, v0, u1, v1))], camera_xy) for the last frame whose detections matched objects, or None.

Each box is the one the detector drew for that object in that frame, so the photograph shows what the label was given to.

latest_frame_bundle()[source]

Return (rgb_bgr, K, T_cam_map) for projecting map-frame points into the current camera image, or None when any piece is unavailable.

async reset_derived_state() → None[source]

Empty the CG map and uuid bindings (flush).

async start() → None[source]
async stop() → None[source]