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.
Fuente del modelo
Descripción de la fuente
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.
Fuentes
1 fuenteVerificado 28 sept
Artefactos del modelo
1 artefactoExtractos de fuentes
2 extractos| id | label |
|---|
| 0 | pizza |
| 1 | burger |
| 2 | sushi |
from transformers import pipeline
clf = pipeline("image-classification", model="cholpona/vit-base-patch16-224-pizza-burger-sushi")
clf("path/to/image.jpg")
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.
| Source | Provides | License |
|---|---|---|
Shad0wKillar/pizza_steak_sushi | pizza, sushi | MIT |
NexaAIalex/Burger | burger | unspecified — see source dataset card |
Splits: ~150 train / 46 test per class — 454 train + 138 test images total.
5e-5save_total_limit=2load_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).
| metric | value |
|---|---|
| accuracy | 1.000 |
| macro F1 | 1.000 |
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 46
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.
| model | held-out burger recall |
|---|---|
| Linear probe (frozen base + LogReg) | 97.03% (686 / 707) |
| This model (full fine-tune) | 99.29% (702 / 707) |
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.
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.
google/vit-base-patch16-224Shad0wKillar/pizza_steak_sushiNexaAIalex/Burger@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}}
}
--- license: apache-2.0 base_model: google/vit-base-patch16-224 library_name: transformers pipeline_tag: image-classification tags: - image-classification - vit - food - pytorch datasets: - Shad0wKillar/pizza_steak_sushi - NexaAIalex/Burger metrics: - accuracy - f1 model-index: - name: vit-base-patch16-224-pizza-burger-sushi results: - task: type: image-classification name: Image Classification dataset: name: pizza-burger-sushi (merged, custom) type: image-folder metrics: - type: accuracy value: 1.0 - type: f1 value: 1.0 name: macro F1 --- # 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`](https://huggingface.co/google/vit-base-patch16-224) on a small custom dataset merged from two Hugging Face sources. ## Classes | id | label | |---|---| | 0 | pizza | | 1 | burger | | 2 | sushi | ## Usage ```python 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`](https://huggingface.co/datasets/cholpona/pizza-burger-sushi-recipe). | Source | Provides | License | |---|---|---| | [`Shad0wKillar/pizza_steak_sushi`](https://huggingface.co/datasets/Shad0wKillar/pizza_steak_sushi) | pizza, sushi | MIT | | [`NexaAIalex/Burger`](https://huggingface.co/datasets/NexaAIalex/Burger) | burger | unspecified — see source dataset card | **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) | metric | value | |---|---| | accuracy | 1.000 | | macro F1 | 1.000 | 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 46 ``` ### Held-out generalization eval (same-...
Source context: 4 downloads · 0 likes · Pipeline image-classification · Library transformers · Repo cholpona/vit-base-patch16-224-pizza-burger-sushi