AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.67k stars 7.96k forks source link

Cannot load image "data/labels/67_2.png" #270

Open dbersan opened 6 years ago

dbersan commented 6 years ago

Trying running the dector test using

darknet.exe detector test obj/obj.data cfg/yolo-custom.cfg yolo-custom.weights data/custom_2.jpg

and it gives many messages like

Cannot load image "data/labels/67_2.png"

Which is strange because I don't have this folder set up anywhere (not this file).

I have other people getting the same error (here, here). It is probably a bug in the code, although I am not sure where to report it (in the original darknet repo or here).

AlexeyAB commented 6 years ago

Cannot load image "data/labels/67_2.png" Which is strange because I don't have this folder set up anywhere (not this file).

If you built darknet.sln in this folder https://github.com/AlexeyAB/darknet/tree/master/build/darknet then darknet.exe will be compiled and apeared in this floder https://github.com/AlexeyAB/darknet/tree/master/build/darknet/x64 - and in this folder you can see folder /data/ in which you can find data/labels/67_2.png: https://github.com/AlexeyAB/darknet/tree/master/build/darknet/x64/data/labels

AlexeyAB commented 6 years ago

@dhiegomaga Now this is fixed.

BaharTaskesen commented 6 years ago

@AlexeyAB I am receiving this error, while I am testing my built model in another hardware. The problem here is as follows, I delete the data/labels/ folder on purpose, since in rpi there is not too much allocation. Is this error important, or should I ignore it? It seems like the loading operation, also increases the computation time. Why is it trying to load labels?

AlexeyAB commented 6 years ago

@BaharTaskesen Images from this folder data/labels/ are used to show class names on the result image when you do ./darknet detector test ...

You can ignore it.

You just can change this line: https://github.com/AlexeyAB/darknet/blob/101de2b07aa2feefa74f7e73876fd5cc8fc696cf/src/detector.c#L1009 to this image **alphabet = NULL;// = load_alphabet(); then this error will not be showed.

Alireza-Pourreza commented 3 years ago

as @AlexeyAB mentioned, you should change two lines (1602 and 1771) at darknet/src/detector.c including the following code: image **alphabet = load_alphabet(); to: image **alphabet = NULL;

Also, you should run makecommand in darknet folder