-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Train my own dataset #1035
Comments
@rimu123 use the default hyperparameters and settings. Follow the tutorial: https://docs.ultralytics.com/yolov5/tutorials/train_custom_data weights have their own parameter group to which weight decay is applied, biases start from a high LR while all else starts from a low LR. This is part of our training strategy. |
Thank you for your reply! I get it. |
@rimu123 yes evolving does take a lot of time unfortunately. Can you post your results.png and test_batch0.png? |
@rimu123 one main difference is multi-scale training is not enabled in this repo by default. It typically bumps mAP a few percentage points. You can enable it like this. Also for best results, I would try training from
|
@glenn-jocher I use my own model, because the input aspect ratio is different, so multi-scale can not be used in training. In darknet, using multi-scale will drop 1,2 points. In addition, data augmentation does not work in my dataset. This picture shows my latest training results using your code. It can be concluded that the total loss has been declining, but the recall and accuracy are showing a downward trend, the same as [email protected] and F1. Does this mean overfitting? Thank you! |
This is a strange result, but yes, when the validation losses increase this indicates overtraining. |
It may be that the learning rate is too high because this is a fine-tuning. In addition, the effect of batchsize on the results will be great. Wait for me to adjust some hidden parameters and share the results with you. |
@rimu123 ok! If in doubt just use the default parameters. This is how we reproduce our results on COCO: |
@glenn-jocher There are two confusions. The first is that the total loss should be shocked. Why is loss always declining slowly in your code? The second is how to get 6300 in utils.py? |
@rimu123 this section of the code is not used in practice, since |
This issue is stale because it has been open 30 days with no activity. Remove Stale label or comment or this will be closed in 5 days. |
Thank you for your work. If I want to train my own dataset, can you give some advice? Because I found that your Hyperparameters are all tuned out through a lot of experiments. should I use your Hyperparameters directly or find my own Hyperparameters . Thank. By the way, why does Conv2d.weight, bias, and bn have different learning strategies?
Looking forward to your reply!
The text was updated successfully, but these errors were encountered: