apple / coremltools

Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.
https://coremltools.readme.io
BSD 3-Clause "New" or "Revised" License
4.42k stars 640 forks source link

Support BICUBIC interpolation for image resizing #2340

Open JarnoRFB opened 2 months ago

JarnoRFB commented 2 months ago

How can this feature be used?

Bicubic image resizing is useful when requiring a resizing method that preserves higher quality, e.g. for object detection, and is implemented as a basic operation in Frameworks such as PyTorch.

Describe alternatives you've considered

Using bilinear interpolation.

Additional context

Other issues that might be related:

TobyRoseman commented 1 month ago

This seems like the exact same request as #1747.

@JarnoRFB - how is this different than that?

JarnoRFB commented 1 month ago

@TobyRoseman Not entirely sure. #1747 talked to about the upsampling and I am particularly interested in downsampling. This is beyond my Pytorch knowledge, but could be that downsampling is supported via the upsample_bicubic2d operator.