You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello while using the SORT object from sort_tracker.py I realized that, after I stop detecting objects, if I send empty boxes, confidence and classes to the update function I still get 1 or more objects as being tracked. I thought the max_lost parameter would prevent this? the paper indicates that the tracks should be terminated if they are not detected for Tlost frames, so shouln't an empty detection count as all tracks not being detected in that frame?
Adding something like this should take care of the tracks if no object is detected in a frame:
fortinunmatched_tracks:
track_id=track_ids[t]
bbox=bbox_tracks[t, :]
confidence=self.tracks[track_id].detection_confidencecid=self.tracks[track_id].class_idself._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1)
ifself.tracks[track_id].lost>self.max_lost:
self._remove_track(track_id)
# In case there are no detections, update tracks with the current prediction, if lost > max_lost remove track.iflen(bboxes) ==0:
foriinrange(len(bbox_tracks)):
track_id=track_ids[i]
bbox=bbox_tracks[i, :]
confidence=self.tracks[track_id].detection_confidencecid=self.tracks[track_id].class_idself._update_track(track_id, self.frame_count, bbox, detection_confidence=confidence, class_id=cid, lost=1)
ifself.tracks[track_id].lost>self.max_lost:
self._remove_track(track_id)
Also talking about the parameter "lost" for the track class isn't that line odd? if you set max_lost to let's say 5, then the condition lost > max_lost cannot be reached since the lost parameter is always reset to 1. In my case I commented that line out to make it work.
Here's a little demo that I wrote, I recommend runing it (without the changes I made) with a video where after the tracked object leaves the screen there are no more objects to detect, to see what I mean.
@cnavarrete Thank you for figuring out this bug. I haven't gotten a chance to look at this project over last few months. Can you also check if there is similar issue for other trackers or this was happening only in SORT?
I have included the suggested changes in the SORT implementation. I tested it with the single video and may be more formal testing required. In case you find any bugs, let me know.
I will close this issue for now.
Hello while using the SORT object from sort_tracker.py I realized that, after I stop detecting objects, if I send empty boxes, confidence and classes to the update function I still get 1 or more objects as being tracked. I thought the max_lost parameter would prevent this? the paper indicates that the tracks should be terminated if they are not detected for Tlost frames, so shouln't an empty detection count as all tracks not being detected in that frame?
Adding something like this should take care of the tracks if no object is detected in a frame:
Also talking about the parameter "lost" for the track class isn't that line odd? if you set max_lost to let's say 5, then the condition lost > max_lost cannot be reached since the lost parameter is always reset to 1. In my case I commented that line out to make it work.
Here's a little demo that I wrote, I recommend runing it (without the changes I made) with a video where after the tracked object leaves the screen there are no more objects to detect, to see what I mean.
Looks like someone else had the same issue #21 (comment)
The text was updated successfully, but these errors were encountered: