cholpona/vit-base-patch16-224-pizza-burger-sushi
ViT-base-patch16-224 fine-tuned on pizza / burger / sushi
A 3-class image classifier built by fully fine-tuning `google/vit-base-patch16-224` on a small custom dataset merged from two Hugging Face sources.
Classes
Usage
from transformers import pipeline
clf = pipeline("image-classification", model="cholpona/vit-base-patch16-224-pizza-burger-sushi")
clf("path/to/image.jpg")Training data
Custom merge of two Hugging Face datasets. The merged dataset itself is not redistributed; see the recipe repo to reproduce: `cholpona/pizza-burger-sushi-recipe`.
Splits: ~150 train / 46 test per class — 454 train + 138 test images total.
Training procedure
- Hardware: Apple Silicon (MPS)
- Epochs: 8
- Optimizer: AdamW with cosine LR schedule, LR
5e-5 - Eval/save strategy: per epoch,
save_total_limit=2 load_best_model_at_end=True,metric_for_best_model="macro_f1"
Full setup in the project repo training notebook (notebooks/finetune_vit_pizza_burger_sushi.ipynb).
Evaluation
Main test split (138 images)
Per-class report:
precision recall f1-score support
pizza 1.0000 1.0000 1.0000 46
burger 1.0000 1.0000 1.0000 46
sushi 1.0000 1.0000 1.0000 46Held-out generalization eval (same-source burgers)
The 138-image test set saturates at 100%. The model was additionally evaluated on 707 unseen burger images from NexaAIalex/Burger that were not used in train or test, alongside a linear-probe baseline — the frozen pretrained google/vit-base-patch16-224 features + a logistic regression head trained on the same 454-image train split. This isolates the contribution of full fine-tuning beyond what the off-the-shelf ImageNet-pretrained features already encode.
Note: single-class eval — every image is a burger, so the metric is recall on the burger class on a larger same-source sample, not full multi-class accuracy. It measures at-distribution generalization for one class; it does not measure how the model handles unseen pizza or sushi distributions.
Limitations
- 100% on the main test split is misleadingly high. The classes are visually distinct and the test set is small (138 images). The held-out burger eval above gives a more honest signal — treat it as the upper bound for in-distribution use.
- Trained on only three food classes — any other input is forced into one of them, often with high confidence.
- The burger source dataset has no specified license; downstream commercial use should independently verify provenance.
License
Model weights: Apache 2.0, inherited from the base model `google/vit-base-patch16-224`.
Training data licenses differ — see the Training data table. The model weights do not redistribute the underlying images.
Credits
- Base model: Google Research — `google/vit-base-patch16-224`
- Pizza / sushi data: `Shad0wKillar/pizza_steak_sushi`
- Burger data: `NexaAIalex/Burger`
- ViT architecture: Dosovitskiy et al., An Image is Worth 16x16 Words, ICLR 2021
Citation
@misc{vit_pizza_burger_sushi_2026,
author = {cholpona},
title = {ViT-base fine-tuned on pizza / burger / sushi},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/cholpona/vit-base-patch16-224-pizza-burger-sushi}}
}