-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
calculate size of dataset after augmentation #10137
Comments
👋 Hello! Thanks for asking about image augmentation. YOLOv5 🚀 applies online imagespace and colorspace augmentations in the trainloader (but not the val_loader) to present a new and unique augmented Mosaic (original image + 3 random images) each time an image is loaded for training. Images are never presented twice in the same way. Augmentation HyperparametersThe hyperparameters used to define these augmentations are in your hyperparameter file (default
yolov5/data/hyps/hyp.scratch-low.yaml Lines 6 to 34 in b94b59e
Augmentation PreviewsYou can view the effect of your augmentation policy in your train_batch*.jpg images once training starts. These images will be in your train logging directory, typically
YOLOv5 Albumentations IntegrationYOLOv5 🚀 is now fully integrated with Albumentations, a popular open-source image augmentation package. Now you can train the world's best Vision AI models even better with custom Albumentations 😃! PR #3882 implements this integration, which will automatically apply Albumentations transforms during YOLOv5 training if Example Good luck 🍀 and let us know if you have any other questions! |
@glenn-jocher Can you please explain why the training time of yolov5 with the default augmentation is the same with no augmentation as I know increasing the size of the dataset will increase training time while using external augmentations increases the training time |
@myasser63 dataset size stays the same. No new images are saved, only new views are passed by the trainloader. |
@glenn-jocher thanks for your help. If I want to make the augmentation to generate more images with the default augmentation where I should do this changes. |
@glenn-jocher what if we want to include the original and the augmented samples in the dataset? |
@hissaanscorecarts might work, try it out. But remember to compare apples to apples if you double your dataset size you'd have to compare to training twice as many epochs with the same dataset size. |
👋 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 ⭐! |
@glenn-jocher May you elaborate more?. Do you mean to train the doubled dataset twice as many epoch of the original dataset? |
@myasser63 yes, that's correct. If you double your dataset size, you should ideally train for twice as many epochs to accurately compare the performance to training with the original dataset size. This helps ensure a fair evaluation of the impact of the augmented dataset. |
@glenn-jocher Why is data augmentation considered an artificial increase in the dataset? We should know how much has increased and how the undersampled dataset gets balanced. |
Search before asking
Question
How can I know the number of the dataset after the default augmentation in
hyp.yaml
?also why the training time of yolov5 with the default augmentation is the same with no augmentation as I know increasing the size of the dataset will increase training time while using external augmentations increases the training time
Additional
No response
The text was updated successfully, but these errors were encountered: