darkflow icon indicating copy to clipboard operation
darkflow copied to clipboard

Loss converge but test fail

Open yamiefun opened this issue 5 years ago • 4 comments

I'm training tiny yolo for one class detection. At the end of training, loss converges to about 0.7, which seems great. But when I test the trained network with some images picked from training dataset, it still detect nothing. I use the command below and I'm not sure if I load the trained weights correctly?

$ flow --model cfg/my-yolo.cfg --load -1 --imgdir images/

I've tried --threshold 0.1 but nothing is detected either. Thanks very much.

yamiefun avatar Feb 20 '20 09:02 yamiefun

Are you sure the data set you are feeding is correctly annotated?

JABBeeson avatar Feb 20 '20 11:02 JABBeeson

Yeah im quite sure. How can I print out the things that detected by yolo during training? I wonder why the training loss can be that small but still detected nothing when testing.

yamiefun avatar Feb 21 '20 18:02 yamiefun

If you are testing against images used in the dataset and it doest detect anything the issue is isolated to the learning. I have no idea what to suggest other than to follow this guide: https://medium.com/coinmonks/detecting-custom-objects-in-images-video-using-yolo-with-darkflow-1ff119fa002f On another note, have you tried training using a pre-existing cfg file to get you started? (like tiny-yolo)

JABBeeson avatar Feb 24 '20 10:02 JABBeeson

Try first overfitting your network with 3 or 5 images (until you obtain >90% of confidence in this examples (1000 epochs its sufficient)). After, you use the last ckpt and all images to train your network again.

arthurfortes avatar Feb 28 '20 23:02 arthurfortes