Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zmy1116 opened this issue Jun 6, 2024 · 1 comment

Comments

@zmy1116
Copy link

zmy1116 commented Jun 6, 2024

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:

if (trk.time_since_update < 1) and (trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits):
# +1 as MOT benchmark requires positive
ret.append(np.concatenate((d, [trk.id+1])).reshape(1, -1))

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.

  • track successfully stablished for the object on frame 2 and 3
  • On frame 4: we associate the object, so the hit_streak= 2, min_hits=3, frame_count=4, it does not satisfy the condition to include to the return, hence empty blob is outputted.

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
Copy link
Author

zmy1116 commented Jun 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant