1. What happened
On 20 November we were testing VIDS on a GPU server with three 1080p cameras running at 25 fps. A dog walked into a lane and stood still. Later, people walked on the road. These are exactly the "animal on road" and "pedestrian on highway" incidents the system exists to catch.
VIDS raised nothing. TMCS, our other incident system, was watching the same view with the same RT-DETR model at the same 640 px input, and it did raise the alert.
2. The first clue
VIDS writes a per-minute [Presence] log line for people and animals. In six minutes of site logs:
- Every line said
animal: seen=N too_large=N. That was one large stationary box being classed as an animal and correctly rejected as too big. - The dog never appeared, not even as a rejected detection.
- There was no
personline at all.
So the dog wasn't being filtered out by a rule. It never reached the rules in the first place.
3. Reproducing it
I took the recorded frames and ran RT-DETR on them offline in a few different ways:
| Input | Result |
|---|---|
| Full view at 640 px | Dog read as "person", 0.43. It was 12×15 px in the model input. |
| Full view at 1280 px | Dog, 0.71 |
| Crop around the dog at 640 px | Dog, 0.85 |
| Second frame, full view at 640 px | The two people, 0.82 and 0.78 |
The people were detected well in the offline test, yet produced no log line on site. The dog was detected weakly and wrongly at full view, but well when cropped. That pointed to two separate problems.
4. Cause 1: the tracker never started a track
VIDS only analyses tracked objects: a detection has to become a track with an ID before any
incident rule looks at it. RT-DETR ran through the standard Ultralytics ByteTrack setup with
fuse_score: true. With that setting:
- A new track needs IoU × score ≥ 0.30 on the very next pass to be confirmed, and it is dropped after one miss.
- The low-score matching stage can never match these boxes, because the fused value is always too low.
A dog scoring 0.36–0.42, with a few pixels of jitter between passes, never got an ID. No ID, no track, no rule, no alert, and no log line. I wrote a unit test that reproduces this exactly, so the cause is proven rather than guessed.
TMCS has its own tracker, and that's why it alerted: weak new ("tentative") tracks match on a buffered IoU without score fusion, and they survive one missed frame.
# bytetrack config used for RT-DETR presence tracking
fuse_score: false # was true: weak new tracks never survived to get an ID
5. Cause 2: the object was too small for the model
The overview camera's lane area is about 1,600 px wide. To fit RT-DETR's 640 px input it was scaled by 0.4, so a dog that was 35×50 px in the real frame became about 14×20 px in what the model saw. At that size, a dog and a person look alike, and the score is weak either way.
This is easy to miss when you think in frame pixels. What matters is the object's size in the model's input.
6. The fix
Turned off score fusion for presence tracking so weak new tracks can live long enough to get an ID.
A time-aware ByteTrack per camera: buffered IoU matching, tentative tracks survive one miss, 2 hits to confirm, and retention in seconds rather than frames (moving objects 10 s, stationary 30 s, people and animals 60 s).
The lane area is cut into tiles no wider than 960 px, with overlap. Each tile runs separately and detections are merged with cross-tile NMS, so small objects stay big enough to classify.
A person or animal at least 30×40 px in the 1080p frame, scoring at least 0.30 on most passes, must be detected and tracked.
7. Making misses visible
The real lesson was that the system had silent gates: places where a detection could disappear without
leaving a trace. Now every reason a detection is dropped is counted in the per-minute [Presence]
line: too large, too small, glare at night, tentative track not yet confirmed, outside the lane, and so on.
If this ever happens again, the log will say "seen 40, dropped 40 as tentative" instead of saying nothing. That turns a mystery into a five-minute fix.
8. Lessons
- Test the tracker, not just the detector. The detector found the people. The tracker threw them away.
- Think in model-input pixels. A 35×50 px dog is fine; a 14×20 px dog is a coin toss.
- A sister system is a free test. Running TMCS on the same view is the only reason we caught this.
- Every filter should leave a footprint. If a detection can disappear, the logs should count it.