-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
Did anyone train without mosaic augmentation ? #55
Comments
training@15 epoch: loss = 0.1544, mAP@0.5=0.267, mAP=0.1412. mAP far lower than mosaic training at same epoch |
@Libaishun you can use the --rect argument to force rectangular training, which will skip the mosaic dataloader, but still use all of the augmentation hyperparamaters.:
|
@glenn-jocher yeah, the problem is: training for same epochs, the mAP of rectangular training is much lower than mosaic training. |
Does this mean the mosaic augmentation trick is the key for yolov5 models to achive such high mAP on COCO? |
Mosaic is very important for COCO because it helps the model learn to not overemphasize activations for large objects (addressing the well known small object problem in COCO). I'm glad you raised this issue because mosaic can really hurt custom datasets where you only have small objects to learn from. For example in an aerial dataset, one might tile images in preprocessing to get closer to the objects. You don't want mosaic there because it will zoom you back out. |
Thank you! I learned a lot from your answer~ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I feel like this very important issue was raised a long time ago but it hasn't been properly adressed. I also noticed a big drop in performance by removing mosaic augmentation.
My dataset falls in the quoted category of small objects so it's a bit counter-intuitive how excluding mosaic can lead to worse results.. |
@kalfasyan thank you for sharing your insights! The impact of mosaic augmentation can vary greatly depending on the dataset characteristics. Mosaic is indeed essential for addressing certain challenges in COCO, however, as you've observed, it can have different effects on custom datasets, particularly those with predominantly small objects. Your experience highlights the intricate interplay between augmentation strategies and dataset specifics, and I appreciate your contribution to the discussion! |
I tried training yolov5s without mosaic augmentation, the training time per epoch halved, I guess the mosaic process in dataloader take up time.
Compare to training with mosaic augmentation, I found the loss is much lower while mAP is worse, I have not trained to 300 epochs to see the final result, but I guess mosaic augmentation will make training converge fast and better?
The text was updated successfully, but these errors were encountered: