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

SAVITRIBAI PHULE PUNE UNIVERSITY

A PROJECT REPORT ON

Food Image Classification and Calorie


Prediction for Dietary Analysis

SUBMITTED TOWARDS THE


PARTIAL FULFILLMENT OF THE REQUIREMENTS OF

BACHELOR OF ENGINEERING
in
COMPUTER

ENGINEERING BY

Aman Singh BECO2324A015


Aman Shukla BECO2324A003
Adishri Kadam BECO2324A002
Khushi Magotra BECO2324A021

Under The Guidance of

Mrs. Dhanashree Phalke


Mrs. Dipali Kirange

DEPARTMENT OF COMPUTER ENGINEERING


D. Y. Patil College of Engineering,
Akurdi.
D. Y. Patil College of Engineering, Akurdi.
DEPARTMENT OF COMPUTER ENGINEERING

CERTIFICATE

This is to certify that the Project Entitled

Food Image Classification and Calorie


Prediction for Dietary Analysis

Aman Singh BECO2324A015


Aman Shukla BECO2324A003
Adishri Kadam BECO2324A002
Khushi Magotra BECO2324A021

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).

Mrs. Dipali Kirange Mrs. Dhanashree Phalke


Co-Guide Guide

Dr. Mrs. M.A. Potey Dr. Mrs. P. Malathi


HOD Computer Principal

D. Y. Patil College of Engineering, Akurdi Pune 44

Signature of Internal Examiner Signature of External Examiner


PROJECT APPROVAL SHEET

A Project

Food Image Classification and calorie

prediction for Dietary Analysis

Is successfully completed by.

Aman Singh BECO2324A015


Aman Shukla BECO2324A003
Adishri Kadam BECO2324A002
Khushi Magotra BECO2324A021

at

DEPARTMENT OF COMPUTER ENGINEERING

D. Y. PATIL COLLEGE OF ENGINEERING,

AKURDI, PUNE

SAVITRIBAI PHULE PUNE UNIVERSITY

ACADEMIC YEAR 2023-2024

Mrs. Dipali Kirange Dr. Mrs. M.A. Potey


Mrs. Dhanashree Phalke HOD Computer
Internal Guide
Abstract

A novel approach is proposed, integrating image processing techniques with Convolutional


Neural Networks (CNNs) to classify food items and estimate their calorie content based on
images. The study begins by curating a diverse dataset of food images representing various
cuisines and presentation styles. Pre-processing methods like image segmentation and
feature extraction are applied to improve the dataset's quality. A custom deep CNN
architecture is then trained on this dataset to effectively categorize different food items.
Leveraging the CNN's ability to learn hierarchical features from raw pixel data, it achieves
high accuracy in distinguishing between various dishes.Additionally, the study addresses
calorie prediction by using regression models that incorporate features derived from the
CNN. These models predict the calorie content of a food item based on its visual
characteristics. By combining image classification with calorie prediction, the approach
aims to empower users in making informed dietary choices and managing their caloric
intake more effectively.The proposed method demonstrates promising outcomes in both
food item classification accuracy and calorie estimation precision. Its potential application
extends to supporting healthier eating habits and aiding dietary monitoring for individuals,
dietitians, and the food industry. This technological approach could serve as a valuable tool
in promoting nutritional awareness and combating diet-related health issues.
Acknowledgements

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

4 Problem Definition and scope 10


4.1 Problem Statement.............................................................................................. 10
4.1.1 Goals and objectives...............................................................................10
4.1.2 Statement of scope..................................................................................10
4.2 Major Constraints................................................................................................ 11
4.3 Methodologies of Problem solving and efficiency issues................................... 11
4.4 Outcome.............................................................................................................. 11
4.5 Applications........................................................................................................ 12
4.6 Hardware Resources Required............................................................................12
III
4.7 Software Resources Required............................................................................. 12

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

6 Software requirement specification 19


6.1 Introduction......................................................................................................... 19
6.1.1 Purpose and Scope of Document............................................................20
6.1.2 Overview of responsibilities of Developer.............................................20
6.2 Usage Scenario....................................................................................................21
6.2.1 User profiles........................................................................................... 22
6.2.2 Use-cases................................................................................................ 23
6.2.3 Use Case View........................................................................................24
6.3 Functional Model and Description......................................................................25
6.3.1 Data Flow Diagram................................................................................ 25
6.3.2 Upload Sequence Diagram:....................................................................27
6.3.3 Download Sequence Diagram:............................................................... 28
6.3.4 Non Functional Requirements:...............................................................29
6.3.5 State Diagram:........................................................................................30
6.3.6 Software Interface Description...............................................................30

7 Detailed Design Document using Appendix A and B 31


7.1 Introduction......................................................................................................... 31
7.2 Architectural Design........................................................................................... 32

7.3 Data design..........................................................................................................31


7.3.1 Internal software data structure.............................................................. 31
7.3.2 Global data structure.............................................................................. 17
7.3.3 Temporary data structure........................................................................17
7.3.4 Database description...............................................................................31
7.4 Component Design..............................................................................................33
7.4.1 Class Diagram....................................................................................... 33

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

11 Deployment and Maintenance 24


11.1 Installation and un-installation............................................................................24
11.2 User help............................................................................................................. 24

12 Conclusion and future scope 40

13 Bibliography 26

Appendix REFERENCES 43

Appendix Laboratory assignments on Project Analysis of Algorithmic Design 28

Appendix Laboratory assignments on Project Quality and Reliability Testing of


Project Design 29

Appendix Project Planner 30

Appendix Reviewers Comments of Paper Submitted 31

Appendix Plagiarism Report 32

Appendix Term-II Project Laboratory Assignments 33

Appendix Information of Project Group Members 34


List of Figures

5.1 Iterative Development Model 13


5.2 Fig. Task Network 16
5.3 Fig. Time Line GANTT chart 17

6.1 Use Case Diagram 24


6.2 DFD Level 0 25
6.3 DFD Level 1 26
6.4 Upload Sequence Diagram 27
6.5 State transition diagram 30

7.1 System Architecture 32


7.2 Component Diagram 33

1 Plagiarism Report of Abstract 44


2 Plagiarism Report of Introduction 45
3 Plagiarism Report of Problem Statement 46
4 Plagiarism Report of Application 47

1.1 Project Planner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


5.1 Team Structure for the Project . . . . . . . . . . . . . . . . . . . . . . . . 17

9.1 Testcases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

1 Plagiarism Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Synopsis

1.1 Project Title


Food Image Classification and Calorie Prediction for Dietary Analysis

1.2 Project Option

BE Final Year Project

1.3 Internal Guide


Guide. Mrs. Dhanashree Phalke and Co- Guide Mrs. Vishakha Metre.

1.4 Sponsorship and External Guide

Not Sponsored

1.5 Technical Keywords (As per ACM Keywords)


1. Convolutional Neural Networks

2. Image Processing

3. Google inception v3 model

4. VGG16, VGG19, ResNet

5. Transfer Learning

6. Region of Interest (ROI)

7. Scale Invariant Feature Transform algorithm

8. Image Segmentation

9. Color Histogram Method

10. Diet Recommendation

D.Y.P.C.O.E.,Akurdi,Pune Department of Computer Engineering


1
1.6 Problem Statement

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.8 Goals and Objectives


The main goals and objective of the system are as follows:

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.

D.Y.P.C.O.E.,Akurdi,Pune Department of Computer Engineering


2
1.9 Relevant mathematics associated with the Project.
Let ‘S’ be the system where, S = {I, O, P, Fs, Ss}

(1.1)
where,
• I = Set of input

• O = Set of output

• P = Set of technical processes

• Fs = Set of Failure State

• Ss = Set of Success State

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.

4. The Failure state as Fs:


inaccurate Food Classification: Low classification accuracy (AC​).
Ineffective or Inappropriate Recommendations: High recommendation
ineffectiveness (IR​).
Low User Satisfaction and Non-Adherence: Low user satisfaction (S) and
non-adherence (A).

D.Y.P.C.O.E.,Akurdi,Pune Department of Computer Engineering


3
5. The Success state as
Ss:
Accuracy of Food Classification: High classification accuracy (AC​).
AC​= Number of correctly classified images / Total number of images​

6. Mathematical Function :
Classification: C_i = classify_food(I_i, M)
Recommendation: R = generate_recommendations(C, P, D)
E(R,P)=Evaluation Metrics

1.10 Names of Conferences / Journals where papers can be published

I. IEEE International Conference on Computer Vision (ICCV)

II. International Conference on Machine Learning (ICML)

1.11 Review of Conference/Journal Papers supporting Project idea

Name: Indian Food Image Classification with Transfer Learning


Standard: 4th IEEE International Conference
Author: B. Anderson and H. Lee
Year: 2021
Drawback: Less accuracy to classify food Items using SVM.

Name: Food Image Recognition and calorie prediction


Standard: Proceedings of the ACM International Conference on Multimedia.
Author: T.Chen and Y.Wang et al.
Year: 2021
Drawback: Require user to manually input the size and dimension of portion they
ate.

D.Y.P.C.O.E.,Akurdi,Pune Department of Computer Engineering


4
Name: A deep convolutional neural network for food detection and recognition.
Standard: ACM
Author: M.A.Subhi and S.M.Ali et al.
Year: 2021
Drawback : Poor feature extraction.

1.12 Plan of Project Execution


Table 1.1: Project Planner

Sr. No. Task Duration Start Date End Date


1. Group Formation 6 21 July 26 July
2. Decide Area of Interest 2 26 July 28 July
3. Search Topic 5 28 July 2 Aug
4. Topic Selection 5 2 Aug 7 Aug
6. Search Related Information 12 7 Aug 19 Aug
7. Understanding Concept 7 19 Aug 26 Aug
8. Search Essential Document Software 6 26 Aug 1 Sep
9 Problem Definition 2 1 Sep 2 Sep
10 Literature Survey 2 1 Sep 2 Sep
11. SRS and synopsis submission 10 3 Sep 12 Sep
12. Project review I 01 15 Sep 15 Sep
13. Project Planning 09 16 Sep 25 Sep
14. Modeling and design 20 26 Sep 14 Oct
15. Project review II 01 18 Oct 18 Oct
16. Workbook signing 04 19 Oct 22 Oct
17. Report submission and ppt 05 23 Oct 27 Oct

D.Y.P.C.O.E.,Akurdi,Pune Department of Computer Engineering


5
2.1 Area of Projec
Web/ML/DL

2.2 Technical Keywords

1. Convolutional Neural Networks

2. Image Processing

3. Google inception v3 model

4. VGG16, VGG19, ResNet

5. Transfer Learning

6. Region of Interest (ROI)

7. Scale Invariant Feature Transform algorithm

8. Image Segmentation

9. Color Histogram Method

10. Diet Recommendation.

D.Y.P.C.O.E.,Akurdi,Pune 6 Department of Computer Engineering


Introduction
The project aims to assist consumers in monitoring their caloric consumption.Use picture
recognition techniques that work on all systems that work with them. Food items must
have bounding boxes drawn around them by the user in order for the system to begin food
item recognition within those bounding boxes. Segment each food item region, extract
characteristics, and then use a convolution neural network to categorise it into one of the
100 food categories in order to identify them more precisely. may alert consumers to
issues with their eating patterns, such as unhealthy eating and unhealthful food trends. It is
helpful in preventing illness. The idea we have suggests employing convolutional neural
networks, which are widely used for image identification, to identify and recognise food
items in food images and display their calorie content. will use support vector machines
(SVM) to categorise the food items that our model has been trained to identify into distinct
categories (e.g., dosa, idli etc.)

3.1 Project Idea

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.

3.2 Motivation of the Project

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.

D.Y.P.C.O.E.,Akurdi,Pune 7 Department of Computer Engineering


3.3 Literature Survey

Sr. Title and Conference/ Algorithms/ Advantages &


No Authors Journal Methodology used. Drawback
Name
1 Indian Food 2021 4th The models used are IncceptionV3 gives
Image International IncceptionV3, highest accuracy to
Classification Conference on VGG16, VGG19 and classify food Items.
with Transfer Computational ResNet
Learning- B. Systems and Build CNN-Classifier Complexity while
Anderson Information using the pre-trained working in large
and H. Lee, Technology model. datasets.
for
Sustainable
Solutions
(CSITSS)
2 Food Image 2021 IEEE Color-segmentation, Capable of estimating
Recognition International k-means clustering, calorie from mixed
and Calorie Symposium texture segmentation portion of food by
Prediction- T. on Multimedia tools. clicking picture from
Chen and Y. mobile and giving input
Wang et al Cloud-SVM and deep to system.
Neural Network to
increase performance Require user to
of image identify manually input the size
model. and dimension of
portion they ate.

3 Image Based 2020 IEEE Conventional Image Automatic food


Food Journal of Recognition Approach recognition methods
Classification Biomedical With Manually will be explored to
and Volume and Health Designed Features and show how they are used
Estimation Informatics End-to-End Image to assist dietitians in
for Dietary Recognition Learning identifying the food
Assessment- items eaten by users.
M. Davis and
A. Wilson et
al

D.Y.P.C.O.E.,Akurdi,Pune 8 Department of Computer Engineering


4. Deep Proceedings of Residual Networks Improved Training and
residual the 2021 IEEE accuracy
learning for conference
image paper on Network depth may
recognition- Computer lead to overfitting.
K.He et al Vision and
pattern
recognition

5. Rethinking Proceedings of Inception Architecture Improved Feature


the inception the 2021 IEEE extraction
architecture conference
for computer paper on
vision- C. Computer Complex architecture
Szegedy et al Vision and design.
pattern
recognition
6. Obesity and National Information Source link between the obesity
cancer Cancer and cancer risk
risk-R. Patel Institute
et al Website 2022
7. A deep 2022 CNN for food Accurate Food Image
convolutional IEEE-EMBS detection and recognition
neural Conference on recognition.
network for biomedical Data availathe bility
food Engineering and model
detection and and Sciences generalization
recognition-
M.A.Subhi
and S.M.Ali
8. Calories 16th IEEE YOLO Model Less accuracy rate as
prediction International compared to other
from food Conference on models.
images- Image
Manal Processing
Chokr, Shady (ICIP), Cairo,
Elbassouni Egypt

D.Y.P.C.O.E.,Akurdi,Pune 9 Department of Computer Engineering


Problem Definition and scope

4.1 Problem Statement


The ease with which food is being delivered at our doorsteps has lead to an outbreak of a
major chronic disease known as obesity. As the necessity of the food arose among people,
the apprehension related to their diet also simultaneously increased.
The core problem we aim to address is as follows:
How can we provide a calorie measurement system whereby the user is made to upload the
image of food item and as a result, number of calories present in the uploaded food image
will be predicted.

4.1.1 Goals and objectives


Goal :
● To develop an image-based food classification system that can be used to provide
dietary recommendations to users.
● To make the system accurate, reliable, and easy to use.
● To make the system accessible to a wide range of users, including those with
limited technical knowledge.

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.

4.1.2 Statement of scope

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.

D.Y.P.C.O.E.,Akurdi,Pune 10 Department of Computer Engineering


4.2 Major Constraints

● Limited and noisy food image data.


● Variability in food appearance.
● Portion size recognition challenges.
● Ethical and privacy concerns.
● Bias and fairness issues.
● Complex personalized recommendations.
● User-friendly interface design.
● Nutritional accuracy challenges.
● Interoperability issues with existing apps

4.3 Methodologies of Problem-solving and efficiency issues

● Data Preparation: Collect and clean a diverse food image dataset.


● Model Development: Choose deep learning models and train for food
classification.
● Evaluation: Assess performance using standard metrics and cross-validation.
● Dietary Recommendations: Develop algorithms for personalized
recommendations.
● Ethical Considerations: Address fairness, bias, and privacy issues.
● Efficiency Enhancement: Optimize models, employ cloud solutions and hardware
acceleration.
● Iterative Improvement: Continuously update models and gather user feedback.
● User Interface: Design a user-friendly interface for end-users.
● Legal Compliance: Ensure adherence to relevant data protection regulations.

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.

D.Y.P.C.O.E.,Akurdi,Pune 12 Department of Computer Engineering


5.1 Applications

● 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.

5.2 Hardware Resources Required

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.

5.3 Software Resources Required

1. Machine Learning Frameworks: Such as TensorFlow, PyTorch, or scikit-learn for


model development.
2. Image Processing Libraries: OpenCV for image preprocessing.
3. Data Management Tools: Databases (e.g., MySQL, MongoDB) for data storage.
4. User Interface Tools: For app or web development, such as React, Angular, or
Android Studio.
5. Cloud Services: If using cloud-based resources for scalability.
6. Privacy and Security Tools: For data protection and compliance with regulation

D.Y.P.C.O.E.,Akurdi,Pune 13 Department of Computer Engineering


Project Plan
5.1 Project Estimates
The iterative model was used as the development model for the system implementation.
The iterative model is a type of software development life cycle (SDLC) that focuses on a
simple, initial implementation that gradually increases in complexity and features until
the final system is complete.

Figure 5.1: Iterative Development Model

• A Design phase : in which a software solution to meet the requirements is


designed. This may be a new design, or an extension of an earlier design.

• 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.

D.Y.P.C.O.E.,Akurdi,Pune 14 Department of Computer Engineering


5.1 Reconciled Estimates

5.1.1 Cost Estimate

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.

5.1.1.1 Time Estimates

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 Project Resources

5.1.2.1 People:

1. Project Members (Adishri Kadam, Aman Shukla, Aman Singh, Khushi Magotra )
1. Guide (Mrs. Dhanashree Phalke)

2. Co-Guide (Mrs.Dipali Kirange)

5.1.2.2 Hardware

1. CPU Speed (2GHz)

2. RAM 8GB

5.1.2.3 Software

1. Operating System: Ubuntu 16.04 and above/Windows 8 and above.


2. IDE : Visual Studio Code, Android Studio.
3. Machine Learning Frameworks: Such as TensorFlow, PyTorch, or scikit-learn for
model development.

D.Y.P.C.O.E.,Akurdi,Pune 15 Department of Computer Engineering


5.2 Risk Management w.r.t. NP Hard analysis
This section discusses Project risks and the approach to managing them.

5.2.1 Risk Identification


For risks identification, a review of the scope document, requirements specifications and
schedule is done. Answers to the questionnaire revealed some risks.

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.

6.Are requirements fully understood by the team and its customers?


Yes, SRS has underlined all the requirements very clearly.
Have customers been involved fully in the definition of requirements?
Yes, the customers will get complete benefits from the system and hence they are
interested in it.
Do end-users have realistic expectations?
Yes.
Does the software engineering team have the right mix of skills?
Yes. The team was divided into Three groups – Model Training, Web and Model Testing
teams according to the skills.
5.Are project requirements
stable?
Yes.
6.Is the number of people on the project team adequate to do the job?
Yes.
7.Do all customer/user constituencies agree on the importance of the project and on
the requirements for the system/product to be built?
Yes. The project mainly focuses on dietery analysis which is the core important part of
the daily lifestyle.

D.Y.P.C.O.E.,Akurdi,Pune 16 Department of Computer Engineering


5.2.2 Risk Analysis
• Attacker goals
We need to consider what an attacker’s goals might be. The standard goals of any
attacker in any security-relevant context are typically attacks against integrity,
confi- dentiality, and availability.

• Privacy
The privacy of the users matter the most. And this is supposed to be anonymous.

5.2.3 Overview of Risk Mitigation, Monitoring, Management


• To reduce the risks following actions can be taken:
● Service and support offerings.
● Regular scheduled maintenance.
● Parallel mechanism is used.

5.3 Project Schedule

5.3.1 Project task set


• UI modules

• Data collection and Preparation

• Model Development and Training

• System Integration and Testing

• Deployment

• Maintenance

5.3.2 Task network

Figure 5.2: Task Network

D.Y.P.C.O.E.,Akurdi,Pune 17 Department of Computer Engineering


5.3.3 Timeline Chart

Figure 5.3: Time Line GANTT chart

5.4 Team Organization

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

5.4.1 Team structure

Table 5.1: Team Structure for the Project

Sr. No. Name Role


1 Adishri Kadam Web and Dashboard Design
2 Khushi Magotra Data Collection and Preprocessing
3 Aman Shukla, Aman Singh Model Building and Testing

D.Y.P.C.O.E.,Akurdi,Pune 18 Department of Computer Engineering


5.4.2 Management reporting and communication
Dedicated Team of four developers working together and taking ownership of different
actions to be performed with project progress is the attitude followed by following ways:

• Daily Scrums

• Inter team communications via virtual platforms

• Github Collaboration

• Guidance from Mentors on monthly basis

D.Y.P.C.O.E.,Akurdi,Pune 19 Department of Computer Engineering


Software requirement specification

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.

6.1.1 Purpose and Scope of Document

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:

● CNN-Based Image Classification: The development of a Convolutional Neural


Network (CNN) module to accurately classify a diverse array of food items based
on uploaded images.

● Calorie Estimation: Implementation of a machine learning-based module for


precise calorie estimation, ensuring high accuracy in determining the calorie
content of various food items.

● Dietary Recommendations: Creation of a dietary recommendation module that


tailors personalized dietary suggestions to users, considering their specific dietary
requirements and preference.

D.Y.P.C.O.E.,Akurdi,Pune 20 Department of Computer Engineering


6.1.2 Overview of responsibilities of Developer
1. Image Classification

Design and train a CNN model for accurate food item classification using a large dataset of
food images.

2. Calorie Estimation:

Develop a machine learning model to predict calorie content by collecting and


training on calorie data for different foods.

3. Dietary Recommendations:

Create a module for personalized dietary recommendations based on user-specific


factors like age, gender, weight, activity level, dietary restrictions, and calorie
goals.

4. User Interface:

Develop a user-friendly interface for easy image uploads, viewing results, and
receiving dietary recommendations.

6.2 Usage Scenario

• Scenario 1: A successful login with valid credentials:


1. User needs to enter his login credentials.

2. User enters his username.

3. User enters his password.

4. User logins successfully into the system.

D.Y.P.C.O.E.,Akurdi,Pune 21 Department of Computer Engineering


• Scenario 2: An unsuccessful login with wrong credentials:

1. User needs to enter his login credentials.

2. User enters his username.

3. User enters his password.

4. But User couldn’t login successfully into the system.

5. User presses forget password link.

6. User gets password reset link on his registered email id.

7. User resets his password and successfully logins into the system.

• Scenario 3: Successful Login:

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.

6.3 User profiles


Actor 1: User

• Users would be expected to login every time to Upload or download.


• Users will be able to query for encrypted data and search using attribute based en-
cryption.

Actor 2: Admin
• Admin can manage the user data.
• Admin can add and delete the user.

D.Y.P.C.O.E.,Akurdi,Pune 22 Department of Computer Engineering


6.2.2 Use-cases

Table 6.2: Use Case table

Sr. No Use case Description Actors


Actors can register User
1 Register
themselves to the application
Actors Can Login User
2 Login
themselves to the application
Actor Can upload the food images
3 Store Data User

Actor can Analyse their diet


4 Diet Analysis User

Actor can view history and compare.


5 View History User

Actor can manage the registered users


6 Manage User Admin
Actor can manage the user data
7 Manage Data Admin

D.Y.P.C.O.E.,Akurdi,Pune 23 Department of Computer Engineering


6.2.3 Use Case View

Figure 6.1: Use Case Diagram

D.Y.P.C.O.E.,Akurdi,Pune 24 Department of Computer Engineering


6.3 Functional Model and Description

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.

6.3.1 Data Flow Diagram

6.3.1.1 Level 0 Data Flow Diagram

Figure 6.2: DFD Level 0

6.3.1.1 Level 1 Data Flow Diagram

Figure 6.3: DFD Level

D.Y.P.C.O.E.,Akurdi,Pune 25 Department of Computer Engineering


6.3.2 Sequence Diagram

Figure 6.4: Sequence Diagram

6.3.3 Non Functional Requirements:

● Usability:The software must have a simple and User-friendly Interface. The


navigation to various pages should make it more convenient for users to save
time and confusion.
● Security: User data shall be encrypted and stored securely and user
authentication shall be implemented to protect user accounts.
● Deployment:
● Backup: There should be an enough back-up maintain feature for the entire
data, to prevent losing any data.
● Platform/Browser Independence: The system should be able to work on any
of the modern browsers like Firefox/ Chrome, and any of the common OS like
Linux, Windows, and Mac OS. and Android OS

D.Y.P.C.O.E.,Akurdi,Pune 26 Department of Computer Engineering


6.3.4 State Diagram:

Figure 6.6: Transaction State transition diagram

D.Y.P.C.O.E.,Akurdi,Pune 27 Department of Computer Engineering


Design Document

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.

7.2 Data design

7.2.1 Internal software data structure

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.

7.2.2 Database description

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.

D.Y.P.C.O.E.,Akurdi,Pune 28 Department of Computer Engineering


4. Data Security:
● Explain the security measures in place to protect the database, including
authentication, authorization, and encryption.
5. Scalability:
● Address how the database can scale to accommodate increasing data volumes and
user demands.
6. Data Retrieval and Querying:
● Detail how the database will be queried to retrieve food item information,
nutritional data, and user-specific data.
7. Data Backup and Recovery:
● Outline strategies for regular data backups and recovery procedures in case of
data loss or system failures.
8. Data Privacy and Compliance:
● Ensure compliance with data privacy regulations, and specify how user data will
be handled securely.
9. Performance Optimization:
● Discuss measures taken to optimize database performance, including indexing
and query optimization.
10. Data Maintenance and Updates:
● Describe how the database will be maintained and updated with new data, and the
frequency of such updates.

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.

D.Y.P.C.O.E.,Akurdi,Pune 29 Department of Computer Engineering


7.3 Architectural Design

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.

Figure 7.1: System Architecture

D.Y.P.C.O.E.,Akurdi,Pune 30 Department of Computer Engineering


Project Implementation

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.

8.2 Tools and Technologies Used

● Programming Languages: Python.


● Machine Learning Frameworks: TensorFlow, Keras, or PyTorch.
● Image Processing: OpenCV, PIL.
● Deep Learning Models: CNNs
● Data Management: Pandas, NumPy, databases.
● Web Development: Django or Flask (if a user interface is needed).
● Cloud Computing: AWS, GCP, or Azure.
● IDEs: Jupyter Notebook, PyCharm, Visual Studio Code.
● Data Visualization: Matplotlib, Seaborn, Plotly.
● Model Evaluation: Scikit-Learn, TensorBoard.
● Collaboration: Jira, Confluence, GitHub.
● Library Dependencies: Specific libraries for image preprocessing and data
handling

D.Y.P.C.O.E.,Akurdi,Pune 31 Department of Computer Engineering


8.3 Methodologies /Algorithm details

Convolutional Neural Networks (CNNs), a type of Deep Neural Network, are


primarily used for image recognition. CNN is made up of some basic layers,
including hidden layers and fully connected layers. Hidden layers are used to
extract and learn the features of training images, while fully connected layers are
used to classify the images.

● 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

D.Y.P.C.O.E.,Akurdi,Pune 32 Department of Computer Engineering


8.4 System Modules

8.4.1 Image Classification Module:

● Responsible for food image classification.


● Utilizes deep learning models like CNNs for accurate food item recognition.
● Provides an API for image analysis requests.

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.

● Monitors system behavior and performance, ensuring reliable results.

● Handles the deployment of the system to a cloud-based infrastructure.

● 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.

D.Y.P.C.O.E.,Akurdi,Pune 33 Department of Computer Engineering


9. Software Testing
In order to check whether the product required and the product built is meeting the ex-
pected requirement, software testing has to be done. Software testing is an activity to
check whether the actual result matches with the expected result and to make sure that the
soft- ware is defect free. It helps to identify errors, gaps or missing requirements in
contrary to the actual requirement. Software testing can be done either manually or by
using automated tools.

9.1 Type of Testing Used

● 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.

D.Y.P.C.O.E.,Akurdi,Pune 34 Department of Computer Engineering


● End-to-End Testing: Testing of complete application environment in a situa- tion
that mimics real world use is performed.
● Functional Testing: Functional testing is performed by focusing only on the output
to check if it is as per the requirement or not.
● Graphical User Interface (GUI) Testing: It includes the testing of size of the
buttons and input field present on the screen, alignment of all text, tables and
content in the table.
● Performance Testing: To check whether the system meets the performance
requirements.

D.Y.P.C.O.E.,Akurdi,Pune 35 Department of Computer Engineering


9.2 Test Cases

Test Test Case Test Steps Expected Actual Result Status


Case Description Result
ID

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.

TC005 Test Accuracy 1. Input a set The The Pass


of Food of food classification classification
Classification images. accuracy accuracy meets
2. Apply meets or or exceeds the
image exceeds the defined
processing defined performance
and performance criteria.
classification. criteria.
3. Compare
the results to
ground truth
labels.
TC006 Test Calorie 1. Input a set The calorie The calorie Pass
Estimation of food estimation estimation
Precision images. precision precision meets
2. Apply meets or or exceeds the
image exceeds the defined
processing, defined performance
classification, performance criteria.
and calorie criteria.
estimation.
3. Compare
the estimated
calorie values
to actual
values.

D.Y.P.C.O.E.,Akurdi,Pune 37 Department of Computer Engineering


10. Results

10.1 Screenshots

D.Y.P.C.O.E.,Akurdi,Pune 38 Department of Computer Engineering


D.Y.P.C.O.E.,Akurdi,Pune 39 Department of Computer Engineering
D.Y.P.C.O.E.,Akurdi,Pune 40 Department of Computer Engineering
10.2 Result Table

Data Used Training Accuracy Testing Accuracy

Combined Dataset 93.29 78.7%

FooDD Dataset 95.45 97.16%

D.Y.P.C.O.E.,Akurdi,Pune 41 Department of Computer Engineering


11. Deployment and Maintenance

11.1 Operational Requirements to run System

1. Programming Languages: Python.


2. Machine Learning Frameworks: TensorFlow, Keras, or PyTorch.
3. Image Processing: OpenCV, PIL.
4. Deep Learning Models: CNNs
5. Data Management: Pandas, NumPy, databases.
6. Web Development: Django or Flask (if a user interface is needed).
7. Cloud Computing: AWS, GCP, or Azure.
8. IDEs: Jupyter Notebook, PyCharm, Visual Studio Code.
9. Data Visualization: Matplotlib, Seaborn, Plotly.
10. Model Evaluation: Scikit-Learn, TensorBoard.
11. Collaboration: Jira, Confluence, GitHub.
12. Library Dependencies: Specific libraries for image preprocessing and data handling

D.Y.P.C.O.E.,Akurdi,Pune 42 Department of Computer Engineering


12. Future Scope and Conclusion

12.1 Future Scope

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.

D.Y.P.C.O.E.,Akurdi,Pune 43 Department of Computer Engineering


12.2 Conclusion

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.

D.Y.P.C.O.E.,Akurdi,Pune 44 Department of Computer Engineering


12.3 Appendix B(Idea Matrix)

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.

D.Y.P.C.O.E.,Akurdi,Pune 45 Department of Computer Engineering


12.4 Refernces

