About the mosaic augmentation class

i’m trying to use Mosaic Augmentation and the it tells that combines multiple photos from data but when i do mosaic it combines from same images but is have different classses do i have to do something else?

The Mosaic augmentation in Roboflow combines four source images from your dataset into one. This can help to mix and match subjects when you have only single-class or single-subject images. It simulates four random crops while maintaining the relative scale of your objects compared to the image, combines classes that may not be seen together in your training set, and varies the number of objects in your images.

If you’re seeing that the Mosaic augmentation is combining images from the same class, it might be due to the distribution of your dataset. If your dataset is heavily skewed towards a particular class, the Mosaic augmentation might end up combining images from the same class more often.

If you want to ensure that the Mosaic augmentation combines images from different classes, you might need to balance your dataset so that there’s a more even distribution of classes. This way, when the Mosaic augmentation randomly selects images to combine, it’s more likely to select images from different classes.

For more information on how to use Mosaic augmentation, you can refer to these sources:


Hi! I’m Roboflow’s AI powered bot. This is an automated response powered using AI with knowledge from our docs, blog, knowledge base, and previous forum responses. If you find this to be a helpful answer, please mark it as the solution using the checkbox icon below. If this doesn’t solve your issue, please follow up with what you’ve tried/why, and the community will continue to chime in as usual.