Professional Documents
Culture Documents
Group - 29 Final Report
Group - 29 Final Report
A PROJECT REPORT ON
BACHELOR OF ENGINEERING
in
COMPUTER
ENGINEERING BY
CERTIFICATE
is a bonafide work carried out by Students under the supervision of Mrs . Dhanashree
Phalke and it is submitted towards the partial fulfillment of the requirement of Bachelor
of Engineering (Computer Engineering).
A Project
at
AKURDI, PUNE
It gives us great pleasure to present the preliminary project report on ‘Food Image
Classification and Calorie Prediction for Dietary Recommendation using ML ’.
I would like to take this opportunity to thank my internal guide Mrs. Dhanashree Phalke
for giving me all the help and guidance I needed. I am really grateful to them for their
kind support. Their valuable suggestions were very helpful.
I am also grateful to Dr. Mrs. Madhuri Potey, Head of the Computer Engineering
Department, College Name for his indispensable support, and suggestions.
In the end our special thanks to Mrs. Dipali Kirange for providing various resources
such as laboratory with all needed software platforms, continuous Internet connection, for
Our Project.
Aman Singh
Aman Shukla
Adishri Kadam
Khushi Magotra
(BE.Computer Engineering)
Contents
1 Synopsis 1
1.1 Project Title........................................................................................................... 1
1.2 Project Option...................................................................................................... 1
1.3 Internal Guide........................................................................................................1
1.4 Sponsorship and External Guide..........................................................................1
1.5 Technical Keywords (As per ACM Keywords).................................................... 1
1.6 Problem Statement................................................................................................ 2
1.7 Abstract................................................................................................................. 2
1.8 Goals and Objectives.............................................................................................2
1.9 Relevant mathematics associated with the Project................................................3
1.10 Names of Conferences / Journals where papers can be published........................3
1.11 Review of Conference/Journal Papers supporting Project idea............................ 4
1.12 Plan of Project Execution......................................................................................5
2 Technical Keywords 6
2.1 Area of Project...................................................................................................... 6
2.2 Technical Keywords..............................................................................................6
3 Introduction 7
3.1 Project Idea............................................................................................................7
3.2 Motivation of the Project...................................................................................... 7
3.3 Literature Survey...................................................................................................7
5 Project Plan 13
5.1 Project Estimates.................................................................................................13
5.1.1 Reconciled Estimates............................................................................. 13
5.1.2 Project Resources................................................................................... 14
5.2 Risk Management w.r.t. NP Hard analysis..........................................................14
5.2.1 Risk Identification.................................................................................. 14
5.2.2 Risk Analysis..........................................................................................15
5.2.3 Overview of Risk Mitigation, Monitoring, Management.......................15
5.3 Project Schedule..................................................................................................16
5.3.1 Project task set........................................................................................16
5.3.2 Task network.......................................................................................... 16
5.3.3 Timeline Chart........................................................................................17
5.4 Team Organization.............................................................................................. 17
5.4.1 Team structure........................................................................................ 17
5.4.2 Management reporting and communication...........................................18
8 Project Implementation 34
8.1 Introduction......................................................................................................... 34
8.2 Tools and Technologies Used..............................................................................34
8.3 Methodologies/Algorithm Details.......................................................................21
8.3.1 Algorithm 1/Pseudo Code...................................................................... 21
8.3.2 Algorithm 2/Pseudo Code...................................................................... 21
8.4 Verification and Validation for Acceptance........................................................ 21
9 Software Testing 36
9.1 Type of Testing Used...........................................................................................36
9.2 Test Cases and Result..........................................................................................38
10 Results 23
10.1 Screen shots.........................................................................................................23
10.2 Outputs................................................................................................................ 23
13 Bibliography 26
Appendix REFERENCES 43
9.1 Testcases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1 Plagiarism Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Synopsis
Not Sponsored
2. Image Processing
5. Transfer Learning
8. Image Segmentation
In today's hectic world, poor dietary habits contribute to health issues like obesity and
heart disease. Conventional techniques for evaluating diets are frequently laborious and
imprecise. We suggest creating an artificial intelligence (AI) system that would provide
people access to real-time dietary habit feedback, enabling them to make decisions that
would improve their health.
1.7 Abstract
Consider being able to take a picture of your food and get comprehensive information on
its nutritional makeup right away. We hope to enable people to make educated dietary
decisions, resulting in better lifestyles and a lower risk of obesity-related diseases, by
utilising the power of food classification.Our algorithm classifies the food items by
examining their features, giving you a comprehensive knowledge of what you're
consuming and how it affects your health.As the necessity of the food arose among
people, People's concern about their diets increased along with their demand for food as
the requirement for food expanded among people. This system also shows weekly
information on the user's caloric intake and the amount of calories needed to prevent
obesity-related illnesses including cancer, heart attacks, and other ailments. In order to
identify complex pictures, We created a collection of food photographs from pre-existing
datasets in order to recognise complicated imagery.
1. To develop a machine learning model that can accurately classify a wide variety of
foods in real time.
2. To integrate the food classification system and the decision support system into a
user-friendly interface.
3. To evaluate the system on real-world dataset to assess its accuracy and reliability.
(1.1)
where,
• I = Set of input
• O = Set of output
1. input data:
I : A set of food images.
P : User-specific dietary profiles and preferences
M : Pre-trained CNN model
D : Database of labelled food items.
2. output Data:
C : Accurate food classification results,
R : Personalized dietary recommendations.
3. The Process P:
P = (V (I, P, M, D), C(I, P, M, D) = C, D(C, P, D) = R)
V=Visualization, C=Compilation and D=displaying Output.
6. Mathematical Function :
Classification: C_i = classify_food(I_i, M)
Recommendation: R = generate_recommendations(C, P, D)
E(R,P)=Evaluation Metrics
2. Image Processing
5. Transfer Learning
8. Image Segmentation
1. With the increasing number of health issues reported due to obesity and
overeating, people have become cautious about their diet intake to prevent
themselves from the diseases such as hypertension, diabetes, and other heart
related problem which are caused due to obesity.
2. As per the data shared by WHO, at least 2.8 million people are dying each year
because of being overweight or obese.
1. The motivation for the project is to develop a system that can help people to make
healthier food choices.
2. The system can also help users to identify and avoid foods that they are allergic to
avoid by their doctor.
3. In addition, the system can be used to develop personalized dietary
recommendations or users based on their individual needs.
Objective :
● To develop a machine learning model that can accurately classify a wide variety of
foods in real-time.
● To develop a decision support system that can generate personalized dietary
recommendations based on the user's individual needs and preferences.
● To integrate the food classification system and the decision support system into a
user-friendly interface.
● To evaluate the system on real-world dataset to assess its accuracy and reliability.
To develop the food image classification model that can predict the calories from the image provided
from dataset and give dietary recommendation for disease like obesity.
4.4 Outcomes
5
● The project is to develop a system that can help people to make healthier food
choices.
● The system can also help users to identify and avoid foods that they are allergic to
avoid by their doctor.
● In addition, the system can be used to develop personalized dietary
recommendations for users based on their individual needs. This can be especially
D.Y.P.C.O.E.,Akurdi,Pune 11 Department of Computer Engineering
helpful for people with chronic diseases such as obesity disease.
● Dietary Tracking Apps: Integration into apps for users to track and improve their
diets.
● Nutritional Guidance: Providing personalized nutritional recommendations.
● Healthcare: Supporting dietary management for individuals with specific health
conditions.
● Food Service Industry: Automating menu labeling and portion control.
● Research: Enhancing nutritional research with image data.
● Public Health: Monitoring and promoting healthy eating habits.
1. Computer: A standard desktop or laptop with a modern CPU and GPU for model
training.
2. Camera: A camera or smartphone for image capture.
3. Cloud Resources: For scalability, cloud-based GPU instances can be used.
4. Mobile Devices: For end-user applications, smartphones or tablets may be
required.
• An Implementation and Test phase : when the software is coded, integrated and
tested.
• A Review phase : in which the software is evaluated, the current requirements are
reviewed, and changes and additions to requirements proposed.
The initial cost estimate of the project before beginning the implementation process is
INR 11000 for in-house resources . This cost may vary according to project development
and deployment.
The initial time estimate for the complete implementation of the primary objectives is 55- 60
days depending on the schedule of the developers. The secondary objectives require an
additional efforts. Also, depending on the stage of development, the testing and debugging
would require an additional of 15 days.
5.1.2.1 People:
1. Project Members (Adishri Kadam, Aman Shukla, Aman Singh, Khushi Magotra )
1. Guide (Mrs. Dhanashree Phalke)
5.1.2.2 Hardware
2. RAM 8GB
5.1.2.3 Software
1. Have top software and customer managers formally committed to support the
project?
Image Classification and calorie prediction for Dietary Analysis project can only benefit
the stakeholders. In today’s times, top software and customer managers have not formally
committed the project but in near future they will.
• Privacy
The privacy of the users matter the most. And this is supposed to be anonymous.
• Deployment
• Maintenance
Our strategy is to divide the tasks amongst four of us. We decided a deadline for each
task. In the end we combine the results of individuals into one single outcome.this is an
approach of an Stage-Gate SDLC
• Daily Scrums
• Github Collaboration
6.1 Introduction
In response to the rising concern over health and nutrition, our project focuses on creating
an advanced food classification system. This system uses Convolutional Neural Networks
(CNNs) and image processing to precisely identify various food items and, more
importantly, offers personalized dietary recommendations tailored to users' specific needs
and preferences. By allowing users to upload food images, the system can predict calorie
content and provide weekly consumption statistics to combat issues like obesity and
related diseases. Our proprietary CNN architecture achieves an impressive 88.7% testing
accuracy and 93.29% training accuracy for food recognition, promising a transformative
impact on dietary management.
The purpose of this project is to develop an image-based food classification and calorie
measurement system that can accurately and efficiently classify a wide range of food
items and estimate their calorie content. The system will also be able to generate
personalized dietary recommendations for users based on their individual needs and
preferences.
The scope of this project encompasses several key components:
Design and train a CNN model for accurate food item classification using a large dataset of
food images.
2. Calorie Estimation:
3. Dietary Recommendations:
4. User Interface:
Develop a user-friendly interface for easy image uploads, viewing results, and
receiving dietary recommendations.
7. User resets his password and successfully logins into the system.
1. User uploads a photo of a food item. The system classifies the food item and
estimates its calorie content.
2. User cprovides the diet to the system. The system tells whether it’s good diet
or not and generates personalized dietary recommendations for the user.
Actor 2: Admin
• Admin can manage the user data.
• Admin can add and delete the user.
A description of each major software function, along with data flow (structured analysis)
or class hierarchy (Analysis Class diagram with class description for object oriented
system) is presented.
7.1 Introduction
Project integrates image recognition, nutrition analysis, and calorie prediction. Data
collection involves sourcing images and nutritional data. The food image classifier,
trained with deep learning models, recognizes food items. Nutritional data is retrieved
from trusted sources. A regression or neural network model predicts calories. The
user-friendly interface lets users upload images and receive dietary insights. Deployment
in the cloud ensures scalability. Rigorous testing and security measures are in place. This
system has the potential to revolutionize dietary monitoring and healthy living.
Designing an internal database for your food recognition and calorie estimation project is
a critical aspect of the development process. Below is a simplified example of how you can
structure your database for such a project. Keep in mind that the actual structure and comp
lexity of your database will depend on your specific project requirements and the techno
logy stack you are using.
1. Database Type:
● Specify the type of database you plan to use (e.g., SQL, NoSQL) based on the
project's requirements.
2. Database Schema:
● Design the database schema, including tables and their relationships. For
example, you might have tables for food items, images, nutritional data, and user
information.
3. Data Storage:
● Describe where the database will be hosted and how data will be stored, such as
on a cloud server or an on-premises system.
This data design and database description will serve as the foundation for your project's
data management. It is crucial to ensure data reliability, security, and efficiency throughout
the project's development.
Designing a Food Image Classification, Dietary Analysis, and calorie prediction system.
This project integrates image recognition, nutrition analysis, and calorie prediction. Data
collection involves sourcing images and nutritional data. The food image classifier,
trained with deep learning models, recognizes food items. Nutritional data is retrieved
from trusted sources. A regression or neural network model predicts calories. The
user-friendly interface lets users upload images and receive dietary insights. Deployment
in the cloud ensures scalability. Rigorous testing and security measures are in place. This
system has the potential to revolutionize dietary monitoring and healthy living.
8.1 Introduction
In an era where dietary choices significantly impact health and well-being, the
development of advanced technologies to assist individuals in making informed food
choices has never been more crucial. "Food Image Classification and Calorie Prediction
for Dietary Analysis" represents an innovative solution at the intersection of computer
vision, machine learning, and nutrition science. This project seeks to create a powerful
tool that can accurately classify food items from images and predict their calorie content,
empowering users to make informed dietary decisions.This project holds the promise of
revolutionizing the way we understand and manage our dietary choices, ultimately
contributing to healthier and more informed lifestyles.
● For the proposed system, we used four convolutional layers with a kernel size of
3x3. Each convolutional layer is followed by a pooling layer, which reduces the
image dimension while maintaining spatial invariance.
● This reduces the overall computation cost of the CNN network. In our architecture,
we used max pooling with a filter size of 2x2 and strides of one to obtain the most
prominent features, which were chosen by taking the maximum value of the feature
from the previous layers.
● After collecting all of the features and converting them into a vector, a fully
connected (FC) layer is used to map the features and classify the test images into
the appropriate categories. We used two FC layers, with the last layer predicting the
probability distribution using the SoftMax classifier
8.4.2 Developer:
● Conducts various testing types, including unit tests, integration tests, and user
acceptance tests.
● Defines metrics and criteria for assessing system accuracy and performance.
● Ensures scalability for handling increased user demand and growing data.
These system modules work together to create a robust, integrated application for food
image classification, dietary analysis, and calories prediction. Each module has specific
responsibilities and functionalities, contributing to the project's overall success and
usability.
● Functional Testing
● Non-Functional Testing or Performance Testing
● Maintenance (Regression and Maintenance)
● Integration Testing: This testing is conducted to confirm the proper function- ing
of the fully integrated components of a food sales prediction application. It
describes the scope and basis for integration testing, testing of internal and external
system interface, testing of security capabilities, testing of accessibil- ity features.
System-level qualification tests address the integrated operation of hardware,
software to assess the system’s response.
● Unit Testing: Unit testing is used to test individual component of the applica- tion.
Alpha testing: Alpha testing is conducted to identify all possible issues or defects
before releasing final working.
● Alpha testing: Alpha testing is conducted to identify all possible issues or defects
before releasing final working system.
● Back-end Testing: Whenever input or data is entered on front-end application, it
stores in the databases and the testing of such database is called as back-end testing
● Black-box testing: This testing analyses the functionality of the system without
knowing much about the internal structure or design of the item that is being tested
and compares the input value with the output value.
● Component testing: The testing of multiple functionalities as a single code and its
objective is to identify if any defect exits after connecting those multiple
functionalities with each other.
TC001 Test Food Image 1.Input a The CNN The CNN Pass
Classification food image correctly correctly
from the classifies the classifies the
dataset. food item. food item.
2. Apply
image
processing
techniques.
3. Use the
CNN model
for food
classification.
TC002 Test Calorie 1. Input a The The regression Pass
Estimation food image regression model
from the model accurately
dataset. accurately estimates the
2. Apply estimates the calorie content
image calorie of the food item.
processing content of the
techniques. food item.
3. Use the
CNN model
for food
classification.
4. Use the
regression
model for
calorie
estimation.
TC003 Test Diverse 1. Input The CNN The CNN Pass
Food Images various food correctly correctly
images from classifies classifies food
different food items items from
cuisines and from diverse diverse cuisines
styles. cuisines and and styles.
2. Apply styles.
image
processing
and
classification
.
D.Y.P.C.O.E.,Akurdi,Pune 36 Department of Computer Engineering
TC004 Test Image The The Pass
Pre-processing 1. Input a pre-processin pre-processing
food image. g techniques techniques
2. Apply enhance the enhance the
image dataset's dataset's quality
segmentation quality and and utility.
and feature utility.
extraction.
10.1 Screenshots
The future scope for "Food Image Classification and Calorie Prediction for Dietary
Analysis" using machine learning is highly promising and dynamic. Up to the present,
significant progress has been made in the development of models for food image
classification and calorie prediction for dietary analysis using machine learning. The focus
has largely been on refining the choice of models, curating and expanding datasets, and
setting the foundation for future implementations. The ongoing work involves model
selection and optimization to enhance accuracy in food image classification and calorie
prediction, which will undoubtedly bolster the system's dietary analysis capabilities.
Furthermore, efforts are directed towards dataset augmentation and quality improvement,
ensuring that the models are trained on diverse and representative data.
Shortly, the emphasis will shift towards practical implementation and model comparison.
The aim is to deploy these systems in real-world scenarios, such as dietary monitoring apps
and services. This deployment will allow for direct user interaction and feedback, bringing
about an era of immediate dietary guidance. Wearable devices may be integrated to
facilitate real-time dietary insights and recommendations based on user preferences and
health goals. The pursuit of personalization remains a key focus, tailoring
recommendations to individual dietary preferences, health objectives, and restrictions.
Additionally, the next steps involve expanding the system's capabilities to encompass
comprehensive nutrient tracking, offering behavioral insights, and adapting to
cross-cultural dietary variations along with that comparative analysis of different models
will be instrumental in refining system performance.
In the realm of dietary analysis, "Food Image Classification and Calorie Prediction for
Dietary Analysis" represents a groundbreaking technological advancement with
far-reaching implications. This project harnesses the power of machine learning to not only
accurately classify food items from images but also predict their calorie content, thus
empowering individuals to make informed dietary choices. As we conclude this journey,
It is evident that the intersection of technology and nutrition science holds immense
potential. The system's ability to provide dietary insights, encourage healthier eating
habits, and promote personalized nutrition is poised to transform the way we approach
food. By continuously improving accuracy, embracing multi-modal analysis, and
integrating real-time feedback, we can shape a future where dietary decisions are not only
healthier but also sustainable. As we move forward, it is our hope that this project will
contribute not only to individual well-being but also to the broader fields of nutrition
research and public health, making a positive impact on society as a whole. The path to a
healthier and more informed future begins here, at the convergence of technology and
dietary analysis.
Responsible
Modules Technology to be used How it will be used Time Allotted
Person
This technology will
HTML, CSS, Js serve as the frontend 1-3 weeks
Login/ for our application
Aman Singh,
Registration We will code the
Python 2-3 weeks Aman Shukla
algorithms in python.
[1] T. Joutou and K. Yanai, “A food image recognition system with multiple kernel
learning” in 16th IEEE International Conference on Image Processing (ICIP), vol. 2020.
IEEE, 2009, pp. 285-288.
[3] E. J. Gallagher and D. LeRoith, “Obesity and diabetes: The increased risk of cancer
and cancer-related mortality,” Physiol. Rev., vol. 95, no. 3, pp. 727-748, 2015
[doi:10.1152/physrev.00030.2014].
[4] C. Szegedy et al., “Going deeper with convolutions” in Proc. IEEE Conference on
Computer Vision Andpattern Recognition, 2022, pp. 1-9
[doi:10.1109/CVPR.2015.7298594].
[5] K. He et al., “Deep residual learning for image recognition,”, 2021, pp. 770-778
[doi:10.1109/CVPR.2016.90]
[6] C. Szegedy et al., “Rethinking the inception architecture for computer vision” in
Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2020, pp. 2818-2826
[doi:10.1109/CVPR.2016.308].
[7] M. Winter-Jensen et al., “Body mass index and risk of infections: A Mendelian
randomization study of 101447 individuals,” Eur. J. Epidemiol., vol. 35, no. 4, pp. 347-354,
2020 [doi:10.1007/s10654-020-00630-7].
[10] H. Zhao et al., Few-Shot and Many-Shot Fusion Learning in Mobile Visual Food
Recognition, 2022 doi:10.1109/ISCAS.2019.8702564.
The problem under consideration is the accurate classification of food images and the
subsequent analysis of their nutritional content for dietary assessment. This involves
developing a system that can automatically identify and classify various types of foods
depicted in images and then provide nutritional insights based on the identified items.
1. Feasibility Assessment:
We can assess the feasibility of this project from a business perspective using the IDEA
Matrix:
Increase: This project could potentially increase efficiency in dietary assessment by
automating the process, and saving time and resources.
Deliver: The system could deliver value to nutritionists, dietitians, and individuals seeking to
monitor their dietary intake.
Accelerate: By automating food classification and dietary analysis, the project could
accelerate the pace of nutritional assessments.
Associate: The project could be associated with existing platforms or services related to
health and wellness, enhancing their capabilities.
In the context of food image classification and dietary analysis, the problem may involve
NP-Hard or NP-Complete challenges, especially in the classification of a wide range of food
items and the analysis of their nutritional content. Modern algebra and relevant mathematical
models could be applied to optimize algorithms for image recognition and nutritional
analysis, potentially addressing these complexity issues.
In the context of food image classification and dietary analysis, the input (x) would be an
image containing one or more food items, and the output (y) would be the classification of the
items along with their respective nutritional information. The function (f(x)) would involve
the process of image recognition and analysis to identify the foods and extract relevant
● Divide the image classification task into smaller, independent subtasks (e.g., feature
extraction, classification).
● Implement these subtasks using libraries or frameworks that support
distributed/parallel/concurrent processing (e.g., TensorFlow with multi-GPU
support).
● Analyze the performance improvement achieved through parallelization compared to
a sequential implementation.
Deliverables:
Deliverables:
● Design test cases (black-box testing) for various functionalities like image
classification, calorie prediction, and edge cases (e.g., blurry images, unrecognized
food items).
● Utilize tools like Mathematica or open-source alternatives for generating test data
(e.g., synthetic images with varying calorie content).
● Implement test cases and execute them against the system to identify bugs or
inconsistencies.
Deliverables:
Review of Design:
1. Feedback Analysis:
● We carefully reviewed the feedback from the Term I assessment, focusing on areas
such as model accuracy, user interface design, and database performance.
● Additionally, we analyzed comments and suggestions received from prestigious
competitions and conferences like those organized by IITs and Central Universities.
2. Corrective Actions:
Deliverables:
● A revised design document detailing the specific changes made in response to the
feedback
● A comprehensive report summarizing the feedback analysis and the corrective actions
taken.
1. Selection:
● We carefully selected suitable hardware components, including a high-performance desktop with modern
CPU and GPU capabilities, to meet the system's requirements.
● Additionally, we considered cloud resources such as AWS for scalability and resource management.
2. Installation:
● We installed all the required software and libraries, including Python with TensorFlow, OpenCV for image
processing, and database systems for data storage.
● Development environments such as Jupyter Notebook and PyCharm were set up for efficient coding and
development workflows.
● A detailed report was prepared documenting the entire workstation setup process,
including hardware specifications, software installations, and configuration steps.
● Screenshots and logs were included to provide a visual representation of the setup.
1. Programming:
● We implemented the core project functions, including food image classification using
CNNs and calorie prediction using regression models.
● Interfaces and GUI elements were developed as per the specifications outlined in the
Term I submission, focusing on user-friendly interactions.
2. Integration:
Deliverables:
● A source code repository was created with detailed commit history, showcasing the
implemented functionalities and interfaces.
● Comprehensive documentation was prepared, including algorithm descriptions and
code snippets.
1. Tool Selection:
● We selected appropriate testing tools, including unit testing frameworks like PyTest
for functional testing and JMeter for performance testing.
Testing Process:
1. Functional Testing:
2. Performance Testing:
● Performance tests were conducted to evaluate system response time and accuracy
under various load conditions.
● Based on the test results, optimizations were implemented to improve system
performance.
3. Security Testing:
● Security testing was conducted to ensure data encryption, secure storage practices, and
user authentication mechanisms were in place.
4. Reliability Testing:
● Reliability tests were performed to assess the system's stability and functionality over
time.
Testing Reports: