Not just single images test
I command like
./darknet detector test ./build/darknet/x64/data/obj.data ./cfg/yolo-obj.cfg /home/workplace/darknet-master/build/darknet/x64/data/backup/yolo-obj_best.weights -ext_output /home/workplace/darknet-master/build/darknet/x64/data/test.txt -dont_show
and
Cannot load image /home/workplace/darknet-master/build/darknet/x64/data/test.txt
so hard to finish a easy step...
Update
I can enter single image one by one using "Enter Image Path"
Can I input a dir including all the imgs need to be test instead of input single imgs every time?
https://github.com/AlexeyAB/darknet#how-to-use-on-the-command-line
To process a list of images data/train.txt and save results of detection to result.json file use: darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -ext_output -dont_show -out result.json < data/train.txt
To process a list of images data/train.txt and save results of detection to result.txt use:
darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -dont_show -ext_output < data/train.txt > result.txt
Pseudo-lableing - to process a list of images data/new_train.txt and save results of detection in Yolo training format for each image as label.txt (in this way you can increase the amount of training data) use: darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -thresh 0.25 -dont_show -save_labels < data/new_train.txt
@AlexeyAB Hi, in the both mentioned methods, we are getting json and txt file. Is there a way for us to save the test images detection at once ?
@AlexeyAB Hi, in the both mentioned methods, we are getting json and txt file. Is there a way for us to save the test images detection at once ?
That鈥檚 exactly what I was talking about
I modified the code in void test detector function, it works now
@Stephenfang51 Hi, can you share the changes you made to
save_image(im, "predictions");
line. I want to save with file name. It is replacing the same image.
I modified the code in
void test detectorfunction, it works now
Hi, friend! Sorry to bother you..
I got a problem when testing on my list of validation images which says: "cannot load image: ...".
What's weird is that these images can be loaded to calculate map when training and I can also test on single image exactly in the same image path saved in the val.txt. Only testing on list of images failed, did you got the same problem and how did you solve it?
Sorry for bothering again and really appreciate your precious help!
Issue is solved: https://github.com/AlexeyAB/darknet/issues/5623#issuecomment-629316643