Closed Tzoulio closed 3 years ago
π Hello @Tzoulio, thank you for your interest in YOLOv5 π! Please visit our βοΈ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.
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 training β Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
For business inquiries or professional support requests please visit https://ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.
Python>=3.6.0 with all requirements.txt installed including PyTorch>=1.7. To get started:
$ git clone https://github.com/ultralytics/yolov5
$ cd yolov5
$ pip install -r requirements.txt
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
@Tzoulio your dataset should include data for all classes you expect to detect during deployment.
@Tzoulio your dataset should include data for all classes you expect to detect during deployment.
Don't the pretrained weights already have that "knoweledge"? I thought that was the point of using them besides training time.
If I make a prediction using the yolov5s weights they can detect a person fine. However, when using the weights that come from trainining yolov5s I cannot detect the same picture of the person. Is it a case of the pretrained weights updating maybe? Should I freeze them so they stay the same? I am only guessing trying to provide as much info as possible thanks in advance..
@Tzoulio your assumptions about how ML works is not correct. If you train on new classes your old classes are not retained.
You either have your cake or eat it, but not both.
So if I train a model using pretrained weights that know an "x" number of classes and I want to add one more class to that list, my dataset should have images of all the previous classes plus the new one?
@Tzoulio yes, your dataset should include data for all classes you expect to detect during deployment.
You can train on multiple datasets simultaneously, though you need to ensure your classes do not intersect among your datasets. If you want to train COCO + custom, then start labelling your custom data from class 80 onward, and then group them in your data.yaml. See GlobalWheat yaml for an idea:
Thank you for the clarification. One last question, if I want to train on coco+custom besides adding the data labels from class 80 onward, do I have to use the coco dataset together with mine?
@Tzoulio yes
Thank you for replying and helping me out. Do you have any reading material to fix my incorrect ML knowledge?
@Tzoulio hey buddy, I would just start from the Train Custom Data tutorial, and then once you get good results there with COCO128, move on to your custom dataset by itself (see Tips for Best Training Results). Once you've got good results there you might wander to more advanced topics like mixing datasets etc.
π 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 β!
βAfter training on the yolov5s weights i can detect my custom classes fine but i am unable to detect the pretrained ones.
I created a data.yaml file in which i included my custom classes plus i left some classes like person or dinning table which the pretrained weights already knew. The dataset im using has no people or dinning table images in it I thought i didnt need to have any maybe i was wrong? Aren't the yolov5s weights trained on the coco dataset?