Skip to content
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

Ways to reduce overfitting? #7059

Closed
1 task done
Sauravpandey98 opened this issue Mar 20, 2022 · 5 comments
Closed
1 task done

Ways to reduce overfitting? #7059

Sauravpandey98 opened this issue Mar 20, 2022 · 5 comments
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@Sauravpandey98
Copy link

Sauravpandey98 commented Mar 20, 2022

Search before asking

Question

Hello to all.I am working on project to detect warehouse boxes.So I trained a model with around 2000 images and tuned the parameters manually to get best model.After this I fine tuned my best model on a new dataset that consists of 1800 train images and around 484 validation images.Here here the stats of my dataset and training parameters:

Dataset properties:

media_images_Mosaics_0_1
media_images_Labels_0_0

Results:
Screenshot from 2022-03-20 20-31-07
Screenshot from 2022-03-20 20-30-49

So as you can see I have done most of the things as suggested by experts to reduce overfitting but still my model is overfitting very early.So I have a few questions:

  1. As you can see the mAP values and precision and recall are good but still the obj loss seemed to be high even after reducing the hyp['obj].Why this is happening?
  2. What can I do further to reduce overfitting?
  3. Lastly if there is any problem with my fine tuning strategy then please tell me?

Additional

And yes please ignore the other box labels that have no objects.It is just an error from my side(that has a long story :) ).It has no effect on training because all I want is to detect the first box label i.e 0th class.

@Sauravpandey98 Sauravpandey98 added the question Further information is requested label Mar 20, 2022
@glenn-jocher
Copy link
Member

glenn-jocher commented Mar 20, 2022

@Sauravpandey98 see Tips for Best Training Results and Hyperparameter Evolution tutorials:

YOLOv5 Tutorials

Good luck 🍀 and let us know if you have any other questions!

@Sauravpandey98
Copy link
Author

yes I have seen this and according to that I tried to apply augmentations and reduced hyp['object'] value to achieve desired result.But still it is overfitting . I cannot do hyper parameter evolution because of computation resources constrain.

@glenn-jocher
Copy link
Member

@Sauravpandey98 wel, looking at your plots your mAP@0.5 is about 99%. Not sure what type of improvement you are trying to get but I'd say focus on increasing your dataset if you don't have resources for evolution.

@Sauravpandey98
Copy link
Author

yes @glenn-jocher, sir yeah my mAP value is good.As you have said before that mAP value is affected by both regression loss and classification loss.So this mAP value may be because of very low regression loss and a mediocre classification loss. I'm saying this because as you can see from the training graphs that even after reducing the hyp['obj'], the object loss is still not so low.Basically I want to reduce this loss further to make classification good.

So,my question is how can I reduce this loss. Also I may be wrong regarding this.So,correct me if I'm wrong.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 23, 2022

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants