ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
51.2k stars 16.43k forks source link

What about a fake training model? #8531

Closed sezer-muhammed closed 2 years ago

sezer-muhammed commented 2 years ago

Search before asking

Description

The idea is to control the dataset. I control dataset with other programs but sometimes I need to see how yolov5 feeds the model. So I train yolov5n.pt model to see batches. I also increased the exported batch images number in the code, but this will change when I do git pull. Sı I cannot update repo.

If we add a fake training that prints all batches for 1 epoch, I can control dataset, I do not need to change code, I can pull the current version of repo, I can use yolov5 from pip (its harder to change code pip installed libraries and not a good way since its easy to forget and it may not be applicable to all python codes that uses that library)

Use case

I have a dataset and need to check if its good in training These what I need to check

Then we control all images, without changing anything in yolov5 code then train the real model.

Additional

No response

Are you willing to submit a PR?

glenn-jocher commented 2 years ago

@sezer-muhammed 👋 Hello! Thanks for asking about improving YOLOv5 🚀 training results. I don't understand your question completely but it seems you are asking about best augmentation settings for training.

Most of the time good results can be obtained with no changes to the models or training settings, provided your dataset is sufficiently large and well labelled. If at first you don't get good results, there are steps you might be able to take to improve, but we always recommend users first train with all default settings before considering any changes. This helps establish a performance baseline and spot areas for improvement.

If you have questions about your training results we recommend you provide the maximum amount of information possible if you expect a helpful response, including results plots (train losses, val losses, P, R, mAP), PR curve, confusion matrix, training mosaics, test results and dataset statistics images such as labels.png. All of these are located in your project/name directory, typically yolov5/runs/train/exp.

We've put together a full guide for users looking to get the best results on their YOLOv5 trainings below.

Dataset

COCO Analysis

Model Selection

Larger models like YOLOv5x and YOLOv5x6 will produce better results in nearly all cases, but have more parameters, require more CUDA memory to train, and are slower to run. For mobile deployments we recommend YOLOv5s/m, for cloud deployments we recommend YOLOv5l/x. See our README table for a full comparison of all models.

YOLOv5 Models

Training Settings

Before modifying anything, first train with default settings to establish a performance baseline. A full list of train.py settings can be found in the train.py argparser.

Further Reading

If you'd like to know more a good place to start is Karpathy's 'Recipe for Training Neural Networks', which has great ideas for training that apply broadly across all ML domains: http://karpathy.github.io/2019/04/25/recipe/

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

sezer-muhammed commented 2 years ago

Hi thanks for answer. I could not express my idea. I just want to see all train batches in exp/train folder to see training images without training. If there is a option that produces and saves train batches I can understand model better.

glenn-jocher commented 2 years ago

@sezer-muhammed first 3 train batches are automatically displayed in this directory

sezer-muhammed commented 2 years ago

Yes, I made it first 150 but I need all of them, and If I make it 150 I cannot git pull since it will be zeroed.

It just my idea but seems nobody needed it so no problem :D

glenn-jocher commented 2 years ago

@sezer-muhammed you can change 3 here to any number you want: https://github.com/ultralytics/yolov5/blob/526e650553819dbff67897b9c752c4072e989823/utils/loggers/__init__.py#L109-L111

github-actions[bot] commented 2 years ago

👋 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 ⭐!