简体   繁体   中英

How to get the coordinates of a bounding box in YOLO?

I am trying to get the coordinates of a bounding box in YOLOv4. I followed the accepted answer provided here . But, even after editing the image.c file I can not see the BBox coordinates. What am I doing wrong?

I am running YOLO on NVIDIA Jetson Nano on Ubuntu and using the terminal to run the following command:

$ ./darknet detector demo cfg/coco.data \
                      cfg/yolov4-416.cfg \
                      yolov4.weights \
                      -c 0

i had the same problem. the problem is that answer works for dar.net pjreddie model. but i think you are using AlexeyAB model. if it is, you should edit image_opencv.cpp file in order to save your bounding box coordinates which is available in src folder. dont forget to re- make dar.net after change.

Try to add -ext_output in the end.

Just add -ext_output at the end command. See below:

/darknet detector test data/folder_name/image_data.data cfg/yolov4_test.cfg backup/yolov4_train_last.weights data/test_data/test_image.jpg -thresh 0.25 -ext_output

Using this command you will get the coordinates in the log along with detected object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM