Skip to content

Model Training ‐ Comparison ‐ [Aspect Ratio]

Nikita K edited this page Sep 29, 2023 · 7 revisions

Models | Logs | Graphs | Configs


We will examine how the dataset images aspect ratio affects the results.


Compared values:

  • cropped images with 1:1 aspect ratio - B,

  • original images with random aspect ratio.


Loss(epoch)

If we look at the loss(epoch) graphs, we can see again that there are fewer epochs than expected. The reason here is the same as before - Buckets and Batch Size.


DLR(step)

The DLR for both GR in the case of original images is slightly lower than for cropped ones.


Loss(step)

However, the loss, on the contrary, is lower, which is strange because previously, when the DLR decreased, the loss increased.



So, the quality of the results definitely did not worsen and may have even improved. Despite this, I would still like to warn you about possible issues because a large number of image groups with different aspect ratios can negatively impact training.

Once, I tried to train a model on over 300 photos, and the training was not progressing at all, even though I obtained excellent results on the 50 photos from the same dataset. I couldn't understand what the problem was until, out of curiosity, I decided to crop all these photos to a 1:1 aspect ratio, which surprisingly solved the problem. Perhaps this issue is not as critical on small datasets, but it's still something to keep in mind.

CONCLUSION

On small datasets, it seems like you can use uncropped images. However, on larger ones, it's advisable to crop them to a 1:1 aspect ratio. In general, you can always do this to avoid any issues.


Next - Model Training ‐ Comparison - [Batch Size]

Clone this wiki locally