SlideShare a Scribd company logo
4
Most read
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1247
Food Quality Detection And Calorie Estimation Using Machine Learning
Prakash R1, Vadlapatla Sathvik2, Potru Teja Sri Venkata Satya Sai3 , Pothireddy Gopichand
Reddy4
1Assitant Professor Sr.Grade1, SENSE, Vellore Institute Of Technology, Katpadi, Tamil Nadu-632014
2,3,4 Student, SENSE, Vellore Institute Of Technology, Katpadi, Tamil Nadu-632014
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Many states in India lack proper food supply to
the poor. Many NGOs and non-profitable organizations
work towards feeding the homeless and needy. But they lack
funding and hence proper food storage facilities and
maintenance is scarce. This project mainly focuses on
helping these organizations to keep the food in check and
serve unspoiled food. It also keeps track of the calories so a
well-balanced diet food is given.
Key Words: food safety, calorie estimation, machine
learning, oxygen sensor, MQ3 sensor, IOT.
1. INTRODUCTION
In this modern era of science of technology, the food
sector is facing one of the major problems that is food
spoilage. food items such as fruits, vegetables and meat
are going stale .The bigger problem is these spoiled items
going undetected and onto the hands of the consumer .
Hence, there is a need for an automated process that
would not only increase the accuracy of spoiled food
detection, but also estimating calories present in it.
This project mainly focuses on helping NGO’s and
organizations to keep their food in check and serve
unspoiled food. It also aims at keeping track of the calories
so a wellbalanced diet food is given. We are also designing
a mobile app which can be used to fetch data about
calories of different vegetables and fruits for the users by
uploading the image of any vegetables or fruits so as to
keep track of their calories and maintain a healthy
balanced diet.
In details, to automate this process, we are planning on
using a collection of smart sensors like temperature
sensor, MQ3 sensor with microcontroller like the Node
MCU. On detection of a spoiled or stale food item, a sound
buzzer will ring and a
LED light will glow to draw attention, we developed an
app, as an application of IoT. This enables consumers to
view the name of fruit or vegetable and also with the help
of developing app we can estimate the amount of calories
present in it.
In addition, the app classifies the image, predicts the
name of the fruit or the vegetable and gives the calories
associated with it. The frontend-backend is handled by the
Streamlit. The user can visit the application by URL. The
user can use the upload button upload button to upload
the image.
2. LITERAUTRE SURVEY
There have been previous papers on different fields on
food spoilage and calorie estimation.[1] An Arduino
sensor-based approach for detecting the food spoilage A
project on monitoring temperature in a small server room
have been implemented previously. The data is sent online
and if the values exceed a limit, the system turns the
conditioning systems on and makes the temperature in the
threshold values This paper is an IOT based consisting of a
microcontroller Arduino Uno, Bluetooth module, electrical
and biosensor like pH sensor, dampness sensor, and gas
sensors. DHT- 11 is used to measure temperature and
moistness, MQ2 to distinguish liquor content is linked with
Arduino board. This is an IoT based system, sends
necessary information to user through ESP8266 Wi-Fi.
Here they focus on keeping the food storage surrounding
to the optimal conditions [2] Iot based smart weighing
system for crate in agriculture. [3] A new deep learning
based food recognition system for dietary assessment on
an edge computing service infrastructure.
Chang Liu, Yu Cao , Senior Member, IEEE, Yan Luo,
Member, IEEE, Guanling Chen, Member, IEEE, Vinod
Vokkarane, Senior Member, IEEE, Ma Yunsheng, Song qing
Chen, Member, IEEE, This paper focuses on nutritional
estimation of food using the visual based food recognition
algorithms using edge computing. The project uses a visual
sensor for capturing the food image, the mobile phone for
the image preprocessing and segmentation and the server
(cloud layer) with the pre trained CNN model and image
classification. The multiple-stage food recognition system
includes Image preprocessing in the front-end component
and the Image segmentation in the front-end component
(CNN based food image analysis) Every living being on
earth is essentially dependent on nutrition to stay alive.
Each individual cell needs energy to continue its vital
activities such as growth, development and renewal of
damages. Environmental conditions, for instance humidity
and temperature allow organisms to spread inside food,
these bacterial activities cause unwanted food spoilage
which may be harmful for human health. [1].In India Data
analysis showed that states of West Bengal (31.22),
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1248
Karnataka (29.11) and Gujarat (22.67) reported maximum
average outbreaks and contributed to 31.5% illnesses and
8.7% deaths. Detecting food spoilage from production to
consumption stages is very crucial. There is indeed an
urgent need for fast and accurate systems, while
conventional spoilage detection techniques are slow and
time consuming [2]. As a result, new vision based
techniques and algorithmic approaches have been
proposed in the last decades. The most recently developed
methods for detecting. Food spoilage are based on digital
image processing, by using nano technology and state-of-
the-art machine learning, which have already proven their
high potential in the food industry. Here for food spoilage
detection we are using nanotechnology,[3].
Nanotechnology based sensing approaches are capable of
providing selective and specific information on the
presence and amount of pathogens and toxins.in this
project we are using MQ3 sensor [4].This MQ3 sensor that
is used to detect the presence of toxic gas acetone and
ethanol in the spoiled food. And also we are using oxygen
sensor which tells us that [5] if food item is inhabited by
germs ,the oxygen levels in the immediate surrounding is
going to be lower than it normally is .The introduction of
these sensors into food detection technology has paved the
way for smart food detection. These sensors will be
integrated with [6]Arduino uno board which is a popular
prototyping board measures and sends data to iot
platform.
3. PROPOSED MODEL DESCRIPTION
In our proposed work, we aim at detecting spoilage in
food items as a part of hardware and estimating calories in
food as a part of software. With the help of sensor nodes
placed near food items methane range and temperature
data can be collected at regular intervals. In this project
we have used industrial MQ3 and temperature sensors.
NodeMCU is with Arduino Uno boards.
In the block diagram, MQ3 and oxygen/temperature
sensor is connected to the Arduino boards and hence gets
connected to the Node MCU. Finally the data is shown on
the blynk app and at the same time the buzzers are turned
on to indicate spoilage of food if the values exceed the
threshold.
For the software part, it is a simple web application in
which the user needs to upload the Image of any fruit or
vegetable. The system next automatically classifies the
Image and gives the prediction about the name of the fruit
or vegetable, and also gives the calories of the object. The
frontend-backend will be handled by the Streamlit. The
user can visit the application by URL. There will be upload
button for the user to upload the image.
Fig -1: Process Flowchart
4. TECHINCAL SPECIFICATIONS
Our proposed work consists of 2 parts – hardware and
software The hardware consists of a MQ3 sensor along
with temperature for methane extent and temperature
measurement respectively, Arduino UNO and nodeMCU
for acquiring data from sensors and sending to the
Arduino IDE. A buzzer and two LED, s are connected to the
Arduino UNO for indicating the spoilage of the food and
blynk app for displaying the methane and temperature
data.
The frontend and backend of the web app is handled by
the StreamLit. It is a simple web application in which the
user needs to upload the Image of any fruit or vegetable.
The system next automatically classifies the Image and
gives the prediction about the name of the fruit or
vegetable, and also about their respective calories.
The user will first upload the Image. That image Will be
stored into the local system. Then pillow will resize the
image according to our model shape, it will convert into
vector. Now this vector will be passed to our model, our
model will classify the class of category. We will get the ID
of category, now we need to map the labels according to
the ID. Now our system will do web-scrap the calories for
predicted object. Our application will display the Result
and Calories into our application.
Fig -2: Flowchart
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1249
5.HARDWARE
5.1. Arduino UNO
Arduino is an open source platform used for building
electronic projects.it is a company.it is basically a
microcontroller. generally a microcontroller is difficult to
use and programming needs some experience. whereas it
comes as module with necessary pins and sockets
connected with microcontroller along with IDE in easy
programming language making it easier for small project
applications.
5.2. MQ3 sensor
MQ standards for having sensitivity towards gas. It is
made up of metal oxide semiconductors. MQ sensor are
called chemo resistor because sensor values change
according to change in resistance of gas. Specifications of
MQ3 sensor are it operates 5V dc and draw 800 Mw,
sensor resistance from 1M to 8MΩ, load resistance is
200kΩ. This module has 4 pins Analog Output (A0), Digital
Output (D0), VCC, GND pins. The A0 pin output will be
varied according to concentration of gas, when
concentration of gas is high, output of A0 pin is high and
vice versa for low concentration of gas.
5.3. ESP8266 Node MCU
NodeMCU is a low-cost open source IoT platform. It
initially included firmware which runs on the ESP8266
Wi-Fi SoC from Espressif Systems, and hardware which
was based on the ESP-12 module. Later, support for the
ESP32 32bit MCU was added.
5.4. Piezoelectric Buzzer
A piezoelectric speaker is a loudspeaker that uses the
piezoelectric effect for generating sound. The initial
mechanical motion is created by applying a voltage to a
piezoelectric material.
5.5. Temperature sensor
A temperature sensor is a device used to measure
temperature. This can be air temperature, liquid
temperature or The temperature of solid matter. The basic
principle of working of the temp. sensors is the voltage
across the diode terminals. If the voltage increases, the
temperature also rises, followed by a voltage drop
between the transistor terminals of base and emitter in a
diode. Here we have used a thermistor in this project
model.
Fig -3: Hardware Circuit
6.SOFTWARE
6.1.PyCharm
PyCharm is an integrated development environment used
in computer programming, specifically for the Python
programming language. It provides code analysis, a
graphical debugger, an integrated unit tester, integration
with version, and supports web development with Django
as well as data science.
6.2.Kaggle
Kaggle is world’s largest data set community with powerful
tools and resources to help to achieve one’s data science
goals. It allows users to find and publish data sets, explore
and build models in a web-based data-science
environment, work with other data scientists and machine
learning engineers, and enter.
6.3.Web App
The web app contains a signup, login and main webpage.
which the user needs to upload the Image of any fruit or
vegetable. The system next automatically classifies the
the Image and gives the prediction about the name of the
competitions to solve data science challenges. Fruit or
vegetable and also about their respective calories.
Fig -4: Calorie estimation Web App
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1250
7. RESULTS
7.1.Hardware
All the connections are successfully made and Arduino and
nodeMCU is turned on. The sensors are brought close to a
sample of food. The sensors connected to the Arduino
polls data from both the sensors. This data is sent to the
nodeMCU which the sends the data to the blynk app via
IDE code. On detection of a spoiled or stale food item a
buzzer sound will ring and a LED light will glow, notified
through blynk app via the Arduino.
Fig -5: Arduino IDE code
Fig -6: Methane And Temperature data values
Fig -7: Food Spoil Alert
Fig -8: Blynk App output reading
7.2.Software
The user will first upload the Image. That image Will be
stored into the local system. Then pillow will resize the
image according to our model shape, it will convert into
vector. Now this vector will be passed to our model, our
model will classify the class of category. We will get the ID
of category, now we need to map the labels according to
the ID. Now our system will do web-scrap the calories for
predicted object. Our application will display the Result
and Calories into our website.
Fig -9: Prediction and calories estimation of banana
The user will first upload the Image. That image Will be
stored into the local system. Then pillow will resize the
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1251
image according to our model shape, it will convert into
vector. Now this vector will be passed to our model, our
model will classify the class of category. We will get the ID
of category, now we need to map the labels according to
the ID. Now our system will do web-scrap the calories for
predicted object. Our application will display the Result
and Calories into our application.
Fig -10: Prediction and calories estimation of carrot
8. CONCLUSION AND FUTURE SCOPE
We were able to detect spoilt food with the help of the
proposed hardware model and also able to predict and
calculate calories of different fruits and vegetables with
the help of the software model. We can further detect
spoilage of food for wider range of food items by
increasing the number and types of sensors used in the
project. For the software model we can further make it
accurate for detection spoilage of food when uploaded a
real time picture of a spoilt or stale food.
9. REFERENCES
[1] A surveillance of food borne disease outbreaks in
India
https://www.sciencedirect.com/science/article/abs/p
i i/S0956713520305466?via%3 Dihub
[2] B. Fletcher and et al., “Advances in meat spoilage
detection: A short focus on rapid methods and
technologies,” J. Food, vol. 16(1), pp. 1037– 1044,
2018.
https://doi.org/10.1080/19476337.2018.1525432
[3] Mustafa F., Hassan R.Y., Andreescu S. Multifunctional
nanotechnology- enabled sensors for rapid capture
and detection of pathogens. Sensors. 2017;17:2121.
https://doi.org/10.3390/s17092121
[4] “Automatic Food Spoilage Detection”, International
Journal of Emerging Technologies and Innovative
Research UG C and issn Approved), March 2018,
http://www.jetir.org/papers/JETIREP06022.pdf
Cruz-Romero, Malco & Santovito, Elisa & Kerry, Joe
[5] & Papkovsky, Dmitri. (2019). Oxygen Sensors for Food
Packaging. 10.1016/B978-0-12-815781- 7.22944-
https://www.researchgate.net/publication/34402033
5_Ox ygen_Sensors_for_Food_Packaging
[6] “FOOD QUALITY SYSTEM BY USING ARDUINO”,
St.Martin’s Engineering college, B.Ravi Chander,
https://jespublication.com/upload/2020-110485.pdf
[7] Hu, H., Zhang, Z., & Song, Y. (2020), Image based food
caloriesestimation
https://arxiv.org/pdf/2106.11776.pdf
[8] Y. Liang and J. Li, (2017). “Deep learning-based food
calorie estimation method in dietary assessment”,
[online] Available: https://arxiv.org/abs/1706.04062.
[9] Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2017).
ImageNet classification with deep convolutional neural
networks. Communications of the ACM, 60(6), pp. 84–
90. https://doi.org/10.1145/3065386
[10] Simonyan, K., & Zisserman, A. (2015). “Very Deep
Convolutional Networks for Large-Scale Image
Recognition”, CoRR, abs/1409.1556. Retrieved from
http://arxiv.org/abs/1409.1556
[11] World Health Organization (2020). “Obesity and
overweight.” Accessed: April 1, 2020. [Online].
Available: https://www.who.int/news-
room/facthttps://www.who.int/news-room/fact-
sheets/detail/obesity-
andoverweightsheets/detail/obesity-andoverweight

More Related Content

PDF
IRJET - An Efficient System to Detect Freshness and Quality of Food
PDF
IRJET- An Efficient System to Detect Freshness and Quality of Food
PDF
Vision Based Food Analysis System
DOCX
Smart food storage and waste reduction.docx
PPTX
Food_Spoilage_Detection_System1.pptx
PDF
IRJET - Calorie Detector
PDF
IoT-Based Food Tracking and Management System Employing NodeMCU and the Blynk...
PDF
IOT Based Monitoring of Fruit Freshness Using Arduino Nano
IRJET - An Efficient System to Detect Freshness and Quality of Food
IRJET- An Efficient System to Detect Freshness and Quality of Food
Vision Based Food Analysis System
Smart food storage and waste reduction.docx
Food_Spoilage_Detection_System1.pptx
IRJET - Calorie Detector
IoT-Based Food Tracking and Management System Employing NodeMCU and the Blynk...
IOT Based Monitoring of Fruit Freshness Using Arduino Nano

Similar to Food Quality Detection And Calorie Estimation Using Machine Learning (20)

PPTX
FRUITS AND VEGETABLEFRUITS AND VEGETABLE
PDF
IRJET - Smart Refrigerator using IoT
PDF
IRJET- Arudino based Smart IoT Food Quality Detection Technology
PPTX
Recipe Detection Of Image Using Deep Learning.pptx
PDF
IRJET- Smart Recipe-An Innovative Way to Cook
PPTX
Food calorie Final ppt.pptx
DOCX
Remaining Shelf-Life Estimation of Fresh Fruits and Vegetables During Transpo...
PDF
IRJET- Smart Management of Crop Cultivation using IoT and Machine Learning
PDF
A Food Monitoring System Based on Bluetooth Low Energy and Internet of Things
PPTX
Food spoilage prevention system final year engineering project.
PDF
IRJET- Detection and Identification of Artificially Ripened Fruits using ...
PPT
Application of soft computing in food processing sector
PPTX
phase 1 ppt dal adulteration.pptx
PDF
Machine learning applications to non-destructive defect detection in horticul...
PPT
Application of artificial intelligence in food processing sector
PPTX
Final year ppt formattd
PDF
3 d vision based dietary inspection for the central kitchen automation
PDF
WEB BASED NUTRITION AND DIET ASSISTANCE USING MACHINE LEARNING
PDF
IRJET- Gabor Filters in Fingerprint Application
PDF
Identification and Recognition of Snack Foods from Cluttered Scene for Dietar...
FRUITS AND VEGETABLEFRUITS AND VEGETABLE
IRJET - Smart Refrigerator using IoT
IRJET- Arudino based Smart IoT Food Quality Detection Technology
Recipe Detection Of Image Using Deep Learning.pptx
IRJET- Smart Recipe-An Innovative Way to Cook
Food calorie Final ppt.pptx
Remaining Shelf-Life Estimation of Fresh Fruits and Vegetables During Transpo...
IRJET- Smart Management of Crop Cultivation using IoT and Machine Learning
A Food Monitoring System Based on Bluetooth Low Energy and Internet of Things
Food spoilage prevention system final year engineering project.
IRJET- Detection and Identification of Artificially Ripened Fruits using ...
Application of soft computing in food processing sector
phase 1 ppt dal adulteration.pptx
Machine learning applications to non-destructive defect detection in horticul...
Application of artificial intelligence in food processing sector
Final year ppt formattd
3 d vision based dietary inspection for the central kitchen automation
WEB BASED NUTRITION AND DIET ASSISTANCE USING MACHINE LEARNING
IRJET- Gabor Filters in Fingerprint Application
Identification and Recognition of Snack Foods from Cluttered Scene for Dietar...
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
PDF
Kiona – A Smart Society Automation Project
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
PDF
Breast Cancer Detection using Computer Vision
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
Kiona – A Smart Society Automation Project
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
BRAIN TUMOUR DETECTION AND CLASSIFICATION
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
Breast Cancer Detection using Computer Vision
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Ad

Recently uploaded (20)

PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Welding lecture in detail for understanding
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Digital Logic Computer Design lecture notes
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Well-logging-methods_new................
PPTX
Construction Project Organization Group 2.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Embodied AI: Ushering in the Next Era of Intelligent Systems
Automation-in-Manufacturing-Chapter-Introduction.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Welding lecture in detail for understanding
OOP with Java - Java Introduction (Basics)
Digital Logic Computer Design lecture notes
Model Code of Practice - Construction Work - 21102022 .pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Well-logging-methods_new................
Construction Project Organization Group 2.pptx
UNIT 4 Total Quality Management .pptx
Geodesy 1.pptx...............................................
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
CH1 Production IntroductoryConcepts.pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Operating System & Kernel Study Guide-1 - converted.pdf

Food Quality Detection And Calorie Estimation Using Machine Learning

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1247 Food Quality Detection And Calorie Estimation Using Machine Learning Prakash R1, Vadlapatla Sathvik2, Potru Teja Sri Venkata Satya Sai3 , Pothireddy Gopichand Reddy4 1Assitant Professor Sr.Grade1, SENSE, Vellore Institute Of Technology, Katpadi, Tamil Nadu-632014 2,3,4 Student, SENSE, Vellore Institute Of Technology, Katpadi, Tamil Nadu-632014 ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - Many states in India lack proper food supply to the poor. Many NGOs and non-profitable organizations work towards feeding the homeless and needy. But they lack funding and hence proper food storage facilities and maintenance is scarce. This project mainly focuses on helping these organizations to keep the food in check and serve unspoiled food. It also keeps track of the calories so a well-balanced diet food is given. Key Words: food safety, calorie estimation, machine learning, oxygen sensor, MQ3 sensor, IOT. 1. INTRODUCTION In this modern era of science of technology, the food sector is facing one of the major problems that is food spoilage. food items such as fruits, vegetables and meat are going stale .The bigger problem is these spoiled items going undetected and onto the hands of the consumer . Hence, there is a need for an automated process that would not only increase the accuracy of spoiled food detection, but also estimating calories present in it. This project mainly focuses on helping NGO’s and organizations to keep their food in check and serve unspoiled food. It also aims at keeping track of the calories so a wellbalanced diet food is given. We are also designing a mobile app which can be used to fetch data about calories of different vegetables and fruits for the users by uploading the image of any vegetables or fruits so as to keep track of their calories and maintain a healthy balanced diet. In details, to automate this process, we are planning on using a collection of smart sensors like temperature sensor, MQ3 sensor with microcontroller like the Node MCU. On detection of a spoiled or stale food item, a sound buzzer will ring and a LED light will glow to draw attention, we developed an app, as an application of IoT. This enables consumers to view the name of fruit or vegetable and also with the help of developing app we can estimate the amount of calories present in it. In addition, the app classifies the image, predicts the name of the fruit or the vegetable and gives the calories associated with it. The frontend-backend is handled by the Streamlit. The user can visit the application by URL. The user can use the upload button upload button to upload the image. 2. LITERAUTRE SURVEY There have been previous papers on different fields on food spoilage and calorie estimation.[1] An Arduino sensor-based approach for detecting the food spoilage A project on monitoring temperature in a small server room have been implemented previously. The data is sent online and if the values exceed a limit, the system turns the conditioning systems on and makes the temperature in the threshold values This paper is an IOT based consisting of a microcontroller Arduino Uno, Bluetooth module, electrical and biosensor like pH sensor, dampness sensor, and gas sensors. DHT- 11 is used to measure temperature and moistness, MQ2 to distinguish liquor content is linked with Arduino board. This is an IoT based system, sends necessary information to user through ESP8266 Wi-Fi. Here they focus on keeping the food storage surrounding to the optimal conditions [2] Iot based smart weighing system for crate in agriculture. [3] A new deep learning based food recognition system for dietary assessment on an edge computing service infrastructure. Chang Liu, Yu Cao , Senior Member, IEEE, Yan Luo, Member, IEEE, Guanling Chen, Member, IEEE, Vinod Vokkarane, Senior Member, IEEE, Ma Yunsheng, Song qing Chen, Member, IEEE, This paper focuses on nutritional estimation of food using the visual based food recognition algorithms using edge computing. The project uses a visual sensor for capturing the food image, the mobile phone for the image preprocessing and segmentation and the server (cloud layer) with the pre trained CNN model and image classification. The multiple-stage food recognition system includes Image preprocessing in the front-end component and the Image segmentation in the front-end component (CNN based food image analysis) Every living being on earth is essentially dependent on nutrition to stay alive. Each individual cell needs energy to continue its vital activities such as growth, development and renewal of damages. Environmental conditions, for instance humidity and temperature allow organisms to spread inside food, these bacterial activities cause unwanted food spoilage which may be harmful for human health. [1].In India Data analysis showed that states of West Bengal (31.22),
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1248 Karnataka (29.11) and Gujarat (22.67) reported maximum average outbreaks and contributed to 31.5% illnesses and 8.7% deaths. Detecting food spoilage from production to consumption stages is very crucial. There is indeed an urgent need for fast and accurate systems, while conventional spoilage detection techniques are slow and time consuming [2]. As a result, new vision based techniques and algorithmic approaches have been proposed in the last decades. The most recently developed methods for detecting. Food spoilage are based on digital image processing, by using nano technology and state-of- the-art machine learning, which have already proven their high potential in the food industry. Here for food spoilage detection we are using nanotechnology,[3]. Nanotechnology based sensing approaches are capable of providing selective and specific information on the presence and amount of pathogens and toxins.in this project we are using MQ3 sensor [4].This MQ3 sensor that is used to detect the presence of toxic gas acetone and ethanol in the spoiled food. And also we are using oxygen sensor which tells us that [5] if food item is inhabited by germs ,the oxygen levels in the immediate surrounding is going to be lower than it normally is .The introduction of these sensors into food detection technology has paved the way for smart food detection. These sensors will be integrated with [6]Arduino uno board which is a popular prototyping board measures and sends data to iot platform. 3. PROPOSED MODEL DESCRIPTION In our proposed work, we aim at detecting spoilage in food items as a part of hardware and estimating calories in food as a part of software. With the help of sensor nodes placed near food items methane range and temperature data can be collected at regular intervals. In this project we have used industrial MQ3 and temperature sensors. NodeMCU is with Arduino Uno boards. In the block diagram, MQ3 and oxygen/temperature sensor is connected to the Arduino boards and hence gets connected to the Node MCU. Finally the data is shown on the blynk app and at the same time the buzzers are turned on to indicate spoilage of food if the values exceed the threshold. For the software part, it is a simple web application in which the user needs to upload the Image of any fruit or vegetable. The system next automatically classifies the Image and gives the prediction about the name of the fruit or vegetable, and also gives the calories of the object. The frontend-backend will be handled by the Streamlit. The user can visit the application by URL. There will be upload button for the user to upload the image. Fig -1: Process Flowchart 4. TECHINCAL SPECIFICATIONS Our proposed work consists of 2 parts – hardware and software The hardware consists of a MQ3 sensor along with temperature for methane extent and temperature measurement respectively, Arduino UNO and nodeMCU for acquiring data from sensors and sending to the Arduino IDE. A buzzer and two LED, s are connected to the Arduino UNO for indicating the spoilage of the food and blynk app for displaying the methane and temperature data. The frontend and backend of the web app is handled by the StreamLit. It is a simple web application in which the user needs to upload the Image of any fruit or vegetable. The system next automatically classifies the Image and gives the prediction about the name of the fruit or vegetable, and also about their respective calories. The user will first upload the Image. That image Will be stored into the local system. Then pillow will resize the image according to our model shape, it will convert into vector. Now this vector will be passed to our model, our model will classify the class of category. We will get the ID of category, now we need to map the labels according to the ID. Now our system will do web-scrap the calories for predicted object. Our application will display the Result and Calories into our application. Fig -2: Flowchart
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1249 5.HARDWARE 5.1. Arduino UNO Arduino is an open source platform used for building electronic projects.it is a company.it is basically a microcontroller. generally a microcontroller is difficult to use and programming needs some experience. whereas it comes as module with necessary pins and sockets connected with microcontroller along with IDE in easy programming language making it easier for small project applications. 5.2. MQ3 sensor MQ standards for having sensitivity towards gas. It is made up of metal oxide semiconductors. MQ sensor are called chemo resistor because sensor values change according to change in resistance of gas. Specifications of MQ3 sensor are it operates 5V dc and draw 800 Mw, sensor resistance from 1M to 8MΩ, load resistance is 200kΩ. This module has 4 pins Analog Output (A0), Digital Output (D0), VCC, GND pins. The A0 pin output will be varied according to concentration of gas, when concentration of gas is high, output of A0 pin is high and vice versa for low concentration of gas. 5.3. ESP8266 Node MCU NodeMCU is a low-cost open source IoT platform. It initially included firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which was based on the ESP-12 module. Later, support for the ESP32 32bit MCU was added. 5.4. Piezoelectric Buzzer A piezoelectric speaker is a loudspeaker that uses the piezoelectric effect for generating sound. The initial mechanical motion is created by applying a voltage to a piezoelectric material. 5.5. Temperature sensor A temperature sensor is a device used to measure temperature. This can be air temperature, liquid temperature or The temperature of solid matter. The basic principle of working of the temp. sensors is the voltage across the diode terminals. If the voltage increases, the temperature also rises, followed by a voltage drop between the transistor terminals of base and emitter in a diode. Here we have used a thermistor in this project model. Fig -3: Hardware Circuit 6.SOFTWARE 6.1.PyCharm PyCharm is an integrated development environment used in computer programming, specifically for the Python programming language. It provides code analysis, a graphical debugger, an integrated unit tester, integration with version, and supports web development with Django as well as data science. 6.2.Kaggle Kaggle is world’s largest data set community with powerful tools and resources to help to achieve one’s data science goals. It allows users to find and publish data sets, explore and build models in a web-based data-science environment, work with other data scientists and machine learning engineers, and enter. 6.3.Web App The web app contains a signup, login and main webpage. which the user needs to upload the Image of any fruit or vegetable. The system next automatically classifies the the Image and gives the prediction about the name of the competitions to solve data science challenges. Fruit or vegetable and also about their respective calories. Fig -4: Calorie estimation Web App
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1250 7. RESULTS 7.1.Hardware All the connections are successfully made and Arduino and nodeMCU is turned on. The sensors are brought close to a sample of food. The sensors connected to the Arduino polls data from both the sensors. This data is sent to the nodeMCU which the sends the data to the blynk app via IDE code. On detection of a spoiled or stale food item a buzzer sound will ring and a LED light will glow, notified through blynk app via the Arduino. Fig -5: Arduino IDE code Fig -6: Methane And Temperature data values Fig -7: Food Spoil Alert Fig -8: Blynk App output reading 7.2.Software The user will first upload the Image. That image Will be stored into the local system. Then pillow will resize the image according to our model shape, it will convert into vector. Now this vector will be passed to our model, our model will classify the class of category. We will get the ID of category, now we need to map the labels according to the ID. Now our system will do web-scrap the calories for predicted object. Our application will display the Result and Calories into our website. Fig -9: Prediction and calories estimation of banana The user will first upload the Image. That image Will be stored into the local system. Then pillow will resize the
  • 5. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 08 | Aug 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1251 image according to our model shape, it will convert into vector. Now this vector will be passed to our model, our model will classify the class of category. We will get the ID of category, now we need to map the labels according to the ID. Now our system will do web-scrap the calories for predicted object. Our application will display the Result and Calories into our application. Fig -10: Prediction and calories estimation of carrot 8. CONCLUSION AND FUTURE SCOPE We were able to detect spoilt food with the help of the proposed hardware model and also able to predict and calculate calories of different fruits and vegetables with the help of the software model. We can further detect spoilage of food for wider range of food items by increasing the number and types of sensors used in the project. For the software model we can further make it accurate for detection spoilage of food when uploaded a real time picture of a spoilt or stale food. 9. REFERENCES [1] A surveillance of food borne disease outbreaks in India https://www.sciencedirect.com/science/article/abs/p i i/S0956713520305466?via%3 Dihub [2] B. Fletcher and et al., “Advances in meat spoilage detection: A short focus on rapid methods and technologies,” J. Food, vol. 16(1), pp. 1037– 1044, 2018. https://doi.org/10.1080/19476337.2018.1525432 [3] Mustafa F., Hassan R.Y., Andreescu S. Multifunctional nanotechnology- enabled sensors for rapid capture and detection of pathogens. Sensors. 2017;17:2121. https://doi.org/10.3390/s17092121 [4] “Automatic Food Spoilage Detection”, International Journal of Emerging Technologies and Innovative Research UG C and issn Approved), March 2018, http://www.jetir.org/papers/JETIREP06022.pdf Cruz-Romero, Malco & Santovito, Elisa & Kerry, Joe [5] & Papkovsky, Dmitri. (2019). Oxygen Sensors for Food Packaging. 10.1016/B978-0-12-815781- 7.22944- https://www.researchgate.net/publication/34402033 5_Ox ygen_Sensors_for_Food_Packaging [6] “FOOD QUALITY SYSTEM BY USING ARDUINO”, St.Martin’s Engineering college, B.Ravi Chander, https://jespublication.com/upload/2020-110485.pdf [7] Hu, H., Zhang, Z., & Song, Y. (2020), Image based food caloriesestimation https://arxiv.org/pdf/2106.11776.pdf [8] Y. Liang and J. Li, (2017). “Deep learning-based food calorie estimation method in dietary assessment”, [online] Available: https://arxiv.org/abs/1706.04062. [9] Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2017). ImageNet classification with deep convolutional neural networks. Communications of the ACM, 60(6), pp. 84– 90. https://doi.org/10.1145/3065386 [10] Simonyan, K., & Zisserman, A. (2015). “Very Deep Convolutional Networks for Large-Scale Image Recognition”, CoRR, abs/1409.1556. Retrieved from http://arxiv.org/abs/1409.1556 [11] World Health Organization (2020). “Obesity and overweight.” Accessed: April 1, 2020. [Online]. Available: https://www.who.int/news- room/facthttps://www.who.int/news-room/fact- sheets/detail/obesity- andoverweightsheets/detail/obesity-andoverweight