Food-101 Image Classification with EfficientNet
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.
Model Summary
- Model Architecture: EfficientNet-B0
- Dataset: Food-101
- Number of Classes: 101
- Input Image Size: 224x224
- Normalization: Mean -
[0.485, 0.456, 0.406]
, Std -[0.229, 0.224, 0.225]
- Optimizer: Adam
- Loss Function: CrossEntropyLoss
- Learning Rate: 0.001
- Epochs: 10
Dataset
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).
- Dataset link: Food-101 on Hugging Face
Model Training
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.
Training Process
- Images are resized to 256x256 and center-cropped to 224x224.
- Data augmentation techniques such as random horizontal flip and random rotation were applied to increase the variety of training images.
- The Adam optimizer was used with a learning rate of 0.001, and cross-entropy loss was used for classification.
Model Performance
- Loss: 1.0926
- Validation Accuracy: 0.6944
- Test Accuracy: 0.8088
These metrics were achieved after 10 epochs of training
How to use the model
You can use the model directly in your own projects by loading it from hugging face.
Requirements
- Python 3.7+
- PyTorch 1.9+
- torchvision 0.10+
- PIL (Pillow)
- Hugging Face transformers library
Model Card
- ModelType: EfficientNet-B0
- Dataset: Food-101
- Framework: Pytorch
- Optimized for: Image Classification
- Downloads last month
- 8
Model tree for dwililiya/food101-model-classification
Base model
google/efficientnet-b0