Downloads · 30 days
0
hylin16/food-recognition-food101-effnet-b0-cbam
food-recognition-food101-effnet-b0-cbam is a image classification model from hylin16. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as other.
Food image classifier trained with foodrecognition. efficientnetb0cbam is a torchvision backbone with a CBAM block (channel then spatial attention) between the features and the classification head.
Downloads · 30 days
0
Access
Public
Updated Sep 6, 2026
Repo size
17.7 MB
Likes
0
Public
Click a slice to open those files.
.pt17.7 MB · 99%
From the Hugging Face model README
Food image classifier trained with food_recognition. efficientnet_b0_cbam is a torchvision backbone with a CBAM block (channel then spatial attention) between the features and the classification head.
| Metric | Value |
|---|---|
| Validation accuracy | 88.70% |
| Macro F1 | 0.8865 |
| Classes | 101 |
| Input resolution | 224px |
| Checkpoint epoch | 29 |
| Training wall clock | 254 min |
| Hardest / easiest class | steak (F1 0.588) / edamame (F1 1.000) |
These figures come from this run's own metrics.json, computed over the full validation split. The repository re-scores every published checkpoint through a separate evaluation path and requires the two to agree to six decimal places.
pip install git+https://github.com/linhongyu510/food_recognition.git
from huggingface_hub import hf_hub_download
from food_recognition import load_predictor
checkpoint = hf_hub_download("hylin16/food-recognition-food101-effnet-b0-cbam", "best.pt")
predictor = load_predictor(checkpoint)
prediction = predictor.predict("photo.jpg", topk=3)
print(prediction.label, prediction.topk)
The checkpoint embeds its architecture, input resolution and class names, so nothing needs to be specified again at load time.
To see which pixels drove a prediction:
food-recognition-gradcam --checkpoint best.pt --input photo.jpg --side-by-side
efficientnet_b0_cbambaf1b5eFood-101 consists of Foodspotting images that are not the property of ETH Zurich; the dataset terms allow scientific fair use, and any use beyond that must be negotiated with the picture owners. These weights are a derivative of that data and are released for research use under the same understanding.