pjreddie / darknet

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

YOLOv1 is doesn't work #179

Open choasup opened 6 years ago

choasup commented 6 years ago

Not only train but also test ~ 1../darknet yolo test cfg/yolov1/yolo.cfg yolov1.weights data/dog.jpg no detection results. 2../darknet yolo train cfg/yolov1/yolo.train.cfg extraction.conv.weights loss is nan or 0.

Maybe weights file is not right? Where can I find right weights?

choasup commented 6 years ago

CUDNN is really magical...but yolov1 has not solved. Loading weights from weights/darknet19_224.conv.23...Done! Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005 Loaded: 2.532400 seconds Detection Avg IOU: 0.000000, Pos Cat: 0.000000, All Cat: 0.000000, Pos Obj: 0.000000, Any Obj: 0.000000, count: 41 Detection Avg IOU: 0.000000, Pos Cat: 0.000000, All Cat: 0.000000, Pos Obj: 0.000000, Any Obj: 0.000000, count: 34 Detection Avg IOU: 0.000000, Pos Cat: 0.000000, All Cat: 0.000000, Pos Obj: 0.000000, Any Obj: 0.000000, count: 46 Detection Avg IOU: 0.000000, Pos Cat: 0.000000, All Cat: 0.000000, Pos Obj: 0.000000, Any Obj: 0.000000, count: 29 1: 89.998825, 89.998825 avg, 0.001000 rate, 9.888660 seconds, 64 images

sivagnanamn commented 6 years ago

I'm also facing similar issue. Unable to train YOLO V1 with the latest source code.

According to #360 , Nov 22,2016 commit works for training YOLO V1.

sivagnanamn commented 6 years ago

@pjreddie @AlexeyAB Could you please help regaring this? IOU, Objectness etc are always 0 when training YOLO V1 with the latest code.

Detection Avg IOU: 0.000000, Pos Cat: 0.000000, All Cat: 0.000000, Pos Obj: 0.000000, Any Obj: 0.000000, count: 41
Detection Avg IOU: 0.000000, Pos Cat: 0.000000, All Cat: 0.000000, Pos Obj: 0.000000, Any Obj: 0.000000, count: 46

However training with an older commit (c71bff69eaf1e458850ab78a32db8aa25fee17dc) & the same data works fine.

sivagnanamn commented 6 years ago

@choasUp Check PR#422 for the fix.

yjcn commented 6 years ago

@sivagnanamn Have you tested it? I have a trained YOLOv1 network and I want to use it on the latest darknet.

sivagnanamn commented 6 years ago

@yjcn I just did a sanity test by training a Tiny YOLO V1 model for few iterations. From the training logs, it seemed to work properly.

yjcn commented 6 years ago

@sivagnanamn I just have tested it. My YOLO1 network still can't work. The network's output is still incorrect. You can look the difference in https://github.com/pjreddie/darknet/issues/432 .

Ratnadeep22 commented 6 years ago

Has anyone got the solution on getting zero's everywhere?

creotiv commented 4 years ago

it's because of negative data passed to the loss function. is add sigmoid on the end, Nan will be fixed