# Trackers fail compared to frame-by-frame Keypoint Detection

**URL:** <https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037>\
**Category:** 🤝  Community Help\
**Created:** [April 2, 2026, 7:25pm UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037 "2026-04-02T19:25:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fitwist](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fitwist/32/9357_2.png) [@fitwist](https://discuss.roboflow.com/u/fitwist)\
**Post date:** [April 2, 2026, 7:25pm UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037/1 "2026-04-02T19:25:31Z")

</div>

How do I tune trackers for video inference?

My Keypoint Detection model reached the following metrics:

- mAP@50: 96.6%
- Precision: 100%
- Recall: 90.9%
- F1: 95.2%

And it really shows good quality keypoint detection on a bunch of **frames** I’ve provided.

But when it comes to the **video** inference, model seems to get mad. Standard code from [documentation](https://supervision.roboflow.com/latest/how_to/track_objects/#__tabbed_5_2) doesn’t contain any tracking at all. So I’ve tried to add trackers:

- [`OC-SORT`](https://trackers.roboflow.com/latest/trackers/ocsort/#run-on-video-webcam-or-rtsp-stream) doesn’t outperform any other tracker
- [`SORTTracker`](https://trackers.roboflow.com/latest/trackers/sort/) also gives insufficient results
- [DetectionSmoother](https://supervision.roboflow.com/detection/tools/smoother/) changed almost nothing in the way bbox coordinates are calculated
- [`ByteTrack`](https://roboflow.com/model/bytetrack) often loses track of an object and produces hundreds of IDs (only ~2 needed)

All of the them often ‘lose’ backward objects (probably because of incorrect IoU threshold).

I’ve added hard poses, frames with vertices missing, like GPT on Roboflow Documentation advised, but it made almost no improvement, comparing to frame-by-frame inference.

I’ve also tried to tune ByteTrack:

```auto
tracker = sv.ByteTrack(

       lost_track_buffer=75,

       track_activation_threshold=0.18,

       minimum_matching_threshold=0.7,

       minimum_consecutive_frames=1,

)

```

But the suggested param values seems to be bad.

You can compare the inference quality on the image:

 ![trackers](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/5/54a087116e3c810885fbf63473dd7c7d21fa0488.jpeg)

How should I tune this trackers or change video inference module to get better results?

---

<div class="post-metadata">

**Author:** ![erik\_roboflow](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/erik_roboflow/32/8925_2.png) [@erik\_roboflow](https://discuss.roboflow.com/u/erik_roboflow)\
**Post date:** [April 13, 2026, 8:36am UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037/2 "2026-04-13T08:36:32Z")

</div>

Hi @fitwist ,

Could you also share a video of just detection (visualization) on a video? Could be that inference speed is too slow for tracker to consistently maintain ID over frames.

Thanks, Erik

---

<div class="post-metadata">

**Author:** ![fitwist](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fitwist/32/9357_2.png) [@fitwist](https://discuss.roboflow.com/u/fitwist)\
**Post date:** [April 16, 2026, 6:40am UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037/3 "2026-04-16T06:40:51Z")

</div>

Of course, here they are

OC-SORT: [https://youtu.be/AZ3smKoeL2Y](https://youtu.be/AZ3smKoeL2Y)

Frame-by-frame: [https://youtu.be/CPvP3gULlEo](https://youtu.be/CPvP3gULlEo)

---

<div class="post-metadata">

**Author:** ![erik\_roboflow](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/erik_roboflow/32/8925_2.png) [@erik\_roboflow](https://discuss.roboflow.com/u/erik_roboflow)\
**Post date:** [April 17, 2026, 8:50am UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037/4 "2026-04-17T08:50:57Z")

</div>

Hi @fitwist , could you also share the full code with detection, tracking, and visualization? The first video seems to have an issue with visualization (scaling?), but would like to verify it locally.

Thanks, Erik

---

<div class="post-metadata">

**Author:** ![fitwist](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fitwist/32/9357_2.png) [@fitwist](https://discuss.roboflow.com/u/fitwist)\
**Post date:** [May 3, 2026, 3:33pm UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037/5 "2026-05-03T15:33:09Z")

</div>

Here’s the code for tracking:

> <https://gist.github.com/fitwist/bd0d684e2cd3ff9aa63a98020a33341e>

Here’s the code for visualization:

> <https://gist.github.com/fitwist/9bafbf69ec3f48ec6b4e277e8cc8c577>

---

<div class="post-metadata">

**Author:** ![Alex\_Bodner](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/alex_bodner/32/6353_2.png) [@Alex\_Bodner](https://discuss.roboflow.com/u/Alex_Bodner)\
**Post date:** [May 4, 2026, 2:10pm UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037/6 "2026-05-04T14:10:10Z")

</div>

Hi @fitwist ! Here Alex from the trackers team. I see in the OC-SORT tracker video that boxes and keypoints clearly look corrupt, while in the other video KeyPoints look really nice!

Could you tell me how are you using the tracker? because OC-SORT isn’t responsible for the input detections quality and I couldnt find this in your code. Also, how are you detecting keypoints in that video? Because OC-SORT should never return a different box than what was inputted, so I think that the problem might be in how you are handling the input to the tracker. Maybe a video of the input boxes helps!

Also we encourage to use tracking alogirthms from trackers package which enables to easily swap trackers instead of sv.ByteTrack.

Best,

Alex

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [May 25, 2026, 2:10pm UTC](https://discuss.roboflow.com/t/trackers-fail-compared-to-frame-by-frame-keypoint-detection/12037/7 "2026-05-25T14:10:38Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
