-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
I want to get the original coordinates of detected objects. Firstly, I used the command below.
./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/images/test4.png -save_labels -dont_show -ext_outputAnd I got a .txt file in the same directory with source image in data/images/test4.png named data/images/test4.txt, and it looks like below.

But I want original coordinates of the objects (the pixel coordinates, before scaled), so I change the source code of writing function called save_annotations and convert2relative in darknet_images.py, showing as below.

Then, I saved the code file and ran make clean and make -j commands in terminal. After these, I delete data/images/test4.txt and ran the command below again.
./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/images/test4.png -save_labels -dont_show -ext_outputBut I got the same result as I changed the code before. How can I make my changes work so that I can get original coordinates of the detected objects?
Appreciate any attempts and answers!