Food classification is an exciting application of machine learning and deep learning. This project demonstrates how to classify food items using images, leveraging Convolutional Neural Networks (CNNs). The implemented model can predict the type of food in an uploaded image or an image captured through a live camera with an accuracy of 88%. Pre-trained models have been used to improve classification performance and achieve better results.
Features
User-Friendly Interface: Interactive UI with attractive animations and styles.
Multiple Input Options:
File Upload
Live Camera Input
Pre-Trained CNN Model: Uses transfer learning for better accuracy.
Model Accuracy: Achieved an accuracy of 88% on the test dataset.
Dataset: Contains 16 food categories with numerous images for training and validation.
Visualization: Displays the uploaded/captured image and provides the classification result.
Audio Support: Includes an audio introduction feature for better user engagement.
Model Predictions: Displays pre-computed predictions for various food items.
Technologies and Libraries Used
Programming Language: Python
Libraries:
Streamlit: For creating the web application.
Pillow (PIL): For image processing.
TensorFlow and TensorFlow Hub: For loading the pre-trained CNN model.
Matplotlib: For image visualization.
NumPy: For numerical computations.
Streamlit-Lottie: For adding animations.
Requests: For fetching Lottie animations.
h5py: For loading .h5 model files.
Model Details
Model Architecture: Convolutional Neural Network (CNN) with pre-trained layers for feature extraction.