• Sonuç bulunamadı

View of A System To Detect Fruitfreshnessusingmachine Learningand Iot Approach

N/A
N/A
Protected

Academic year: 2021

Share "View of A System To Detect Fruitfreshnessusingmachine Learningand Iot Approach"

Copied!
9
0
0

Yükleniyor.... (view fulltext now)

Tam metin

(1)

A System To Detect Fruitfreshnessusingmachine Learningand Iot Approach

Ganeshan Mudaliar

1

, B.K Rashmi Priyadarshini

2

.

1SchoolofECE, REVAUNIVERSITY,Bangalore, r19mve07@ece.reva.edu.in 2School of ECE, REVA UNIVERSITY, Bangalore, rashmipriyadarshini@reva.edu.in

Article History: Received: 11 January 2021; Revised: 12 February 2021; Accepted: 27 March 2021; Published online: 23 May 2021

Abstract: Food spoilage is a big problem in today's culture, as consuming spoiled food can be dangerous to one's health.Our

study intends to detect rotten food at an early stage and improve accuracy to reduce food waste by using sensors and analysing gases released by specific food products.When a microcontroller detects gases, it communicates data to the internet of things, enabling for the necessary action to be taken..In the food business, where food identification is currently done by hand, this offers a wide range of uses.We used machine learning and IoT, as well as sensors, to anticipate how frequently a food will spoil.This will increase supermarket competitiveness, resulting in more organic and natural products being sold.This study looks at how Machine Learning and IoT can be used to determine food freshness.The Wi-Fi module connects this IoT system to the internet, and it begins reading data from the connected sensors.The system consists of a microprocessor, as well as electrical and biosensors such as a moisture sensor and an ethanol gas sensor.This technology detects moisture as well as harmful gases.A convolutional neural network (CNN), a sort of deep learning neural network, is a type of deep learning neural network..CNNs are a big step forward in image identification.They're most usually utilised to examine visual imagery, and they're regularly involved in picture categorization behind the scenes.We get an accuracy of 89% while using CNN in detecting ripen fruit and 96% in rotten fruit.The result of both CNN and sensors valve comparing that both the result it is declard as fresh or rotten.

Keywords: Fruit, Feature Extraction, Neural Network, Convolution Neural Network (CNN), Fruit Classification,

ESP32,IOT,Gas Sensors,Moisture Sensor.

1. Introduction

Nowadays, every one in several travellodge mess and kitchens,hotels is impacted by the food they eat. fruits , and other commonly consumed foods do not have quality because their moisture levels and toxic gases fluctuate.It should be tracked at any point of the supply chain to ensure food safety.changes can affect the taste,flavour, and shelf life of fruits.When fruit begins to decompose, it releases gases such as ethanol,methane,Ammonia,Through the passage of time, these gases become more prevalent.The aim of this system is to detect spoilage of food before significant symptoms appear..According to the study, food emits certain gases that can be measured by IOT sensors as it decays, and the amounts of these gases can differ depending on the degree of the decay.To evaluate the freshness and consistency of food, criteria such as oxygen ,moisture, and gas levels must be measured in food products.The food will not often seem to be safe.The aim of the paper is to identify changes in food's nutritional value.The proposed methodology would assist people in determining the quality or consistency of foodOur goal for the system is to have improved food freshness and quality.The buyer must have a general understanding of the nutrients in food.Infection has been related to several other diseases that have a detrimental effects on one's health.We use sensors and machine learning together to assess the freshness of fruits and vegetables, which can help prevent food spoilage.In this article, we look at a secure and cost-effective method for detecting fruit freshness based on size, form, and colour. Fruits should be tested in a non-damaging manner since they are delicate objects.When it comes to fruit sizing, the most important physical property is its colour, which also serves as a visual property.As a result, fruit freshness classification is critical for rising market share and establishing higher quality levels.If classification and ranking are performed by hand, the procedure will be sluggish and prone to errors.Humans classify the freshness of fruits based on colour, height, and other factors.If these consistency indicators are laid outThe job would be easier and error-free if these quality controls are mapped into an integrated framework using a compatible programming language.As a result, the fruit sorting process becomes faster and less expensive.Machine Learning methods have recently been discovered to be increasingly useful in the fruit industry, primarily for applications in fruit freshness detection.For perceptible examination, fruit characteristics such as form and colour are critical.Both criteria must be easily identified by a formally separate framework for fruit scoring based on freshness.The aim of this research is to provide a classification model for fruit spoiled or fresh and by using suitable sensors and measuring gases emitted by the specific food object, our project aims to detect spoiled food.When a microcontroller detects this, it sends data via the internet of things, allowing necessary action to be taken.The interoperability and application of IoT and Machine Learning are only enhanced when they are combined.The ESP32 is a family of low-cost, low-power system-on-a-chip microcontrollers that have built-in Wi-Fi and dual-mode Bluetooth.

The ESP32 series in addition to alcohol.ut we figured out a means to figure it out.The MQ-3 alcohol sensor may be used to test for alcohol, benzine, hexane, or LPG levels in the air, but solely for alcohol

(2)

levels."ThingSpeak is an open-source Internet of Items (IoT) application and API for storing and retrieving data from things over the Internet or over a contains built-in antenna switches, RF baluns, power amplifiers, low-noise receive amplifiers, filters, and power-management modules, as well as a TensilicaXtensa LX6 CPU in dual-core and single-core versions. The MQ-3 alcohol sensor is sensitive to a variety of gases Local Area Network utilising the HTTP and MQTT protocols.ThingSpeak allows developers to create sensor recording apps, location tracking apps, and a social network of things with status updates.A convolutional neural network (CNN) is a specific type of artificial neural network that uses perceptrons, a machine learning unit algorithm, for supervised learning, to analyze data and to classify images .

2. Literature survey

In this work, a CNN-based fruit identification system is suggested.For classification, the suggested method employs deep learning techniques.This work investigates a CNN-based fruit identification classifier. [1]

The different image processing approaches used for fruit categorization are discussed in this research. The evolution of computer vision has made it feasible to train the computer to categorise pictures based on specified features, and this paper discusses numerous approaches and algorithms used for fruit detection and classification..[2]

Using a Convolutional Neural Network, this paper proposes a classification model for orange images.The deep learning CNN approach is used to classify five different types of oranges: good-orange-grade-1, good orange, immature-orange, rotten-orange, and damaged-orange.To achieve better fruit classification, CNN needs to perform better. [3]

In this paper, we used Tensorflow, one of the most popular deep learning libraries to classify dataset, which is frequently used in data analysis studies.UsingTensorflow, which is an open-source artificial intelligence library compared the effects of multiple activation functions on classification results.[4]

The author proposed sensing designs and their analytical features for measuring freshness markers, allergens, pathogens, adulterants and toxicants are discussed with example of applications.[5]

Monitoring of perishable food products and early detection of degradation will avoid loss due to food wastage and also ensures the freshness of food. In this scenario, remote monitoring of fruits during transportation from field to shelf can ensure the quality of fruit. In this work, a wireless sensor network was designed for monitoring of fruits during transportation and even after storage[6]

Monitor the gas levels coming out of the food, when the food is about to get spoiled. The amount of the gas level released from the food is monitored through the gas sensors and converted into analog values to be displayed on the IoT platform to be monitored wherever required[7]

The writers focused on the classification of bacteria in street food.Market food has a huge cultural influence, but the cleanliness and quality of street food are often underestimated due to a lack of awareness about proper food production.Since it's exhausting to use an optical nose and image scanning to see whether the microorganism is already there, a bad microorganism that causes diarrheal diseases.The aim of this paper is to develop an electronic nose with gas sensors that can detect three types of bacteria commonly found on street foods: Enterococcus faecalis, Escherichia coli, and Staphylococcus aureus, as well as classify whether the bacteria are present before and after cooking.[8]

3. Methodology 1.ML USING CNN CNN

A convolutional neural network (CNN) is a specific type of artificial neural network that uses perceptrons, a machine learning unit algorithm, for supervised learning, to analyze data. CNNs apply to image processing, natural language processing and other kinds of cognitive tasks.CNN is a multilayer, feed-forward neural networks (FFNN) which can quickly identify, classify, and recognize any features in an image. It is used mainly with visual data, such as image classification. A CNN can be prepared to do image analysis tasks including

(3)

biases that form layers and fire in a particular order to end up with a final output. The networks can be trained in order to recognize particular patterns by feeding them large amounts of data. This is very useful in the field of computer vision since it means that a computer can be trained to recognize different objects.

Fig3.1: Architecture of CNN In this section we directly discuss about how is the system is Select the fruit Images.

Resize all fruit images to standard size.

Changing the dataset from having (n, breadth, height) to (n, depth, width, height). Split dataset into training, test & validation set using kerastrain_test_split command.

Transforming our data type to float32 and normalizing our data values from 0-255 to the range [0, 1]. Preprocess class labels.

Define our model architecture.

Compile model with stochastic gradient descent optimizer and categorical-cross entropy and also the learning rate=0.0001.

Fit and train data.

Evaluate model on test dataset and calculate the confusion matrix Classification is done through python 3.6.

2.methodology using sensor and iot

Sensors are used to calculate food properties like moisture, ethanol, and methane levels.

The system is made up of a microcontroller, as well as electrical and biosensors such as a moisture sensor and an ethanol gas sensor. It detects moisture and harmful gases.Moisture is detected using a moisture sensor, and alcohol gas levels are detected by the MQ3 gas sensor, both from food samples.Through the Wi-Fi module, this IoT system connects to the internet and begins reading data from the interfaced sensors, MQ3 sensor, and moisture sensor.Ethanol-related gas emissions are measured with the MQ3 sensor.Food and fruits emit ethanol-like fumes when they deteriorate.

The MQ3 sensor detects changes in the environment. Certain gases are detected by the MQ3 sensor.The data is uploaded to a server via the system's Wi-Fi module, where it is processed.By comparing the values to the threshold values, the results are obtained

4. Proposed system

GAS

SENSOR

FOOD

(4)

FIG4.1 Block diagram of proposed systemThe aim of this proposed system is to create a device that includes sensors and ML for early detection of food spoilage.The use of sensors to calculate various food parameters such as pH, moisture, ethanol, and methane levels.A microcontroller, and moisture sensor, and ethanol gas sensor, make up the system.The suggested solution detects moisture, and toxic gases in the vicinity.The moisture sensor detects moisture using a moisture sensor, alcohol gas levels using the MQ3 gas sensor, from food..The MQ3 sensor senses ethanol-related gas emissions.When food or fruits spoil, they produce ethanol-like gases.and moisture sensor detect the increase in the moisture level when the fruit is rotten .and the data gathered from the esp32 is send it to the thingsspeak server where authorized user can view the real time changes in the food .Using ML we can detect the food from external features such as texture ,color, size ,which help to early classification of food using both this approaches we can compare both external as well as intenalfeatures and come to a conclusion if the food is spoiled or not.This system increases the accuracy of detecting fresh food.

5. Result

I.RESULTS WITH CNN

When we show the image or real tomato the ML identifies the tomato is ripen or rotten .fig 5.1shows the ripen tomato with 89%accuracy

MOISTURE

SENSOR

CNN

RESULT

(5)

When we show the image or real tomato the ML identifies the tomato is ripen or rotten .fig 5.2 shows the rotten tomato with 96 %accuracy

Fig 5.2: Rotten tomato of 96%

When we show the image or real tomato the ML identifies the tomato is ripen or rotten .fig 5.3 shows the rotten tomato with 73%accuracy

Fig 5.3: Rotten tomato of 73%

II .results with sensors and iot

On the basis on the reading obtained by

the sensor fig 5.4shows the result as food is

(6)

Fig 5.4Food is Fresh

Fig5.5: shows the graph genereated in thingsspeak by the data send by the sensor using wifi it shows there is no abnormality in the moisture level and gas level when fresh food exposed.

