Instructions to use facebook/dinov2-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/dinov2-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="facebook/dinov2-base")# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("facebook/dinov2-base") model = AutoModel.from_pretrained("facebook/dinov2-base") - Notebooks
- Google Colab
- Kaggle
Image preprocessing: mismatch between crop and resize parameters
#6
by mwcampbell - opened
I noticed that in the auto image preprocessing parameters for this model, the preprocessor is configured to resize the image such that the shortest edge is 256 pixels, but then the image is cropped to 224x224. Is this mismatch deliberate? In other words, is it intended that some of the image will be cut off even along the shortest edge?