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

Logic Error? trk.hit_streak >=self.min_hits, ret.append(...) #166

Open
dklb23 opened this issue Feb 19, 2023 · 0 comments
Open

Logic Error? trk.hit_streak >=self.min_hits, ret.append(...) #166

dklb23 opened this issue Feb 19, 2023 · 0 comments

Comments

@dklb23
Copy link

dklb23 commented Feb 19, 2023

sort/sort.py

Line 245 in da0fe4d

if (trk.time_since_update < 1) and (trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits):

Shouldn't the ret.append(...) function only be called when trk.hit_streak is greater than or equal to self.min_hits?

Because the self.frame_counter value starts at 1 and is always less than or equal to self.min_hits, therefore the ret.append(...) function will always be called because trk.time_since_update < 1 is also true.

I now use only:

if (trk.hit_streak >= self.min_hits):

This gives me the possibility that the trk is only returned if it has really succeeded in achieving the required 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