tryolabs / norfair

Lightweight Python library for adding real-time multi-object tracking to any detector.
https://tryolabs.github.io/norfair/
BSD 3-Clause "New" or "Revised" License
2.41k stars 247 forks source link

Simplify frame skipping logic #304

Open aguscas opened 9 months ago

aguscas commented 9 months ago

In norfair, whenever you skip frames, the hit_counter of each TrackedObjects gets decreased by one. Therefore, when you skip more frames than the value of the hit_counter, then the object gets destroyed, even though you didn’t even use the detector! That is undesirable. Also, the period variable doesn't seem intuitive on what is doing.

The way it works in this PR is: