Skip to content

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

Merged
glenn-jocher merged 1 commit intoultralytics:masterfrom
kimnamu:fix/mosaic_augmentation
Sep 14, 2021
Merged

Shuffle all 4(or 9) images in mosaic augmentation#4787
glenn-jocher merged 1 commit intoultralytics:masterfrom
kimnamu:fix/mosaic_augmentation

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