How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-feature-extraction", model="mnjm/DINOv1-ViT-S-16-food101")
# Load model directly
from transformers import AutoImageProcessor, AutoModel

processor = AutoImageProcessor.from_pretrained("mnjm/DINOv1-ViT-S-16-food101")
model = AutoModel.from_pretrained("mnjm/DINOv1-ViT-S-16-food101", device_map="auto")
Quick Links

DINOv1-ViT-S-16-food101

DINOv1 ViT-S/16 model trained from scratch on the Food-101 dataset using a custom training repo.

Evaluation

Weighted k-NN evaluation on Food-101 validation features:

k Top-1 accuracy Top-5 accuracy
5 64.09% 79.93%
10 66.38% 83.47%
20 67.59% 86.17%
100 67.81% 88.72%

Run

from transformers import AutoImageProcessor, ViTModel

processor = AutoImageProcessor.from_pretrained("mnjm/DINOv1-ViT-S-16-food101")
model = ViTModel.from_pretrained("mnjm/DINOv1-ViT-S-16-food101")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
image_features = outputs.last_hidden_state[:, 0]
Downloads last month
9
Safetensors
Model size
21.7M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train mnjm/DINOv1-ViT-S-16-food101