experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 784 forks source link

Whether need to set the backend model parameters as untrainable? #287

Open lychenpan opened 6 years ago

lychenpan commented 6 years ago

I'm trying to reproduce the training process as readme.md on kangaroo datasets. I changed the init function of backend.py to read parameters directly from a yolov2.weights(because the downloaded link of pretrained model is unvisited. And proxysite.com does work either). And change the backend layers as untrainable. Then training the model on both kangaroo and raccoon datasets, the messages say that the average recall will decrease to zero after about 10 epochs. However, when I change the backend layers as trainable, the average recall will decrease to around 30%.
So, question 1, when to choose train from scratch and when to choose fine-tune? question2, when train from scratch, what is the proper training data amount? The model has more than 50M parameters, just about 100 training(both kangaroo and raccoon) images will be enough? Will the low image amount result in overfit? @experiencor Thanks so much!

leadcain84 commented 6 years ago

yolov2.weight is uploaded. refer to https://1drv.ms/f/s!ApLdDEW3ut5fec2OzK4S4RpT-SU

lychenpan commented 6 years ago

@leadcain84 Thanks for your comment. Actually, when I visited the link via browser, it will dislay "Sorry something goes wrong", so i can't download the file. I downloaded the yolov2.weights from yolo official website. So I think it may not be the problem of weights.

rodrigo2019 commented 6 years ago

pre trained weights is now avaliable here

lychenpan commented 6 years ago

@rodrigo2019 Thanks for your comment and work.