vision icon indicating copy to clipboard operation
vision copied to clipboard

Lanczos interpolation support in resize

Open MHRDYN7 opened this issue 5 months ago • 1 comments

🚀 The feature

Are there any plans to support the lanczos interpolation method for resize? @NicolasHug I might be open to implement it (depends on the complexity).

Motivation, pitch

Seems important enough to include it in torchvision. I've been trying to port some code to torchvision from PIL and Mediapy and this missing interpolation method stands as an obstacle. Also, seems like that some models requiring this interpolation method in hf transformers are having to change to other methods for preprocessing.

Alternatives

No response

Additional context

No response

MHRDYN7 avatar Aug 06 '25 10:08 MHRDYN7

Hi @MHRDYN7 , thank you for the feature request. I think this may make sense, but adding a new interpolation mode is a ton of work, and it would have to be made upstream in pytorch, because we just rely on the torch.nn.functional.interpolate op.

seems like that some models requiring this interpolation method in hf transformers are having to change to other methods for preprocessing

I'd like to learn more, can you share more details about this?

NicolasHug avatar Aug 08 '25 09:08 NicolasHug