Fix interpolation of convnext image processor
Author: chandrusuresh
Pull request: yes

# What does this PR do?
Image processors do not have the same interpolation method used in the actual models (reference to actual models: timm). This PR fixes:
- the interpolation method for ConvNext
- updates the conversion script to use timm models instead of downloading checkpoints from url. This was necessary to overcome the AssertionError thrown from comparing the logits to the hard-coded logits from the checkpoint url and fixes the bug in #37461 
- Convnext model (in timm) seems to use `IMAGENET_DEFAULT_MEAN/STD` to normalize image. But the default value set in `ConvNextImageProcessor` and `ConvNextImageProcessorFast` are `IMAGENET_STANDARD_MEAN/STD`. This has been fixed in this PR.

For the 2nd point above, the following timm models were tested to pass all assertions in the script. The following table summarizes the equivalence between the timm models and the checkpoint urls in the original script.

### Some noteworthy changes
(!) Default interpolator was updated on `ConvNextImageProcessorFast`. But `timm_pixel_values` do not match and raise an AssertionError. This is outside the scope of this PR.

| Checkpoint URL      | TIMM model name |
| ----------- | ----------- |
| [convnext_tiny_1k_224_ema.pth](https://dl.fbaipublicfiles.com/convnext/convnext_tiny_1k_224_ema.pth) | [convnext_tiny.fb_in1k](https://huggingface.co/timm/convnext_tiny.fb_in1k) |
| [convnext_small_1k_224_ema.pth](https://dl.fbaipublicfiles.com/convnext/convnext_small_1k_224_ema.pth) | [convnext_small.fb_in1k](https://huggingface.co/timm/convnext_small.fb_in1k) |
| [convnext_base_1k_224_ema.pth](https://dl.fbaipublicfiles.com/convnext/convnext_base_1k_224_ema.pth) | [convnext_base.fb_in1k](https://huggingface.co/timm/convnext_base.fb_in1k) |
| [convnext_base_1k_384.pth](https://dl.fbaipublicfiles.com/convnext/convnext_base_1k_384.pth) | Not available |
| [convnext_large_1k_224_ema.pth](https://dl.fbaipublicfiles.com/convnext/convnext_large_1k_224_ema.pth) | [convnext_large.fb_in1k](https://huggingface.co/timm/convnext_large.fb_in1k) |
| [convnext_large_1k_384.pth](https://dl.fbaipublicfiles.com/convnext/convnext_large_1k_384.pth) | Not available |
| [convnext_base_22k_224.pth](https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_224.pth) | [convnext_base.fb_in22k](https://huggingface.co/timm/convnext_base.fb_in22k) |
| [convnext_large_22k_224.pth](https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_224.pth) | [convnext_large.fb_in22k](https://huggingface.co/timm/convnext_large.fb_in22k) |
| [convnext_xlarge_22k_224.pth](https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_224.pth) | [convnext_xlarge.fb_in22k](https://huggingface.co/timm/convnext_xlarge.fb_in22k) |
| [convnext_base_22k_1k_224.pth](https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_1k_224.pth) | [convnext_base.fb_in22k_ft_in1k](https://huggingface.co/timm/convnext_base.fb_in22k_ft_in1k) |
| [convnext_base_22k_1k_384.pth](https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_1k_384.pth) | [convnext_base.fb_in22k_ft_in1k_384](https://huggingface.co/timm/convnext_base.fb_in22k_ft_in1k_384) |
| [convnext_large_22k_1k_224.pth](https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_1k_224.pth) | [convnext_large.fb_in22k_ft_in1k](https://huggingface.co/timm/convnext_large.fb_in22k_ft_in1k) |
| [convnext_large_22k_1k_384.pth](https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_1k_384.pth) | [convnext_large.fb_in22k_ft_in1k_384](https://huggingface.co/timm/convnext_large.fb_in22k_ft_in1k_384) |
| [convnext_xlarge_22k_1k_224_ema.pth](https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_1k_224_ema.pth) | [convnext_xlarge.fb_in22k_ft_in1k](https://huggingface.co/timm/convnext_xlarge.fb_in22k_ft_in1k) |
| [convnext_xlarge_22k_1k_384_ema.pth](https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_1k_384_ema.pth) | [convnext_xlarge.fb_in22k_ft_in1k_384](https://huggingface.co/timm/convnext_xlarge.fb_in22k_ft_in1k_384) |

The following were not tested:
- `model.save_pretrained` and `image_processor.save_pretrained`
- `model.push_to_hub`

Fixes #28180 , #37461

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
@NielsRogge @amyeroberts 



Comments:
cc @qubvel @zucchini-nlp 

> Hey @chandrusuresh! Thanks a lot for opening a PR
> 
> I agree regarding bicubic interpolation and DEAFULT mean/std changes, however not sure regarding changes in the conversion script. Originally, checkpoints were converted from facebookresearch URLs, so it's better to keep them.

Thanks for the response. The issue is not really the checkpoints, but more the check with the logits. The hard-coded values do not match with the output of the image processor. 
There are other image processors that use the timm models as a baseline for comparing the image processors, so I decided to do the same.
If we keep the checkpoints as is, we need to get the logits somehow. any thoughts how we may do that?

I suppose they can be obtained running the original implementation

https://github.com/facebookresearch/ConvNeXt/tree/main

> I suppose they can be obtained running the original implementation
> 
> https://github.com/facebookresearch/ConvNeXt/tree/main

Thanks for the feedback. I've reverted the change back to using checkpoint_url. I replaced the hard-coded logits (which only have 3 elements) with those computed from timm models. I've verified that all the checkpoints in the above table pass the asserts.

@qubvel  I'd appreciate a review here. I've made the changes as requested.

@ArthurZucker @Rocketknight1 @qubvel any chance you could review this? its been stale for more than a week now. I'd appreciate a quick review on this, pls?

Hi @chandrusuresh thanks for this PR and apologies for getting no response here. The PR looks good to me. Could you rebase on main by doing:
```bash
git remote add upstream https://github.com/huggingface/transformers.git
git fetch upstream
git merge upstream/main
```
?

@NielsRogge Thanks for the approval. Merged to upstream and ready for merge.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_37460). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@qubvel @Rocketknight1 @NielsRogge  Can I get an approval on this PR, please?

Hi @qubvel could you review this one?

@chandrusuresh do you need another round of reviews?