# The Use of Different Image Recognition Techniques in Food Safety: A Study

Authors: Rijwan Khan; Santosh Kumar; Niharika Dhingra; Neha Bhati
Journal: Journal of Food Quality
 (2021)

---

## Abstract

Food safety refers to preparing, transporting, and storing food to avoid foodborne sickness and harm. From farm to factory and factory to fork, food items may meet various health dangers. Therefore, food safety is crucial both monetarily and morally. The implications of failing to comply with food safety requirements are varied. The requirement for accurate, quick, and nonpartisan quality assessments of these features in food products continues to rise with increased demands for dietary materials and high-quality requirements. Computer vision provides an automatic, nondestructive, and economic approach to achieving these aims. A substantial research has demonstrated its effectiveness for fruit and vegetable assessment and classification. It stresses the critical components of image processing technology and a survey of the most current advances across the food sector. This article outlines the essential parts of a computer vision system. In order to avoid foodborne disease and ensure food security, fast and effective detection of pathogenic microorganisms is crucial for public safety biomonitoring. Over the years, microorganism detection techniques have evolved.


---

## Body

## 1. Introduction

Management of the safety and quality of food and food products in contemporary food production facilities is an essential and crucial problem since the producers have to comply rigorously with the regulations and they have to satisfy the needs of the consumers. Factors impacting the quality of food may be determined via visual examination and image analysis. According to this evaluation outcome, the price of a product may be established or the last consumable date may be calculated. These qualities are connected to aspects that may be assessed using nondestructive approaches [1]. The quality of food may be judged by studying the changes in its visual qualities, such as size, color, shape, and texture. These evaluations were done by people before computer vision systems were invented, and this approach was expensive and subjective. In addition, computer vision systems may perform better than human operators and human perception in the spectrum range of uncertain situations for human operators. Computer vision is indeed a solution for food safety and quality assurance applications, because of its benefits such as substantially greater operation speed, consistency, dependability, objectivity, and adaptability to industrial contexts.Foodborne infections constitute a large and ongoing burden on public health. More than a century has passed, pushed, and fed into macrosocial forces, such as population increase, urbanization, and globalization, in huge alterations in food production, distribution, and regulations [2]. In recent years, large volumes of data have been generated in the food industry and distribution network as compared to in other industrial sectors, in particular. A range of data was creatively investigated and at varying phases within the agricultural chain to improve food supply safety [3]. For example, in preharvest, field, and weather forecasts, toxin contaminations on farmlands were predicted, and in the retail environment, contactless audits and record-keeping were performed for 1.4 million months, and observations of roast chickens’ actual annealing temperature were carried out for food safety. The consumer interactions with foods, including transactions, ingestion, comments, and share experience, also produce a huge amount of data at the end of the food supply chain [4]. Through digital platforms including social networking sites, search stories, fundraising sites, testimonials and remarks, and also Sales Revenue and Consumer Transactions, these unique data streams are becoming available. Extraction of this information is on the horizon in order to inform food safety and public health [4]. In tracking instances and agents of foodborne diseases, blockchain solutions have a vital role to play. Food adulteration is a severe problem in India with an average of one out of four food samples not adhering to norms. These standards are specified by the Food Safety and Standards Authority of India (FSSAI). FSSAI is the top food regulator under the Ministry of Health and Family Welfare. It has an extensive enforcement mechanism throughout the states and UTs (Union Territories), coupled with a network of the main and referral food testing facilities. As part of their routine inspections, food safety officials gather samples that are forwarded to laboratories for testing [5]. Based on statistics for the period 2015–2020, the top five states with the greatest proportion of nonconforming samples are Uttar Pradesh (49.99%), Mizoram (42.20%), Jharkhand (38.90%), Nagaland (36.79%), and Tamil Nadu (34.43%).FSSAI pledges to comply with the principles of risk-based evaluation. However, if we compare the statistics to the number of food safety officials at the state level, this does not appear to be the case. The proportion of food safety officers (FSOs) available in the states are 19.63% in Uttar Pradesh, 0.74% in Mizoram, 6.49% in Jharkhand, 0.21% in Nagaland, and 11.59% in Tamil Nadu. The risk assessment would recommend that additional police must be hired in regions with a greater proportion of nonconforming tests [6]. The Comptroller and Auditor General (CAG) of India’s FSSAI audit, completed in 2017, made several undesirable remarks. For example, “Neither FSSAI nor the state food authorities have written rules and processes for threat assessments and the FSSAI does not have any information on food industry.” For another, “65 out of the 72 State food labs to whom FSSAI and state food safety agencies provided food samples for testing do not hold National Certification Board for Testing and Calibration Laboratories (NABL) accreditation. Therefore, the quality of testing by these facilities cannot be assured.” There have also been given concerning permits being based on inadequate paperwork in 50% of test check situations [7]. There has also been the prospect of dangerous/declared dangerous food goods continuing to be made and marketed—owing to the inability of the authorities to monitor and revoke permits given under the product approval system pronounced unconstitutional by the Supreme Court. Given the fact that FSSAI does not maintain a database of food industry operators and there are no written protocols on risk-based inspections, the sampling done by FSOs may at best be regarded as ad hoc. Even the testing is dubious since the laboratories are not certified. As to the CAG report, “Shortage of competent people and functioning food testing equipment in state food labs and referral labs resulted in poor testing of food samples.” Food safety concerns might develop due to two primary reasons—not following adequate procedures or purposeful purpose to mislead. A foreign item in a package of food might occur maybe because the machine operator was negligent [7]. But to short-sell clients in quantity or quality is to conduct food fraud. The United Nations (UN) Food and Agriculture Organization describes “food fraud” as “when clients are misled about the quality and/or content of the food they are buying, and is typically driven by an excessive advantage for those who are selling the food.”Computer Vision in Agriculture is also available [8]. In this paper, the authors discussed how to ensure food security in an effective way with computer vision.


## 2. Literature Review

As living standards increase, food safety and potential contaminants remain a serious health issue. Due to the fact that food is both an energy source and a food source, people want products of high quality and safety [9]. In general, it is up to customers to check that not only are all food items safe but also they contain what they state. A sunflower oil bottle, for example, labeled as 100% pure olive oil, should, other than the organic specific interpretation which forms part of the olive oil and which cannot be separated or taken out fully without damage to the olive oil, include exactly whatever the labeling specifies. The problems and catastrophes in the domain of food security are all physical, microbiological, and hygiene practices and ecological malfunctions. Foods have been widely recorded with industrial pollutants in history. In Japan, Iraq, the United States, and other nations, millions of people were affected or murdered. The most common disease recognized in 1956 at Minamata Bay, in Kumamoto, Japan, is Minamata (methylmercury poisoning). The Agano River in Niigata Prefecture in Japan had a second outbreak in 1965. The symptoms include ataxia, sensory difficulties, visual field narrowing, and auditory and language impairments. The methyl mercury disposed of in landfills has been collected and poisoned in fish and crustaceans [10].Before 1960, Japan’s population was affected by an outbreak known as the “Itai-Itai” epidemic, triggered by residents who consumed rice contaminated by excessive cadmium levels. According to a 1961 survey, Mitsui Mining and Smelting’s Kamioka mining facility generated cadmium pollution, and 30 kilometers downstream of the mine was the worst damaged region. The Ministry of Health and Welfare of Japan did not issue a formal pronouncement until 1968 on the indications of cadmium exposure to “Itai-Itai’s” disorder. Mass biphenyl poisoning (PCBs) happened in northern Kyushu, Japan, in 1968, when heat-degrading PCBs tainted rice oil during manufacturing [11]. These people were seldom known for chloracne skin conditions. Hepatic, hormonal, neuroendocrine, neuropsychiatric, and neoplastic consequences have also been reported. The disease was referred to as “Yusho” (oil syndrome in Japanese). The deliberate contamination of cooking oil did not lead to Yusho.The consumption of grains treated with organomercury compounds in 1971-1972 generated a serious incidence of mercury poisoning in Iraq. Organomercury was derived from seeds treated before sowing, mainly to avoid seed/soilborne fungal infection. Individuals who ate the seeds have been reporting tremors, dizziness, schizophrenia, hallucination, and convulsions. Similar incidences of food pollution happened in Taiwan around 1979. The whole population has discovered cooking oil contaminated with PCBs and dibenzofurans (PCDFs). The quantity of contaminated oil and the way in which the oil was produced, packaged, labeled, distributed, and sold were so big that about 2000 persons ate spoiled food [12, 13]. A recent study has shown that exposure to PCBs and PCDFs might lead even 3 decades later to an elevation in death rate. Those who ingested contaminated oil in recent oil spills in Taiwan (2014-2015) need still be assessed for immediate and long-term health consequences. The consumption of grains treated with organomercury compounds in 1971-1972 generated a serious incidence of mercury poisoning in Iraq. Organomercury was derived from seeds treated before sowing, mainly to avoid seed/soilborne fungal infection. Patients who ate the seeds have been reporting tremors, dizziness, schizophrenia, hallucination, and convulsions. In 1989, the US FDA issued the order to prevent brokers from buying and selling nonfeeding oil, for instance, toxic waste petroleum, and to mark it for feed usage on animals. One example was discovered for human consumption via PCB poisoning in turkeys.PCBs were identified in waste cooking oil from the sludge pool of a pharmaceutical company, marked as “industrial waste not used for animal feed.” Further investigation showed that traders purchase and sell railway vehicles and oil tankers and charge feed producers with materials as a feed grade independent of their origin [13]. The producer may have blended this with other fats and oils and diluted its etymological root and contaminants. This incidence has not been extensively reproduced in the United States due to a careful FDA field research programmed and a government food toxicity laboratory. In the 21st century, food safety worries did not diminish. Local infections may swiftly turn into international catastrophes due to the extreme velocity and scope of commodity dissemination. Serious outbreaks of foodborne disease have happened in all hemispheres. The 2008 melamine toxication of infant formula, 51,900 in hospital and six fatalities, harmed 300,000 babies and young children in China alone. In addition to kidney damage, consequences like malignancy or potential delay in maturation were identified. In 2011, an outbreak involving entomopathogens, the Escherichia coli (EHE coli), with cases reported in eight European and North American nations, resulting in 53 deaths, was associated with the fenugreek sprouts in Germany. The pandemic of E. coli in 2011 caused farmers and industry US$1.3 billion in damage in Germany and US$236 million in emergency aid payments in 22 Member States of the European Union.


## 3. Brief Introduction of Image Recognition

Image recognition is a term that describes a set of algorithms and technologies that attempt to evaluate image data and fully comprehend the disguised interpretations of characteristics beside them and implement these learned representations for specific activities like categorizing pixels’ classifications instantaneously, understanding which items are available and where in an image, etc. These technologies leverage numerous classic computer vision approaches as well as machine learning and deep learning algorithms to get essential results for solving such situations [4, 14]. Image recognition is a wide and thorough work related to the more general difficulty of the design categorization. Throughout the evaluation of which solution is suitable for your scenario, a number of key distinctions have to be addressed. Usually, we may divide picture recognition into two main issues: single and multiclass. The model suggests only one classification per picture in single class image recognition. If you train a dog or cat identification model, just one label will be supplied to a picture including a dog and a cat. We use binary classifiers to call these models in instances when only two classes are concerned (dog; not dog). Many labels can be given to the picture using multiclass recognition models. An image with a cat and a dog can be labeled on a single label. In general, multiclass models create sentiment scores for every probable class, which is the probability that the image belongs to this class.


## 4. Image Recognition Techniques

### 4.1. Deep Learning in Food Safety

The great diversity in food form, quantity, thickness, flavor, and content make the identification of food a tough process for natural goods such as food and processed food [4, 15]. Different backgrounds and arrangements of food products can cause variances in the identification and classification of food. The image analysis owing to the universal usage of Convolutional Neural Network (CNN) was currently the most commonly used pattern for food identification and categorization [16, 17]. Network Architecture based on CNN is defined in Figure 1. There are a number of popular CNN image recognition frameworks, including one with a network with recurring units. VGG is a system that contains synchronous channels and a residual neural network, which includes a variety of residual block buildings including Google Net. The network includes a variety of image processing units. In addition, these specified network designs with pretrained weights may be obtained from the model zoo. That is to say, some ImageNet collections have already learned algorithms to retrieve image skills (such as colors, texture information, and high-level abstract representations). Researchers can utilize the validation of their images to add deep education based on the pretrained framework so that we can train up the weights of the fully integrated structure in order to ensure that the weights of the convolution layer remain constant or the weights of the complete network are somewhat adjusted. It is known as “fine-tuning,” a retraining strategy that has been shown to be a successful way of shortening the training period and achieving better results. In terms of food/nonfood categorization, food segregation, and recognition of components, revolutionary networks have been often utilized [18].Figure 1
Network architecture based on CNN.The aim was on designing a reliable interface with lower complexity while guaranteeing that actual APP expenses, higher throughput, and equipment demands are taken into consideration in the appropriate way. Network training usually takes place by lowering the inaccuracy between the findings and the soil. However, as a trainer (with many characteristics fewer than the trainer), they proposed a new methodology in order to transmit information from a widely fitted CNN (compressed GoogLeNet) as a trainee to a basic model [17]. The purpose of data distribution was to evaluate CNN trainees for CNN trainers properly [19, 20]. The CNN trainee must be ranked as the CNN trainer. So, it was a pattern classification challenge instead of categorization. The trainee has been educated to approximate the trainer by taking unlabeled nonfood photographs and then has to be further refined with the food categorization labels. While performance was not particularly excellent, this technique proved that we can apply the process of knowledge transfer to train a basic and memory-reduced network. In brief, the general learning mechanism provided for the picture-based identification of food was largely the same in the articles evaluated [21]. Dataset preparation is the initial stage. With deep learning needs for vast quantities of data, online food pictures or a freely accessible food collection are usually the best choices for the training phase. Next, preprocessing of images like standardization and scaling is taken to reduce the disturbance produced by nonuniform light, inconsistent resolution, etc.If this dataset is insufficiently big, it is advisable to increase the data by random cutting, rotation, and tilt to imitate photography from diverse points of view. Overall, data increase is not considered in studies based on huge open datasets. The data set is then constantly separated into a network training set (or calibration), a validation set for the hyperparameters, and an assessment (or testing) to check the model’s prediction capability. Training tasks can be performed as a second phase when the dataset is available. There are already well-known image categorization networks such as AlexNet, GoogLeNet, and ResNet. Most papers have been directly employed by preformed CNN and have improved the model in their classification database, some researchers have made changes to these networks as solutions, and some authors have also created new configurations or introduced a new training method for identifying the food image [22, 23].


### 4.2. Machine Learning in Food Safety

A range of NDS (Novel Data Streams) sources may be used to conduct food safety practice and research in conjunction with machine education or relevant scientific and computational data techniques. NDS provides the opportunity to boost observatory accuracy, details, width, and flexibility by allowing an unobtrusive, continuous, unsupervised collection of information particularly created for food safety.The following are three key sources of NDS data combined with the analytics of machine learning.


#### 4.2.1. Text Data

Text data are informal or disorganized metadata, in the form of a linguistic text which provides actual facts for detecting or responding to infections and dangers in terms of food safety. Text NDS sources for food safety applications used in tandem with machine learning algorithms may be classified as public postal data and web-based user-created information [24]. The text content of a post may be natural, together with titles or comments expressing users’ keywords. Text data may be examined to evaluate the sentiments (optimistic, pessimistic) of posts or the content. Nontext information or the price and location rating are metadata that may be used to estimate the nontext for correlation to the suspect/implicit source of an infection (e.g., eatery) and/or user. The conceptual architecture of text data using machine learning methodology is described in Figure 2.Figure 2
Conceptual architecture of text data using machine learning methodology.To translate high-dimensional text content, a multistage analytic methodology is necessary for feasible potential hazards. The methodology might begin with digital information techniques to conduct surveys, signal processing and preprocessing (for example, spelling and grammatical correction, removal of filler words, and noise deletion of information), and the dimension reduction process (filtering). Keywords often represent a first step in extracting or filtering data which may be connected to food safety [24, 25]. Typically, few sentences or buzzwords are a priority and can involve illness, food intoxication, puking, tossing, barking, and anxiety. A typical difficulty for predictive analytics is to categorize postal or Internet information as significant or not related to food safety issues. These implementations involve decision trees, SVMs, and neural networks for classification techniques.


#### 4.2.2. Transactional Data

