david8862 / keras-YOLOv3-model-set

end-to-end YOLOv4/v3/v2 object detection pipeline, implemented on tf.keras with different technologies
MIT License
636 stars 220 forks source link

Tips & trick for training 'tiny_yolo3_darknet', 'yolo3_darknet', 'yolo4_darknet' #79

Open mvanlierBCG opened 4 years ago

mvanlierBCG commented 4 years ago

So for 'yolo3_darknet', 'yolo4_darknet' I have downloaded and converted with your tool the backbone weights: darknet53.conv.74.weights and csdarknet53-omega_final.weights. But there also exists yolov3.weights andyolov4.weights.

I want to train the yolov3 and yolov4 models on a custom dataset with only one class. What would you suggest in that case:

Do you have further any tips for training models on a dataset with one class?

And what would you suggest for 'tiny_yolo3_darknet', since there are no backbone weights for that model?

david8862 commented 4 years ago

@mvanlierBCG If training from scratch (and having a suitable scale dataset), the standard way is loading Imagenet pretrained backbone and freeze the backbone part for several epochs (transfer stage) for basic convergence of the head part, and then free the whole network for forther fine tune. But from my experience on the darknet families, seems the .weights converted backbone weights are not well pretrained on Imagenet and may not fit for this process. I'm still not quite sure about the root cause and may try to retrain them by myself later. The COCO pretrained .weights for detection model could also be considered for preloading, but that may need more trick & experiments to transfer to custom datasets.

For tiny_yolo3_darknet, you can refer #78

mvanlierBCG commented 4 years ago

@david8862 Thanks for your comment on this. Is there any difference between those two approaches:

Which one would you recommend, and why?

david8862 commented 4 years ago

@mvanlierBCG