Sub topic 12
Occlusion, ID Switches, and Camera Motion
Prerequisites: object detection, bounding boxes, IoU, data association, and basic Kalman-filter motion models.
A tracker assumes that each detected object can be connected to an existing track. Real video breaks this assumption. An object can disappear behind another object, detections can fail for several frames, or the camera can move. These failures can cause a tracker to lose an identity or assign one object’s identity to another.
Occlusion and Track Continuation
Occlusion happens when one object blocks another from the detector or from the camera. The hidden object may have no detection even though it still exists.
A tracker can temporarily coast a track. Coasting means updating the track with its motion prediction while waiting for a new detection. The track keeps its last identity, but its predicted box becomes less reliable as the gap grows.
A practical lifecycle often uses these states:
- Tentative: the track has appeared only once or a few times.
- Confirmed: repeated detections support that the track is real.
- Coasting: detections are missing, so prediction maintains the track.
- Deleted: the track has missed too many frames and is removed.
The maximum coast time is a trade-off. A short limit removes stale tracks quickly but breaks identities during long occlusions. A long limit preserves identities longer but can create false tracks or incorrect reattachments.
ID Switches and Fragmentation
An ID switch occurs when a tracked object receives another object’s identity, or when an identity moves from one object to another. For example, two people may cross paths. If their boxes overlap and the detector produces uncertain positions, IoU matching can associate person A’s track with person B’s detection.
Fragmentation occurs when one real object is represented by several separate track segments. A missed detection can end the first segment, and a later detection can start a new ID.
| Failure | Typical cause | Useful response |
|---|---|---|
| ID switch | Similar objects cross or overlap | Add appearance matching and tighter motion gating |
| Fragmentation | Track deleted during a missed detection | Allow short coasting and improve detection recall |
| False continuation | Stale prediction attaches to another object | Limit coast time and require stronger evidence |
Camera Motion
A constant-velocity model describes motion in image coordinates. It works well when the camera is fixed and objects move smoothly. With a moving camera, the entire scene can shift. A stationary object may appear to move quickly, so a tracker’s prediction becomes inaccurate.
Camera motion can be handled in several ways:
- Estimate global motion from background features and compensate the detections before association.
- Use an image transformation, such as an affine transform or homography, to map positions between frames.
- Increase the motion uncertainty during rapid camera movement, which makes the association gate wider.
- Use appearance features when geometric motion is unreliable.
Global compensation does not solve every problem. A homography models a mostly planar scene. Nearby objects at different depths may not follow the same transformation, especially during camera rotation or strong perspective changes.
Choosing a Response
For a fixed surveillance camera with sparse objects, IoU and a Kalman filter may be sufficient. For crowded scenes, add appearance embeddings, which are numerical representations of visual characteristics. For moving cameras, compensate global motion before relying on image-space distance. Always inspect ID switches and fragmentations separately: a tracker can have good detection coverage while still assigning identities poorly.
Exercise
A person is hidden for three frames while the camera remains fixed. What tracker behavior helps preserve the person’s identity, and what risk must be controlled?
Show answer
The tracker should coast the existing track using its motion model and keep the identity temporarily. It must limit the coast duration and gate the reappearance so the track does not attach to a different nearby person.