noahcao / OC_SORT

[CVPR2023] The official repo for OC-SORT: Observation-Centric SORT on video Multi-Object Tracking. OC-SORT is simple, online and robust to occlusion/non-linear motion.
MIT License
735 stars 103 forks source link

Question regarding to trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits #123

Open zmy1116 opened 1 month ago

zmy1116 commented 1 month ago

Hello,

First, thank you for sharing this repository.

I'm testing OC-SORT on one of my own video using the demo_video.py file as you suggested in readme. I found that some detection results are not included in any of tracking results. Digging further I found that the main problem is at ocsort.py where we output results:

https://github.com/noahcao/OC_SORT/blob/7a390a5f35dbbb45df6cd584588c216aea527248/trackers/ocsort_tracker/ocsort.py#L316-L318

specifically on line 316 trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits:

Let's suppose the video has 4 frames, the a still object appear on frames 2, 3, 4, and we set min_hits = 3 as the default params.

I'm a bit confused what's the rational behind trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits. My guest is that it may boost performance for certain types of videos? Should I use a different function other than update for general videos (eg: not security footage, with shot changes, etc)?

I guess my concern is that I can fix this specific part with something making sense. but there may be other parts you did intentionally for performance on certain types of videos that I'm not aware of.

Thank you

zmy1116 commented 1 month ago

i understand now that since it's an online tracker, we only track objects starting from the min_hits