Final Year Major Project Report
Final Year Major Project Report
Project Report
BACHELOR OF TECHNOLOGY
in
By
(Assistant Professor)
May 2025
TABLE OF CONTENTS
DECLARATION………………………………………………………………........v
CERTIFICATE……………………………………………………………………..vi
AKNOWLEDGEMENT……………………………………………………….......vii
ABSTRACT……………………………………………………………………….viii
LIST OF FIGURES………………………………………………………………...ix
LIST OF TABLES………………………………………………………………….x
LIST OF ABBREVIATIONS………………………………………………….......xi
1.1.2 What are the key studies and findings in the field……………………2
1.1.3 Key Highlights of the current state of Recipe Generator Using Food
Images………………………………………………………………………2
ii
1.3.8 Deployment and Future Enhancements………………………………8
iii
2.4.4 Economic Viability……………………………...............................24
3.6 Conclusion……………………………………………………………….28
4.1 Testing………………………………………………...............................29
4.3 Evaluation……………………………………………………………….33
4.5 Conclusion……………………………………………………………....35
iv
CHAPTER 6 (PROJECT MANAGEMENT)
6.10 Conclusion……………………………………………………………...44
6.11 Result……………………………………………………………...........45
PLAGIARISM REPORT....................................................................................49
RESEARCH PAPER...........................................................................................51
CERTIFICATES…………………………………………………………….....56
APPENDIX A.......................................................................................................58
APPENDIX B.......................................................................................................59
REFERENCES………………………………………………………………....60
v
DECLARATION
I hereby declare that this submission is my own work and that, to the best of my
knowledge and belief, it contains no material previously published or written by
another person nor material which to a substantial extent has been accepted for the
award of any other degree or diploma of the university or other institute of higher
learning, except where due acknowledgment has been made in the text.
Signature:
Roll no.:2200950109007
Signature:
Signature:
vi
CERTIFICATE
This is to certify that Project Report entitled “Recipe Generator Using Food Images”
which is submitted by Saket Gupta, Utsav Chaturvedi, Krish Sharma in partial
fulfillment of the requirement for the award of degree B. Tech. in Department of
Computer Science and Engineering of MGM’s College of Engineering and
Technology which is affiliated by AKTU Lucknow, is a record of the candidate own
work carried out by him/her under my supervision. The matter embodied in this report
is original and has not been submitted for the award of any other degree.
vii
ACKNOWLEDGEMENT
It gives us a great sense of pleasure to present the report of the B. Tech Project
undertaken during B. Tech. Final Year. We owe special debt of gratitude to Mr. Shashi
Kant Mourya Department of Computer Science & Engineering, MGM’s College of
Engineering and Technology, Noida for his/her constant support and guidance
throughout the course of our work. His/her sincerity, thoroughness and perseverance
have been a constant source of inspiration for us. It is only his/her cognizant efforts
that our endeavors have seen light of the day.
We also take the opportunity to acknowledge the contribution of Mrs. Karamjeet Kaur
Head, Department of Computer Science & Engineering, MGM’s College of
Engineering and Technology, Noida for his/her full support and assistance during the
development of the project.
We also do not like to miss the opportunity to acknowledge the contribution of all
faculty members of the department for their kind assistance and cooperation during
the development of our project. Last but not the least, we acknowledge our friends for
their contribution in the completion of the project.
Signature:
Roll no.:2200950109007
Signature:
Signature:
viii
ABSTRACT
The integration of deep learning techniques in culinary technology has opened new
avenues for automating recipe generation from food images. This project introduces
a sophisticated system that leverages Convolutional Neural Networks (CNNs) and
advanced image processing algorithms to identify ingredients from uploaded food
images and generate corresponding recipes. The system begins with image
preprocessing to enhance the quality and extract significant features, followed by
ingredient classification using CNNs. These identified ingredients are then used by
the recipe generation algorithm to create detailed recipes, providing users with
comprehensive cooking instructions based on the visual input.
By utilizing a large dataset of food images and recipes, the system learns to generalize
across various cuisines, making it versatile and effective. The project highlights the
potential of combining computer vision and natural language processing to align
visual content with textual recipes, addressing challenges in ingredient recognition
and ensuring coherent recipe generation
This innovative approach not only simplifies the culinary process for users but also
enhances their cooking experience by offering personalized and accurate recipe
suggestions based on the food items at hand. The use of multimodal learning
techniques further enriches the system's capability to understand and process visual
and textual data concurrently, paving the way for more advanced applications in the
future.
ix
LIST OF FIGURES
x
LIST OF TABLES
xi
LIST OF ABBREVIATIONS
AI Artificial Intelligence
ML Machine Learning
DL Deep Learning
UI User Interface
UX User Experience
DB Database
JS JavaScript
xii
Abbreviation Full Form
xiii
CHAPTER 1
INTRODUCTION
The "Recipe Generator Using Food Images" is an innovative project designed to utilize deep
learning techniques to transform how individuals engage with food imagery. In the current
digital age, food photography is a popular source of inspiration, with millions sharing and
viewing food-related content on social media platforms. However, recreating these dishes
often poses a challenge for many due to insufficient culinary knowledge or lack of detailed
recipes. This project seeks to fill that gap by developing a system that can generate complete
cooking recipes, including creative dish names, ingredient lists, and step-by-step instructions,
simply from analyzing food images.
The core concept of the project revolves around employing advanced machine learning
models—specifically computer vision and natural language processing—to accurately
identify dish components and convert visual information into text. By doing so, the Recipe
Generator enables users to transform food imagery into practical culinary guidance, helping
them try out new recipes or recreate meals from photos. This technology holds great promise
in fields such as gastronomy, recipe personalization, and food blogging, providing a valuable
tool for both beginner cooks and culinary enthusiasts alike.
By incorporating methods like image classification, object detection, and recipe generation
models, this project highlights the intersection between artificial intelligence and food
technology, offering a useful solution for anyone looking to enhance their cooking experience
based on visual inspiration.
The combination of food recognition, recipe generation, and deep learning has seen
significant progress in recent years, fueled by advancements in computer vision and natural
language processing (NLP). Generating recipes from food images is a complex task that
involves both visual recognition and language generation, with several approaches, datasets,
and models contributing to the field.
Generating recipes from images involves not just recognizing food items but also converting
that data into structured text. Early methods used rule-based systems that mapped identified
ingredients to pre-set cooking instructions (Salvador et al., 2017). However, these systems
lacked flexibility and often produced repetitive results.
Neural networks, particularly Recurrent Neural Networks (RNNs) and Long Short-Term
Memory (LSTM) networks, have since been used to generate more coherent and diverse
recipe text. Salvador et al.'s Pic2Recipe system combined CNNs for ingredient recognition
with RNNs for recipe generation, showcasing the potential for modern recipe generation
systems.
More recent text generation models like GPT (Generative Pre-trained Transformer) and
BERT (Bidirectional Encoder Representations from Transformers) have demonstrated the
ability to generate more detailed and contextually appropriate recipes. Zhu et al. (2020)
1
explored multimodal learning, integrating both image and text data to improve the quality and
variety of generated recipes.
1.1.2 What are the key studies and findings in the field:
1.1.3 Key Highlights of the current state of Recipe Generator Using Food Images:
Recent advancements in deep learning, computer vision, and natural language processing
have greatly influenced the development of recipe generators using food images. Significant
progress has been made in the following areas:
Improved Food Image Recognition: CNNs have become highly accurate in classifying
food items and ingredients from images. Models such as ResNet and Inception, along
with large datasets like Food-101 and Recipe1M, have played crucial roles in
improving recognition across a wide range of cuisines and presentations.
Multimodal Learning Integration: Modern recipe generation systems use both visual
and textual data to better understand the relationship between a dish's appearance and
its ingredients. By combining computer vision with NLP techniques like transformers,
these models can generate more coherent and natural recipe instructions.
2
intricate recipes is still a challenge, especially when regional variations in cooking
methods come into play.
Applications and Personalization: Recipe generators are being used in areas like food
blogging and smart kitchen assistants. However, the ability to personalize recipes
based on dietary needs, preferences, or ingredient availability is still in development,
with ongoing research addressing these limitations.
The current literature on Recipe Generators Using Food Images highlights significant
advancements in the fields of computer vision and natural language processing, but also
reveals several limitations and gaps that hinder the broader applicability and accuracy of
these systems.
Handling Mixed Dishes and Complex Foods: Current literature shows that food
recognition systems perform well on simple, single-item dishes, but encounter
difficulties with mixed or layered dishes. Complex meals such as soups, sandwiches,
or salads, which contain multiple ingredients presented together, can confuse models
that are primarily trained on well-separated, clearly visible food items. For example,
the Recipe M dataset (Marin et al., 2019), despite being a large dataset, does not
adequately address this complexity, limiting the effectiveness of models trained on
such data.
Dataset Limitations and Biases: The datasets used in food recognition and recipe
generation models, such as Food-101 (Bossard et al., 2014) and Recipe1M (Marin et
al., 2019), are often skewed toward Western cuisines, leading to biases in the models’
ability to recognize dishes from other cultures. This gap results in underrepresentation
of global cuisines, which reduces the system's utility for a more diverse, global
3
audience. Additionally, these datasets may not contain enough variety in food
presentation, limiting the generalization of models to real-world images with varying
quality, lighting, or angles.
In the era of social media, food imagery plays a significant role in influencing culinary
choices. However, many individuals struggle to recreate dishes they find appealing due to
a lack of cooking knowledge or experience. The challenge lies in developing an
intelligent system that can analyse food images and generate comprehensive cooking
recipes.
4
Key Objectives:
To design a deep learning model that accurately identifies ingredients and dish types
from food images.
To create a user-friendly interface that allows users to upload images and receive
recipes, bridging the gap between inspiration and execution in cooking.
In today’s digital world food image plays a crucial role in shaping preferences and
choices. With platforms like Instagram and Pinterest upbringing mouth watering food
photos, individuals are increasingly inspired to explore new dishes. However, many
aspiring cooks often find themselves at a loss when it comes to recreating these
visually appealing dishes, primarily due to a lack of cooking knowledge, experience,
or recipe access.
The Recipe Generator will provide users with a detailed recipe that includes
ingredient lists -by-step cooking instructions, and catchy titles, tailored to the
identified components of the dish. By bridging the gap between inspiration and action,
this project aims to empower individuals .with the tools and confidence, they need to
recreate their favorite dishes in their own kitchens, enhancing their culinary skills and
encouraging creativity in cooking.
5
1.3.1 Plan of Action:
Clearly define the goals of the project, focusing on improving the accuracy of
ingredient recognition and the quality of generated recipes.
Identify the target user base (e.g., individuals seeking easy recipe generation, people
with dietary restrictions, etc.).
Datasets:
• Use existing datasets like Recipe1M and Food-101 for initial model training.
• Supplement with additional datasets, especially those with global and regional
cuisine diversity, to reduce biases.
Augmentation:
6
1.3.4 Recipe Generation:
Multimodal Learning:
• Explore multimodal learning techniques that combine visual data (image) and
textual data (recipe) for more accurate recipe generation. This could involve
training a joint embedding space for both images and text
Recipe Adjustment:
Model Evaluation:
7
• Measure the coherence and usability of generated recipes through human
evaluation, asking participants to review or attempt cooking the generated
recipes.
User Feedback:
Deployment:
• Develop a web or mobile app interface for user interaction, allowing users to
upload images and receive recipes.
8
1.4 Proposed Module:
The system can be divided into several key modules, each focusing on a specific aspect of the recipe
generation process, from image recognition to the final output of a personalized, accurate recipe.
Below are the proposed modules.
Objective: To prepare the input food images for further analysis by applying
preprocessing techniques.
Components:
• Image Resizing: Standardize image sizes for consistent input to the deep
learning models.
• Image Enhancement: Apply techniques such as brightness adjustment, contrast
enhancement, and noise reduction.
• Data Augmentation: Generate more training data by applying transformations
like rotations, flips, and colour adjustments to simulate real-world variability.
Objective: To detect and identify ingredients in the uploaded food image using deep
learning models.
Components:
• Convolutional Neural Network (CNN): Use models like ResNet or
EfficientNet for food image recognition.
• Ingredient Classification: Perform multi-label classification to identify
multiple ingredients in complex dishes.
• Ingredient Confidence Scoring: Assign a confidence score to each detected
ingredient to ensure accuracy.
• Handling Complex Dishes: Implement techniques to handle visually mixed or
blended dishes by refining recognition algorithms.
9
Components:
• User Input Preferences: Allow users to input preferences (e.g., vegetarian,
gluten-free, low-carb) and dietary restrictions.
• Ingredient Substitution Engine: Provide recommendations for ingredient
substitutions if certain items are unavailable or restricted.
• Recipe Scaling: Offer options to scale the recipe based on the number of
servings required.
• Real-Time Ingredient Matching: Match the recognized ingredients with the
user’s available inventory or preferences.
Objective: To calculate the nutritional value of the generated recipe based on the
identified ingredients.
Components:
• Ingredient Nutrient Database: Connect the recognized ingredients to a
nutritional database to retrieve information about calories, macronutrients
(carbs, fats, proteins), and micronutrients.
• Nutritional Summary Generator: Generate a detailed nutritional breakdown for
the entire recipe, helping users understand its health value.
• Dietary Goal Alignment: Suggest modifications to the recipe to meet specific
health or fitness goals (e.g., low calorie, high protein).
Objective: To provide an intuitive interface for users to upload images, view recipes,
and interact with the system.
Components:
• Image Upload Interface: Allow users to easily upload food images from their
device.
• Recipe Display Interface: Display generated recipes with clear instructions,
including a breakdown of ingredients and cooking steps.
• Preference Setting: Enable users to set dietary preferences or ingredient
availability for more personalized recipe generation.
• Feedback and Rating System: Allow users to rate the accuracy of the
generated recipe or provide feedback for system improvement.
Objective: To ensure the accuracy and performance of the food recognition and recipe
generation models.
Components:
• Model Accuracy Testing: Evaluate the performance of the CNN for food
recognition using metrics like accuracy, precision, and recall.
• User Evaluation: Gather feedback from users about the usefulness and
accuracy of the generated recipes.
• Continuous Model Improvement: Regularly update and fine-tune models
based on user feedback and newly available data.
10
1.4.8 Multilingual Support Module:
11
1.5.2 Software Requirements:
Operating System:
• Development Environment:
1. Linux (Ubuntu 20.04+ recommended) for compatibility with deep
learning frameworks.
2. Windows 10/11 (with WSL2 for Linux compatibility) or macOS
(M1/M2 chips).
• Deployment Environment:
1. Linux-based OS for server deployment (Ubuntu, CentOS, or any other
stable Linux distribution).
Deep Learning Frameworks:
• TensorFlow 2.x or PyTorch: For building and training CNNs and NLP
models.
1. TensorFlow is widely used for large-scale projects, while PyTorch is
often preferred for research and model experimentation.
• Keras (optional): High-level API for TensorFlow for easy model prototyping.
Image Processing Libraries:
• OpenCV: For image preprocessing, augmentation, and manipulation.
• Pillow: Python Imaging Library (PIL) for basic image handling.
• scikit-image: For additional image processing tasks (e.g., filtering, image
segmentation).
Natural Language Processing Libraries:
• Hugging Face Transformers: For recipe generation using models like GPT,
BERT, or custom NLP models.
• spaCy or NLTK: For additional text processing and natural language tasks.
Data Handling and Storage:
• Pandas: For dataset manipulation (e.g., ingredient lists, recipes, and metadata).
• NumPy: For numerical operations and handling large data arrays.
• SQL / NoSQL Database: To store recipes, user preferences, and generated
data.
1. PostgreSQL (SQL) or MongoDB (NoSQL) for storing user inputs,
preferences, and generated recipe data.
Web Framework (For Deployment):
• Flask or Django: For building the web-based application where users upload
images and receive recipes.
• Fast API: For building fast, asynchronous APIs for communication between
the front end and the machine learning model.
Cloud Services (Optional):
• AWS S3 or GCP Cloud Storage: For storing images, datasets, and user-
generated content.
• AWS SageMaker or Google AI Platform: For training and deploying machine
learning models in the cloud.
Frontend Technologies:
• HTML/CSS/JavaScript: For building the front-end user interface.
• React.js or Vue.js: For creating dynamic and responsive web applications.
• Bootstrap or Material-UI: For UI design to ensure the interface is user-friendly
and mobile-responsive.
Version Control:
• Git: For managing code versions and collaboration.
12
• GitHub/GitLab/Bitbucket: For hosting code repositories and managing issues.
Package Management:
13
CHAPTER 2
A functional model represents the logical flow and interaction of different components
within the system, focusing on what the system does rather than how it is implemented. In the
Recipe Generator Using Food Images project, the functional model outlines the key
operations and data transformations required to convert a user-uploaded food image into a
corresponding recipe.
14
Step 1: User Interface
Description: The User Interface (UI) is the first point of interaction for users. It
allows users to upload food images for analysis.
Functionality:
Description: This step prepares the uploaded images for analysis by applying
preprocessing techniques.
Functionality:
• Image Resizing: Standardizes image sizes to ensure consistency for the deep
learning model.
Functionality:
15
• Classifies ingredients through multi-label classification to identify multiple
ingredients in complex dishes.
Functionality:
• May incorporate multimodal learning to combine visual and textual data for
improved recipe generation.
Functionality:
• Displays the recipe in a clear and organized format, including sections for
ingredients and cooking instructions.
• Provides options for users to adjust the recipe based on preferences, such as
scaling the recipe or substituting ingredients.
The data modeling or data structuring represents the nature of data, and the business logic
to control the data. It also organizes the database. The structures of data are explicitly
determined by the data models. Data model helps to communicate between business
people, who require the computer system, and the technical people, who can fault their
requirements.
16
2.2.1 Data Flow Diagram:
The Data Flow Diagram (DFD), Figure 2.2, for "Recipe Generator" illustrates the
interaction between the User, Recipe Generator, and the System. The user captures and
uploads an image of a dish to Recipe Generator, which fetches and encodes the image
before sending it to the System. The System processes the image to predict the dish or
ingredients and generates a corresponding recipe. This recipe is then sent back to Recipe
Generator, which provides it to the user. The process showcases a streamlined workflow
where the user's image input is transformed into a detailed recipe output through
collaborative processing between Recipe Generator and the System.
17
The Level 1 Data Flow Diagram (DFD), Figure 2.3, for the "Recipe Generator" system
outlines the key processes and data exchanges between the User, Recipe Generator, the
System, and the Recipe Database. The user starts by uploading an image to Recipe
Generator. Recipe Generator sends this image to the System, which processes it and
encodes the image using the DenseNet201 model. The encoded image is then sent back
to Recipe Generator, where it checks for similarity with the recipes stored in the Recipe
Database. Once a matching recipe is found, Recipe Generator retrieves the recipe from
the database and displays it to the user. This diagram effectively captures the detailed
steps and interactions required to convert an uploaded image into a relevant recipe.
E-R diagram displays the relationship of entity sets stored in a database. ER diagrams
help to explain the logical structure of databases.ER model help us to analyze data
requirements systematically to produce a well-designed database.
18
2.2.3 Class diagram:
Class diagram describes the attributes and operations of a class and also the
constraints imposed on the system. The class diagrams are widely used in the
modeling of object-oriented systems because they are the only UML diagrams,
which can be mapped directly with object- oriented languages.
2.3 A Process Flow Model: This model describes the flow of controls in the system. This is
preparation to see how the system will work when executed.
19
2.3.1 Activity Diagram:
The activity diagram outlines the process flow for a recipe generator system using
images. Here's a step-by-step explanation of each stage:
1. Registration: The user first registers with the system to create an account.
2. Login: After registration, the user attempts to log in. If the login is unsuccessful,
the process loops back to prompt the user to log in again. If successful, the process
continues to the next step.
20
4. Segmentation: The pre-processed image is then segmented to isolate relevant
regions, such as the specific food items present in the image.
6. India-Based Feature Extraction: The system extracts feature from the food images
that are relevant for identifying Indian cuisine or specific regional dishes.
8. Result: Finally, the system generates a result, which could be the identified food
type along with possible recipe suggestions based on the classified food.
This sequence diagram illustrates the process flow for classifying a food image within
a recipe generation system. Below is a detailed breakdown of the key steps involved.
1. Login/Registration: The user initiates the interaction by logging into the system or reg
istering as a new user. This step ensures that the user has access to the system's featur
es and services.
21
2. Successful Login/Registration: Once the user provides the necessary credentials, the s
ystem authenticates the information. Upon successful verification, the user is granted
access to the system, confirming their login or registration.
3. Pre-Processing: The system begins by pre-
processing the uploaded image. This step involves preparing the raw image data for fu
rther analysis, including operations like resizing, normalization, and noise reduction.
4. Feature Extraction: After pre-
processing, the system extracts significant features from the image. This involves iden
tifying key attributes and patterns that are essential for recognizing the content of the i
mage.
5. Segmentation: The system then segments the image, isolating specific regions of inter
est that contain the food items. This step helps in focusing the analysis on relevant par
ts of the image.
6. Classification Using CNN: The segmented image regions are fed into a Convolutional
Neural Network (CNN) for classification. CNN is a deep learning algorithm that is hi
ghly effective in analyzing visual data and recognizing patterns.
7. Food Image Classification: Finally, the system completes the classification process, i
dentifying the food items in the image. The classification results are then provided to t
he user, displaying the recognized food items.
1. Algorithms:
2. Data Structures:
3. Files:
4. Interface Protocols:
22
WebSocket’s for real-time data updates and interactions.
1. Algorithms:
CNNs: Technically feasible with current machine learning frameworks (e.g., TensorFl
ow, PyTorch).
SVM and Decision Trees: Feasible but less accurate for complex image data.
2. Data Structures:
Arrays and Dictionaries: Efficient and feasible with ample computational resources.
Graphs: Feasible with efficient graph traversal algorithms for recipe generation.
3. Files:
Image Files and Databases: Technically feasible with cloud storage solutions (e.g., A
WS, Azure).
Configuration Files: Easily manageable and feasible.
4. Interface Protocols:
REST API and GraphQL API: Widely supported and feasible with modern web frame
works.
WebSockets: Feasible for real-time interactions but might require more resources.
1. Algorithms:
CNNs: High accuracy and reliable for complex image recognition tasks.
SVM and Decision Trees: Suitable for smaller, less complex tasks.
2. Data Structures:
3. Files:
23
4. Interface Protocols:
REST and GraphQL APIs: Ensure smooth data exchange between components.
WebSockets: Enhances user experience with real-time updates.
1. Costs:
The best design for this project will prioritize accuracy and user experience while maintainin
g economic Viability.
Chosen Design:
Algorithm: Convolutional Neural Networks (CNNs) for high accuracy in image recog
nition.
Data Structures: Arrays and Dictionaries for efficient data handling.
Files: Image files (JPEG, PNG) and SQL database for robust data management.
Interface Protocols: REST API for reliable and scalable communication.
24
CHAPTER 3
The recipe generator system is composed of several key modules, each handling a specific
and essential functionality. This modular approach allows easier debugging, testing, and
scalability. The implementation phase primarily utilized Python, TensorFlow, PyTorch,
OpenCV, Flask, and supporting libraries. A modular structure ensured that each component
could be developed, tested, and refined independently before final system integration. The
core modules implemented include:
Image Processing Module: This module is the entry point of the system where users
upload food images. The system accepts images in standard formats such as JPEG and
PNG. It performs crucial preprocessing operations like resizing, normalization, and
denoising to ensure compatibility and quality. Additional features such as cropping to
focus on the main food item and data augmentation for training were also
implemented.
User Interface Module: Developed using HTML, CSS, JavaScript, and Bootstrap,
this web-based UI enables seamless interaction with the backend system. Users can
upload images, view results, and interact with generated recipes. The interface is
designed to be intuitive and responsive, catering to both tech-savvy and non-technical
users.
25
Database Management Module: Implemented using MySQL, this module stores
user-uploaded images, detected ingredients, and generated recipes. It allows retrieval
of previous queries and supports logging, user history, and system audit trails.
Each module was first prototyped using mock data and independently tested using unit tests.
Subsequent refinements were made before their integration into the overall system.
Developing RESTful APIs using Flask to enable communication between the frontend
and backend.
Data Format Mismatch: Differences in tensor shapes or JSON keys were resolved
by implementing pre- and post-processing wrappers.
Latency Issues: To manage long model inference times, images were resized to
optimal dimensions, and asynchronous request handling was used.
Comprehensive integration testing was conducted after every milestone to ensure the
correctness and compatibility of the system. The system was deployed on a cloud platform
26
(AWS/GCP), and APIs were containerized using Docker for easy deployment and scalability.
Static and dynamic tests were run to simulate multiple user scenarios and stress conditions.
The integrated system achieved a smooth, efficient pipeline where the user's uploaded image
is preprocessed, passed through a CNN for ingredient detection, followed by NLP-based
recipe generation, and finally rendered in a visually engaging UI. This full-stack integration
validated the operational and technical feasibility of the project.
The user interface was integrated first to serve as the access point.
The machine learning model was linked with the image processor and the recipe
retrieval system.
Each integration step was accompanied by unit testing, integration testing, and error handling
validation to ensure data consistency and system stability.
Testing Tools: Postman (API testing), Browser Dev Tools (UI validation)
27
3.5 Challenges and Solutions:
3.6 Conclusion:
Module and system integration were critical in ensuring that the Recipe Generator Using
Food Images project functioned effectively from end to end. Through systematic integration
strategies, rigorous testing, and modular design, the individual components were successfully
combined into a robust, user-friendly, and intelligent application capable of transforming
food images into full recipe suggestions.
28
CHAPTER 4
4.1 Testing:
The testing phase of the Recipe Generator system aimed to validate functionality, reliability,
accuracy, and user satisfaction. This phase was critical in ensuring that the final system met
user expectations and operated efficiently under varying conditions. Several layers of testing
were performed, each targeting different aspects of the application.
Unit Testing Each module was tested independently using unit testing techniques to ensure
that individual components performed as expected. For the image processing module, tests
verified image format handling, resizing, and normalization processes. The ingredient
detection model was tested on known food images to validate output labels. The recipe
generation module was validated for syntax, relevance, and completeness of the generated
text. Tools like PyTest and unittest were used extensively.
Integration Testing Following unit tests, modules were integrated, and integration testing was
conducted to assess their interaction. The primary focus was on data flow and interface
communication between modules. For instance, ingredient lists from the detection module
were validated to ensure compatibility with the recipe generation model. API endpoints
developed in Flask were tested using Postman to validate input-output consistency.
System Testing System testing assessed the functionality of the entire application in a
simulated real-world environment. Scenarios included various types of food images (e.g.,
single dish, multiple items, blurry photos) to check system resilience. Results showed
consistent behavior across test cases. Testing also confirmed that system latency was within
acceptable bounds, with average response time from image upload to recipe generation
remaining under 5 seconds.
Functional Testing This type of testing ensured that the system met functional requirements.
Key functionalities tested included:
29
Proper storage and retrieval from the database
Responsive UI interactions All functional aspects passed the test cases defined in the
software requirement specifications (SRS).
Regression Testing After updates and modifications, regression testing was conducted to
ensure that existing functionalities remained unaffected. For instance, when the recipe
formatting logic was modified, previously working features like image upload and ingredient
prediction were re-tested to confirm continued functionality.
Performance Testing Performance metrics were collected to evaluate system efficiency and
scalability:
The system successfully handled 100 concurrent user requests with minimal latency
variations. These results demonstrated the system’s capacity to operate in real-time,
suitable for web deployment.
User Acceptance Testing (UAT) UAT was conducted by providing access to a sample group
of end users who tested the platform and provided feedback on usability, clarity, and
accuracy. Key feedback included:
Positive remarks on fast image processing and recipe generation Changes were made
based on this feedback, including improved formatting and addition of step numbers
in instructions.
Bug Tracking and Fixing All bugs and system anomalies found during testing were logged,
categorized by severity, and resolved. A centralized bug tracking sheet helped manage this
process. Most bugs were UI inconsistencies, rare incorrect predictions, or edge-case failures
(e.g., images with poor lighting or non-food items).
30
4.2 Types of Testing Performed:
Scope:
• Image preprocessing
Tools Used:
Scope:
Outcome: Integration testing confirmed that API requests correctly triggered model
predictions and the retrieval of corresponding recipes.
31
4.2.3 Functional Testing:
Test Cases:
Result: The system responded appropriately to all functional scenarios, passing over
95% of functional test cases.
• Ease of navigation
• Visual clarity
• Speed of interaction
Scope:
32
• Server response under peak load
Results:
Scope:
Outcome: No critical vulnerabilities found; CORS policy and file-type checks were
successfully enforced.
4.3 Evaluation:
The evaluation process focused on quantifying the system’s performance and usability
through well-defined metrics. These metrics were chosen based on system goals and included
both technical and user-centric parameters.
Accuracy Metrics
Ingredient Detection Accuracy: Using a labeled test dataset of 1,000 images, the
system achieved an accuracy of 87%.
Precision & Recall: Precision was calculated at 84% and recall at 86%, indicating
reliable ingredient identification with few false positives or negatives.
33
Grammar and Syntax: Evaluated using grammar tools, outputs were found to be 95%
grammatically correct.
Relevance: Manual review by culinary experts found that 88% of recipes were
relevant to the predicted ingredients.
90% were likely to recommend the tool Feedback also suggested interest in features
like multilingual support and dietary tags.
System Performance
Throughput: System handled up to 100 concurrent requests with a 95% success rate.
Response Time: Average of 4.7 seconds per image from upload to final result
Scalability & Flexibility The system architecture supports containerization using Docker,
which enables easy scaling on platforms like AWS or GCP. The modular nature allows
integration with future features like voice input, barcode scanning, or nutrition estimators.
Dependency on quality and clarity of input image These limitations were documented,
and possible solutions (like better preprocessing, data augmentation, and ensemble
modeling) were proposed for future versions.
Improvement Actions
34
Conclusion The comprehensive testing and evaluation process confirmed that the Recipe
Generator system is technically sound, user-friendly, and capable of performing its intended
tasks with high reliability. The feedback loop enabled continuous improvement, and
evaluation metrics showed promising results, indicating the system's readiness for
deployment and future enhancements.
Model Inaccuracy on Mixed Dishes: The model struggled with composite food
items or multiple dishes in one image. To address this, the training dataset was
refined, and preprocessing was enhanced.
File Size Issues: Large image files affected performance. This was mitigated by
setting an upload size limit and compressing images during preprocessing.
API Timeout: Rare timeouts occurred under high load, resolved by optimizing Flask
server configuration.
4.5. Conclusion:
The testing and evaluation phase validated that the Recipe Generator Using Food Images
project performs reliably and meets its functional requirements. The system provides accurate
predictions, fast responses, and a smooth user experience. Comprehensive testing also
ensured that the application is secure, scalable, and ready for real-world deployment.
The positive evaluation results affirm the robustness of the system, while the identified
improvements form the basis for future updates.
35
CHAPTER 5
To effectively develop the Recipe Generator system, the project was broken down into
smaller, manageable tasks. Each task contributed to building different components of the
system, allowing for parallel development and simplified debugging. Below is a breakdown
of the major tasks:
Requirement Analysis
Model Development
Module Integration
Frontend Development
• Designing the user interface for image upload and recipe display.
Backend Development
36
• Conducting unit, system, and user acceptance testing.
The project followed a time-bound schedule, ensuring that all tasks were completed within
the allocated period. The schedule was divided into weekly milestones, as shown below:
Week Tasks
This schedule ensured proper time management and task distribution among team
members.The Weekly checkpoints and progress reviews were conducted to track the status of
tasks. This approach not only ensured accountability but also allowed for early identification
and mitigation of potential risks or delays. Any deviations from the planned schedule were
promptly addressed through rescheduling or resource adjustments.
37
5.3 Task Specification:
Each task in the development pipeline was specified with its goal, input, output, estimated
effort, duration, and dependencies:
38
Backend Develop Integrated Functional 12 1 week Module
Development APIs and modules backend Integration
server logic
39
CHAPTER 6
PROJECT MANAGEMENT
6.1 Major Risks and Contingency Plans:
Project management for the Recipe Generator using Deep Learning involves several critical
aspects, including identifying potential risks, formulating mitigation strategies, planning
project execution, and drawing insights from the overall experience. This chapter provides an
in-depth analysis of the risks encountered during the development process and the
contingency plans adopted to ensure smooth project progression.
Data-Related Risks
• Risk: Inaccurate or insufficient data for training the deep learning models.
• Contingency Plan: Curated and augmented diverse datasets from multiple
sources. Applied data preprocessing and augmentation techniques such as
rotation, cropping, and brightness adjustments to simulate variability and
enrich the training set.
Model Performance Issues
• Risk: The deep learning model may underperform in real-world scenarios due
to overfitting or poor generalization.
• Contingency Plan: Adopted regularization methods (dropout, early stopping),
used transfer learning, and validated models using cross-validation on a
segmented dataset.
Infrastructure Challenges
• Risk: Limited computational resources affecting training time and system
responsiveness.
• Contingency Plan: Leveraged cloud-based infrastructure like Google Colab,
AWS, and GPU support for intensive model training. Scaled computing power
as required to accommodate project needs.
Integration Failures
• Risk: Potential conflicts during module integration (e.g., communication
issues between image processing and recipe generation modules).
• Contingency Plan: Followed modular development and testing strategy,
established API contracts early in the project, and used tools like Postman to
ensure consistent data flow.
Security and Privacy Concerns
• Risk: Unauthorized access to user-uploaded images or misuse of personal
data.
• Contingency Plan: Implemented secure authentication, HTTPS protocols, and
limited access permissions. Educated users about data handling policies.
User Acceptance Risks
• Risk: Users may find the application difficult to use or the recipe outputs
irrelevant.
• Contingency Plan: Conducted User Acceptance Testing (UAT) early,
collected feedback, and made iterative UI/UX and model improvements based
on actual user behavior.
40
Timeline Overruns
The development of the Recipe Generator project was a significant learning journey, both
technically and managerially. Here are the key takeaways across multiple dimensions:
41
System Integration:
• Learned to combine multiple modules—image input, ingredient detection,
recipe generation—into a seamless system. Ensured compatibility and
communication among components.
Agile Planning:
• Managed tasks using Agile methodology with regular sprint reviews and
feedback loops. This improved adaptability and focused the team on short-
term deliverables.
Team Collaboration:
• Improved team communication using platforms like Trello and Google
Workspace for document sharing, progress tracking, and issue resolution.
Risk Management:
• Learned how to anticipate potential problems, formulate solutions in advance,
and pivot plans when necessary to mitigate delays or errors.
Documentation and Reporting:
• Documented system design, development processes, and testing outcomes
thoroughly, improving report writing and technical articulation.
Presentation Skills:
• Gained confidence in presenting technical content to both technical and non-
technical audiences through presentations, demos, and Q&A sessions.
Leadership and Accountability:
• Distributed roles and responsibilities within the team. Took initiative during
critical project phases and ensured timelines were met without compromising
quality.
While building a solution from scratch, the team encountered several unexpected
hurdles that required creativity and critical thinking. For example, ingredient overlap
was addressed using confidence thresholds and ensemble model strategies.
Thinking from a user’s perspective added depth to the project by incorporating
intuitive UI designs and user-friendly error handling.
Devised new strategies for multilingual support and dietary customization, laying a
foundation for future innovations.
The Recipe Generator using Deep Learning successfully combined multiple technical
domains, including computer vision, NLP, and web technologies, to create a user-centric
42
product. The project underscored the importance of structured planning, collaborative
teamwork, and continuous evaluation.
This experience not only contributed to skill development but also instilled confidence in
handling end-to-end AI projects—from ideation to deployment. It served as a stepping stone
for future ventures in AI, machine learning, and software engineering.
While the current implementation provides a strong foundational system, there are numerous
opportunities for future improvements and expansions:
Recipe Personalization:
• Developing a mobile app version of the system with camera integration would
make the solution more accessible and practical for everyday uses.
43
Multilingual Support:
Voice-Enabled Interaction:
Nutritional Analysis:
• Users could rate recipes, upload their own food images, and contribute to the
recipe database, turning the platform into a collaborative cooking assistant.
• Suggest grocery lists based on selected recipes and link with local or online
grocery stores for seamless shopping experiences.
6.10 Conclusion:
The Recipe Generator Using Food Images project successfully demonstrates the potential of
artificial intelligence and deep learning in simplifying everyday tasks such as meal planning
and cooking. By leveraging computer vision techniques and a pre-trained convolutional
neural network (CNN), the system can accurately analyze a food image and generate the most
relevant recipe, including ingredients and preparation steps.Throughout the development
process, the project integrated multiple technical components—image processing, model
inference, database querying, and web interfacing—into a cohesive and interactive
application. The frontend ensures a user-friendly interface, while the backend handles
complex tasks like image classification and data retrieval. Careful planning, modular
development, and structured integration allowed the system to perform efficiently and
reliably.
This project not only showcases a practical application of AI in food computing but also
highlights how deep learning can bridge the gap between visual inputs and actionable
outcomes. The project has strong potential to assist users in identifying unknown dishes,
discovering new recipes, and promoting healthier eating habits.
44
6.10 Result:
45
Figure 6.3: Food Image Dataset
46
Figure 6.5: Predicted Dish
47
Figure 6.6: Recipe Book
48
PLAGIARISM REPORT
49
Figure 6.7: DrillBit Plagiarism Report
50
RESEARCH PAPER
51
Figure 6.8: Research Paper
52
Figure 6.8: Research Paper
53
Figure 6.8: Research Paper
54
Figure 6.8: Research Paper
55
CERTIFICATES
56
57
APPENDIX A
This appendix highlights the front-end design and overall user experience of the Recipe
Generator Using Food Images application.
The user interface was developed with a focus on simplicity, accessibility, and
responsiveness. The design ensures users can easily interact with the system, whether on
desktop or mobile devices. The primary components include:
Image Upload Section: Positioned at the top of the homepage, this section allows
users to upload an image of a food item. Supported formats include .jpg, .png, and
.jpeg. A clear “Upload Image” button is available, along with a preview display of the
selected image.
Recipe Output Section: Once an image is uploaded and processed, the application
displays the predicted dish name along with its corresponding recipe. This section
includes:
• Dish Title
• Ingredients List
• Step-by-step Cooking Instructions
• Nutritional Information (if available)
Navigation Menu: A fixed navigation bar provides access to different parts of the
application such as:
• Home
• About
• How It Works
• Contact Us
Feedback and Control Form: At the bottom of the interface, a contact form allows
users to submit feedback or inquiries, improving interaction and usability.
58
APPENDIX B
This appendix outlines the architectural, technical, and structural components of the backend
system, excluding actual code implementation.
1. System Architecture:
The backend is built using Python and Flask, functioning as a lightweight web server to
handle client requests. It communicates with the front-end through a RESTful API and
processes food image data for prediction.
Image Processing Module: Upon image submission, the backend receives and pre-
processes the image using normalization, resizing, and transformation techniques
compatible with the pre-trained model.
Prediction Engine: A deep learning model (typically based on CNN architecture
such as ResNet or VGG) is used to identify the food item from the uploaded image.
Recipe Mapping Module: Once the food item is identified, the system queries a
structured dataset or recipe bank to retrieve the relevant cooking instructions and
ingredient list.
3. Database Design:
Image Validation: Backend checks for valid image formats and applies size limits to
prevent overload.
API Routing: Clean and well-structured API endpoints ensure seamless
communication between the client and server.
Scalability Considerations: The backend design allows for easy migration to cloud
platforms like Heroku, Render, or AWS for future scalability and deployment.
59
REFERENCES
[1] Meyers, A., Johnston, N., Rathod, V., Korattikara, A., Gorban, A., Silberman,
N.&Murphy, K. (2015). Im2Calories: Towards an Automated Mobile Vision Food Diary.
ICCV.arXiv:1504.06193
[2] Salvador, A., Hynes, N., Aytar, Y., Marin, J., Ofli, F., Weber, I., & Torralba, A. (2017).
Learning Cross-modal Embeddings for Cooking Recipes and Food Images. IEEE CVPr
arXiv:1707.03496
[3] Kawano, Y., & Yanai, K. (2014). Automatic Expansion of a Food Image Dataset
Leveraging Existing Categories with Domain Adaptation. ECCV Workshops. Link
[4] Wang, X., Min, W., Liu, X., & Jiang, S. (2020). Recipe1M+: A Dataset for Learning
Cross-modal Embeddings for Cooking Recipes and Food Images. IEEE Transactions on
Pattern Analysis and Machine Intelligence. Link
https://github.com/search?q=recipe+generation+image
https://www.tensorflow.org/tutorials/images/classification
[10] Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2012). ImageNet Classification with
Deep Convolutional Neural Networks. NeurIPS.
[11] He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep Residual Learning for Image
Recognition Conference CVPR.
[12] Simonyan, K., & Zisserman, A. (2014). Very Deep Convolutional Networks for Large-
Scale Image Recognition. arXiv preprint.arXiv:1409.1556
60
[13] Vaswani, A., et al. (2017). Attention is All You Need. NeurIPS. Link
[14] Radford, A., et al. (2021). Learning Transferable Visual Models From Natural Language
Supervision. ICML (CLIP Paper). Link
[15] Chen, M., Dhingra, K., Wu, W., Yang, L., Sukthankar, R., & Yang, J. (2009). PFID:
Pittsburgh Fast-Food Image Dataset. IEEE International Conference on Image Processing
(ICIP).
[16] Zhou, F., Lin, Z., & Brandt, J. (2016). Chef Mapper: A Deep Learning Approach for
Cross-modal Recipe Retrieval. ECCV.
61