max_age |
30 |
Frames a track survives without detection. |
Longer track persistence (handles occlusions better). |
Tracks terminate faster (reduces stale tracks). |
Increase for crowded/occluded scenes. |
n_init |
3 |
Detections needed to start a new track. |
More reliable tracks (fewer false positives). |
Faster track initiation (but more noise). |
Decrease for rapid-moving objects. |
max_iou_distance |
0.7 |
IoU threshold for motion-based matching. |
More tolerant to large movements/occlusions. |
Stricter position matching (reduces mismatches). |
Increase for erratic motion. |
max_cosine_distance |
0.2 |
Threshold for appearance-based Re-ID. |
Looser Re-ID (more ID switches). |
Stricter Re-ID (fewer switches but may drop tracks). |
Decrease for distinct appearances. |
nn_budget |
100 |
Max stored appearance features per track. |
Better Re-ID accuracy (higher memory). |
Lower memory usage (may reduce accuracy). |
Adjust based on GPU memory. |
nms_max_overlap |
1.0 |
Overlap threshold for Non-Max Suppression. |
Allows more overlapping tracks. |
Aggressive suppression (reduces duplicates). |
Set to 1.0 for crowded scenes. |
gating_threshold |
None |
Mahalanobis distance threshold for gating. |
More permissive to motion uncertainty. |
Stricter motion consistency checks. |
Tune if Kalman filter is unstable. |