Instructions to use facebook/dinov2-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/dinov2-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="facebook/dinov2-large")# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("facebook/dinov2-large") model = AutoModel.from_pretrained("facebook/dinov2-large") - Notebooks
- Google Colab
- Kaggle
Image_size differences
#4
by lombardata - opened
Hi @nielsr ,
I was wondering why the image size in the config model ( "image_size": 518) is :
518
while in the image processor images are resized to 256 and then cropped to 224.
In my understanding, they should be the same to get better performances, isn't it?
Moreover, I didn't fully understand the utility of rescaling in the image processor with the following factor :
"rescale_factor": 0.00392156862745098
Is this done in the original model implementation ?
Thank you in advance for the clarification!
"rescale_factor": 0.00392156862745098 it is just 1/255 which rescales images from range 0-255 to 0-1.