ifzhang / FairMOT

[IJCV-2021] FairMOT: On the Fairness of Detection and Re-Identification in Multi-Object Tracking
MIT License
3.99k stars 935 forks source link

how to draw the trajectory for every obj? #94

Open Gavin666Github opened 4 years ago

Gavin666Github commented 4 years ago

hello,I want to draw everyone's trajectory instead of the bounding box. What should I do?Thx

ifzhang commented 4 years ago

You can use the center point of the bottom side of the bounding box to represent the trajectory. Then you can keep all the trajectories in all frames and draw them.

kaiven11 commented 3 years ago

@ifzhang I found tracking_utils/visualization.py has a function called plot_trajectory , I try to use like below: online_ids_vi = vis.plot_trajectory(img0,online_tlwhs,online_targets); But report error,: File "/home/sd/object_detection/objection_track/FairMOT/src/lib/tracking_utils/visualization.py", line 62, in plot_trajectory x1, y1, w, h = tuple(map(int, tlwh)) TypeError: 'numpy.float64' object is not iterable

Pls give some advice. Thx