Sample Project Report Product Based-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

Cook AI

Recipe Generator using Deep learning


A PROJECT REPORT

Submitted by

JALAJ GUPTA [RA2111027010148]


ISHAN SHARMA [RA2111027010086]

Under the Guidance of

Dr. Prakash M

(Associate Professor, Department of Data Science And Business Systems)

in partial fulfillment of the requirements for the degree


of

BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE ENGINEERING
with specialization in Big Data Analytics

DEPARTMENT OF DATA SCIENCE AND BUSINESS SYSTEM


COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR- 603 203

OCTOBER 2024
Department of Department of Data Science And Business Systems
SRM Institute of Science & Technology
Own Work Declaration Form

This sheet must be filled in (each box ticked to show that the condition has been met). It must
be signed and dated along with your student registration number and included with all
assignments you submit – work will not be marked unless this is done.
To be completed by the student for all assessments

Degree/ Course : Bachelor of Technology in Computer Science Engineering with


specialisation in Big Data Analytics

Student Name : Jalaj Gupta, Ishan Sharma

Registration Number : RA2111027010148 , RA2111027010086

Title of Work : Cook AI - Recipe Generator using Deep learning

We hereby certify that this assessment compiles with the University’s Rules and Regulations
relating to Academic misconduct and plagiarism , as listed in the University Website,
Regulations, and the Education Committee guidelines.

We confirm that all the work contained in this assessment is our own except where indicated,
and that We have met the following conditions:

● Clearly referenced / listed all sources as appropriate


● Referenced and put in inverted commas all quoted text (from books, web, etc)
● Given the sources of all pictures, data etc. that are not my own
● Not made any use of the report(s) or essay(s) of any other student(s) either past or present
● Acknowledged in appropriate places any help that I have received from others (e.g.
fellow students, technicians, statisticians, external sources)
● Compiled with any other plagiarism criteria specified in the Course handbook /
University website

We understand that any false claim for this work will be penalized in accordance with the
University policies and regulations.

DECLARATION:
I am aware of and understand the University’s policy on Academic misconduct and plagiarism and I
certify that this assessment is my / our own work, except where indicated by referring, and that I have
followed the good academic practices noted above.

If you are working in a group, please write your registration numbers and sign with the date for
every student in your group.

Jalaj Gupta Ishan Sharma


[RA2111027010148] [RA2111027010086]
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR – 603 203

BONAFIDE CERTIFICATE

Certified that 18CSP107L - Minor Project report titled “Cook AI - Recipe Generator
using Deep learning ” is the bonafide work of “Jalaj Gupta [RA2111027010148],
Ishan Sharma [RA2111027010086]” who carried out the project work under my
supervision. Certified further, that to the best of my knowledge the work reported herein
does not form any other project report or dissertation on the basis of which a degree or
award was conferred on an earlier occasion on this or any other candidate.

DR. PRAKASH M DR. KAVITHA V


SUPERVISOR PROFESSOR &HEAD
Associate Professor DEPARTMENT OF
Department of Data Science And DATA SCIENCE AND BUSINESS
Business Systems SYSTEM
ABSTRACT

The "CookAI Recipe Generator" is an AI-powered platform designed to transform how


users interact with food, making the cooking process more accessible, personalized, and
sustainable. By utilizing cutting-edge deep learning and natural language processing, the
platform enables users to upload food images and receive detailed, customized recipes in
return. The AI identifies the dish and its key ingredients, generating a comprehensive recipe
that includes a list of ingredients, step-by-step cooking instructions, and dietary-specific
substitutions.

CookAI aims to simplify cooking for users of all skill levels. Whether someone is a novice or
an experienced home cook, the platform tailors recipes based on individual dietary
preferences, ingredient availability, and personal tastes. This personalized approach
encourages experimentation in the kitchen, making it easy for users to try new cuisines and
dishes they might otherwise overlook.

In addition to enhancing the cooking experience, CookAI promotes sustainability by


minimizing food waste. The platform suggests recipes based on the ingredients users already
have, allowing them to make the most of leftover or underused items. By promoting efficient
use of ingredients, CookAI aligns with the global push for responsible consumption and
production, contributing to the United Nations’ Sustainable Development Goal (SDG) 12.

The platform also supports healthier eating habits by offering nutritional alternatives and
health-focused substitutions, empowering users to make informed choices about their meals.
Users can select dietary preferences—such as vegetarian, gluten-free, or low-carb—and the
AI will generate recipes that cater to these needs, making healthy eating more attainable.

CookAI envisions fostering a vibrant, community-driven space where users can share their
creations, exchange tips, and offer feedback on various recipes. This collaborative aspect
encourages peer-to-peer learning and allows users to continuously discover new cooking
techniques and ideas.

Overall, "CookAI Recipe Generator" harnesses the power of artificial intelligence to


streamline the cooking process, encouraging creativity while promoting sustainability and
healthy eating. By making recipe generation instant and personalized, CookAI revolutionizes
how people approach cooking, empowering individuals to effortlessly create delicious,
tailored meals while reducing food waste and supporting a more sustainable lifestyle.

1
TABLE OF CONTENTS

