theAIGuysCode / yolov4-deepsort

Object tracking implemented with YOLOv4, DeepSort, and TensorFlow.
GNU General Public License v3.0
1.33k stars 750 forks source link

Get the Bbox and ID dictionary lists #42

Open vishalk2999 opened 3 years ago

vishalk2999 commented 3 years ago

I am working with yolo for the first time and I would like to know if there is way in which I can get the coordinates of the identified objects with their class ID as a list or a Dictionary rather than a continuous stream of text.

Dishant-P commented 3 years ago

Well, for that you will need to append the detections into the dictionary on every single frame.

ghauffrane commented 3 years ago

If you will run detector demo on a video input, you can add at the end of the command this: > filename.txt this way the display of your detected objects will be stored there. Afterwords, you can make a function or script that properly extracts detections all along their information into a json file. But, if you will run detector test on a number of images you can add -out filename.json or filename.txt Check this in the darknet repo. You will find all this info explained.