scene_service.scene_graph¶
Object relations over the ObjectRegistry, served through SceneGraphStore.
- class scene_service.scene_graph.GeometryHint(distance: float, xy_overlap: float, vertical_order: str, containment: str)[source]¶
Bases:
objectSpatial cues passed to the LLM alongside the object pair.
- containment: str¶
- distance: float¶
- vertical_order: str¶
- xy_overlap: float¶
- class scene_service.scene_graph.SceneGraphEdge(source_id: str, target_id: str, relation: str, confidence: float = 0.0, method: str = 'llm', reason: str = '', updated_at: float = <factory>, stale_rounds: int = 0)[source]¶
Bases:
objectDirected relation between two scene graph nodes.
- confidence: float = 0.0¶
- method: str = 'llm'¶
- reason: str = ''¶
- relation: str¶
- shown_on_map() bool[source]¶
A relation the map states: measured, or a confident model call. same_object is a dedup hint between detections, not a relation.
- source_id: str¶
- stale_rounds: int = 0¶
- target_id: str¶
- updated_at: float¶
- class scene_service.scene_graph.SceneGraphNode(object_id: str, label: str, bbox_center: tuple[float, float, float], bbox_extent: tuple[float, float, float], yaw: float = 0.0, caption: str | None = None, confidence: float = 0.0, observation_count: int = 0, last_seen: float | None = None)[source]¶
Bases:
objectOne node in the scene graph, mapped 1:1 to an ObjectRegistry record.
- bbox_center: tuple[float, float, float]¶
- bbox_extent: tuple[float, float, float]¶
- caption: str | None = None¶
- confidence: float = 0.0¶
- label: str¶
- last_seen: float | None = None¶
- object_id: str¶
- observation_count: int = 0¶
- yaw: float = 0.0¶
- class scene_service.scene_graph.SceneGraphSnapshot(nodes: dict[str, ~scene_service.scene_graph.types.SceneGraphNode]=<factory>, edges: list[SceneGraphEdge] = <factory>, updated_at: float = <factory>)[source]¶
Bases:
objectImmutable snapshot of the full scene graph at a point in time.
- edges: list[SceneGraphEdge]¶
- nodes: dict[str, SceneGraphNode]¶
- updated_at: float¶
Modules
Low-frequency rebuild of the semantic edges from the ObjectRegistry. |
|
Fast geometric relation loop (a few Hz). |
|
What the bounding boxes alone say about a pair of scene-graph nodes, and a jitter-stable signature of that geometry for the relation cache key. |
|
Image-grounded relation inference. |
|
Minimal async OpenAI-compatible client, configured by the VLM_* variables the VLM detector also reads. |
|
LLM prompts for scene graph relation inference. |
|
Edge candidate generation and LLM-based relation inference. |
|
Live scene graph plus the on-disk relation cache. |
|
Core data structures for the Scene Graph layer. |