Image Classification
Transformers
TensorBoard
Safetensors
vit
food
fruits
junkfood
Generated from Trainer
Instructions to use gutkia01/vit-food-classification-gutkia01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gutkia01/vit-food-classification-gutkia01 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="gutkia01/vit-food-classification-gutkia01") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("gutkia01/vit-food-classification-gutkia01") model = AutoModelForImageClassification.from_pretrained("gutkia01/vit-food-classification-gutkia01", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model save
Browse files- README.md +12 -54
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -3,10 +3,6 @@ library_name: transformers
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: google/vit-base-patch16-224
|
| 5 |
tags:
|
| 6 |
-
- image-classification
|
| 7 |
-
- food
|
| 8 |
-
- fruits
|
| 9 |
-
- junkfood
|
| 10 |
- generated_from_trainer
|
| 11 |
metrics:
|
| 12 |
- accuracy
|
|
@@ -20,51 +16,24 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 20 |
|
| 21 |
# vit-food-classification-gutkia01
|
| 22 |
|
| 23 |
-
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the
|
| 24 |
It achieves the following results on the evaluation set:
|
| 25 |
-
- Loss: 0.
|
| 26 |
-
-
|
| 27 |
-
- Accuracy: 0.9998
|
| 28 |
|
| 29 |
-
#
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
##
|
| 34 |
|
| 35 |
-
|
| 36 |
-
- **Base model:** `google/vit-base-patch16-224`
|
| 37 |
-
- **Task:** Binary image classification: `Fruit` vs. `Junkfood`
|
| 38 |
-
- **Framework:** Hugging Face Transformers Trainer
|
| 39 |
-
- **Input format:** RGB images, 224×224, loaded via `imagefolder`
|
| 40 |
|
| 41 |
-
##
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
-
|
| 46 |
-
- Interactive demos comparing healthy vs. unhealthy food
|
| 47 |
-
- Computer vision use cases with simple binary class structures
|
| 48 |
-
|
| 49 |
-
### Limitations
|
| 50 |
-
|
| 51 |
-
- Only supports binary classification (no subclass differentiation)
|
| 52 |
-
- Cannot recognize new or abstract dishes (e.g. salad, sushi)
|
| 53 |
-
- Cannot evaluate ingredients, calories, or portion sizes
|
| 54 |
-
|
| 55 |
-
## 📊 Training and Evaluation Data
|
| 56 |
-
|
| 57 |
-
The model was trained on a binary dataset composed of:
|
| 58 |
-
|
| 59 |
-
- **Fruits360 Dataset**: 137,000+ structured fruit images in a controlled studio setup ([Kaggle link](https://www.kaggle.com/datasets/moltean/fruits))
|
| 60 |
-
- **Fast Food Classification Dataset v2**: 20,000 fast food images, 10 categories (e.g., burger, pizza, fries) ([Kaggle link](https://www.kaggle.com/datasets/utkarshsaxenadn/fast-food-classification-dataset))
|
| 61 |
-
|
| 62 |
-
### Dataset Composition
|
| 63 |
-
|
| 64 |
-
The dataset is a combination of:
|
| 65 |
-
|
| 66 |
-
- **Fruits360 Dataset** ([Kaggle](https://www.kaggle.com/datasets/moltean/fruits))
|
| 67 |
-
- **Fast Food Classification Dataset v2** ([Kaggle](https://www.kaggle.com/datasets/utkarshsaxenadn/fast-food-classification-dataset))
|
| 68 |
|
| 69 |
### Training hyperparameters
|
| 70 |
|
|
@@ -80,21 +49,10 @@ The following hyperparameters were used during training:
|
|
| 80 |
### Training results
|
| 81 |
|
| 82 |
|
| 83 |
-
| Epoch | Training Loss | Validation Loss | Accuracy |
|
| 84 |
-
|-------|---------------|------------------|----------|
|
| 85 |
-
| 1 | 0.0000 | 0.0215 | 0.9975 |
|
| 86 |
-
| 2 | 0.0000 | 0.00004 | 1.0000 |
|
| 87 |
-
| 3 | 0.0000 | 0.00008 | 1.0000 |
|
| 88 |
-
| 4 | 0.0000 | 0.00011 | 1.0000 |
|
| 89 |
-
| 5 | 0.0000 | 0.00011 | 1.0000 |
|
| 90 |
-
| 6 | 0.0000 | 0.00008 | 1.0000 |
|
| 91 |
-
|
| 92 |
-
Final training loss: **0.00047**
|
| 93 |
-
Evaluation accuracy: **0.9998**
|
| 94 |
|
| 95 |
### Framework versions
|
| 96 |
|
| 97 |
-
- Transformers 4.
|
| 98 |
- Pytorch 2.6.0+cu124
|
| 99 |
-
- Datasets
|
| 100 |
- Tokenizers 0.21.1
|
|
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: google/vit-base-patch16-224
|
| 5 |
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- generated_from_trainer
|
| 7 |
metrics:
|
| 8 |
- accuracy
|
|
|
|
| 16 |
|
| 17 |
# vit-food-classification-gutkia01
|
| 18 |
|
| 19 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the None dataset.
|
| 20 |
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 0.0000
|
| 22 |
+
- Accuracy: 1.0
|
|
|
|
| 23 |
|
| 24 |
+
## Model description
|
| 25 |
|
| 26 |
+
More information needed
|
| 27 |
|
| 28 |
+
## Intended uses & limitations
|
| 29 |
|
| 30 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
## Training and evaluation data
|
| 33 |
|
| 34 |
+
More information needed
|
| 35 |
|
| 36 |
+
## Training procedure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
### Training hyperparameters
|
| 39 |
|
|
|
|
| 49 |
### Training results
|
| 50 |
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
### Framework versions
|
| 54 |
|
| 55 |
+
- Transformers 4.52.3
|
| 56 |
- Pytorch 2.6.0+cu124
|
| 57 |
+
- Datasets 3.6.0
|
| 58 |
- Tokenizers 0.21.1
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 343223968
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36c88d625e0f04dbcaa4cc5ca35e86abcc7cb8db44cdfae57e52cfbf9c28de86
|
| 3 |
size 343223968
|