Transactional information is a type of NDS utilized for foodborne illness epidemiological investigation. Traditional epidemiology research techniques entail the identification of commonality between case patients followed by microbial contamination of suspicious samples by medical examinations [25]. In creating empirical studies on the causative food vehicle early in the inquiry process and/or in the location of contamination in retail or dining outlets, metadata must give impartial use documentation proved to promote, enhance, or even augment traditional research methodologies.Accumulated sales data applications are discussed in form of consolidated retailing or pooled territorial retailing information or predictive analytics data. The application of this information in epidemic monitoring and epidemic research to determine the responsible food vehicle was highlighted by certain cases. Food products with sales trends closer to the dispersion of outbreaks are thought to be the cause of the foodstuff. Methods include the probability pricing strategy and maximum likelihood estimate for the identification of a group of food goods that are most likely to be contaminated. While a theory-driven probability model is a product identification technique itself, discrete classification algorithms are employed to determine the accuracy and learning structure of the approach’s performance. Similar production and distribution patterns are used with the purpose of identifying groupings of food goods that cannot be differentiated and potentially confuse research.


#### 4.2.3. Trade Data

Innovative applications in the evaluation of food safety hazards have been lately detected as trade data customarily gathered or collected for business operations or statistical analyses. Here, we describe trade data inside NDS as detailed data, composite statistics data, or model representations of flows that characterize manufacturing, ingestion, or foodstuff movement through complicated distribution networks between countries or within a single country or across areas of the supply system [26]. Examples of data sources include constitutional information on the business, exports and financial trade, manufacturing, and sales data. These data sources provide a link mapping, which enables extensive analyses of food safety risks, typically network theoretically.


## 4.1. Deep Learning in Food Safety

The great diversity in food form, quantity, thickness, flavor, and content make the identification of food a tough process for natural goods such as food and processed food [4, 15]. Different backgrounds and arrangements of food products can cause variances in the identification and classification of food. The image analysis owing to the universal usage of Convolutional Neural Network (CNN) was currently the most commonly used pattern for food identification and categorization [16, 17]. Network Architecture based on CNN is defined in Figure 1. There are a number of popular CNN image recognition frameworks, including one with a network with recurring units. VGG is a system that contains synchronous channels and a residual neural network, which includes a variety of residual block buildings including Google Net. The network includes a variety of image processing units. In addition, these specified network designs with pretrained weights may be obtained from the model zoo. That is to say, some ImageNet collections have already learned algorithms to retrieve image skills (such as colors, texture information, and high-level abstract representations). Researchers can utilize the validation of their images to add deep education based on the pretrained framework so that we can train up the weights of the fully integrated structure in order to ensure that the weights of the convolution layer remain constant or the weights of the complete network are somewhat adjusted. It is known as “fine-tuning,” a retraining strategy that has been shown to be a successful way of shortening the training period and achieving better results. In terms of food/nonfood categorization, food segregation, and recognition of components, revolutionary networks have been often utilized [18].Figure 1
Network architecture based on CNN.The aim was on designing a reliable interface with lower complexity while guaranteeing that actual APP expenses, higher throughput, and equipment demands are taken into consideration in the appropriate way. Network training usually takes place by lowering the inaccuracy between the findings and the soil. However, as a trainer (with many characteristics fewer than the trainer), they proposed a new methodology in order to transmit information from a widely fitted CNN (compressed GoogLeNet) as a trainee to a basic model [17]. The purpose of data distribution was to evaluate CNN trainees for CNN trainers properly [19, 20]. The CNN trainee must be ranked as the CNN trainer. So, it was a pattern classification challenge instead of categorization. The trainee has been educated to approximate the trainer by taking unlabeled nonfood photographs and then has to be further refined with the food categorization labels. While performance was not particularly excellent, this technique proved that we can apply the process of knowledge transfer to train a basic and memory-reduced network. In brief, the general learning mechanism provided for the picture-based identification of food was largely the same in the articles evaluated [21]. Dataset preparation is the initial stage. With deep learning needs for vast quantities of data, online food pictures or a freely accessible food collection are usually the best choices for the training phase. Next, preprocessing of images like standardization and scaling is taken to reduce the disturbance produced by nonuniform light, inconsistent resolution, etc.If this dataset is insufficiently big, it is advisable to increase the data by random cutting, rotation, and tilt to imitate photography from diverse points of view. Overall, data increase is not considered in studies based on huge open datasets. The data set is then constantly separated into a network training set (or calibration), a validation set for the hyperparameters, and an assessment (or testing) to check the model’s prediction capability. Training tasks can be performed as a second phase when the dataset is available. There are already well-known image categorization networks such as AlexNet, GoogLeNet, and ResNet. Most papers have been directly employed by preformed CNN and have improved the model in their classification database, some researchers have made changes to these networks as solutions, and some authors have also created new configurations or introduced a new training method for identifying the food image [22, 23].


## 4.2. Machine Learning in Food Safety

A range of NDS (Novel Data Streams) sources may be used to conduct food safety practice and research in conjunction with machine education or relevant scientific and computational data techniques. NDS provides the opportunity to boost observatory accuracy, details, width, and flexibility by allowing an unobtrusive, continuous, unsupervised collection of information particularly created for food safety.The following are three key sources of NDS data combined with the analytics of machine learning.


### 4.2.1. Text Data

Text data are informal or disorganized metadata, in the form of a linguistic text which provides actual facts for detecting or responding to infections and dangers in terms of food safety. Text NDS sources for food safety applications used in tandem with machine learning algorithms may be classified as public postal data and web-based user-created information [24]. The text content of a post may be natural, together with titles or comments expressing users’ keywords. Text data may be examined to evaluate the sentiments (optimistic, pessimistic) of posts or the content. Nontext information or the price and location rating are metadata that may be used to estimate the nontext for correlation to the suspect/implicit source of an infection (e.g., eatery) and/or user. The conceptual architecture of text data using machine learning methodology is described in Figure 2.Figure 2
Conceptual architecture of text data using machine learning methodology.To translate high-dimensional text content, a multistage analytic methodology is necessary for feasible potential hazards. The methodology might begin with digital information techniques to conduct surveys, signal processing and preprocessing (for example, spelling and grammatical correction, removal of filler words, and noise deletion of information), and the dimension reduction process (filtering). Keywords often represent a first step in extracting or filtering data which may be connected to food safety [24, 25]. Typically, few sentences or buzzwords are a priority and can involve illness, food intoxication, puking, tossing, barking, and anxiety. A typical difficulty for predictive analytics is to categorize postal or Internet information as significant or not related to food safety issues. These implementations involve decision trees, SVMs, and neural networks for classification techniques.


### 4.2.2. Transactional Data

Transactional information is a type of NDS utilized for foodborne illness epidemiological investigation. Traditional epidemiology research techniques entail the identification of commonality between case patients followed by microbial contamination of suspicious samples by medical examinations [25]. In creating empirical studies on the causative food vehicle early in the inquiry process and/or in the location of contamination in retail or dining outlets, metadata must give impartial use documentation proved to promote, enhance, or even augment traditional research methodologies.Accumulated sales data applications are discussed in form of consolidated retailing or pooled territorial retailing information or predictive analytics data. The application of this information in epidemic monitoring and epidemic research to determine the responsible food vehicle was highlighted by certain cases. Food products with sales trends closer to the dispersion of outbreaks are thought to be the cause of the foodstuff. Methods include the probability pricing strategy and maximum likelihood estimate for the identification of a group of food goods that are most likely to be contaminated. While a theory-driven probability model is a product identification technique itself, discrete classification algorithms are employed to determine the accuracy and learning structure of the approach’s performance. Similar production and distribution patterns are used with the purpose of identifying groupings of food goods that cannot be differentiated and potentially confuse research.


### 4.2.3. Trade Data

Innovative applications in the evaluation of food safety hazards have been lately detected as trade data customarily gathered or collected for business operations or statistical analyses. Here, we describe trade data inside NDS as detailed data, composite statistics data, or model representations of flows that characterize manufacturing, ingestion, or foodstuff movement through complicated distribution networks between countries or within a single country or across areas of the supply system [26]. Examples of data sources include constitutional information on the business, exports and financial trade, manufacturing, and sales data. These data sources provide a link mapping, which enables extensive analyses of food safety risks, typically network theoretically.


## 4.2.1. Text Data

Text data are informal or disorganized metadata, in the form of a linguistic text which provides actual facts for detecting or responding to infections and dangers in terms of food safety. Text NDS sources for food safety applications used in tandem with machine learning algorithms may be classified as public postal data and web-based user-created information [24]. The text content of a post may be natural, together with titles or comments expressing users’ keywords. Text data may be examined to evaluate the sentiments (optimistic, pessimistic) of posts or the content. Nontext information or the price and location rating are metadata that may be used to estimate the nontext for correlation to the suspect/implicit source of an infection (e.g., eatery) and/or user. The conceptual architecture of text data using machine learning methodology is described in Figure 2.Figure 2
Conceptual architecture of text data using machine learning methodology.To translate high-dimensional text content, a multistage analytic methodology is necessary for feasible potential hazards. The methodology might begin with digital information techniques to conduct surveys, signal processing and preprocessing (for example, spelling and grammatical correction, removal of filler words, and noise deletion of information), and the dimension reduction process (filtering). Keywords often represent a first step in extracting or filtering data which may be connected to food safety [24, 25]. Typically, few sentences or buzzwords are a priority and can involve illness, food intoxication, puking, tossing, barking, and anxiety. A typical difficulty for predictive analytics is to categorize postal or Internet information as significant or not related to food safety issues. These implementations involve decision trees, SVMs, and neural networks for classification techniques.


## 4.2.2. Transactional Data

Transactional information is a type of NDS utilized for foodborne illness epidemiological investigation. Traditional epidemiology research techniques entail the identification of commonality between case patients followed by microbial contamination of suspicious samples by medical examinations [25]. In creating empirical studies on the causative food vehicle early in the inquiry process and/or in the location of contamination in retail or dining outlets, metadata must give impartial use documentation proved to promote, enhance, or even augment traditional research methodologies.Accumulated sales data applications are discussed in form of consolidated retailing or pooled territorial retailing information or predictive analytics data. The application of this information in epidemic monitoring and epidemic research to determine the responsible food vehicle was highlighted by certain cases. Food products with sales trends closer to the dispersion of outbreaks are thought to be the cause of the foodstuff. Methods include the probability pricing strategy and maximum likelihood estimate for the identification of a group of food goods that are most likely to be contaminated. While a theory-driven probability model is a product identification technique itself, discrete classification algorithms are employed to determine the accuracy and learning structure of the approach’s performance. Similar production and distribution patterns are used with the purpose of identifying groupings of food goods that cannot be differentiated and potentially confuse research.


## 4.2.3. Trade Data

Innovative applications in the evaluation of food safety hazards have been lately detected as trade data customarily gathered or collected for business operations or statistical analyses. Here, we describe trade data inside NDS as detailed data, composite statistics data, or model representations of flows that characterize manufacturing, ingestion, or foodstuff movement through complicated distribution networks between countries or within a single country or across areas of the supply system [26]. Examples of data sources include constitutional information on the business, exports and financial trade, manufacturing, and sales data. These data sources provide a link mapping, which enables extensive analyses of food safety risks, typically network theoretically.


## 5. Image Processing

Image processing is a method that enhances or collects crucial data for actions on an image. It is a kind of data analysis wherein the input is an image, and the output is an image or the properties/features of the picture. The interpretation of images is currently one of the most rapidly increasing disciplines. It also focuses on architectural and informatics expertise.