ABSTRACT iv
TABLE OF CONTENTS v
LIST OF FIGURES vi
LIST OF TABLES vii
ABBREVIATIONS viii

CHAPTER NO. TITLE PAGE NO.

1 INTRODUCTION 1

1.1 General (Introduction to Project) 2


1.2 Motivation 3
1.3 Sustainable Development Goal of the Project 4
1.4 Product Vision Statement 5
1.5 Product Goal 6
1.6 Product Backlog (Key User Stories with Desired Outcomes) 7
1.7 Product Release Plan 8

2 SPRINT PLANNING AND EXECUTION 9

2.1 Sprint 1 10
2.1.1 Sprint Goal with User Stories of Sprint 1 11

2.1.2 Functional Document 12

2.1.3 Architecture Document 13

2.1.4 UI Design 14

2.1.5 Functional Test Cases 15

2.1.6 Daily Call Progress 16

2.1.7 Committed vs Completed User Stories 17

2.1.8 Sprint Retrospective 18

2
2.2 Sprint 2 19

2.2.1 Sprint Goal with User Stories of Sprint 2 20

2.2.2 Functional Document 21

2.2.3 Architecture Document 22

2.2.4 UI Design 23

2.2.5 Functional Test Cases 24

2.2.6 Daily Call Progress 25

2.2.7 Committed vs Completed User Stories 26

2.2.8 Sprint Retrospective 27

2.3 Sprint 3 28
2.3.1 Sprint Goal with User Stories of Sprint 3 29

2.3.2 Functional Document 30

2.3.3 Architecture Document 31

2.3.4 UI Design 32

2.3.5 Functional Test Cases 33

2.3.6 Daily Call Progress 34

2.3.7 Committed vs Completed User Stories 35

2.3.8 Sprint Retrospective 36

3. RESULTS AND DISCUSSIONS 37

3.1 Project Outcomes (Justification of outcomes and how they align 38

with the goals)

3.2 Committed vs Completed User Stories 39

4 CONCLUSIONS & FUTURE ENHANCEMENT 40


APPENDIX

3
LIST OF FIGURES

CHAPTER NO TITLE PAGE NO.


1 Planner Board of Cook AI 14
1 Release plan of Cook AI 14
2 Architecture Diagram 19
2 Standup meetings 22
2 Committed Vs Completed User Stories for sprint 1 23
2 Sprint retrospective for project 23
4 Screenshot 1 37
4 Screenshot 2 37
4 Screenshot 3 37
4 Screenshot 4 37

LIST OF TABLES

CHAPTER NO TITLE PAGE NO.


1 User Stories 14
2 User Stories of sprint 1 17
2 Access level Authorization Matrix 19
2 Functional Test Cases 23

4
ABBREVIATIONS

1. API – Application Programming Interface

2. UI – User Interface

3. AI – Artificial Intelligence

4. PAT – Personal Access Token

5. TheMealDB – The Meal Database

6. YT – YouTube (for Google YouTube API)

7. OCR – Optical Character Recognition

8. JSON – JavaScript Object Notation (common data format for APIs)

9. CSV – Comma-Separated Values

10.HTTP – Hypertext Transfer Protocol (for API requests)

11.ML – Machine Learning

5
CHAPTER 1

INTRODUCTION

1.1 Introduction to CookAI Recipe Generation Application:


The "CookAI-Recipe Generator" platform exemplifies how artificial intelligence can
transform everyday activities like cooking by providing a unique, AI-powered culinary
experience. This application uses deep learning and natural language processing to generate
comprehensive cooking recipes from simple food images. Users can upload a photo of any
dish, and CookAI identifies the dish and produces a tailored recipe, including a title, list of
ingredients, and step-by-step cooking instructions.

The system’s image recognition capability analyzes the uploaded food image, determining
key ingredients and the dish type. Then, through advanced natural language processing, it
formulates a recipe that users can easily follow. This application bridges the gap between
cooking and AI, enabling users to access detailed recipes effortlessly, making cooking more
approachable and creative.

Additionally, CookAI leverages AI to continuously improve recipe accuracy and expand its
culinary knowledge base. As users interact with the platform, the system refines its ability to
recognize diverse dishes and generate high-quality, useful recipes. By transforming food
photos into complete recipes, CookAI demonstrates the potential of AI to simplify and
enhance cooking, catering to users’ culinary curiosity and fostering a more innovative
cooking experience.

6
1.2 Motivation

The inspiration for "CookAI Recipe Generator" is rooted in the vision of simplifying and
enhancing the cooking experience through the power of artificial intelligence. In today’s
fast-paced world, many individuals face barriers to cooking—whether due to a lack of time,
unfamiliarity with recipes, or the challenge of interpreting traditional instructions.
Conventional recipe sources often present cooking as a rigid, text-driven process that can feel
inaccessible to novice or experimental cooks. By automating recipe generation from food
images, "CookAI" provides a flexible, intuitive alternative, empowering users to cook with
confidence by eliminating the need for complex instructions or ingredient lists.

