Regarding the interpolation methods for the various augmentations present in the torchvision library

username: akshay_23
cooked: <p>I was going through the various interpolation methods in the documentation and noticed that most of the time the default interpolation method is given as InterpolationMode.BILINEAR or InterpolationMode.NEAREST while isn’t BICUBIC considered to be better and hence it should made the default.</p>
<p>Is there any reason to consider the other 2 interpolation methods for Imagenet , I work with medical images and have found BICUBIC better , there are some research also supporting the work (<a href="https://www.scirp.org/journal/paperinformation.aspx?paperid=113621" class="inline-onebox" rel="noopener nofollow ugc">Effect of the Pixel Interpolation Method for Downsampling Medical Images on Deep Learning Accuracy</a>)</p>
<p>Bicubic interpolation algorithm can get relatively clear picture quality, but it needs larger amount of calculation. This algorithm now is most commonly used in many image processing software such as Photoshop, After Effects, Avid and Final Cut Pro etc. More info can be viewed <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;ved=2ahUKEwi14fzqj_H7AhWkTGwGHVMAD5YQFnoECB8QAQ&amp;url=https%3A%2F%2Fwww.atlantis-press.com%2Farticle%2F4822.pdf&amp;usg=AOvVaw1UCsnI9eLXU7U0Xef5VKHO" rel="noopener nofollow ugc">here</a></p>
<p>Is there any reason the torchvision community decided to use NEAREST and BILINEAR as default over BICUBIC , one reason I could think of would be to compromise image quality over speed.<br>
Anyway currently if we want to change the interpolation method we just have to set the<br>
<code>interpolation=InterpolationMode.BICUBIC</code><br>
while running the transforms.Rotation or functional.affine so not much of a hasle.</p>

username: ptrblck
cooked: <p>I would guess the defaults were picked because they worked fine and a bicubic interpolation might not have shown any benefits while training CNNs for e.g. ImageNet. Your observation for medical use cases is interesting and <code>MONAI</code> uses the <code>'area'</code> mode as the default for it’s <a href="https://docs.monai.io/en/stable/transforms.html#monai.transforms.Resize"><code>monai.transforms.Resize</code></a> transformation.<br>
Did you see any advantage in using bicubic interpolation for any of the current CNNs (e.g. in the <a href="https://github.com/rwightman/pytorch-image-models">TIMM</a> repo)?<br>
A quick check shows that <code>'bilinear'</code> might also be the default for ImageNet evaluation as seen <a href="https://github.com/rwightman/pytorch-image-models/blob/e3b2f5be0afaa6f2dd71be17a689b44b126a3ce9/timm/data/transforms_factory.py#L141">here</a>, but <a class="mention" href="/u/rwightman">@rwightman</a> would have more insight if bicubic interpolation is outperforming the defaults in any use case.</p>

username: akshay_23
cooked: <p>I haven’t checked it yet, need to perform various comparative analysis to see if it actually benefits for the image net dataset , my work currently is focused on medical images so wanted to point that out, I feel it should translate to Image Net too unless people have already tried it and felt it wasn’t too useful.</p>