This app uses a Food Category Image Classifier model that has been trained to recognize 12 different categories of foods: Bread, Dairy, Dessert, Egg, Fried Food, Fruit, Meat, Noodles, Rice, Seafood, Soup, and Vegetable. After classifying the category, it provides personalized recipe recommendations based on user preferences for diet and cuisine. With its easy-to-use interface and integration with recipe databases, the app is perfect for food lovers looking for personalized recipe suggestions.
Click Here To View This App Online!
The website used is https://www.seriouseats.com/, and the data obtained for each recipe is as follows:
- Name of Recipe
- Rating (out of 5)
- Description
- Ingredients
- Recipe Facts
- Directions
- Number of Servings
- Nutrition Label
- Images of the Recipes
- Descriptive Tags
Scraped the images of the 12 food categories for the image classification model using a software called Bulk Image Downloader from Google Images
- Data cleaning and formatting was done in Python using Pandas.
- The AI was then trained with food images from Google.
- 1500 total images were downloaded across the 12 different categories.
- 80% of the images were used for training and the other 20% were used for testing/validation.
Cloud storage with AWS S3 bucket stored a json file of our recipe dataset.
AWS Lambda and AWS API Gateway were used to interact with the frontend according to user input in the front end.
- Streamlit was used for the user interface, which included everything from the diet and cuisine dropdown menus to working with the fine-tuned image classifier model.
Hugging Face Spaces was used to host our final trained model as well as our web interface code.
Metric | Score |
---|---|
Accuracy | 96% |
Loss | 0.1443 |
Precision_macro | 0.9621 |
Precision_micro | 0.96 |
Precision_weighted | 0.9621 |
Recall_macro | 0.96 |
Recall_micro | 0.96 |
Recall_weighted | 0.96 |
F1_macro | 0.9595 |
F1_micro | 0.96 |
F1_weighted | 0.9595 |
To use our app, simply click on this link to access the web app. Once you're on the app, select your preferences for diet and cuisine from the dropdown menus, and click the "Get Recipe" button. Our image classification model will identify the food category and provide personalized recipe recommendations based on your preferences. You can also view recipe details, ratings, nutrition facts, and more.
- Python 3.6 or higher
- Streamlit
- Requests
- plotly
- Clone the repository:
git clone https://github.com/NebulaCrasher/curated-cuisine-coalition.git
- Install the required packages:
pip install streamlit requests
- Run the app:
streamlit run Classification_And_Recipes.py