Moreover, people’s culinary creativity is often limited by what they know or have access to,
leaving a vast range of dishes unexplored. The motivation to build "CookAI" also lies in
democratizing culinary knowledge, allowing users to access recipes from diverse cuisines
simply by uploading a picture of a dish. The platform harnesses deep learning to analyze and
recognize ingredients visually, while natural language processing creates straightforward,
step-by-step instructions that allow anyone to cook new and exciting dishes. This
personalized approach encourages users to explore beyond their usual repertoire, making it
easier to try dishes that may otherwise seem intimidating or unfamiliar.

Beyond individual cooking, "CookAI" also speaks to the growing interest in merging
technology with culinary arts. By providing a platform that is both interactive and adaptive,
the project brings a sense of innovation to cooking, showing how AI can transform everyday
tasks. As the system learns from each interaction, it refines its recipe suggestions and gains
insights into user preferences, gradually building a community-driven knowledge base that
elevates the cooking experience for everyone involved. Ultimately, the platform aims to turn
cooking into a creative, collaborative process where users are not just following instructions
but actively engaging with and contributing to a broader culinary culture.

7
1.3 Sustainable Development Goal of the Project

The "CookAI Recipe Generator" aligns with several United Nations Sustainable
Development Goals (SDGs), particularly SDG 2 (zero hunger), SDG 3 (good health and
well-being), and SDG 12 (responsible consumption and production). These goals are
addressed through the platform's ability to make nutritious cooking more accessible, promote
healthier eating habits, and encourage mindful food usage.

By transforming food images into detailed recipes, "CookAI" directly supports SDG 2 (Zero
Hunger) by increasing access to cooking resources and knowledge. The platform enables
users to make the most of their ingredients, encouraging home-cooked meals and
empowering individuals to prepare nutritious recipes with what they have on hand. This can
be especially valuable in communities with limited access to culinary resources or formal
cooking education, supporting food security and reducing dependency on processed foods.

"CookAI" also promotes SDG 3 (good health and well-being) by fostering healthier eating
habits through AI-generated recipes. The platform’s capacity to recommend ingredient
substitutions and suggest balanced recipes encourages users to make informed, nutritious
choices. By making healthy cooking easier and more approachable, "CookAI" empowers
users to take control of their dietary habits, supporting a lifestyle that prioritizes well-being
and nutrition.

Additionally, SDG 12 (Responsible Consumption and Production) is addressed as the


platform promotes mindful ingredient use and reduces food waste. With its image-recognition
capabilities, "CookAI" enables users to repurpose leftovers or random ingredients into
complete recipes, fostering a zero-waste approach to cooking. By encouraging users to make
the most of what they have, the platform contributes to more sustainable food consumption
and production patterns, helping individuals minimize waste and appreciate the value of all
ingredients.

Through AI-driven recipe generation, "CookAI" demonstrates how innovative technology


can drive sustainable culinary practices. By making cooking easier, healthier, and more
efficient, the platform not only supports individual users but also contributes to a global effort
toward sustainable and responsible food practices, creating a positive impact on both
individual lives and the environment.

8
1.4 Product Vision Statement

1.4.1 Audience:

● Primary Audience: Cooking enthusiasts and home cooks seeking convenient,


personalized recipe generation from food images.
● Secondary Audience: Nutritionists, culinary experts, and food bloggers looking to
share recipes and culinary insights interactively.

1.4.2 Needs:

● Primary Needs:
○ A user-friendly platform to generate customized recipes based on food images.
○ Easy access to a variety of recipes tailored to available ingredients.
○ Health-focused recommendations and ingredient substitutions for personalized
nutrition.
● Secondary Needs:
○ Tools to categorize and save recipes for future use.
○ Community-driven features for sharing and exploring diverse culinary
practices.
○ Insights and tips from culinary experts to refine cooking skills and practices.

1.4.3 Products:

● Core Product: An AI-powered recipe generator that transforms food images into
complete recipes, including ingredients, cooking instructions, and health-conscious
substitutions.
● Additional Features:
○ Ingredient optimization to reduce food waste by using available resources.
○ Search and filter options for easy access to recipes by dietary preferences or
cuisines.
○ Personalized suggestions based on user interactions, dietary needs, and taste
preferences.
○ Feedback mechanisms for continuous improvement and user satisfaction.

9
1.4.4 Values:

Core Values:

● Personalization:
"CookAI" prioritizes personalized recipe experiences by adapting recipes to user
inputs, dietary preferences, and ingredient availability. This ensures that every user
receives recipes that are both relevant and enjoyable, accommodating individual tastes
and nutritional requirements.
● Sustainability:
The platform emphasizes sustainable cooking practices, helping users minimize waste
by using available ingredients effectively. Through thoughtful recipe suggestions and
ingredient optimization, "CookAI" contributes to reducing environmental impact and
promoting conscious cooking.
● Inspiration:
"CookAI" fosters culinary creativity, inspiring users to try new dishes and techniques.
By providing recipe suggestions based on food images, it helps users expand their
cooking horizons and experiment in the kitchen, making cooking an exciting and
creative journey.
● Inclusivity:
The platform is designed to be accessible for users of all culinary skill levels, from
beginners to experienced cooks. By breaking down complex recipes into
easy-to-follow steps and suggesting alternatives, "CookAI" makes cooking
approachable and inclusive.
● Convenience:
"CookAI" transforms cooking from a time-consuming task into a convenient
experience by generating recipes instantly from photos. This saves users time on meal
planning and grocery shopping by allowing them to make dishes from ingredients
they already have.

10
Differentiators:

● AI Recipe Generation:
The platform leverages cutting-edge deep learning to generate recipes from food
images, making cooking more accessible and innovative. This technology allows
users to get customized recipes instantly, bringing AI-powered convenience directly
into the kitchen.
● Health-Driven Suggestions:
"CookAI" offers ingredient substitutions and health-conscious alternatives, helping
users make informed choices that align with their nutritional goals. By suggesting
healthier ingredients or lower-calorie options, it supports users in maintaining
balanced diets.
● Sustainable Cooking:
Supporting sustainable cooking practices, "CookAI" encourages users to reduce waste
by using available ingredients. Through ingredient-based recipe generation, it enables
users to prepare meals that make the most of what they already have, promoting
mindful consumption.
● Community Engagement:
"CookAI" enables users to share recipes, tips, and cooking experiences with a
community of like-minded individuals. This peer-to-peer connection fosters a sense of
community, allowing users to learn from each other and exchange creative culinary
ideas.
● Continuous Learning and Improvement:
As users interact with the platform, "CookAI" refines its recommendations based on
feedback and engagement. This continuous learning capability allows the platform to
evolve and improve, making each recipe more accurate and tailored to user
preferences over time.

11
1.5 Product Goal

The primary goal of "CookAI Recipe Generator" is to revolutionize the cooking experience
by providing an accessible, personalized approach to recipe creation through AI technology.
This platform empowers individuals to cook confidently by transforming food photos into
detailed, customized recipes that align with their unique preferences and dietary needs. By
leveraging deep learning and natural language processing, "CookAI" continually refines its
recipe generation capabilities, making the cooking experience more intuitive, engaging, and
enjoyable over time. This goal is rooted in making culinary knowledge widely accessible,
enabling users to easily explore diverse cuisines and cooking techniques from the comfort of
their own kitchens.

Beyond personalized recipe generation, "CookAI" aims to foster a sense of culinary


community by encouraging users to experiment with ingredients and share their creations.
The goal is to create a sustainable cooking environment where users not only discover new
recipes but also contribute to a growing library of culinary insights through user feedback and
shared experiences. This approach ensures that cooking is not just a solitary activity but a
shared journey that celebrates creativity and collaboration.

Ultimately, the product goal is to build a culinary ecosystem that is not just about following
recipes but about fostering creativity, promoting sustainable food practices, and enhancing
user well-being. By combining AI-driven personalization with community-driven culinary
exploration, "CookAI" aspires to make cooking a rewarding, inclusive, and socially impactful
experience that encourages both individual growth and community connection.

12
1.6 Product Backlog

Table 1.1 User Stories

S.No User Stories of "CookAI - Recipe Generator" Application


1. As a new user, I want to easily register on the platform so that I can gain access to
features like recipe generation and personalized recommendations.

2. As a new user, I want to create a personal profile after registration so that I can
save my generated recipes and set dietary preferences.
3. As a user, I want to upload a photo of a dish so that I can receive an AI-generated
recipe, including ingredients and step-by-step cooking instructions.
4. As a user, I want to browse various recipe categories so that I can explore new
dishes and find recipes that match my tastes.
5. As a user, I want the platform to suggest ingredient substitutions based on my
dietary preferences so that I can cook healthier or allergy-friendly meals.
6. As a user, I want to participate in recipe sharing and discussions so that I can
share my creations, get feedback, and learn new techniques from the community.
7. As a user, I want to receive real-time suggestions on cooking adjustments while
following the recipe so that I can make the dish successfully.

8. As a user, I want the platform to analyze the ingredients in my uploaded image so


that I can reduce waste by making recipes based on available items.

9. As a user, I want to engage in forums and share tips so that I can learn from the
community and enhance my cooking knowledge.
10. As a user, I want enhanced search functionality to find recipes by ingredients,
dietary requirements, or cuisines quickly and efficiently.
11. As a user, I want to provide feedback on the platform’s recipes and features so that
I can contribute to improving the user experience and content relevance.

13
The product backlog of "CookAI Recipe Generator" was configured using an Agile Board, as
shown in Figure 1.1. This product backlog includes all user stories for the AI-based recipe
generator application. Each user story details necessary parameters such as MoSCoW
prioritization, functional and non-functional requirements, and acceptance criteria with linked
tasks for efficient project tracking and development.

Figure 1.1 Planner Board of Cook AI

1.7 Product Release Plan

Figure 1.2 Release plan of Cook AI

14
CHAPTER 2

SPRINT PLANNING AND EXECUTION

2.1 Sprint 1

2.1.1 Sprint Goal with User Stories of Sprint 1


The goal of the first sprint is to build the user landing page and enable core functionalities
like user registration, profile creation, and image-based recipe generation. This sprint aims to
establish a smooth onboarding process and provide the foundational functionality for
generating and exploring recipes based on user-uploaded images.

The following table 2.1 represents the detailed user stories of the sprint 1

Table 2.1 Detailed User Stories of sprint 1

S.NO Detailed User Stories


1. As a new user, I want to easily register on the platform so that I can gain access to
features like personalized recipe generation and ingredient-based suggestions.
2. As a new user, I want to create a personal profile after registration so that I can save
my generated recipes, set dietary preferences, and manage my cooking history.
3. As a user, I want to upload an image of a dish so that the platform can analyze it and
generate a recipe with ingredients and instructions for me to try cooking.

2.1.2 Functional Document

2.1.2.1. Introduction

The "CookAI - Recipe Generator" project aims to create a user-friendly platform that
harnesses artificial intelligence to transform food images into comprehensive, personalized
cooking recipes. This platform is designed to simplify cooking by providing tailored recipes
based on user preferences, fostering creativity in the kitchen, and promoting sustainable food
practices. The project focuses on delivering a personalized culinary experience while also
enabling users to share, explore, and experiment with recipes through AI-powered
technology.

15
2.1.2.2. Product Goal

The primary goal of this project is to develop a platform that enhances the cooking
experience by providing personalized, AI-generated recipes. The platform aims to:

● Generate customized recipes based on images of food dishes.


● Offer ingredient substitutions and suggestions to accommodate dietary preferences.
● Utilize AI to continuously refine recipe accuracy and personalization.
● Foster a community of cooking enthusiasts who can share, learn, and engage with
each other’s culinary creations.

2.1.2.3. Demography (Users, Location)

Users:

● Target Users: Home cooks, food bloggers, nutritionists, and individuals interested in
exploring new recipes.
● User Characteristics: Varied levels of cooking expertise, dietary preferences, and
culinary interests.

Location:

● Target Location: Global, with a focus on regions where cooking at home is culturally
prevalent and access to technology is widespread.

2.1.2.4. Business Processes

The key business processes include:

● User Registration and Authentication:


Users can register securely using email or social media accounts. Authentication
ensures secure access to personalized recipe generation and content.
● Personalized Recipe Generation:
The system generates customized recipes based on the uploaded food images, user
preferences, and dietary restrictions.

16
● Ingredient Optimization:
The platform suggests ingredient substitutions and ways to minimize food waste by
offering recipes based on available ingredients.

2.1.2.5. Features

The project focuses on implementing the following key features:

● Feature 1: User Registration

○ Description:
Users can create an account to access personalized recipes and save their
preferences.

○ User Story:
As a user, I want to easily register and create an account so I can save and
access my customized recipes.

● Feature 2: Image-Based Recipe Generation

○ Description:
The platform allows users to upload a food image, which the AI analyzes to
generate a recipe including ingredients and instructions.

○ User Story:
As a user, I want to upload a picture of a dish and receive a complete recipe so
I can cook it at home.

● Feature 3: Enhanced Search Functionality

○ Description:
The platform offers advanced search options, enabling users to find recipes by
cuisine, ingredients, or dietary requirements.

○ User Story:
As a user, I want to easily search for recipes using filters so I can quickly find
dishes that match my preferences.

17
2.1.2.6. Authorization Matrix

Table 2.2 Access level Authorization Matrix

Role Access Level


Full access to user management, content management, and
Administrator platform settings.
Access to recipe creation, user interaction tools, and content
Educator management related to cooking.
Access to personalized recipes, ingredient optimization, and
Learner community features.
Limited access to browse publicly available recipes and explore
Guest User content.

2.1.2.7. Assumptions
● The AI models for recipe generation and personalization will be trained using a
diverse dataset that reflects a wide range of cuisines, ingredients, and dietary needs.
● The development team will have access to cloud infrastructure for testing,
deployment, and scaling of the platform.
● Users and stakeholders will provide timely feedback throughout testing phases to
ensure continuous improvement.

2.1.3 Architecture Document

2.1.3.1. Application

Microservices: The "CookAI - Recipe Generator" platform is built on a microservices


architecture, where each core functionality is managed by independent services. Key services
include:

● Authentication Service:
Manages user registration, login, and account recovery, ensuring secure access to
user-specific features like personalized recipe storage and profile management.
● Image Analysis Service:
Handles the processing of uploaded food images, using deep learning models to
identify ingredients and suggest relevant recipes based on the recognized dish.

18
● Recipe Generation Service:
This service combines the identified ingredients and image analysis results with
natural language processing to generate a complete recipe, including instructions and
optional ingredient substitutions.
● User Profile Management Service:
Manages user data, dietary preferences, saved recipes, and personalized settings,
enabling a tailored experience for each user.
● Notification Service:
Manages the sending of real-time notifications related to recipe recommendations,
community interactions, and platform updates to keep users engaged and informed.

● Community Interaction Service:


Facilitates user engagement by managing recipe sharing, comments, and feedback
within the platform, encouraging a community-driven cooking experience.

2.1.3.2 System Architecture:

Figure 2.3 System Architecture Diagram

19
2.1.3.3. Data Exchange Contract:

Frequency of Data Exchanges: Data exchanges on the "CookAI - Recipe Generator"


platform are managed based on timing and operational needs:

● Real-Time Exchanges:
For critical operations like user authentication, recipe generation, and image analysis,
data is exchanged in real-time via APIs to ensure quick response times and a smooth
user experience.
● Periodic Syncs:
Non-critical data, such as user activity logs, historical recipe usage data, and
community engagement metrics, is synchronized at scheduled intervals for
performance optimization.

Data Sets: The platform manages several key data sets, each with specific exchange
requirements:

● User Data:
Includes personal details, preferences, dietary restrictions, and saved recipes. This
data is exchanged during login, profile updates, and preference adjustments.
● Recipe Data:
Encompasses recipe details, ingredients, cooking instructions, and image-based
metadata, exchanged when generating recipes or updating recipe content.
● Community Interaction Data:
Tracks user feedback, comments, and recipe sharing activity. This data is exchanged
when users engage with shared content or leave feedback.

Mode of Exchanges (API, File, Queue, etc.): Various methods are used for data exchange
across the platform:

20
● API:
RESTful APIs facilitate real-time data exchanges between the front-end and back-end
services, ensuring immediate access to personalized recipes and user updates.
● Message Queues:
Services such as RabbitMQ or AWS SQS are employed for asynchronous tasks, like
sending notifications for recipe recommendations or processing community
interactions in the background.
● File-Based Exchanges:
Bulk data, such as high-resolution food images or recipe uploads, is handled via file
exchanges using cloud storage solutions like AWS S3 for efficient management and
scalability.

2.1.4 UI DESIGN

21
2.1.5 Functional Test Cases
Table 2.3 Functional Test cases

Actual
Test Case ID Test Case Description Input Expected Output Output
Image file
TC1 Verify image upload (jpeg/png/jpg) Image displayed True

TC2 Verify dish recognition Image bytes Recognized dish name True
Recipe details
Fetch recipe by dish Recognized (ingredients,
TC3 name dish name instructions) True
Verify ingredient list List of ingredients
TC4 display Recipe data displayed True

Verify YouTube video Valid YouTube video


TC5 link retrieval Dish name URL True
Check handling of Invalid file Error message
TC6 invalid image type displayed True
Check handling of Unrecognized Error message
TC7 unrecognized dish image displayed True

2.1.6 Daily Call Progress

Figure 2.4 Standup meetings

22
2.1.7 Committed Vs Completed User Stories

Figure 2.5 Bar graph for Committed Vs Completed User Stories

2.1.8 Sprint Retrospective

Liked Learned Lacked Logged For

Better recognition Researching


Smooth API integration, accuracy, APIs, improving
engaging UI API limits in dish recognition, nutrition customization options data
Adding filters,
Core features delivered Consistent nutrition user feedback
on schedule Value of user feedback for accuracy data, feedback tool option

Figure 2.6 Sprint Retrospective for the Sprint 1

23
2.2 SPRINT 2

2.2.1 Sprint Goal with User Stories of Sprint 2

The goal of Sprint 2 is to expand the platform’s functionality by introducing advanced search
features, ingredient optimization, and community interaction. These additions will enable
users to find relevant recipes easily, substitute ingredients effectively, and engage with other
users through sharing and feedback mechanisms.

Sprint 2 Key Deliverables:

● Enhanced Recipe Search Functionality


○ User Story:
As a user, I want to search for recipes by cuisine, ingredients, or dietary
requirements so that I can easily find recipes that match my preferences.
○ Objective:
Develop advanced search filters for cuisine type, specific ingredients, cooking
time, and dietary preferences.
● Ingredient Substitutions and Optimization
○ User Story:
As a user, I want ingredient substitution options and suggestions for reducing
food waste so that I can use what I have on hand and avoid unnecessary waste.
○ Objective:
Provide AI-powered ingredient substitutions based on user input, dietary
preferences, or allergy constraints.
● Community Engagement Features
○ User Story:
As a user, I want to share my recipes, comment on others' creations, and
provide feedback so that I can engage with the community and learn from
others.
○ Objective:
Enable recipe sharing, commenting, rating, and providing feedback to foster
community interaction.

24
● Real-Time Notifications
○ User Story:
As a user, I want to receive notifications about new recipe suggestions,
community feedback, and personalized recommendations so that I stay
engaged with the platform.

○ Objective:
Implement a real-time notification system for recipe updates, feedback, and
community interactions.

2.2.2 Functional Document


● Enhanced Search and Filtering
○ Allows users to search for recipes using multiple criteria such as ingredient
type, cuisine, dietary needs, and preparation time.
● Ingredient Optimization and Substitution
○ Suggests useful alternatives for ingredients to reduce food waste and cater to
dietary preferences or allergies.
● Recipe Sharing and Feedback

○ Users can share their own customized recipes, provide comments, and give
feedback on others' creations.

2.2.3 Architecture Document


● Community Interaction Microservice
○ Manages user interactions, such as recipe sharing, comments, and ratings.
● Notification Service

○ Sends real-time notifications related to recipe suggestions, community


engagement, and platform updates.

2.2.4 UI Design
● Search and Filter Interface
○ Design and implement user-friendly search filters that allow users to easily
locate recipes based on specific criteria.
● Community Interaction Features

○ Design user interface for recipe sharing, commenting, and rating.

2.2.5 Functional Test Cases


● Test Search Functionality

25
○ Verify that users can search for recipes based on filters like ingredients,
cuisine, and dietary preferences.
● Test Ingredient Substitution
○ Ensure the platform provides accurate and useful substitutions for selected
ingredients.

2.3 Sprint 3

2.3.1 Sprint Goal with User Stories of Sprint 3

The goal of Sprint 3 is to refine existing features based on user feedback from the first two
sprints. It will also introduce advanced personalization, performance optimization, and deeper
insights into user engagement through an analytics dashboard.

Sprint 3 Key Deliverables:

● Advanced Recipe Personalization


○ User Story:
As a user, I want to receive more personalized recipe suggestions based on my
previous activity so that I can explore new recipes that match my preferences.
○ Objective:
Enhance AI algorithms to provide more accurate and personalized recipe
suggestions based on user history and feedback.
● User Analytics and Insights
○ User Story:
As an administrator, I want to track user activity and engagement so that I can
improve the platform based on user behavior and preferences.
○ Objective:
Develop an analytics dashboard to track user interactions, recipe searches,

26
ingredient usage, and overall engagement metrics.

● Performance Optimization
○ User Story:
As a user, I want the platform to quickly analyze uploaded images and
generate recipes so that I don’t have to wait too long.
○ Objective:
Optimize image recognition and recipe generation algorithms to reduce
processing times and improve performance.
● UI/UX Refinement
○ User Story:
As a user, I want a smooth and intuitive interface so that I can easily navigate
the platform without confusion.
○ Objective:
Refine UI and UX design based on user feedback, ensuring the platform is
visually appealing and responsive across devices.

2.3.2 Functional Document

● User Analytics Dashboard


○ Provides administrators with insights into user behavior, including recipe
searches, feedback, and engagement metrics.
● Deeper Recipe Personalization
○ Uses advanced AI to offer tailored recipe recommendations based on the
user’s activity history and feedback.
● Performance Optimization
○ Ensures faster response times for image recognition and recipe generation
processes.

2.3.3 Architecture Document

● Analytics Microservice
○ Gathers and analyzes data related to user activity, engagement, and
performance to offer actionable insights.

27
● Performance Optimization
○ Focus on optimizing the microservices for image recognition and recipe
generation to ensure quick processing times.

2.3.4 UI Design

● User Analytics Dashboard


○ Design an intuitive and visually appealing analytics dashboard for
administrators to monitor user behavior.
● UI Refinement for Recipe Generation and Search
○ Improve the overall user interface for recipe upload and search functionalities
based on user feedback.

2.3.5 Functional Test Cases

● Test Analytics Dashboard


○ Verify that the data presented on the analytics dashboard is accurate and
provides useful insights for administrators.
● Test Recipe Personalization
○ Ensure that the platform delivers personalized recipe recommendations based
on a user’s previous activity and preferences.
● Test Platform Performance
○ Test and validate the performance of image recognition and recipe generation
to ensure quick and smooth operations.

28
CHAPTER 3

RESULTS AND DISCUSSION

3.1 Project Outcomes

The "CookAI" project effectively accomplishes its main goal, which is to convert dish photos
into thorough recipe recommendations enhanced with ingredient lists, serving sizes, projected
calorie counts, thorough directions, and pertinent YouTube tutorials. Accurate dish
identification from uploaded photographs is made possible by the integration of Clarifai's
image recognition API, which serves as a gateway to additional features. The following are
the primary results attained:

Dish Recognition: Using user-provided photos, the Clarifai API correctly determines the
type of dish, laying the groundwork for recipe lookup and educational assistance.

Recipe Information: CookAI uses TheMealDB API to obtain and display ingredients
together with measurements and preparation instructions, making it simple for users to
reproduce well-known dishes.

Nutritional Estimation: CookAI generates a random estimate of calories between


predetermined ranges. Users can learn more about the dish's calorie composition using this
approximation.

User Guidance through Video Tutorials: CookAI helps users learn visually and improves
their cooking experience by using the Google YouTube API to present a pertinent cooking
video tutorial based on the identified food.

All things considered, the CookAI app provides users with a seamless and engaging
experience by converting image-based searches into practical culinary knowledge. Future
enhancements might focus on improving item customisation according to dietary preferences,
expanding the cuisines covered, and improving calorie estimation.

29
3.2 Committed Vs Completed User stories

Figure 3.7 Committed vs Completed

30
CHAPTER 4

CONCLUSION & FUTURE ENHANCEMENTS

Conclusion

By converting food photos into customised recipes, the CookAI-Recipe Generator project
seeks to offer a smooth cooking experience. Users may explore, store, and create recipes with
ease once the platform's core features—such as user registration, profile management, and
image-based recipe generation—are in place. The platform is a dependable and entertaining
resource for foodies of all skill levels because of its user-friendly UI and AI-powered
technologies.

Future Enhancements

1. Dietary Analysis in Real Time:

● Provide users with dietary breakdowns depending on their health objectives by


