Downloads · 30 days
6
17% of all-time downloads
mnjm/DINOv1-ViT-S-16-food101
DINOv1-ViT-S-16-food101 is a image feature extraction model from mnjm. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for transformers.
DINOv1 ViT-S/16 model trained from scratch on the Food-101 dataset using a custom training repo.
Downloads · 30 days
6
17% of all-time downloads
All-time downloads
35
Public
Parameters
21.7M
547 MB on disk
Likes
0
Public
Click a slice to open those files.
.zip460 MB · 84%
From the Hugging Face model README
DINOv1 ViT-S/16 model trained from scratch on the Food-101 dataset using a custom training repo.
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% |
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]