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
Is there any way to know which item in detections is uninitialized (not yet alive)?
Extra info: I am basically looking for a link between the input and the output. I want to achieve the output (tracked_objects) to be also of length 3, and just have None in there. So for example [obj1(...), none, obj2(...)]. This makes it clear that the second bounding box from the detections variable is the item that is still initializing. I also don't want object_ids for objects that have just left the frame (I guess sometimes tracked_objects can be larger than detections because of objects that just left the frame but still have a hit counter).
The text was updated successfully, but these errors were encountered:
norfair.update() returns only the live objects, but if you need to debug the uninitialized objects, you can access the complete list of objects on tracker.tracked_objects. Please consider that this list does not follow the detections list order but instead is ordered by ID. If you need to check which detection matched each tracked object, you may use tracked_object.last_detection.
Regarding your last comment on the length of the lists, please note that objects don't disappear instantly; instead, their life is controlled by the hit_counter_max, so you may still see some objects for a while that have left the frame.
I used tracked_object.last_detection.points to get the xy coordinates of each tracked object. Then I compared these xy coordinates to the xy coordinates of all the bounding boxes. This allowed me to link what bounding boxes corresponded to which trackids. Not sure if this is the most calculation efficient, but it got the job done! Thank you
Imagine there are 3 bounding boxes in 'detections' and 2 items in 'tracked_objects' (because one object is still uninitialized).
Is there any way to know which item in detections is uninitialized (not yet alive)?
Extra info: I am basically looking for a link between the input and the output. I want to achieve the output (tracked_objects) to be also of length 3, and just have None in there. So for example [obj1(...), none, obj2(...)]. This makes it clear that the second bounding box from the detections variable is the item that is still initializing. I also don't want object_ids for objects that have just left the frame (I guess sometimes tracked_objects can be larger than detections because of objects that just left the frame but still have a hit counter).
The text was updated successfully, but these errors were encountered: