ultralytics/yolov5

Saving Augmented Images

Opened this issue · 2 comments

Search before asking

Question

Hello friends,
"As you know, data augmentation methods lead to a slower training process. Therefore, I have decided to perform augmentation methods once and save the new images. Then, for another training process, I will only use these new images and will not use augmentation methods in the training process. In the getitem method of the LoadImagesAndLabels class, I saved the images and their corresponding labels. To achieve this, I used one epoch with a batch size of one to perform these methods for each image. After the process was finished, I checked the images and labels, and everything is fine. However, the problem is that I can't achieve the same accuracy as before with this new dataset (augmented method)."

Additional

No response

Hello!

It sounds like you've implemented a smart strategy for handling data augmentations! However, when you pre-generate and save augmented images as static datasets, there could be a loss in the variability and randomness that on-the-fly augmentations provide during training, potentially impacting the model's ability to generalize well.

It's important to ensure that your static dataset has sufficient diversity and coverage of possible variations. Consider also integrating a mix of augmented and original images in your training batches to maintain some level of randomness.

If accuracy continues to be an issue, reviewing the types of augmentations and their parameters might help. Sometimes, excessive or improperly tuned augmentations can distort the learning process rather than aiding it.

Keep up the experimentation! 🚀

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

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 YOLO 🚀 and Vision AI ⭐