An_IoT_and_Machine_Learning_Based_Model
An_IoT_and_Machine_Learning_Based_Model
Research Article
An IoT and Machine Learning-Based Model to Monitor Perishable
Food towards Improving Food Safety and Quality
Received 12 March 2022; Revised 1 May 2022; Accepted 7 May 2022; Published 6 June 2022
Copyright © 2022 Amina Batool et al. This is an open access article distributed under the Creative Commons Attribution License,
which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Increased quantities of the same sort of item are not nearly as critical to client happiness as a high-quality product. The re-
quirements and expectations of the consumer have an impact on the overall quality of a product or service. The term “quality” may
also be defined as the sum total of all the features that contribute to the production of goods and services that are satisfactory to the
consumer. Certain imported commodities have lately seen an improvement in quality thanks to efforts by importing nations.
Additionally, it safeguards food imported from other nations by confirming that it is safe for human consumption before it is
released. This article describes a technique for monitoring perishable goods that is based on the Internet of Things and machine
learning. Pictures are recorded using high-resolution cameras in this suggested architecture, and then these images are sent to a
cloud server using Internet of Things devices. When uploaded to a cloud server, these photos are segmented using the K-means
clustering method. Then, using the principal component analysis technique, features are extracted from the photos, and the
images are categorized using machine learning models that have been trained. This proposed model makes use of the Internet of
Things, image processing, and machine learning to monitor perishable food.
inconsistent [6]. In agricultural engineering studies [7, 8], labeled, while the training data for regression must be un-
this method has been applied. labeled (clustering) [14].
Technological advances and the incorporation of these Identifying the traits that make something unique, or
advances into a sustainable farming system have assisted “target attributes,” is the first step in determining how to
agricultural research. Technology has automated every stage classify it. Decision trees and support vector machines, as
of the agricultural process, making it a long-term economic well as Bayesian classifiers, are commonplace in many fields
model. An intermediary who buys cheap from farmers and [15]. They are used in machine learning as well as in neural
then resells it at a profit is removed from the equation. networks and classifiers. One at a time, they will be covered
Computational intelligence approaches have recently been in detail. Algorithms for learning form the basis of each
used to handle agricultural system decision modelling approach.
challenges. Technologies like artificial intelligence and the Decision trees may be useful in situations when classi-
Internet of Things are already making a difference in ag- fication is a problem. A decision tree sorts events into
riculture. Machine learning and the Internet of Things may categories based on the values of the attributes they contain.
be used to keep tabs on perishable commodities, which is an Each branch in the decision tree indicates a possible value for
essential application. Food safety and quality are improved a node in the classification. Feature values are used to rank
as a result [9]. instances in the hierarchy, whereas root nodes are used to
The Internet of Things (IoT) is a hot issue right now. classify them.
Every element of our everyday life is being influenced by the When it comes to input attributes, it may not be possible
Internet of Things. The Internet of Things has numerous to accurately describe them. While input attribute set values
applications and is making people’s lives better (IoT). IoT match those in the training dataset, class variables are
technology enables smart cities, smart homes, smart nondeterministic. This is due to a lack of consideration for
healthcare, smart agriculture, smart farming, smart logistics, noise and confusion in the data processing. There are many
and smart production [10, 11]. ways to tell if you have cardiovascular disease in your daily
Agriculture is essential to the country’s economy since it life.
feeds its inhabitants. This means that all of the country’s Even those who follow a heart-healthy diet and engage in
major corporations are linked and interrelated. A country is a regular physical activity run the risk of getting heart disease
considered rich if its economy and society are mainly de- if they smoke, drink alcohol, or have a genetic predisposi-
pendent on agriculture. Agriculture employs the vast ma- tion. It is not always possible to get reliable information from
jority of people in the vast majority of countries. The upkeep the well-known symptoms of cardiac disease. In these cases,
of plants and animals on large farms may entail the hiring of the Bayesian classifier uses attributes to determine the class
additional workers. The bulk of these huge farms has close label [16].
processing facilities where they generate and process their In order to create animal brains, a biological neural
agricultural goods. network is used. ANN is a connectionist system due to the
Automated machine learning techniques can be used to fact that it is made up of connected nodes and directed links.
analyze the complex interaction between agricultural sys- Communication between nodes is carried out by means of
tems’ inputs and outputs by employing nonlinear and time- connections, each of which has its own weight. Prior to being
dependent analytical methodologies as well as different transferred to the next node, signals must be processed at
unknown components [12, 13]. each node’s end.
This article presents an Internet of Things and machine Nonlinear functions are applied to the output of each
learning-based model to monitor perishable foods. In this neuron in most artificial neural network implementations.
proposed model, first images are captured using high-res- As the process of learning continues, the strength of the
olution cameras, and then these images are forwarded to a signal changes based on the weight and connections of the
cloud server through IoT devices. On the cloud server, these artificial neurons [17].
images are segmented using the K-means clustering algo- There are two ways to build a learning model in ML
rithm. Then, features are extracted by the principal com- classification. These models begin learning as soon as they
ponent analysis algorithm. After that, the images are have access to the training data. A separate model can
classified using trained machine learning predictors. This recognize a test case if the properties of the test case exactly
proposed model makes use of the Internet of Things, image match any of the training instances. Students like these are
processing, and machine learning to monitor perishable labeled “lazy” [18].
food. When it comes to categorization, each sample is con-
sidered an individual data point in the context of all other
2. Literature Survey samples. A clear separation between the test case and the rest
of the data has been formed. A data point’s neighbors in-
The term “machine learning” (ML) refers to an emerging clude every other data point in its immediate proximity.
subject in which algorithms can learn and develop on their The data point is classified in accordance with the
own without the need for explicit coding. There are two main classifications of its immediate neighbors. Data points
approaches to machine learning: unsupervised and super- having a large number of classified neighbors are given the
vised. Classification and regression are the two main types of class label that is most frequently used by other data points.
inference. The training data for classification must be The precise value of K-nearest neighbors must be
Journal of Food Quality 3