Closed Pranav-India closed 1 year ago
Hi @Pranav-India,
The new draw_box
was made to handle both Detections and TrackedObjects. You can pass the same list that you were passing to the deprecated draw_tracked_boxes
.
The idea is that you can pass the list of detections or the list of tracked objects and this function can handle both.
Now that I double check I think the TypeHint of this one Sequence[Union[Detection, TrackedObject]]
should be Union[Sequence[Detection], Sequence[TrackedObject]]
. A slight difference but that might be what was confusing you.
Hi @javiber
Thank you for your help ...I sent the tracked objects to the draw_box it is working fine. I need some help with tracking also it is not doing the the re-identification properly I am loosing the track of bbox(human)..can you suggest something ? In the video I have some fast moving individuals when there is occlusion among them sometimes it looses the track..
Hi @Pranav-India, sorry for the late response
Occlusions are a common tracking problem and can't be hard to fix. Norfair by default only uses spatial features so I'd first try to mitigate the problems with that:
hit_counter_max
and initialization_delay
if needed. They control how long the objects live after the detection is lost and how long it takes for objects to start after you recover them.distance_threshold
If you encounter any problems with those points feel free to reach out we can also give you some suggestions if you share the original video with us.
The steps above just mitigate the issues, in order to properly fix the problem you need to add visual features to the mix, we are working on a better demo and a more detailed guide to ReID, in the meantime we only have this simple demo. You will need a model that can give you proper embedding of your objects.
I'm going to close this issue as the original problem is solved, feel free to open a new one to keep discussing reid after occlusions
Describe the situation you are working on I would like to thank you for this amazing git ..I am using yolov5 model detection with the norfair tracker..
Describe what is it that you need help with In the part where we want to draw the bounding boxes ..I initially used the function draw_tracked_boxes but got the message that this function deprecated..now to use the draw_box function I am not sure how input should be given should I pass the detections of yolov5 or should I pass tracked_objects Additional context
I saw the part where an argument drawables is used it is said that this should be union of detections and tracked_objects but the detection object is this <tracker.Detection object at 0x7f7f7580c2e8> and tracked_object is Object_7(age: 7, hit_counter: 8, last_distance: 0.62, init_id: 1)
Not sure what can be done..