[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.

[2] H. Hoashi et al., “Image recognition of 85 food categories by feature fusion” in


IEEE International Symposium on Multimedia, vol. 2010. IEEE, 2021, pp. 296-301
[doi:10.1109/ISM.2010.51].

[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].

[8] S. Saha, Dec. 2023 [Online], “A comprehensive guide to convolutional neural


networks-the eli5 way,” Available: https : / / towardsdatascience . com / a - comprehensive -
guide-to-convolutional-neural- networks- the-eli5-way.

D.Y.P.C.O.E.,Akurdi,Pune 46 Department of Computer Engineering


[9] M. A. Subhi and S. M. Ali, “A deep convolutional neural network for food detection
and recognition” in IEEE-EMBS Conference on Biomedical Engineering and Sciences
(IECBES), vol. 2018. IEEE, 2022, pp. 284-287 [doi:10.1109/IECBES.2018.8626720].

[10] H. Zhao et al., Few-Shot and Many-Shot Fusion Learning in Mobile Visual Food
Recognition, 2022 doi:10.1109/ISCAS.2019.8702564.

D.Y.P.C.O.E.,Akurdi,Pune 47 Department of Computer Engineering


Laboratory assignments on Project Analysis of
Algorithmic Design

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.

2. NP-Hard, NP-Complete, or Satisfiability Issues:

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.

3. Input, Output, and Functionality:

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

D.Y.P.C.O.E.,Akurdi,Pune 48 Department of Computer Engineering


nutritional data from a database or through analysis of the image itself.

Laboratory assignments on Project Quality and Reliability


Testing of Project Design
Design Exploration and Parallel Processing (Divide and Conquer)

● 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:

● Code demonstrating parallel processing for image classification tasks.


● Performance comparison between sequential and parallel implementations.

Functional Dependency Modeling and UML Diagrams

● Identify functional dependencies between modules involved in image processing,


classification, and calorie prediction.
● Construct a functional dependency graph depicting these dependencies.
● Create UML diagrams (e.g., Class diagrams, Sequence diagrams) to represent the
system architecture, object interactions, and data flow.
● Utilize appropriate software modeling tools (e.g., UML modeling software) for
creating these diagrams.

Deliverables:

● Functional dependency graph representing relationships between modules.


● A set of UML diagrams depicting the system architecture and object interactions.

D.Y.P.C.O.E.,Akurdi,Pune 49 Department of Computer Engineering


Testing and Reliability Evaluation

● 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:

● A set of test cases covering various functionalities of the system.


● Test results with identified bugs or inconsistencies.
● Analysis of UML diagram reliability based on test case execution.

D.Y.P.C.O.E.,Akurdi,Pune 50 Department of Computer Engineering


Reviewer Comments of Paper Submitted
1. Name of the Conference/Journal where paper was submitted:IJSARET
2. Paper accepted/rejected: Accepted
3. Review comments by reviewer: No
4. Corrective actions if any:No

D.Y.P.C.O.E.,Akurdi,Pune 51 Department of Computer Engineering


13. Plagiarism Report

D.Y.P.C.O.E.,Akurdi,Pune 52 Department of Computer Engineering


D.Y.P.C.O.E.,Akurdi,Pune 53 Department of Computer Engineering
D.Y.P.C.O.E.,Akurdi,Pune 54 Department of Computer Engineering
D.Y.P.C.O.E.,Akurdi,Pune 55 Department of Computer Engineering
Term-II Project Laboratory Assignments
Task 1: Review and Corrective Actions

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:

Based on the feedback, we implemented several key changes:

● Enhanced model accuracy by refining the training data and fine-tuning


hyperparameters.
● Improved the user interface for a more intuitive and visually appealing experience.
● Optimized database queries to ensure faster data retrieval and improved storage
efficiency.
● Each modification was thoroughly documented along with the rationale behind it.

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.

Task 2: Project Workstation Setup

Workstation Selection and Installation:

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.

D.Y.P.C.O.E.,Akurdi,Pune 56 Department of Computer Engineering


Report Preparation:

● 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.

Task 3: Programming and Implementation

Project Functions and Interfaces:

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:

● Modules such as image processing, classification, calorie estimation, and dietary


recommendations were seamlessly integrated to ensure smooth functionality.
● Code refactoring was performed to enhance performance and readability.

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.

Task 4: Testing and Evaluation

Test Tool Selection:

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:

D.Y.P.C.O.E.,Akurdi,Pune 57 Department of Computer Engineering


● Unit tests were conducted to verify the functionality of individual components.
● Integration testing was performed to ensure seamless interaction between modules.
● The system was validated against the initial requirements to ensure compliance.

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:

● Comprehensive testing reports were generated, including charts, graphs, and


summaries of test results.
● The reports also documented identified issues and the corrective actions taken.

D.Y.P.C.O.E.,Akurdi,Pune 58 Department of Computer Engineering


Information of Project Group Members

Name: Aman Singh

Date of birth: 30 March, 2002


Gender: Male
Address: Jammu
Email: iamansingh02@gmail.com
Contact Number: +91 7889391045
Placement Details: Placed at Rockwell Automation
Paper Published : Yes

D.Y.P.C.O.E.,Akurdi,Pune 59 Department of Computer Engineering


Name: Adishri Kadam

Date of birth: 08 March, 2002


Gender: Female
Address: Solapur
Email: adishrikadam3766@gmail.com
Contact Number: +91 9307370915
Placement Details: Placed at Persistent
Paper Published : Yes

D.Y.P.C.O.E.,Akurdi,Pune 60 Department of Computer Engineering


Name: Aman Shukla

Date of birth: 10 August, 2002


Gender: Male
Address: Vaaranasi
Email: amanshukla360s@gmail.com
Contact Number: +91 8709742412
Placement Details:Appearing
Paper Published : Yes

D.Y.P.C.O.E.,Akurdi,Pune 61 Department of Computer Engineering


Name: Khushi Magotra

Date of birth: 01 Sep, 2002


Gender: Female
Address: Jammu
Email: khushimagotra94@gmail.com
Contact Number: +91 6006207688
Placement Details:Appearing
Paper Published : Yes

D.Y.P.C.O.E.,Akurdi,Pune 62 Department of Computer Engineering


D.Y.P.C.O.E.,Akurdi,Pune 63 Department of Computer Engineering

You might also like