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

Best Number of epochs? #930

Closed
yazeedhasan97 opened this issue Sep 8, 2020 · 3 comments
Closed

Best Number of epochs? #930

yazeedhasan97 opened this issue Sep 8, 2020 · 3 comments
Labels
question Further information is requested Stale

Comments

@yazeedhasan97
Copy link

Hi,

I am training my model on a data set with 850 train image and 250 val image

the thing is, I am running the training for 30 epochs and 12 batches (that what my device can take, and take around 3 hours to finish), but still, the mAP is very low and the model poorly detects the objects I am training on

I am gathering and labeling more data for the training process in the mean time. However, I have 3 questions?

Are the number of epochs related to the amount of my training data(more data/more epochs OR less data/more epochs)?
Do low batches affect the training mAP?
What is the best number of epochs for such dataset (850 train image and 250 val)

Please find the result of my training

image

  0/29        0G   0.09966   0.01311         0    0.1128         1       480         0         0 2.492e-06 5.397e-07   0.08867  0.009083         0
  1/29        0G   0.08995   0.01455         0    0.1045         1       352         0         0  0.001459 0.0001784   0.08163  0.009477         0
  2/29        0G   0.08862    0.0123         0    0.1009         1       480         0         0 0.0005077 7.246e-05   0.09102   0.01327         0
  3/29        0G   0.08621   0.01414         0    0.1004         1       224         0         0   0.01481  0.002737   0.07515   0.01159         0
  4/29        0G   0.08282   0.01361         0   0.09644         1       416  0.003232    0.4158  0.004293   0.00105   0.08466    0.1115         0
  5/29        0G   0.08837   0.01405         0    0.1024         1       480  0.008542     0.299  0.004305 0.0006745   0.09466   0.02414         0
  6/29        0G   0.08527   0.01391         0   0.09918         1       192         0         0  0.002861 0.0005437   0.08161   0.01095         0
  7/29        0G   0.07894   0.01498         0   0.09392         1       320   0.09511   0.07904   0.03146  0.006696   0.06468   0.01462         0
  8/29        0G   0.08419   0.01331         0    0.0975         1       288         0         0   0.04485   0.01217   0.07224   0.01132         0
  9/29        0G   0.08268   0.01297         0   0.09566         1       352         0         0   0.01232  0.001863   0.07967   0.01109         0
 10/29        0G   0.08223   0.01454         0   0.09677         1       416         0         0  0.004548 0.0007495   0.07592   0.01198         0
 11/29        0G   0.07916   0.01374         0    0.0929         1       224   0.05356    0.4296   0.09908   0.01612   0.06536   0.01399         0
 12/29        0G   0.07961   0.01356         0   0.09317         1       448   0.06935     0.512    0.1334   0.02706   0.06485   0.01415         0
 13/29        0G    0.0763   0.01324         0   0.08954         1       480   0.09109   0.03093   0.02091  0.002706   0.06997   0.01173         0
 14/29        0G   0.07497   0.01359         0   0.08856         1       256         0         0   0.02358  0.003817   0.06593    0.0119         0
 15/29        0G   0.07631    0.0125         0   0.08882         1       224         0         0   0.02196   0.00485   0.07033   0.01195         0
 16/29        0G   0.07737   0.01369         0   0.09106         1       192    0.0278   0.01031    0.0353  0.006509   0.06075   0.01252         0
 17/29        0G   0.07206   0.01327         0   0.08533         1       320   0.07842    0.2027   0.05105   0.01499   0.05978     0.012         0
 18/29        0G   0.07173   0.01361         0   0.08534         1       160    0.1081   0.01031   0.06596   0.01392   0.05635   0.01201         0
 19/29        0G   0.07049   0.01415         0   0.08464         1       480    0.1251    0.4983    0.1363   0.03508    0.0612   0.01218         0
 20/29        0G   0.06933   0.01355         0   0.08288         1       320   0.02504   0.01718   0.01769  0.003571   0.05766    0.0121         0
 21/29        0G   0.07087    0.0139         0   0.08477         1       192    0.1205   0.08591    0.0683   0.01458   0.06045   0.01111         0
 22/29        0G   0.06656   0.01429         0   0.08085         1       352   0.09393     0.512    0.1206    0.0279   0.05108   0.01217         0
 23/29        0G   0.06508   0.01382         0    0.0789         1       288     0.185     0.071   0.07345   0.01645   0.05313   0.01193         0
 24/29        0G   0.06433   0.01284         0   0.07717         1       320    0.1336    0.4261    0.1446   0.02885   0.05331   0.01156         0
 25/29        0G   0.06212   0.01339         0   0.07552         1       384    0.1365    0.4948    0.1529   0.03423   0.05144   0.01112         0
 26/29        0G   0.06044   0.01307         0   0.07351         1       192    0.1658     0.488    0.1893   0.05188   0.04968   0.01078         0
 27/29        0G   0.06347   0.01157         0   0.07504         1       288    0.1123    0.5189    0.1937   0.03736   0.05165    0.0116         0
 28/29        0G    0.0614   0.01307         0   0.07447         1       320    0.2084     0.299    0.1484    0.0376    0.0501   0.01064         0
 29/29        0G   0.05834   0.01317         0    0.0715         1       256    0.1034    0.4124   0.08006   0.02031   0.04898   0.01197         0
@yazeedhasan97 yazeedhasan97 added the question Further information is requested label Sep 8, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2020

Hello @yazeedhasan97, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, 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 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:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

@glenn-jocher
Copy link
Member

glenn-jocher commented Sep 8, 2020

Get yourself a GPU, train to 300 epochs. We offer a wealth of free GPU environments, not sure why you would opt to train on CPU...

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2020

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.

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
Projects
None yet
Development

No branches or pull requests

2 participants