### 5.1. Image Segmentation

Image segmentation, as shown in Figure3, is a relevant and sustainable way to find salient items in static ambient photographs. The subtraction of the background is a popular class of procedures used to divide interest items into a scene [27]. In the literature, this problem was thoroughly examined. The techniques used for background removal may be considered as a two-object imaging approach that frequently has to handle changes in lighting and sensor captures artifacts such as blurredness and scene complexity. The most important elements to handle are specific reflections, backdrop confusion, shades, and shadows of photographs. Thus, image segmentation may only be necessary by concentrating on the description of the item, in order to decrease the complexity of the picture. Only the K-means-based picture segmentation approach offers an intercommerce between effective segmentation and per-unit cost among several fragmentation strategies [28]. Figure 3 shows examples of the approaches of picture segmentation.Figure 3
Image segmentation.


### 5.2. Defect Segmentation

In the categorization of fruit disease, exact defect segmentation is necessary. If the method is not precise, the features of the noninfected zone prevail in the area afflicted [28]. While there are problems with K-Man clustering techniques that can be distinguished in sick fruit pictures, the addition of fruit background removal can be separated by just two clusters. The usage of a single channel and two clusters is insufficient in problem categorization. Therefore, numerous subgroups and numerous colored channels are needed for exact disease fragmentation. The images are separated into three or four clusters in this research, with the majority of the impacted regions in one cluster. Objective analysis is the simplest solution on the number of clusters: when the c number of clusters is deemed to be suitable to overcome a certain challenge, no human participation is needed, meaning that the process is totally computerized. In our situation, the classification of fruit and fruit illnesses will be sufficient in 2 and 4 groups.


### 5.3. Feature Extraction

Feature extraction is a method of reducing dimensionality that reduces an original raw data set to more achievable processing groupings [29]. A feature of these enormous data sets is a big number of variables that require a great deal of data processing resources. Feature extraction is the name of methods that choose and/or combine variables into features and efficiently reduce the quantity of information to be collected even while representing the entire model properly and fully. The fruit disease recognition system is explained in Figure 4.(i)
Global Color Histogram (GCH): In fact, the GCH is the simplest way to encode data pictures. A GCH is an organized numerical set that describes how likely a pixel for a distinct color is to be of the same color. The number of distinct colors and scaling bias prevention are reduced by consistent standardization and characterization.(ii)
Color Coherence Vector (CCV): Coherence of color defines how wide a region of the same shade the colored particles are. These zones are known as consistent regions. The contiguous zone consists of coherent pixels, albeit not incoherent. The approach blurs the color space of the image to compute CCVs to remove minor differences between nearby pixels. Subsequently, the related elements in the image are found to categorize the colored pixels whether they are consistent or inconsistent. CCV calculates two color histograms after categorizing the pixel image: coherent pixel values and inconsequential pixels [29]. They are kept as a single histogram.(iii)
Border/Interior Classification (BIC): the approach classifies picture pixels as border or interior in order to calculate for BIC. An internal pixel is categorized when its four neighbors have the same quantized color (top, bottom, left, and right). It is categorized as a frontier otherwise. Two color histograms are calculated once the picture pixels have been identified: one for the borders and one for inside pixels.(iv)
Local Binary Pattern (LBP): This is a fundamental but extremely efficient texture operator which identifies the pixel across the surrounding of each pixel and regards it as a binary integer. Due to its classification accuracy and computer simplicity, LBP Texture Operator has been a significant approach in numerous applications. The methodology to the usually diverse quantitative and organizational model of image segmentation might be considered as a unifying one [30]. Maybe the most essential quality in real-world applications of the LBP operator is its stability against monotonous grey-scale shifts produced by lighting differences, for example.(v)
Completed Local Binary Pattern (CLBP): Complete local binary pattern (CLBP) is characterized by localized pixel and local sign-magnitude difference (LDSMT). The center pixel is specified by a binary grey level map called CLBP Centre, whereas the LDSMT consists of two components, namely, sign differentiation and magnitude differential labeled as CLBP S and CLBP M [30]. The finalized histograms of CLBP C, CLBP S, and CLBP M are merged.(vi)
Unser’s Feature (UNSER): The methodology first identifies the dislocation variation in quantity and amplitude (d1, d2) and then builds two histograms to extract the UNSER feature (sum and differential histogram).(vii)
Improved Sum and Difference Histogram (ISADH): Researchers established an effective ISADH texture function based on a distribution of sum and difference in order to encode the next information in one pixel of an image. The sum and difference are calculated by neighboring pixels in thex-direction; then, both the y address sum and difference are reproduced in the y-direction [31]. The approach can record the connection among each pixel and its neighboring pixels in the x and y coordinates with highly efficient x and y directions separately.Figure 4
Fruit disease recognition system.


### 5.4. Training and Classification

A multiclass segmentation problem is categorized as two-class (splitting and dominating) problems and a basic learner is called a binary classification. Binary classification is required ifN is the number of different classes for problem N(N–1)/2. N classification is required. C class I patterns in the third binary classification are positive while class J patterns are negative. In order to acquire the final result, the minimum distance between the vector formed (binary results) and the binary design (ID) for each class is computed [31]. The test case is a category with a minimum distance from the class ID and Boolean results.There can be an understanding of a three-class basic issue:a, b, and c. There will be three binary grades in the base classifiers, each consisting of two classes (i.e., a to b, a to c, and b to c), each binary being constructed for training. Each class obtains, as shown in Table 1, a unique ID. First, we create the binary a∗b, the tag class one, output +1, and output class b − 1, and we set the remaining parts of the column to 0. Next, we will take the c and tag class “a” classification approach, class c to +1, and the remainder of the 0 items column. We repeat this procedure in the case of binary category b∗c and in +1 in class b and in category c − 1 and set 0 for other entries in which 0 is the “Don’t care” value. Lastly, each row is uniquely identifiable by the class ID (e.g., b = [–1, +1, 0]). Each binary classifier provides a binary response for each input sample. When, for instance, the results of the binary classification a∗b, a∗c, and b∗c are [+1, −1, +1], the input example is the class with the smallest vector distance [+1, −1, +1]. The unique ID of each class is given in Table 2.Table 1
FSOs and samples in five states.
State/UTPercentage of nonconforming samplesNumber of FSOsPercentage of FSOsJharkhand38.902196.49Mizoram42.20250.74Nagaland36.7970.21Tamil Nadu34.4339111.59Uttar Pradesh49.9966219.63Table 2
Unique ID of each class.
a∗bb∗ca∗cA+10+1b−1+10C0−1−1


## 5.1. Image Segmentation

Image segmentation, as shown in Figure3, is a relevant and sustainable way to find salient items in static ambient photographs. The subtraction of the background is a popular class of procedures used to divide interest items into a scene [27]. In the literature, this problem was thoroughly examined. The techniques used for background removal may be considered as a two-object imaging approach that frequently has to handle changes in lighting and sensor captures artifacts such as blurredness and scene complexity. The most important elements to handle are specific reflections, backdrop confusion, shades, and shadows of photographs. Thus, image segmentation may only be necessary by concentrating on the description of the item, in order to decrease the complexity of the picture. Only the K-means-based picture segmentation approach offers an intercommerce between effective segmentation and per-unit cost among several fragmentation strategies [28]. Figure 3 shows examples of the approaches of picture segmentation.Figure 3
Image segmentation.


## 5.2. Defect Segmentation

In the categorization of fruit disease, exact defect segmentation is necessary. If the method is not precise, the features of the noninfected zone prevail in the area afflicted [28]. While there are problems with K-Man clustering techniques that can be distinguished in sick fruit pictures, the addition of fruit background removal can be separated by just two clusters. The usage of a single channel and two clusters is insufficient in problem categorization. Therefore, numerous subgroups and numerous colored channels are needed for exact disease fragmentation. The images are separated into three or four clusters in this research, with the majority of the impacted regions in one cluster. Objective analysis is the simplest solution on the number of clusters: when the c number of clusters is deemed to be suitable to overcome a certain challenge, no human participation is needed, meaning that the process is totally computerized. In our situation, the classification of fruit and fruit illnesses will be sufficient in 2 and 4 groups.


## 5.3. Feature Extraction

Feature extraction is a method of reducing dimensionality that reduces an original raw data set to more achievable processing groupings [29]. A feature of these enormous data sets is a big number of variables that require a great deal of data processing resources. Feature extraction is the name of methods that choose and/or combine variables into features and efficiently reduce the quantity of information to be collected even while representing the entire model properly and fully. The fruit disease recognition system is explained in Figure 4.(i)
Global Color Histogram (GCH): In fact, the GCH is the simplest way to encode data pictures. A GCH is an organized numerical set that describes how likely a pixel for a distinct color is to be of the same color. The number of distinct colors and scaling bias prevention are reduced by consistent standardization and characterization.(ii)
Color Coherence Vector (CCV): Coherence of color defines how wide a region of the same shade the colored particles are. These zones are known as consistent regions. The contiguous zone consists of coherent pixels, albeit not incoherent. The approach blurs the color space of the image to compute CCVs to remove minor differences between nearby pixels. Subsequently, the related elements in the image are found to categorize the colored pixels whether they are consistent or inconsistent. CCV calculates two color histograms after categorizing the pixel image: coherent pixel values and inconsequential pixels [29]. They are kept as a single histogram.(iii)
Border/Interior Classification (BIC): the approach classifies picture pixels as border or interior in order to calculate for BIC. An internal pixel is categorized when its four neighbors have the same quantized color (top, bottom, left, and right). It is categorized as a frontier otherwise. Two color histograms are calculated once the picture pixels have been identified: one for the borders and one for inside pixels.(iv)
Local Binary Pattern (LBP): This is a fundamental but extremely efficient texture operator which identifies the pixel across the surrounding of each pixel and regards it as a binary integer. Due to its classification accuracy and computer simplicity, LBP Texture Operator has been a significant approach in numerous applications. The methodology to the usually diverse quantitative and organizational model of image segmentation might be considered as a unifying one [30]. Maybe the most essential quality in real-world applications of the LBP operator is its stability against monotonous grey-scale shifts produced by lighting differences, for example.(v)
Completed Local Binary Pattern (CLBP): Complete local binary pattern (CLBP) is characterized by localized pixel and local sign-magnitude difference (LDSMT). The center pixel is specified by a binary grey level map called CLBP Centre, whereas the LDSMT consists of two components, namely, sign differentiation and magnitude differential labeled as CLBP S and CLBP M [30]. The finalized histograms of CLBP C, CLBP S, and CLBP M are merged.(vi)
Unser’s Feature (UNSER): The methodology first identifies the dislocation variation in quantity and amplitude (d1, d2) and then builds two histograms to extract the UNSER feature (sum and differential histogram).(vii)
Improved Sum and Difference Histogram (ISADH): Researchers established an effective ISADH texture function based on a distribution of sum and difference in order to encode the next information in one pixel of an image. The sum and difference are calculated by neighboring pixels in thex-direction; then, both the y address sum and difference are reproduced in the y-direction [31]. The approach can record the connection among each pixel and its neighboring pixels in the x and y coordinates with highly efficient x and y directions separately.Figure 4
Fruit disease recognition system.


## 5.4. Training and Classification

A multiclass segmentation problem is categorized as two-class (splitting and dominating) problems and a basic learner is called a binary classification. Binary classification is required ifN is the number of different classes for problem N(N–1)/2. N classification is required. C class I patterns in the third binary classification are positive while class J patterns are negative. In order to acquire the final result, the minimum distance between the vector formed (binary results) and the binary design (ID) for each class is computed [31]. The test case is a category with a minimum distance from the class ID and Boolean results.There can be an understanding of a three-class basic issue:a, b, and c. There will be three binary grades in the base classifiers, each consisting of two classes (i.e., a to b, a to c, and b to c), each binary being constructed for training. Each class obtains, as shown in Table 1, a unique ID. First, we create the binary a∗b, the tag class one, output +1, and output class b − 1, and we set the remaining parts of the column to 0. Next, we will take the c and tag class “a” classification approach, class c to +1, and the remainder of the 0 items column. We repeat this procedure in the case of binary category b∗c and in +1 in class b and in category c − 1 and set 0 for other entries in which 0 is the “Don’t care” value. Lastly, each row is uniquely identifiable by the class ID (e.g., b = [–1, +1, 0]). Each binary classifier provides a binary response for each input sample. When, for instance, the results of the binary classification a∗b, a∗c, and b∗c are [+1, −1, +1], the input example is the class with the smallest vector distance [+1, −1, +1]. The unique ID of each class is given in Table 2.Table 1
FSOs and samples in five states.
State/UTPercentage of nonconforming samplesNumber of FSOsPercentage of FSOsJharkhand38.902196.49Mizoram42.20250.74Nagaland36.7970.21Tamil Nadu34.4339111.59Uttar Pradesh49.9966219.63Table 2
Unique ID of each class.
a∗bb∗ca∗cA+10+1b−1+10C0−1−1


## 6. Challenges of Food Safety

There are four key areas where food safety challenges exist.(i)
Microbiological Protection: In nature, food is organic. It can encourage the growth of bacteria that can cause foodborne disease. Although most foodborne diseases are caused by viruses, bacterial organisms are accountable for mortality and morbidity in connection with foodborne infections. Symptoms range from simple diarrhea to neurological, hepatic, and renal disorders induced by either pathogenic toxin [31, 32]. The main cause of serious and severe foodborne illness is bacterial organisms present in food. Over 90% of illnesses with food toxicity are accountable for Staphylococcus, Salmonella, Clostridium, Campylobacter, Listeria, Vibrio, Bacillus, and E. coli. Salmonella, for instance, represents 5700 to 10 200 instances, followed by Campylobacter (2600–3500 cases) and Listeria, the most prevalent cause of bacterial foodborne diseases in the USA and France in the last decade of the 20th century (304 cases) [33].(ii)
Chemical Protection: Some nonfood chemical additives were identified such as colorants and antioxidants. [32]. In some food samples, higher quantities of heavy metals like plum, cadmium, arsenic, mercury, and copper indicate that utensils are likely to be wasted and unhealthy food hygiene.(iii)
Personal hygiene is really important: Personal and public health are both at risk when food handlers and preparers exercise poor personal hygiene. Many foodborne infections may be avoided with simple behaviors like complete hand washing and proper washing facilities.(iv)
Hygiene of the environment: Inadequate composting and garbage treatment services and devices promote the build-up of decaying and polluted food [34]. As a result, the numbers of pests and bugs rise, providing a risk of complications of food and spoiling. Insufficient sanitation and hygiene are leading to unsatisfactory food storage and transit in treatment and manufacturing facilities, along with the sale of unhealthy foods.


## 7. Comparative Study

A comparative study with different techniques is shown in Table3.Table 3
Comparative study of existing image recognition techniques for food safety.
ReferencePreprocessing techniquesNo. of categoriesTrainingColor spaceEvaluation criteriaDanti et al. [35]Cropping and resizing10BPNNClassifierHSIAccuracy96.40%Rocha et al. [36]K-means with two clusters15MulticlassSVMHSIAverage error97%Suresha et al. [37]WatershedSegmentation8Decision tree classifierRGBAccuracy95%Faria et al. [38]K-means with two clusters15Classifier fusionHSIAccuracy98.8%±0.9Kanakaraddi et al. [39]Median filtering4Decision treeRGBDiseaseSeverityPydipati et al. [40]Edge detection4GeneralizedSquared distanceHSIAccuracy>95%Pujari et al. [41]K-means2BPNNClassifierRGBAccuracy84.65%Kim et al. [42]ROI cropping6DiscriminantAnalysisHSIAccuracy96%


## 8. Conclusion

The paper examined several newest studies related to the application of image recognition in food safety, detailing the structure, training techniques, and final assessment results of DNNs employed in the processing of food picture, wavelength, phrase, and supplemental data in every publication studied. The authors compared computer vision with the transgressive side along with image processing and deep learning with other common approaches. The authors discovered that the deep learning approach produces better outcomes than other approaches, also found the advantages and disadvantages of deep learning techniques, and have addressed in detail the prospects and limitations of deep learning on food safety. Eventually, it is recommended that the quality of food be assessed as a blend of profound knowledge and multisource data transformation encompassing RGB (Red, Green, Blue) images, spectra, scents, and taste, as well as the construction of highly automatically controlled food-data-sharing systems with steady signals. The possibilities for deep learning data analytics can be further evaluated in areas rarely investigated such as food sensory, intake, food supplies chains, and impactful testimonials such as food image processing. The Fruit Quality Evaluation Framework could be established into productive things.



---

*Source: 7223164-2021-11-23.xml*