Fig5.5:Graph generated by Thingsspeak when food is fresh

On the basis on the reading obtained by the sensor fig 5.6 shows the result as food is spoiled as it detect changes in gas level and moisture level above threshold

(7)

abnormality in the moisture level and gas level when rotten food is exposed.

Fig5.7:Graph generated by Thingsspeak when food is spoiled III.Combined Result of IOT and ML

Fig 5.8 shows the combined results obtained by the the ML and iot based sensor system to come to a conclusion that the food is fresh or spoiled.

Fig5.8:combine result of system using Machine learning and IOT 6. Future enhancement

Furtermore, this technique can be combined with biosensors such that the freshness of food can be determined not only by external factors such as colour, form, texture, and scale, but also by internal factors such as chemical and biological changes in the food using various sensors.

To view the results of food item inspections, a webapplication can be created.

(8)

vegetable groups.

Plan to use several other CNN-based models to compare their accuracy on the same dataset

More features for ranking and classification that can classify types of disease and/or texture composition of fruits can also be worked on.

7. Conclusion

This paper focuses on the use of convolutional neural networks (CNNs) and sensors to detect any visible signs of spoilage, the sensors can detect gas pollutants and other essential constituents including pH and moisture levels from food products in the food and agriculture industries. The CNN identify characteristics such as Size, colour, and form to distinguished between ripe and rotten fruits.In order to improve the functionality and versatility of our dataset, we included several real-world exanples . The use of sensors to monitor the presence of these values in foods can aid in the early detection of food spoilage and the avoidance of spoiled food intake.To improve the sensitivity of such detection systems, these approaches may be expanded to include other types of gas sensors and foods.As a result, the proposed approach effectively increases the rate of fruit detection.

REFERENCES

1. Xiaoyang Liu, etc “A Detection Method for Apple Fruits Based on Color and Shape Features” , IEEE Access, 22 May 2019 .

2. Seng, Woo Chaw,etc. "A new method for fruits recognition system." Electrical Engineering and Informatics 2009. ICEEI'09. International Conference on. Vol. 1. IEEE, 2009.

3. Nishat Tasnim, Md. etc“A Convolution Neural Network Based Classification Approach for Recognizing Traditional Foods of Bangladesh from Food Images”.

4. Sahu, Dameshwari, and ChiteshDewangan. "Identification and Classification of Mango Fruits Using Image Processing." Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol 2.2 (2017): 203-210.

5. Fatima Mustafa and Silvana Andreescu, “Chemical and Biological Sensors for Food-Quality Monitoring and Smart,” Phil. Trans. Roy. Soc. London, vol. A247, pp. 529–551, 16 October 2018 6. Chanthini.B, Manivannan.D, Umamakeswari.A “Perishable Food Quality Monitoring –An Internet of

Things (IoT) Approach” ISSN: 1311-8080 (printed version); ISSN: 1314-3395

7. Food quality monitoring system B.RaviChander ,P.A.Lovina,G.Shiva Kumari Vol11,Issue4,April/2020ISSN NO:0377-9254

8. Detection and classification of bacteria in common street foods using electronic nose and support vector machine”2017

9. Neethirajan, S.; Jayas, D.S. Nanotechnology for the food and bioprocessing industries. Food Bioprocess Technol. 39–47. I. S. Jacobs and C. P. Bean, “Fine particles, thin films and exchange anisotropy,” in Magnetism,

10. Application of biosensors in food quality control Rafeeya Shams1, Jagmohan Singh1, Shafia Ashraf1, Mehnaza Manzoor1, Aamir Hussain Dar2 Journal of Postharvest Technology 2020, 08(1): 53-74 11. Shiv Ram Dubey and Anand Singh Jalal "Application of Image Processing in Fruit and Vegetable

Analysis” A Review.

12. Kavdır, I., Guyer, D.E.: Comparison of Artificial Neural Networks and Statistical Classifiers in Apple Sorting using Textural Feature,. Biosystems Engg. 89, 331-344 (2004).

13. Hannan M.W., Burks T.F., Bulanon D.M., “A Machine Vision Algorithm for Orange Fruit Detection”, Agricultural Engineering International: the CIGR E journal, vol-XI,Pages:1-7, December-2009. 14. T.-N. Do and J.-D. Fekete, ``Large scale classification with support vector machine algorithms,'' in

Proc. 6th Int. Conf. Mach. Learn. Appl., Cincinnati, OH, USA, Dec. 2007, pp. 7_12.

15. Bargoti, S. and Underwood, J., 2017, May. Deep fruit detection in orchards. In Robotics and Automation (ICRA), 2017 IEEE International Conference on(pp. 3626–3633). IEEE.

16. Prabha, D. Surya, and J. Satheesh Kumar. "A study on image processing methods for fruit classification." Proc. Int. Conf. on Computational Intelligence and Information Technology, CIIT 2012. 17. Tarale, Ketki, and Anil Bavaskar. "Fruit Detection Using Image Processing Technique." National

Conference on Advances in Engineering and Applied Science (NCAEAS). 2017,(3)2: 178-183.

18. DameshwariSahu, Ravindra Manohar Potdar.“Defect Identification and Maturity Detection of Mango Fruits Using Image Analysis” American Journal of Artificial Intelligence

19. HYBRID MEDICAL IMAGE FUSION BASED ON CURVELET TRANSFORM WITH PULSE COUPLED NEURAL NETWORK, Dr. S. Sai iKumar , Dr.B.V. Subba Rao, Dr. J. Rajendra Prasad,

(9)

Neural Network Algorithm for Observation of Accuracies for Various Hidden Layers”, ArXiv e-Journal ( ISSN 2331-8422 )

21. Mehenag Khatun, .etc” Fruits Classification using Convolutional Neural Network” GRD Journals- Global Research and Development Journal for Engineering | Volume 5 | Issue 8 | July 2020 ISSN- 2455-5703

22. Dhiya Mahdi Asriny,.etcOrange Fruit Images Classification using Convolutional Neural Networks” International Conference on Information Technology and Digital Applications 2019 IOP Conf. Series: Materials Science and Engineering 803 (2020) 012020 IOP Publishing doi:10.1088/1757- 899X/803/1/012020

23. FatihErtam.etc– “Data Classification with Deep Learning using Tensorflow”, 2nd International Conference on Computer Science and Engineering, 2017

Referanslar

Benzer Belgeler

15 Ali Nihai’s Velayetnama of Haci Bektas Veli Written in Poetry and the Haci Bektas Veli Eulogies in the Velayetnama. Orhan

Ey yolcular ey yolcular Yol Muhammet’in yoludur Dil Muhammet Ali’nindir Yol Muhammet’in Ali’nindir Hani eben hani dedem Ayni yâre sende gidem Doğru yolu tarif eden Dil

Cümle eş dost, şair, ressam, serseri Artık cümbüşte yoksam geceleri / Sanmayın tarafımdan bir ihanet var Yaş ilerliyor, artık geçti bizden Kişi ev bark

Yeğen, Güran, Genim, Rıfat ve Kehyagil ailelerinin büyüğü ve yakını, Emin Kehyagil'in eşi, Nevin Kehyagil, A yla Pulhan, Leyla ve Halil Giresunlu,. Mehmet ve Birte

Objective: To perform morphometric analysis of corpus callosum (CC) by using callosal area (CA), supratentorial-supracallosal area (SSA) and CA/SSA parameters in a healthy

Beton döküm yönüne göre karot alım doğrultusu incelendi- ğinde, döküm yönü tersinde alınan karotların basınç dayanı- mı, döküm yönünde alınan karotlara göre

Sonuç olarak; bu olgumuzda tanı konamayan kronik öksürük ve tedaviye dirençli lober pnömonilerin etyolojisinde hasta yaşı ne olursa olsun yabancı cisim aspirasyonunu

Türkiye’de standartlara uygun beton üretilmesi ve inşaatlarda doğru beton uygulamalarının sağlanması için 29 yıldır çalışan Türkiye Hazır Beton Birliği (THBB),