Skip to content

Commit e7296c3

Browse files
committed
Update design doc
1 parent 03f81af commit e7296c3

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

docs/design/tracker-service.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Design Document: Tracker Service
22

33
- **Author(s)**: [Józef Daniecki](https://github.com/jdanieck)
4-
- **Date**: 2026-01-16
5-
- **Version**: 0.1
4+
- **Date**: 2026-04-27
5+
- **Version**: 0.2
66
- **Status**: `Accepted`
77
- **Related ADRs**:
88
- [ADR-0003: Scaling Controller Performance](../adr/0003-scaling-controller-performance.md)
@@ -52,7 +52,8 @@ Explicitly out of scope:
5252
- **Lease-based scaling** — Static scene partitioning only
5353
- **Multi-scene fusion** — No cross-scene track handoff
5454
- **Scene hierarchy** — Flat scene structure only; no parent-child scene relationships or nested regions
55-
- **Sensor tagging of a track** — No visibility array or per-sensor metadata on tracks
55+
- **Sensor tagging of a track** — No visibility array or per-sensor assignment on tracks
56+
- **Multi-camera confidence merging** — When a track is observed by multiple cameras in the same time chunk, `confidence` from the last processed camera overwrites earlier values (last-write-wins, inherent RobotVision attributes API limitation)
5657

5758
## Architecture
5859

@@ -90,7 +91,8 @@ See full schema: [`camera-data.schema.json`](../../tracker/schema/camera-data.sc
9091
"person": [
9192
{
9293
"id": 1,
93-
"bounding_box_px": { "x": 4, "y": 0, "width": 127, "height": 309 }
94+
"bounding_box_px": { "x": 4, "y": 0, "width": 127, "height": 309 },
95+
"confidence": 0.92
9496
}
9597
]
9698
}
@@ -121,13 +123,22 @@ See full schema: [`scene-data.schema.json`](../../tracker/schema/scene-data.sche
121123
"translation": [-0.33, 2.48, 0.0],
122124
"velocity": [-0.04, 0.2, 0.0],
123125
"size": [0.5, 0.5, 1.85],
124-
"rotation": [0, 0, 0, 1]
126+
"rotation": [0, 0, 0, 1],
127+
"confidence": 0.92
125128
}
126129
]
127130
}
128131
```
129132

130-
## Data
133+
### Detection Data Passthrough
134+
135+
The `confidence` field is passed through from the camera detection message to the corresponding track in the scene output. It is optional — when absent in the detection message it is omitted from the track output.
136+
137+
| Field | Type | Description |
138+
| ------------ | ------ | --------------------------------------------------------- |
139+
| `confidence` | number | Detection confidence score in \[0, 1\] from the AI model |
140+
141+
**Multi-camera limitation**: When a track is matched against detections from multiple cameras within the same time chunk, `confidence` reflects the last matched camera only (last-write-wins). This is an inherent limitation of the RobotVision attributes API used for per-track data storage.
131142

132143
In-memory only - no persistent storage. Stateless design for horizontal scalability.
133144

tracker/src/coordinate_transformer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ CoordinateTransformer::transformDetections(std::span<const Detection> detections
194194
if (!detections[i].metadata_json.empty()) {
195195
obj.attributes["metadata_json"] = detections[i].metadata_json;
196196
}
197-
if (detections[i].confidence.has_value()) {
197+
if (!detections[i].confidence.empty()) {
198198
obj.attributes["confidence"] = std::to_string(*detections[i].confidence);
199199
}
200200

0 commit comments

Comments
 (0)