-1

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
desertnaut
  • 57,590
  • 26
  • 140
  • 166

3 Answers3

2

i had the same problem. the problem is that answer works for darknet 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 darknet after change.

Amir Karami
  • 181
  • 7
0

Try to add -ext_output in the end.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
0

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.

Constantine
  • 650
  • 9
  • 15