๐ Food Image Classification using TensorFlow: A deep learning model to classify various food items using TensorFlow and CNNs.
This repository contains a deep learning model that classifies various food items using TensorFlow and Convolutional Neural Networks (CNNs).
The goal of this project is to build a model that can accurately classify images of food into predefined categories. With the rise of health and fitness apps, such a model can be integrated into applications to automatically detect and log consumed food items based on user-uploaded images.
The dataset used for this project consists of images of various food items categorized into different classes. Each image is labeled with its corresponding food category. Available here
- Data Augmentation: To artificially increase the size of the training dataset and improve model generalization.
- Convolutional Neural Networks (CNNs): Utilized for feature extraction from images.
- Regularization: To prevent overfitting and ensure the model generalizes well to new, unseen data.
- Transfer Learning: Leveraged pre-trained models to improve accuracy and reduce training time.
- TensorFlow 2.x
- Python 3.7+
- Numpy
- Matplotlib
- Scikit-learn
- hypopt
- PIllow
- torch (During Experimentation)
- pipreqs
- Clone the repository:
git clone https://github.com/your_username/food-image-classification.git
- Navigate to the project directory and install the required packages:
cd food-image-classification
Use pipreqs to obtain requirements
- Run the main script in the orderr represented in the AI Algorithm .ipynb here on google colab to train the model: `
- To evaluate the model on test data, view the test scores in the AI Algorithm.ipyb file:
The model achieved a test accuracy of 92% on the test dataset. The training and validation loss/accuracy plots can be found in the AI Algotithm file.
- Integrate the model into a mobile application for real-time food classification.
- Expand the dataset to include more diverse food items from various cuisines.
- Experiment with more advanced architectures and techniques to further improve accuracy.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Special thanks to the creators of the food dataset.
- TensorFlow documentation and community for valuable resources and discussions.