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

Shuffle all 4(or 9) images in mosaic augmentation #4787

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

kimnamu
Copy link
Contributor

@kimnamu kimnamu commented Sep 14, 2021

Thank you for sharing nice open-source codes 👍

This PR is. for shuffling the order of all 4(or 9) images in mosaic augmentation

Currently, the order of images in mosaic augmentation is not completely random.
The remaining images except the first are randomly arranged. Apply shuffle all to increase the diversity of data composition.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced image indexing for data augmentation in YOLOv5 🖼️✨

📊 Key Changes

  • Added random.shuffle(indices) in the load_mosaic and load_mosaic9 methods.

🎯 Purpose & Impact

  • Purpose: To introduce more randomness in selecting images for mosaic data augmentation, which stitches together multiple images to create a new training sample.
  • Impact: This change likely leads to better model generalization due to increased variability in training data, potentially improving the performance of YOLOv5 object detection models. 🚀

Thank you for sharing nice open-source codes 👍

I applied to shuffle the order of all 4(or 9) images in mosaic augmentation

Currently, the order of images in mosaic augmentation is not completely random.
The remaining images except the first are randomly arranged. Apply shuffle all to increase the diversity of data composition.
@glenn-jocher glenn-jocher changed the title Shuffle the order of all 4(or 9) images in mosaic augmentation Shuffle all 4(or 9) images in mosaic augmentation Sep 14, 2021
@glenn-jocher
Copy link
Member

@kimnamu great idea! This will add a bit more randomness to the augmentation.

@glenn-jocher glenn-jocher merged commit fcb225c into ultralytics:master Sep 14, 2021
@glenn-jocher
Copy link
Member

@kimnamu PR is merged. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐

CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
Thank you for sharing nice open-source codes 👍

I applied to shuffle the order of all 4(or 9) images in mosaic augmentation

Currently, the order of images in mosaic augmentation is not completely random.
The remaining images except the first are randomly arranged. Apply shuffle all to increase the diversity of data composition.
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Thank you for sharing nice open-source codes 👍

I applied to shuffle the order of all 4(or 9) images in mosaic augmentation

Currently, the order of images in mosaic augmentation is not completely random.
The remaining images except the first are randomly arranged. Apply shuffle all to increase the diversity of data composition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants