Yolov5 - Different result from saved augmentation data and use 'augment' = True

username: Dreamer179
cooked: <p>Hi there,<br>
When I train yolov5 pytorch on my custom dataset, I tried an experiment.</p>
<p>Ep1: Firstly, I train my dataset (folder Dataset1) with args ‘agment’ = True. Then I save all image augmentation and label files when it create_dataLoader to Dataset2 folder (with train/val split like Dataset1).</p>
<p>Ep2: Next, I trained model with this augmentation dataset (Dataset2) and set up ‘augment’=False.</p>
<p>This problem is, the Ep1 (training with ‘augment’ = True) got the better results than Ep2 which new augment data I saved. I get map@.5 = 0.978 on Ep1 and map@.5=0.685 on Ep2 .I don’t know why results are different, whereas I checked results between two approaches many times.<br>
Below is result I training Dataset2.<br>
Thanks a lot &lt;3</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/3/f3849cb5e8a437ff28f5eafd7c7558e07e6a41b0.png" data-download-href="https://discuss.pytorch.org/uploads/default/f3849cb5e8a437ff28f5eafd7c7558e07e6a41b0" title="results"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/3/f3849cb5e8a437ff28f5eafd7c7558e07e6a41b0_2_690x345.png" alt="results" data-base62-sha1="yKg91sEuTk6wGPKXLOEZRNVgsU0" width="690" height="345" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/3/f3849cb5e8a437ff28f5eafd7c7558e07e6a41b0_2_690x345.png, https://discuss.pytorch.org/uploads/default/optimized/3X/f/3/f3849cb5e8a437ff28f5eafd7c7558e07e6a41b0_2_1035x517.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/f/3/f3849cb5e8a437ff28f5eafd7c7558e07e6a41b0_2_1380x690.png 2x" data-dominant-color="EBECF3"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">results</span><span class="informations">2400×1200 247 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: ptrblck
cooked: <p>Based on <a href="https://github.com/ultralytics/yolov5/blob/8f875d93a258d2b8b27a19499058f755af8aec4f/utils/datasets.py#L591-L613">this usage</a> of the <code>augment</code> argument, the data and labels are augmented in each iteration and thus epoch. If you are randomly transforming the data only once and load it afterwards, you wouldn’t use any data augmentation anymore and are feeding static input to the model.</p>

username: Dreamer179
cooked: <p>Tks so much, I understood. I’m joining a competition belong to data centric. I must prepare a best dataset for yolov5 model to get the best result on map@.5.<br>
The training process limited in 100 epoch, 3000 images and not use <code>augment</code> argument. So I prepare a augmented dataset before training process. Are u have any idea to get the best result equivalent with when we use <code>augment</code> args.</p>

username: ptrblck
cooked: <p>If I understand your use case correctly, you are not allowed to use data augmentation during the training, but would like to achieve a similar performance with a static dataset?<br>
If so, I wouldn’t know of a good technique to act as a replacement for data augmentation. Maybe try to increase the regularization through dropout layers, weight decay etc.</p>

username: Dreamer179
cooked: <p>Yeah, that right. And I do not allowed to change the hyper parameter or structure from the original model. Any thing I can make better is prepare the best dataset.</p>