pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.75k stars 21.33k forks source link

Boundary Boxes not found on prediction.jpg images (YOLOv3) #1951

Open MicahImani opened 4 years ago

MicahImani commented 4 years ago

Hi,

I'm new working with YOLO. I have compiled a dataset of 500 images of people. I have a file named OD that is found inside my darknet folder with the following files inside: Annotation- xml files JPEGImages- Images as well as txt files in here labels- txt files Test- person_path_val.txt & val.txt files Train-person_path_train.txt & train.txt files voc.data file voc.names file yolo-voc_final.weightss yolov3-voc.cfg file

This is the command I use to train: ./darknet detector train ./OD/voc.data ./OD/yolov3-voc.cfg ./OD/yolo-voc_final.weights ./OD/JPEGImages Ouput: Loading weights from ./OD/yolo-voc_final.weights...Done! Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005 Saving weights to backup/yolov3-voc_final.weights Cannot load image "/Users/micahimanihall/darknet/OD/JPEGImages/0365.jpeg" STB Reason: can't fopen This is the command used for testing: ./darknet detector test ./OD/voc.data ./OD/yolov3-voc.cfg ./OD/yolo-voc_final.weights ./OD/JPEGImages/0270.jpeg Output: Loading weights from ./OD/yolo-voc_final.weights...Done! ./OD/JPEGImages/0270.jpeg: Predicted in 16.414372 seconds.

This is the trained/outputted image:

predictions

It doesn't have any boundary boxes drawn on it although the prediction has been made there is no percentage of accuracy shown either. Does anybody know how I could fix this?

GeneralCuster commented 4 years ago

I had lots of issues trying to use the detector built into YOLO as well. I've had much better luck getting bounding boxes from a model using opencv + python to run the detections.

This is the tutorial I followed (you can use his python detection script also) that helped me to finally get detections from my model: https://www.learnopencv.com/training-yolov3-deep-learning-based-custom-object-detector/

Here also is a direct link to the github account the article tries to make you sign up to a mailing list to get: https://github.com/spmallick/learnopencv/tree/master/YOLOv3-Training-Snowman-Detector