# Object Tracking

Object tracking assigns stable IDs to detections so you know which object is which over time. On OAK, tracking runs fully
on-device, pairing detector outputs with hardware-accelerated association so IDs stay steady through occlusions and motion.

[Detection networks](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/detection_network.md) combined with
[ObjectTracker](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/object_tracker.md) node yield tracked
objects with status and, when paired with [spatial
detections](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/spatial_detection_network.md) or stereo, XYZ
coordinates.

## Tracking resilience

Tracklets carry lifecycle flags (new/removed/persisting) and survive detector dropouts via short-term tracking. You can cap max
objects, pick ID policies, and remap ROIs to depth for spatial readouts. Pair with
[depth](https://docs.luxonis.com/overview/toplevel-features/depth.md) or [feature
tracking](https://docs.luxonis.com/overview/toplevel-features/feature_tracking.md) when you need both semantics and precise motion
cues.

## Spatial tracking

Object tracking can also be depth-aware, extending image-space with real-world position context. In scenes where objects overlap
in 2D, depth can also provide an extra cue for keeping IDs consistent.

## Typical use cases

 1. Spatial object tracking: fuse detections with stereo for XYZ-labeled tracklets to drive grasping, inspection, or collision
    avoidance.
 2. RGB-only tracking: keep lightweight persistent IDs on single-camera streams for retail analytics, counting, or sports clips.
 3. Cross-stream overlays: map RGB tracks into depth/IR space so overlays line up and which can help navigation tasks to stay
    accurate.

## Guides and examples

### People tracker example

Counts people going through FOV

[People tracker example](https://github.com/luxonis/oak-examples/tree/main/neural-networks/object-tracking/people-tracker)

### Object tracker example

Spatial tracking with YOLO and stereo fusion

[Object tracker example](https://docs.luxonis.com/software-v3/depthai/examples/object_tracker/object_tracker.md)

### Object Tracker Replay

Track IDs on recorded or live video

[Object Tracker Replay](https://docs.luxonis.com/software-v3/depthai/examples/object_tracker/object_tracker_replay.md)

### Object Tracker Remap

Align tracked boxes across RGB and depth

[Object Tracker Remap](https://docs.luxonis.com/software-v3/depthai/examples/object_tracker/object_tracker_remap.md)

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
