Hello everyone, this is the first time I'm training YOLO. Currently I'm training YOLOv2 and at the same time while it is being trained, I test with backed up weights. When I run the test as:
./darkent detector test *.data *.cfg backup/*.weights *.jpg
I get Cannot load image "data/labels/*.png" error for all the files in data/labels/png. After the program finishes running, it outputs its predictions on the stdout, it draws predicted bounding boxes on the picture, but writes no labels on these boxes. I explicitly stated the full directory of *.names file in my *.data file, so why does YOLO look for data/labels directory for labels? What am I missing?
Here you can see the situation better:

(Currently it's not important whether it predicts correctly, I'm just interested in why no labels is shown on the image while something is predicted and bbox'ed.)
me too
In the folder data/labels/are pictures of characters of the alphabet. YOLO uses them to draw the label in the picture. Probably you have deleted that folder, so Yolo can't find them and your label gets black in the picture.
You can change the path of the directory, where the pictures of the characters are loacted. In src/image.c in function load_alphabet(), sprintf(buff, "data/labels/%d_%d.png", i, j);. In this case you need to rebuild darknet using make.
Issue can also appear if you are trying to run the command not from the intended folder, e.g.:
./darknet/darknet detector test darknet/cfg/obj.data cfg/yolo-obj.cfg darknet/temp_models/yolo-obj_final.weights scan_classifier/Training_scan/4-28.png
Make sure you use something like this:
./darknet detector test cfg/obj.data cfg/yolo-obj.cfg temp_models/yolo-obj_final.weights ../scan_classifier/Training_scan/4-28.png
Probably you're using docker and your WORKDIR is wrong. You have to run the command from where darknet is.
Most helpful comment
Issue can also appear if you are trying to run the command not from the intended folder, e.g.:
./darknet/darknet detector test darknet/cfg/obj.data cfg/yolo-obj.cfg darknet/temp_models/yolo-obj_final.weights scan_classifier/Training_scan/4-28.pngMake sure you use something like this:
./darknet detector test cfg/obj.data cfg/yolo-obj.cfg temp_models/yolo-obj_final.weights ../scan_classifier/Training_scan/4-28.png