hollance / CoreMLHelpers

Types and functions that make it a little easier to work with Core ML in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How are images being resized (what interpolation methods)?

bigmit2011 opened this issue · comments

I'm going through your README and you show different options of resizing:

One use Vision (which does the resizing)

Or use:
if let pixelBuffer = image.pixelBuffer(width: 224, height: 224)

I'm wondering how are these images being downsized. What interpolation methods are used when downsizing. I realized playing with Coreml in Python that
different interpolation methods affect the accuracy of the model.

Thank you so much for this repository.

It uses one of the vImageScale methods to do the resizing. I'm not 100% sure but I think that is bilinear.