thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

No bounding boxes #1048

Open pdhruv93 opened 5 years ago

pdhruv93 commented 5 years ago

I am creating a custom object detector for Road crack detection. The loss significantly decreases after 600 epochs. But still after that I see no bounding box on my images. Even if I use the same input image for testing, still it does not draw any bounding box. Any idea what is the issue and I have seen same issue reported multiple times: https://stackoverflow.com/questions/55830479/no-bounding-box-after-custom-traning-yolov3-model

Here is my Google colab notebook: https://colab.research.google.com/drive/16nhjP0MNIRUZv0SCGV4UsQzwEPRIn-iF#scrollTo=a7qhTxIyKdRQ

mpky commented 5 years ago

@pdhruv93 I'd recommend training till the loss gets down to around 1.5 and then setting the threshold quite low on the first detection attempt

kmarrip commented 5 years ago

@pdhruv93 loss is around 1.5 in your dataset, try getting it around 0.5.

guias12 commented 5 years ago

How many images do you have on your dataset? I was facing the same issue the solution was to train again with more images. First time I trained with about 300 images, on the second time(when everything worked fine) I used ~1200 for each class

kmarrip commented 5 years ago

@guias12 have the model train on 3-5 imags first, overfit the model on these images, if the loss is around 0.5 then the learning rate is ok for the dataset, if it doesnt overfit then try chaning your learning rate. if the loss is indeed around 0.5 then try retraining the model, atleast 500 uniform images for each class is good enough for the model