New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Training very small custom data in yolov5, load pre-trained weight and freeze some layers? #49
Comments
Hello @JunFang-NWPU, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments. If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
For more information please visit https://www.ultralytics.com. |
@JunFang-NWPU for training very small datasets, my number one recommendation is to not train, and instead collect more training data. The chances of your results generalizing well are not good. If you want to continue training with a small dataset, then simply start from pretrained weights and train normally. --adam sometimes helps smaller datasets as well, though it generally benefits from a smaller learning rate than SGD, so if you use it I would reduce your
I always advise against freezing any layers. I've made this point many times before in ultralytics/yolov3, and the same applies here. If you still want to freeze layers, you can simply set the |
OK, Thanks. I will give a try. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi,
If I have only a very small dataset, e.g., server hundred images for about ten classes. As suggested, i) I need to train my own data from the pre-trained weight, and ii) maybe I need to freeze some layers, for instance , the backbone, and only modify weight of other layers.
My questions are:
i) Are the above two methods are the best strategies to deal with training very small dataset?
ii) How to freeze some layers of the yolov5?
Thanks.
The text was updated successfully, but these errors were encountered: