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
I have searched the Yolo Tracking issues and found no similar bug report.
Question
Thanks for this repo
In one frame I have 10 boxes for persons lets say they have corresponding indexes 0 for first box, 1 for second ....9 for the 10th.
I only have 7 tracks
Is there a way to know directly
the index of the box that is assigned to a given track_id
the indexes of the boxes that are not assigned to any track (could be track "-1" like values not in a cluster for sckilt learn dbscan)
Thanks for your help
The text was updated successfully, but these errors were encountered:
The index given to each bbox depends on the association rounds of each tracking algorithm. The assigned IDs are generated in ascending order. When a track ID is lost it can be recovered for a limited period of time, in order not to flood the memory with lost tracks, otherwise it is lost forever.
Thanks for answering me.
But I must admit I could not figure how to find which box is assigned to which track from it
So here is the way I do it now
while True:
ret, im = vid.read()
if not ret: break
# substitute by your object detector, output has to be N X (x, y, x, y, conf, cls)
in_this_frame = np.where(in_frame == i_frame)[0]
dets = boxes[in_this_frame]
tracker.update(dets, im) # --> M X (x, y, x, y, id, conf, cls, ind)
tracker.plot_results(im, show_trajectories=True)
new_boxes = []
new_ids = []
for a in tracker.active_tracks:
if a.history_observations:
if len(a.history_observations) > 2:
box = a.history_observations[-1]
new_boxes.append(box)
new_ids.append(a.id)
new_obs = np.hstack((i_frame,box, a.id))
if len(all_tracks) == 0: all_tracks = new_obs.copy()
else: all_tracks = np.row_stack((all_tracks, new_obs))
video_writer.write(im)
pairdist = distance.cdist(dets, new_boxes, 'euclidean')
pairs = np.where(pairdist == 0) # this line give the assignment between dets and new_ids
i_frame += 1
With DeepOcSort
And other thing surprised me, quiet often, they are more boxes in new_boxes (i.e. boxes corresponding to active tracks) than boxes in dets in my case on average 10% more.
And is clear in the tracker video that some boxes are false positive (aka ids 29 and 76 in image). https://drive.google.com/file/d/1hBBVOYyZkLEaNC348jbI-NDNi6QCCul7/view?usp=sharing
An option to plot boxes only corresponding to "dets" would make sense. May be det_id is what I am looking for ?
With BotSort
Behavior is different in my case I always got len(new_boxes) < len(dets)
and all new_boxes are close to on det
Search before asking
Question
Thanks for this repo
In one frame I have 10 boxes for persons lets say they have corresponding indexes 0 for first box, 1 for second ....9 for the 10th.
I only have 7 tracks
Is there a way to know directly
the index of the box that is assigned to a given track_id
the indexes of the boxes that are not assigned to any track (could be track "-1" like values not in a cluster for sckilt learn dbscan)
Thanks for your help
The text was updated successfully, but these errors were encountered: