Skip to content

Commit

Permalink
Increase initial hit count for norfair tracker (#7925)
Browse files Browse the repository at this point in the history
* Increase initial hit count of tracked object

* Formatting
  • Loading branch information
NickM-27 authored Sep 24, 2023
1 parent 08586f8 commit 1c27ee2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frigate/track/norfair_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ def register(self, track_id, obj):
"ymax": self.detect_config.height,
}

# start object with a hit count of `fps` to avoid quick detection -> loss
next(
(o for o in self.tracker.tracked_objects if o.global_id == track_id)
).hit_counter = self.camera_config.detect.fps

def deregister(self, id, track_id):
del self.tracked_objects[id]
del self.disappeared[id]
Expand Down

0 comments on commit 1c27ee2

Please sign in to comment.