This project is a Chrome extension leveraging AI and Computer Vision to analyze food images and return corresponding recipes. The AI model used is a pre-trained YOLOv8 model from the Ultralytics library. The application communicates with various APIs and uses Flask as the backend framework, with a frontend built using HTML, CSS, and JavaScript.
Ensure Python is installed on your machine (python --version). Install the necessary Python packages by running pip install -r requirements.txt in the project directory.
This project uses the OpenAI API. You will need to obtain your own OpenAI key. Visit the OpenAI website to get your key.
The application comprises a Chrome extension and a Flask API.
- Navigate to
chrome://extensions/in Chrome. - Enable Developer mode (top right).
- Click "Load unpacked" and select the
chrome_extensiondirectory.
- Navigate to the
flask_apidirectory in your terminal. - Run
python app.pyto start the Flask server.
- Open the Chrome extension and upload a PNG food image.
- The extension sends the image to the Flask API.
- The API processes the image with the YOLOv8 model and returns a recipe.
- The recipe is displayed in the Chrome extension.
The project uses the following technologies:
- Flask: Backend framework.
- HTML/CSS/JavaScript: Frontend technologies.
- Python-JavaScript communication: To facilitate interaction between the frontend and backend.
The project communicates with the following APIs:
- OpenAI
- The Meal DB API: https://www.themealdb.com/
Key libraries used include Flask, Ultralytics, OpenCV, Torch, Torchvision, Numpy, Pandas, Matplotlib, and Seaborn. Refer to requirements.txt for a full list of dependencies.
Developed by: Ayen (Hunter College), Samin (Hunter College), Oluwajembola (Midwood High School), and Sudiptto (Hunter College).