Skip to content

Verify interpolation of image processors #28180

@NielsRogge

Description

@NielsRogge

Feature request

As pointed out in #27742, some image processors might need a correction on the default interpolation method being used (resampling in Pillow). We could check this on a per-model basis.

Motivation

Interpolation methods have a slight (often minimal) impact on performance. However it would be great to verify this on a per-model basis.

e.g. ViT's image processor defaults to BILINEAR but should use BICUBIC as seen here. We can update the default values of the image processors, but can't update the configs on the hub as this would break people's fine-tuned models.

Your contribution

I could work on this, but this seems like a good first issue for first contributors.

To be checked (by comparing against original implementation):

  • beit
  • bit
  • clip
  • convnext
  • convnextv2
  • cvt
  • data2vec-vision
  • deit
  • dinat
  • dinov2
  • efficientformer
  • efficientnet
  • focalnet
  • imagegpt
  • levit
  • mobilenet_v1
  • mobilenet_v2
  • mobilevit
  • mobilevitv2
  • nat
  • perceiver
  • poolformer
  • pvt
  • regnet
  • resnet
  • segformer
  • siglip
  • swiftformer
  • swin
  • swinv2
  • van
  • vit
  • vit_hybrid
  • vit_msn

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions