AlexeyAB / darknet

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

Could't open YOLOv3 custom trained file #2619

Open amar-mustaqim opened 5 years ago

amar-mustaqim commented 5 years ago

I've done training YOLO v3 of my own dataset(9000 images of 3 different classes). But when i try to run the detection, this error appeared. Any suggestion? testing error

ghost commented 5 years ago

@amar-mustaqim What command did you enter ?

It looks like the weights' path is wrong.

amar-mustaqim commented 5 years ago

darknet.exe detector test data/obj.data yolo-obj.cfg yolo-obj_last.weights. I stop the training after 6000 iterations.

ghost commented 5 years ago

U need an image path after that darknet.exe detector test data/obj.data yolo-obj.cfg yolo-obj_last.weights image.jpg

check yolo-obj_last.weights path try with yolo-obj_6000.weights path

amar-mustaqim commented 5 years ago

Actually both yolo-obj_last.weights and yolo-obj_6000.weights are at the same path which is in x64/backup. I understand about the image path, but what if I want to run the detection through the webcam?

ghost commented 5 years ago

darknet.exe detector demo data/obj.data yolo-obj.cfg x64/backup/yolo-obj_last.weights 0

for webcam it's demo command and you need opencv compiled You have to enter the exact path for .data .cfg .weights files 0 is for webcam

amar-mustaqim commented 5 years ago

Thank you so much for your help mate! Will figure it out 😄

amar-mustaqim commented 5 years ago

I try to run this command:

darknet.exe detector demo data/obj.data yolo-obj.cfg backup/yolo-obj_last.weights 0

and this error appear.
webcam detection stream close

vaishnavm217 commented 5 years ago

darknet.exe detector demo data/obj.data yolo-obj.cfg backup/yolo-obj_last.weights 0

Correct command is darknet.exe detector demo data/obj.data yolo-obj.cfg backup/yolo-obj_last.weights -c 0

General structure of commands are darknet.exe <function1> <function2> <data path> <cfg path> <weights path> <rest of things (image, camera,-show etc)>

amar-mustaqim commented 5 years ago

Thank you so much! It works!

AlexeyAB commented 5 years ago

@amar-mustaqim Read more: https://github.com/AlexeyAB/darknet#how-to-use-on-the-command-line