dwililiya commited on
Commit
33cc76a
1 Parent(s): 574019b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -54
README.md CHANGED
@@ -1,55 +1,67 @@
1
- # Food-101 Image Classification with EfficientNet
2
-
3
- This project focuses on fine-tuning the **EfficientNet-B0** model for image classification using the **Food-101** dataset. The model is trained to classify images into 101 different food categories.
4
-
5
- ## Model Summary
6
-
7
- - **Model Architecture**: EfficientNet-B0
8
- - **Dataset**: Food-101
9
- - **Number of Classes**: 101
10
- - **Input Image Size**: 224x224
11
- - **Normalization**: Mean - `[0.485, 0.456, 0.406]`, Std - `[0.229, 0.224, 0.225]`
12
- - **Optimizer**: Adam
13
- - **Loss Function**: CrossEntropyLoss
14
- - **Learning Rate**: 0.001
15
- - **Epochs**: 10
16
-
17
- ## Dataset
18
-
19
- The **Food-101** dataset consists of 101 food categories, with 1,000 images for each category. The dataset is already split into training (75,750 images) and validation (25,250 images).
20
-
21
- - Dataset link: [Food-101 on Hugging Face](https://huggingface.co/datasets/ethz/food101)
22
-
23
- ## Model Training
24
-
25
- The model is based on **EfficientNet-B0**, a state-of-the-art architecture for image classification. The pretrained model is fine-tuned on the Food-101 dataset using PyTorch.
26
-
27
- ### Training Process
28
-
29
- - Images are resized to 256x256 and center-cropped to 224x224.
30
- - Data augmentation techniques such as random horizontal flip and random rotation were applied to increase the variety of training images.
31
- - The Adam optimizer was used with a learning rate of 0.001, and cross-entropy loss was used for classification.
32
-
33
-
34
- ## Model Performance
35
- - Loss: 1.0926
36
- - Validation Accuracy: 0.6944
37
- - Test Accuracy: 0.8088
38
-
39
- These metrics were achieved after 10 epochs of training
40
-
41
- ## How to use the model
42
- You can use the model directly in your own projects by loading it from hugging face.
43
-
44
- ### Requirements
45
- - Python 3.7+
46
- - PyTorch 1.9+
47
- - torchvision 0.10+
48
- - PIL (Pillow)
49
- - Hugging Face transformers library
50
-
51
- ## Model Card
52
- - ModelType: EfficientNet-B0
53
- - Dataset: Food-101
54
- - Framework: Pytorch
 
 
 
 
 
 
 
 
 
 
 
 
55
  - Optimized for: Image Classification
 
1
+ ---
2
+ datasets:
3
+ - ethz/food101
4
+ language:
5
+ - en
6
+ metrics:
7
+ - accuracy
8
+ base_model:
9
+ - google/efficientnet-b0
10
+ tags:
11
+ - food
12
+ ---
13
+ # Food-101 Image Classification with EfficientNet
14
+
15
+ This project focuses on fine-tuning the **EfficientNet-B0** model for image classification using the **Food-101** dataset. The model is trained to classify images into 101 different food categories.
16
+
17
+ ## Model Summary
18
+
19
+ - **Model Architecture**: EfficientNet-B0
20
+ - **Dataset**: Food-101
21
+ - **Number of Classes**: 101
22
+ - **Input Image Size**: 224x224
23
+ - **Normalization**: Mean - `[0.485, 0.456, 0.406]`, Std - `[0.229, 0.224, 0.225]`
24
+ - **Optimizer**: Adam
25
+ - **Loss Function**: CrossEntropyLoss
26
+ - **Learning Rate**: 0.001
27
+ - **Epochs**: 10
28
+
29
+ ## Dataset
30
+
31
+ The **Food-101** dataset consists of 101 food categories, with 1,000 images for each category. The dataset is already split into training (75,750 images) and validation (25,250 images).
32
+
33
+ - Dataset link: [Food-101 on Hugging Face](https://huggingface.co/datasets/ethz/food101)
34
+
35
+ ## Model Training
36
+
37
+ The model is based on **EfficientNet-B0**, a state-of-the-art architecture for image classification. The pretrained model is fine-tuned on the Food-101 dataset using PyTorch.
38
+
39
+ ### Training Process
40
+
41
+ - Images are resized to 256x256 and center-cropped to 224x224.
42
+ - Data augmentation techniques such as random horizontal flip and random rotation were applied to increase the variety of training images.
43
+ - The Adam optimizer was used with a learning rate of 0.001, and cross-entropy loss was used for classification.
44
+
45
+
46
+ ## Model Performance
47
+ - Loss: 1.0926
48
+ - Validation Accuracy: 0.6944
49
+ - Test Accuracy: 0.8088
50
+
51
+ These metrics were achieved after 10 epochs of training
52
+
53
+ ## How to use the model
54
+ You can use the model directly in your own projects by loading it from hugging face.
55
+
56
+ ### Requirements
57
+ - Python 3.7+
58
+ - PyTorch 1.9+
59
+ - torchvision 0.10+
60
+ - PIL (Pillow)
61
+ - Hugging Face transformers library
62
+
63
+ ## Model Card
64
+ - ModelType: EfficientNet-B0
65
+ - Dataset: Food-101
66
+ - Framework: Pytorch
67
  - Optimized for: Image Classification