Skip to content

feat: Add OC-SORT tracker#7066

Open
omkar-334 wants to merge 1 commit into
open-edge-platform:feature/getitrackfrom
omkar-334:getitrack-ocsort
Open

feat: Add OC-SORT tracker#7066
omkar-334 wants to merge 1 commit into
open-edge-platform:feature/getitrackfrom
omkar-334:getitrack-ocsort

Conversation

@omkar-334

Copy link
Copy Markdown
Contributor

Summary

Adds the OC-SORT tracking algorithm.
Depends on #6950 (rebase this once that PR is merged)

Behavior

  • Output contains ACTIVE tracks only; lost tracks coast internally until they recover or age out.
  • Observation-centric state per track is grouped in one record; Kalman state stays in a separate dict for batched prediction.
  • Defaults follow the reference (Cao et al., CVPR 2023): det_threshold=0.6, iou_threshold=0.3, delta_t=3, inertia=0.2, use_byte=False.

Mechanisms

  • OCM (observation-centric momentum): a velocity-direction consistency term added to the first association cost, gated on pure IoU.
  • OCR (observation-centric recovery): a second pass matching leftover detections against each track's last observation instead of its Kalman prediction.
  • ORU (observation-centric re-update): on re-acquisition after a gap, the filter is rewound to the last observation and replayed along a virtual trajectory to the new one.
  • Optional BYTE stage (use_byte): associates low-score detections to still-unmatched tracks before the recovery pass.

Benchmark

Identical synthetic detection streams with known ground truth are fed to every tracker and scored with motmetrics. 300 frames, 3 seeds, averaged. Occluded objects are removed from ground truth while hidden, so identity metrics grade re-acquisition. Higher MOTA and IDF1 are better; lower IDSW is better.

Identity quality (IDF1)

Tracker linear occlusion nonlinear crowded
getitrack-ocsort-byte 0.977 0.924 0.795 0.832
getitrack-ocsort 0.923 0.876 0.758 0.810
ultralytics-ocsort 0.918 0.883 0.784 0.809
roboflow-ocsort 0.846 0.788 0.667 0.690
getitrack-bytetrack (reference) 0.969 0.794 0.615 0.657

Detection accuracy (MOTA)

Tracker linear occlusion nonlinear crowded
getitrack-ocsort-byte 0.954 0.942 0.939 0.891
getitrack-ocsort 0.856 0.848 0.848 0.801
ultralytics-ocsort 0.856 0.848 0.849 0.801
roboflow-ocsort 0.733 0.707 0.711 0.636

How to test

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

@omkar-334
omkar-334 requested a review from a team as a code owner July 19, 2026 10:09
@github-actions github-actions Bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM TEST Any changes in tests BUILD labels Jul 19, 2026
Adds the OC-SORT tracking algorithm (observation-centric momentum, recovery,
and re-update on top of Kalman-plus-IoU association), registered under
`ocsort`, with `OCSortConfig` and unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant