CoolFace
Modelpublic

cholpona/vit-base-patch16-224-pizza-burger-sushi

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes5downloads
Model Card

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

idlabel
0pizza
1burger
2sushi

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`.

SourceProvidesLicense
`Shad0wKillar/pizza_steak_sushi`pizza, sushiMIT
`NexaAIalex/Burger`burgerunspecified — 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)

metricvalue
accuracy1.000
macro F11.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 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.

modelheld-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.

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

Citation

bibtex
@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}}
}