libffcv / ffcv

FFCV: Fast Forward Computer Vision (and other ML workloads!)
https://ffcv.io
Apache License 2.0
2.8k stars 180 forks source link

Resize Interpolation #245

Open vchiley opened 1 year ago

vchiley commented 1 year ago

In torchvision's RandomResizeCrop and Resize allow the user to specify the interpolation. This isn't an option in ffcv's RandomResizedCrop nor is it documented which interpolation is being used. Could this be included / documented?

JJGO commented 1 year ago

The default doesn't seem to be the same (torchvision's seems to be Bilinear whereas FFCV defaults to nearest) which can lead to artifacting in the images.

JJGO commented 1 year ago

I spoke too soon, the mode is not NEAREST but INTER_AREA from looking at this line which is probably a good choice for downsampling (see opencv docs but not for upsampling.

But yeah, I agree that the authors should put this as part of the docs