integrating nutritional analysis for products and recipes (e.g., calorie count,
macronutrients, and allergen warnings).

2. Voice-Activated Directions for Recipes:

● Use voice-guided recipe instructions to allow users to cook hands-free, which will
make it simpler to follow directions.

3. Support for Multiple Languages:

● Increase language support to attract a wider range of users, particularly in areas where
people are passionate about cooking but have low levels of English competence.

4. Improved Customisation of AI Recipes:

● Improve the models for generating recipes to better suit regional components,
seasonal crops, and particular culinary preferences.

5. Connectivity with Intelligent Kitchen Appliances:

● Allow synchronisation with smart kitchen appliances (such as cookers and ovens) so
that cooking parameters are automatically changed in accordance with recipe
directions.

CookAI's usefulness and appeal will be strengthened by these upcoming developments,


giving customers an even more convenient, individualised, and immersive cooking
experience..

31
APPENDIX

Appendix A: API Details

A.1 Clarifai API

● Purpose: Identifies dish names from images.

● Endpoint: https://api.clarifai.com
● Sample Call: model.predict_by_bytes(image_bytes, input_type="image")

A.2 TheMealDB API

● Purpose: Provides recipe details (ingredients, instructions).

● Endpoint: https://www.themealdb.com/api/json/v1/1/search.php?s=dish_name

A.3 YouTube API

● Purpose: Find relevant recipe videos.

● Endpoint: https://www.googleapis.com/youtube/v3/search

Appendix B: Key Code Snippets

B.1 Dish Recognition:


def recognize_dish(image_bytes):

model = Model(url="https://clarifai.com/...", pat=clarifai_pat)

return
model.predict_by_bytes(image_bytes).outputs[0].data.concepts[0].name

B.2 YouTube Video Search:


def get_youtube_video(dish_name):

youtube = build('youtube', 'v3', developerKey=google_api_key)

response = youtube.search().list(part="snippet", maxResults=1,


q=f"{dish_name} recipe").execute()

return
f"https://www.youtube.com/watch?v={response['items'][0]['id']['videoId']}"

32
Appendix C: Sample coding
import streamlit as st

from clarifai.client.model import Model

from PIL import Image

import requests

from io import BytesIO

from googleapiclient.discovery import build

# API Keys

clarifai_pat = "5a2c5e444b9b40ab9e4f60f950e71bfd"

google_api_key = 'AIzaSyAdj0qB_7Z5LuTosBkI_oY47USIZ_MtvVU'

# Functions for YouTube video and dish recognition

def get_youtube_video(dish_name):

youtube = build('youtube', 'v3', developerKey=google_api_key)

response = youtube.search().list(part="snippet", maxResults=1,


q=f"{dish_name} recipe").execute()

return
f"https://www.youtube.com/watch?v={response['items'][0]['id']['video
Id']}"

def recognize_dish(image_bytes):

model=Model(url="https://clarifai.com/clarifai/main/models/foo
d-item-recognition", pat=clarifai_pat)

prediction=model.predict_by_bytes(image_bytes,
input_type="image")

return prediction.outputs[0].data.concepts[0].name if
prediction.outputs else None

# App interface

st.title('CookAI 🍳')
uploaded_file = st.file_uploader("Upload an image:", type=["jpeg",
"png", "jpg"])

33
if uploaded_file:

image = Image.open(uploaded_file)

st.image(image, caption='Uploaded Image')

image_bytes = BytesIO()

image.save(image_bytes, format='PNG')

dish_name = recognize_dish(image_bytes.read())

if dish_name:

st.write(f"### Dish Name: {dish_name}")

video_url = get_youtube_video(dish_name)

st.write("### Watch a tutorial:")

st.video(video_url)

else:

st.write("Dish not recognized.")

Appendix D: Sample Screenshots

1. Dish identification result

34
2. Recipe and ingredient list

3. Calorie estimate

35
4. Recipe video tutorial link

36
PLAGIARISM REPORT

Project Title: CookAI

The "CookAI" project uses machine learning and image recognition to recognise dishes from
provided photos, offer recipes, and connect pertinent video tutorials. The application makes
use of the YouTube API to retrieve instructional videos and the Clarifai API to recognise food
items.

Methodology
● Image Recognition: Utilizes the Clarifai API to recognize dishes from images.
● Recipe Retrieval: Fetches recipes and ingredients from TheMealDB API.
● YouTube Integration: Links cooking tutorials using the Google YouTube API.

Results
The project's essential features were effectively put into practice. When a user uploads an
image, the program will:

● Identify the dish


● Show the dish's name.
● Give cooking directions and an ingredient list.
● Provide a pertinent YouTube video instructional for additional direction.
● Comparability to Current Works
Although the techniques employed in "CookAI" are based on technology and APIs that are
openly accessible, there are already programs that carry out comparable tasks.

Conclusion
"CookAI" is a cutting-edge use of current technologies to improve culinary instruction and
expedite cooking procedures. But it's important to recognise the groundwork established by
earlier research in this field. The initiative aims to innovate within the framework offered by
the established technology rather than copying current solutions.

37

You might also like