FoodVision is a Python project that effectively utilizes Convolutional Neural Networks (CNN) for food image classification. The adoption of best practices, automation through shell scripting, and the inclusion of both command line and GUI interfaces contribute to its accessibility and usability. Future improvements aim to enhance the model's performance and user experience.
FoodVision
├── 📄 LICENSE
├── 📄 README.md
├── 📄 .gitignore
├── 📄 requirements.txt - Contains all the dependencies
├── 📄 GUI.py - Generates a user-friendly GUI for image classification.
├── 📄 prediction.py - Allows image prediction using command line arguments.
├── 📄 main.py - Builds and trains CNN models.
└── 📂 data/ - Contains datasets and Python files for automating the download and structuring.
└── 📂 models/ - Holds various CNN models along with their accuracy and loss curves.
└── 📂 utils/ - Includes helper functions for data preprocessing and model evaluation.
- Create and activate the virtual environment
python -m venv env
For windows
source env/Scripts/Activate
For Linux
source env/bin/activate
- Install Dependencies
pip install -r requirements.txt
- Make a prediction - Command Line Arguments (CLI)
python prediction.py --help
Response
Predict and plot food images.
options:
-h, --help show this help message and exit
--model MODEL Model name or number
--food FOOD Food class name
python prediction.py --model 1 --food pizza
- Make a prediction - Through GUI
python GUI.py
If you are looking to enhance the model accuracy, run the setup.sh
bash file to avail all the images you'll need for building the model.
bash setup.sh
This will automatically download and unpack the zip file and will delete unnecessary data as well.