cvlab-stonybrook / LearningToCountEverything

MIT License
361 stars 75 forks source link

Aspect ratio not preserved on some images #14

Closed domenVres closed 2 years ago

domenVres commented 2 years ago

Dear authors,

I am participating with my team in ML Reproducibility Challenge 2021 and as part of that we analysed how you resized your images to height 384. We noticed that for some images (there are 1200 such images, one example is 1386.jpg) there is a significant differences (more than 0.01) in height and width ratios listed in .json file. Because of that there is a difference (in pixels) in width of your resized images and width of the resized images, if the exact aspect ratio (up to a rounding error) from original size would be preserved. Those width differences are significant (average difference is around 128.5 pixels). Here is the distribution of those differences: error_dist We were wondering if there is a particular reason that those images were resized this way and would appreciate any insight.

Thanks and best regards, Domen

Viresh-R commented 2 years ago

Hey, The aspect ratios for those images are preserved whose original width is greater than 384. However, for images with original width less than 384, we decided to resize it to a fixed size of 384 * 384. For such images, the aspect ratios are not preserved. We did this so as to prevent the images from becoming too small. Also, we have conducted experiments at the original image size, and we did not notice any improvement in performance when the training is done at original image size.