libffcv/ffcv

Mapping from torchvision transforms to FFCV transforms

meghbhalerao opened this issue · 1 comments

Dear Authors,

Is there is 1 to 1 mapping from the image transforms that are supported by torchvision and those of ffcv, more specifically, when I see this page - https://docs.ffcv.io/api/decoders.html#ffcv.fields.decoders.CenterCropRGBImageDecoder - I see that a lot of these are very similar to the ones that torchvison has, since we want an equivalent dataloader in both ffcv and pytorch, here is a list of torchvison transforms - https://pytorch.org/vision/0.8/transforms.html - just adding this here for reference.

The above context brings me to specific question that I had - I want to do a simple resize of images, how do I do that in ffcv, I see here that https://docs.ffcv.io/api/decoders.html#ffcv.fields.decoders.CenterCropRGBImageDecoder - there is a center crop but that does cropping first and then resizing, can I just have an op which does a simple resize?

In a broader context, if someone can provide some common torchvison transforms followed by their equivalent ffcv counterparts, that would be super useful!

Thanks for your time!

You can probably use ffcv.fields.decoders.RandomResizedCropRGBImageDecoderand set scale=(1.0, 1.0) and ratio=(1.0, 1.0). I agree there should be a ResizeDecoder though