CN113624759A - Apple nondestructive testing method based on machine learning - Google Patents
Apple nondestructive testing method based on machine learning Download PDFInfo
- Publication number
- CN113624759A CN113624759A CN202110906221.5A CN202110906221A CN113624759A CN 113624759 A CN113624759 A CN 113624759A CN 202110906221 A CN202110906221 A CN 202110906221A CN 113624759 A CN113624759 A CN 113624759A
- Authority
- CN
- China
- Prior art keywords
- apple
- model
- data
- apples
- nondestructive
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000009659 non-destructive testing Methods 0.000 title claims abstract description 24
- 238000010801 machine learning Methods 0.000 title claims abstract description 18
- 241000220225 Malus Species 0.000 claims abstract description 118
- 235000021016 apples Nutrition 0.000 claims abstract description 42
- 238000012549 training Methods 0.000 claims abstract description 40
- 238000001514 detection method Methods 0.000 claims abstract description 33
- 238000012360 testing method Methods 0.000 claims abstract description 26
- 238000012216 screening Methods 0.000 claims abstract description 18
- 239000000126 substance Substances 0.000 claims abstract description 7
- 201000010099 disease Diseases 0.000 claims abstract description 3
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 claims abstract description 3
- 238000013527 convolutional neural network Methods 0.000 claims description 18
- 238000013135 deep learning Methods 0.000 claims description 15
- 230000001537 neural effect Effects 0.000 claims description 10
- 238000013528 artificial neural network Methods 0.000 claims description 9
- 238000011156 evaluation Methods 0.000 claims description 9
- 238000003062 neural network model Methods 0.000 claims description 7
- 125000004122 cyclic group Chemical group 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 6
- 238000002372 labelling Methods 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 6
- 238000012795 verification Methods 0.000 claims description 6
- 235000002566 Capsicum Nutrition 0.000 claims description 5
- 239000006002 Pepper Substances 0.000 claims description 5
- 241000722363 Piper Species 0.000 claims description 5
- 235000016761 Piper aduncum Nutrition 0.000 claims description 5
- 235000017804 Piper guineense Nutrition 0.000 claims description 5
- 235000008184 Piper nigrum Nutrition 0.000 claims description 5
- 238000010168 coupling process Methods 0.000 claims description 5
- 150000003839 salts Chemical class 0.000 claims description 5
- 230000006870 function Effects 0.000 claims description 3
- 230000035515 penetration Effects 0.000 claims description 2
- 235000013399 edible fruits Nutrition 0.000 abstract description 22
- 230000000694 effects Effects 0.000 abstract description 2
- 238000010191 image analysis Methods 0.000 abstract description 2
- 238000005516 engineering process Methods 0.000 description 16
- 238000012545 processing Methods 0.000 description 14
- 239000000523 sample Substances 0.000 description 8
- 238000011161 development Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 4
- 206010063385 Intellectualisation Diseases 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000013523 data management Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000007654 immersion Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004497 NIR spectroscopy Methods 0.000 description 1
- 238000005481 NMR spectroscopy Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000002604 ultrasonography Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N29/00—Investigating or analysing materials by the use of ultrasonic, sonic or infrasonic waves; Visualisation of the interior of objects by transmitting ultrasonic or sonic waves through the object
- G01N29/04—Analysing solids
- G01N29/043—Analysing solids in the interior, e.g. by shear waves
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N29/00—Investigating or analysing materials by the use of ultrasonic, sonic or infrasonic waves; Visualisation of the interior of objects by transmitting ultrasonic or sonic waves through the object
- G01N29/04—Analysing solids
- G01N29/12—Analysing solids by measuring frequency or resonance of acoustic waves
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G06T5/70—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N2021/8466—Investigation of vegetal material, e.g. leaves, plants, fruits
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N2291/00—Indexing codes associated with group G01N29/00
- G01N2291/02—Indexing codes associated with the analysed material
- G01N2291/023—Solids
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N2291/00—Indexing codes associated with group G01N29/00
- G01N2291/02—Indexing codes associated with the analysed material
- G01N2291/028—Material parameters
- G01N2291/0289—Internal structure, e.g. defects, grain size, texture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30181—Earth observation
- G06T2207/30188—Vegetation; Agriculture
Abstract
The invention discloses an apple nondestructive testing method based on machine learning, and relates to a method for intelligently testing and grading apples by utilizing image analysis. The method comprises the following steps: obtaining an apple multi-parameter training model; setting an apple quality screening interval; the method comprises the steps of obtaining an appearance picture of an apple to be detected, recognizing the appearance picture of the apple by using a training model after denoising, carrying out internal nondestructive testing on the selected required apple, carrying out nondestructive judgment on the inside of the apple by using the training model, carrying out internal resonance sound wave detection on the disease-free apple, judging the content of internal substances by using the training model, and finishing classification of all apples. The method disclosed by the invention can be used for accurately detecting a large number of apples quickly and efficiently, so that the detection accuracy and efficiency are improved, and the detection flow is optimized. Not only can reduce the workload of the fruit grower, but also can improve the income of the fruit grower. And fruits with different grades can be provided according to the requirements of consumers, and certain effect is achieved on improving the position of domestic fruits.
Description
Technical Field
The invention relates to a method for intelligently detecting and grading apples by utilizing image analysis.
Background
The development of agriculture is closely related to the development of comprehensive national strength and the stability of national conditions in China, and the prosperous agriculture is one of the main targets at the present stage. China is currently in a key period for the transition from traditional agriculture to modern agriculture. Although the fruit resources are very abundant, the fruit yield already occupies the first position of the world, the export quantity and the quality are lower, the export quantity of the current fruit only occupies 2 percent of the world, and most of the fruit is sold in China. Taking apple as an example, one important factor influencing the development of the apple is that the grading and screening of the fruits are inaccurate, and the detection of the fruits cannot reach the export standard, so that the selling price of the fruits is influenced. The phenomenon of degrading primary products to secondary products, or upgrading secondary products to primary products, often occurs causing significant economic losses and consumer dissatisfaction. Because most fruits are sold in the country, the fruit detection device at the present stage mainly uses the traditional apple classification method, namely, the traditional apple classification method is identified by manpower and immature machines, screening is carried out according to the size and the appearance of the apples, the error rate is high, the efficiency is low, the influence of subjective feeling is large, the device cannot meet the requirements of the production and the sale of the existing apples, the quality of the fruits is reduced to some extent, and the market competitiveness is difficult to obtain comprehensive guarantee. This highlights the need to develop better automated apple classification techniques.
The nondestructive detection technology achieves the purposes of food detection and classification by signal acquisition and control and processing and analyzing the acquired signals on the basis of not damaging fruits. At the present stage, the research on nondestructive testing of fruits mainly uses the principles of optics, electromagnetism, mechanics, signal processing and the like, and focuses on the nuclear magnetic resonance technology, the dielectric property technology, the vibro-acoustic technology, the near infrared spectroscopy analysis technology, the machine vision technology and the X-ray technology, so that a plurality of researchers construct a system for detecting fruits by using the method. However, the systems have the problems that accurate identification cannot be realized, a large amount of rapid detection cannot be realized, and intellectualization cannot be realized. With the rapid development of artificial intelligence technology and mechanical automation technology, a machine learning technology is gradually popularized, and the deep learning algorithm has the advantages of strong acuity and wide available range. The deep learning technology and the nondestructive testing technology are deeply fused, so that the accurate screening and grading of fruits becomes an important trend for future development.
Disclosure of Invention
The invention aims to solve the technical problem of providing a machine learning-based apple nondestructive testing method aiming at the defects of the prior art. Not only can judge the appearance quality of the apples, but also can judge the content of sugar in the apples, such as the like, so that the quality of the apples can be screened and graded. The device disclosed by the invention realizes intellectualization as a whole, solves the problem that the prior art cannot accurately identify, and quickly, efficiently and accurately screens apples in a grading manner. The technical scheme is as follows:
a machine learning-based apple nondestructive testing method, the method comprising:
s0, collecting appearance pictures and size data of the apples, internal ultrasonic nondestructive data and internal resonance sound wave data, and training the data to obtain a training model;
s1, setting an apple quality screening interval;
s2, conveying the apples to an appearance nondestructive detection area;
s3, obtaining an appearance picture of the apple to be detected, removing salt and pepper noise of the picture, identifying the appearance picture of the apple by using the trained model, and determining the required apple according to the identification result;
s4, conveying the needed apples screened in the S3 to an internal nondestructive detection area, conveying irrelevant apples to an alternative selection area, and carrying out screening after parameters are reset;
s5, obtaining internal ultrasonic nondestructive data of the to-be-detected apple in the internal nondestructive detection area, carrying out nondestructive judgment on the interior of the apple by using the trained model, determining that the interior of the apple is free of diseases, if the interior of the apple is diseased, transmitting the apple to a special area, and if the interior of the apple is not diseased, entering the step S6;
s6, acquiring internal resonance sound wave data of the apples to be detected, judging the internal substance content of the apples by using the trained model, classifying the apples according to the substance content, and transmitting the screened apples to a designated area;
s7, resetting the quality screening interval to carry out additional screening on irrelevant apples in S4, and repeating the steps S2-S7 to finish the classification of all apples.
Preferably, the step S5 of acquiring the internal ultrasonic nondestructive data of the apples to be detected in the internal nondestructive testing area is to acquire the internal ultrasonic nondestructive data by using a non-contact air coupling technique and an ultrasonic penetration method. Air coupling ultrasonic detection technology: similar to the traditional water immersion method, the difference is that air is not water between the probe and the detected object. The incidence angle can be changed by changing the inclination angle of the probe, and meanwhile, ultrasonic waves of various modes can be excited, and focused ultrasonic waves can be formed more easily, so that internal ultrasonic nondestructive data can be acquired.
More preferably, the step S0 is:
labeling the appearance picture of the apple by using the quality interval in the step S1, and giving a label for training a convolutional neural network model (namely a CNN model) based on deep learning;
labeling is carried out by collecting internal ultrasonic nondestructive data and internal resonance sound wave data and using the quality interval in the step S1, and labels are given for training a convolutional neural network-cyclic neural network model (namely, a CNN-RNN model) based on deep learning.
More preferably, the training of the deep learning based convolutional neural network model comprises:
(1) preprocessing the acquired apple appearance image to obtain subimages, and randomly dividing the subimages into a training set, a verification set and a test set according to a certain proportion;
(2) inputting the data of the training set into a convolutional neural network for training to obtain a trained network model;
(3) inputting the data of the test set into the trained network model to obtain a preliminary test result;
(4) testing and evaluating the precision of the sample data set based on the trained model, debugging and optimizing the model parameters according to the evaluation result, and repeating the steps (1) to (3) until the model is stable to generate final model parameters;
the model adopts an SSIM loss function to describe the difference between the real value and the predicted value, and the model is debugged and optimized based on the difference, specifically:
wherein x and y represent two pictures, μx、μyDenotes the mean value of x, y, σx、σyDenotes the standard deviation, σ, of x, yxyDenotes the covariance of x, y, c1、c2Representing a constant and avoiding coefficient errors caused by denominator being zero.
Further preferably, the model described in step S3 is a CNN model (i.e., a convolutional neural network model).
Or more preferably, the training of the deep learning based convolutional neural network-cyclic neural network model comprises:
(1) preprocessing collected apple internal ultrasonic nondestructive data and internal resonance sound wave data, and randomly dividing the data into a training set, a verification set and a test set according to a certain proportion;
(2) inputting the data of the training set into a convolutional neural network-cyclic neural network for training to obtain a trained network model;
(3) inputting the data of the test set into the trained network model to obtain a preliminary test result;
(4) carrying out advancing test and precision evaluation on the sample data set based on the trained model, debugging and optimizing model parameters according to an evaluation result, and repeating the steps (1) to (3) until final model parameters are generated after the model is stabilized;
the model adopts a cyclic neural network to replace a convolutional neural network full-connection layer, and the output model is an LSTM model in the cyclic neural network.
Further preferably, the model described in steps S5 and S6 is a CNN-RNN model (i.e., a convolutional neural network-recurrent neural network model).
In another preferred embodiment, in step S3, the noise of salt and pepper in the picture is removed by using a median filtering method.
Wherein, the preferable formula of the median filtering method is as follows: cv2.media Blur (img, ksize),
where img is the image to be processed and ksize is the size of the filter kernel (height and width of its neighborhood image during the averaging process).
In another preferred embodiment, the quality screening interval setup in step S1 complies with GB/T10651-2008 and NYT 2316-.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the invention directly processes, analyzes and judges the signals such as the sound waves obtained by nondestructive testing, and overcomes the defect of inaccurate detection result caused by the method that most of the market converts the obtained signals into pictures and finally analyzes and judges the pictures by optical testing.
The development of the apple nondestructive testing system based on machine learning can make up for the defects of the existing apple nondestructive testing system. The algorithm of deep learning is fused with a nondestructive testing technology, intellectualization is realized from the whole classification of placement, transmission and detection of apples, a large number of apples can be accurately detected in a high-speed and high-efficiency manner, the detection accuracy and efficiency are improved, and the detection flow is optimized. Not only can reduce the workload of the fruit grower, but also can improve the income of the fruit grower. And fruits with different grades can be provided according to the requirements of consumers, and certain effect is achieved on improving the position of domestic fruits.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a detection flowchart of example 1;
FIG. 2 is a CNN principle of operation;
FIG. 3 is a CNN-RNN principle of operation;
FIG. 4 is an image processing flow diagram;
fig. 5 is a schematic diagram of optical detection.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
As shown in fig. 1-5, a machine learning-based apple nondestructive testing method includes:
and S0, collecting the appearance picture and the size data of the apple, the internal ultrasonic nondestructive data and the internal resonance sound wave data, and training the data to obtain a training model. The method specifically comprises the following steps:
labeling the appearance picture of the apple by using the quality interval in the step S1, and giving a label for training the convolutional neural network model based on deep learning.
Labeling by collecting internal ultrasonic nondestructive data and internal resonance sound wave data and using the quality interval in the step S1, and giving a label for training a convolutional neural network-cyclic neural network model based on deep learning.
The convolutional neural network model training process based on deep learning comprises the following steps:
(1) preprocessing the acquired apple appearance image to obtain subimages, and randomly dividing the subimages into a training set, a verification set and a test set according to a certain proportion;
(2) inputting the data of the training set into a convolutional neural network for training to obtain a trained network model;
(3) inputting the data of the test set into the trained network model to obtain a preliminary test result;
(4) testing and evaluating the precision of the sample data set based on the trained model, debugging and optimizing the model parameters according to the evaluation result, and repeating the steps (1) to (3) until the model is stable to generate final model parameters;
the model adopts an SSIM loss function to describe the difference between the real value and the predicted value, and the model is debugged and optimized based on the difference, specifically:
wherein x and y represent two pictures, μx、μyDenotes the mean value of x, y, σx、σyDenotes the standard deviation, σ, of x, yxyDenotes the covariance of x, y, c1、c2Representing a constant and avoiding coefficient errors caused by denominator being zero.
The convolutional neural network-cyclic neural network model training process based on deep learning comprises the following steps:
(1) preprocessing collected apple internal ultrasonic nondestructive data and internal resonance sound wave data, and randomly dividing the data into a training set, a verification set and a test set according to a certain proportion;
(2) inputting the data of the training set into a convolutional neural network-cyclic neural network for training to obtain a trained network model;
(3) inputting the data of the test set into the trained network model to obtain a preliminary test result;
(4) carrying out advancing test and precision evaluation on the sample data set based on the trained model, debugging and optimizing model parameters according to an evaluation result, and repeating the steps (1) to (3) until final model parameters are generated after the model is stabilized;
the model adopts a cyclic neural network to replace a convolutional neural network full-connection layer, and the output model is an LSTM model in the cyclic neural network.
S1, setting an apple quality screening interval; wherein the quality interval setting follows GB/T10651-2008 and NYT 2316-2013.
S2, conveying the apples to an appearance nondestructive detection area;
s3, obtaining an appearance picture of the apple to be detected, removing salt and pepper noise of the picture by using a median filtering method, identifying the appearance picture of the apple by using a trained CNN model, and determining the required apple according to the identification result;
the formula of the median filtering method is as follows: cv2.media Blur (img, ksize),
where img is the image to be processed and ksize is the size of the filter kernel (height and width of its neighborhood image during the averaging process).
S4, conveying the needed apples screened in the S3 to an internal nondestructive detection area, conveying irrelevant apples to an alternative selection area, and carrying out screening after parameters are reset;
s5, obtaining internal ultrasonic nondestructive data of the to-be-detected apple in the internal nondestructive detection area, and performing nondestructive judgment on the interior of the apple by using the trained CNN-RNN model, namely obtaining the internal ultrasonic nondestructive data by adopting a non-contact air coupling technology. Air coupling ultrasonic detection technology: similar to the traditional water immersion method, the difference is that air is not water between the probe and the detected object. The incidence angle can be changed by changing the inclination angle of the probe, and meanwhile, ultrasonic waves of various modes can be excited, and focused ultrasonic waves can be formed more easily, so that internal ultrasonic nondestructive data can be acquired. Determining that the interior of the mobile phone is not sick, if the interior of the mobile phone is sick, transmitting the mobile phone to a special area, and if the interior of the mobile phone is sick, entering step S6;
s6, obtaining internal resonance sound wave data of the apples to be detected, judging the internal substance content of the apples by using the trained CNN-RNN model, classifying according to the substance content, and transmitting the screened apples to a designated area;
s7, resetting the quality screening interval to carry out additional screening on irrelevant apples in S4, and repeating the steps S2-S7 to finish the classification of all apples.
In this embodiment, it is preferable that step S0 is to collect the appearance picture, size data, and internal ultrasound nondestructive data and internal resonance sound wave data of the apple by using the trinocular imaging acquisition system.
The trinocular imaging acquisition system comprises: the system comprises a data processing terminal, a data acquisition device, an apple detection device, an apple identification device and an information interaction device;
the data processing terminal is respectively connected with the data acquisition device, the apple detection device, the apple identification device and the information interaction device; the data acquisition device respectively acquires a visible light image and a depth image and inputs the visible light image and the depth image into the data processing terminal; the apple detection device acquires a depth image from the data processing terminal to carry out apple detection, and feeds back a detection result to the data processing terminal; the data processing terminal controls the apple identification module to identify the corresponding visible light image according to the apple detection result and feeds back the identification result to the data processing terminal; and the data processing terminal controls the data transmission of the information interaction device according to the apple detection and identification result.
The data processing terminal is provided with a data management module used for storing acquired images and identity information, and the data management module is respectively connected with the data processing terminal, the apple detection device and the apple identification device.
In the trinocular imaging acquisition system, the data acquisition device comprises an image acquisition device, and the image acquisition device comprises a visible light image acquisition module and a depth image acquisition module; the visible light image acquisition module and the depth image acquisition module are respectively connected with the data processing terminal.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A machine learning-based apple nondestructive testing method is characterized by comprising the following steps:
s0, collecting appearance pictures and size data of the apples, internal ultrasonic nondestructive data and internal resonance sound wave data, and training the data to obtain a training model;
s1, setting an apple quality screening interval;
s2, conveying the apples to an appearance nondestructive detection area;
s3, obtaining an appearance picture of the apple to be detected, removing salt and pepper noise of the picture, identifying the appearance picture of the apple by using the trained model, and determining the required apple according to the identification result;
s4, conveying the needed apples screened in the S3 to an internal nondestructive detection area, conveying irrelevant apples to an alternative selection area, and carrying out screening after parameters are reset;
s5, obtaining internal ultrasonic nondestructive data of the to-be-detected apple in the internal nondestructive detection area, carrying out nondestructive judgment on the interior of the apple by using the trained model, determining that the interior of the apple is free of diseases, if the interior of the apple is diseased, transmitting the apple to a special area, and if the interior of the apple is not diseased, entering the step S6;
s6, acquiring internal resonance sound wave data of the apples to be detected, judging the internal substance content of the apples by using the trained model, classifying the apples according to the substance content, and transmitting the screened apples to a designated area;
s7, resetting the quality screening interval to carry out additional screening on irrelevant apples in S4, and repeating the steps S2-S7 to finish the classification of all apples.
2. The machine learning-based apple nondestructive testing method of claim 1, wherein the step S5 of obtaining the internal ultrasonic nondestructive data of the to-be-tested apples in the internal nondestructive testing area is to obtain the internal ultrasonic nondestructive data by a non-contact air coupling technique using an ultrasonic penetration method.
3. The apple nondestructive testing method based on machine learning of claim 2, wherein the step S0 is:
labeling the quality interval in the step S1 through the appearance picture of the apple, and giving a label for training a convolutional neural network model based on deep learning;
labeling by collecting internal ultrasonic nondestructive data and internal resonance sound wave data and using the quality interval in the step S1, and giving a label for training a convolutional neural network-cyclic neural network model based on deep learning.
4. The machine learning-based apple nondestructive testing method of claim 3, wherein the training of the deep learning-based convolutional neural network model comprises:
(1) preprocessing the acquired apple appearance image to obtain subimages, and randomly dividing the subimages into a training set, a verification set and a test set according to a certain proportion;
(2) inputting the data of the training set into a convolutional neural network for training to obtain a trained network model;
(3) inputting the data of the test set into the trained network model to obtain a preliminary test result;
(4) testing and evaluating the precision of the sample data set based on the trained model, debugging and optimizing the model parameters according to the evaluation result, and repeating the steps (1) to (3) until the model is stable to generate final model parameters;
the model adopts an SSIM loss function to describe the difference between the real value and the predicted value, and the model is debugged and optimized based on the difference, specifically:
wherein x and y represent two pictures, μx、μyDenotes the mean value of x, y, σx、σyDenotes the standard deviation, σ, of x, yxyDenotes the covariance of x, y, c1、c2Representing a constant and avoiding coefficient errors caused by denominator being zero.
5. The machine learning and machine learning-based apple nondestructive testing method of claim 4, wherein the model in step S3 is a CNN model.
6. The machine learning-based apple nondestructive testing method of claim 3, wherein the training of the deep learning-based convolutional neural network-cyclic neural network model comprises:
(1) preprocessing collected apple internal ultrasonic nondestructive data and internal resonance sound wave data, and randomly dividing the data into a training set, a verification set and a test set according to a certain proportion;
(2) inputting the data of the training set into a convolutional neural network-cyclic neural network for training to obtain a trained network model;
(3) inputting the data of the test set into the trained network model to obtain a preliminary test result;
(4) carrying out advancing test and precision evaluation on the sample data set based on the trained model, debugging and optimizing model parameters according to an evaluation result, and repeating the steps (1) to (3) until final model parameters are generated after the model is stabilized;
the model adopts a cyclic neural network to replace a convolutional neural network full-connection layer, and the output model is an LSTM model in the cyclic neural network.
7. The machine learning-based apple nondestructive testing method of claim 6, wherein the model in steps S5 and S6 is a CNN-RNN model.
8. The machine learning-based apple nondestructive testing method of claim 1, 2, 3 or 6, wherein in step S3, the picture salt and pepper noise is removed by median filtering.
9. The machine learning-based apple nondestructive testing method of claim 8, wherein the median filtering method formula is: cv2.media Blur (img, ksize),
where img is the image to be processed and ksize is the size of the filter kernel.
10. The method as claimed in claim 8, wherein the quality screening interval setup in step S1 complies with GB/T10651-2008 and NYT 2316-2013.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110906221.5A CN113624759A (en) | 2021-08-09 | 2021-08-09 | Apple nondestructive testing method based on machine learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110906221.5A CN113624759A (en) | 2021-08-09 | 2021-08-09 | Apple nondestructive testing method based on machine learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113624759A true CN113624759A (en) | 2021-11-09 |
Family
ID=78383453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110906221.5A Pending CN113624759A (en) | 2021-08-09 | 2021-08-09 | Apple nondestructive testing method based on machine learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113624759A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115406967A (en) * | 2022-11-01 | 2022-11-29 | 湖南木屋网络科技有限公司 | Method, system, equipment and storage medium for judging fruit quality |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5152401A (en) * | 1989-10-13 | 1992-10-06 | The United States Of America As Representd By The Secretary Of Agriculture | Agricultural commodity condition measurement |
JP2004202489A (en) * | 2002-12-10 | 2004-07-22 | Mitsui Mining & Smelting Co Ltd | Article sorting system |
JP2014173982A (en) * | 2013-03-08 | 2014-09-22 | Zensho Holdings Co Ltd | Food inspection device and food inspection system |
WO2018002841A1 (en) * | 2016-06-29 | 2018-01-04 | Ser.Mac S.R.L. | An apparatus for detecting damaged fruit and vegetable products |
US20180088084A1 (en) * | 2016-09-28 | 2018-03-29 | International Business Machines Corporation | Food doneness monitor |
CN110148122A (en) * | 2019-05-17 | 2019-08-20 | 南京东奇智能制造研究院有限公司 | Apple presentation quality stage division based on deep learning |
CN111680738A (en) * | 2020-06-03 | 2020-09-18 | 安徽中青检验检测有限公司 | Screening device for apple quality detection and detection method thereof |
CN112115752A (en) * | 2019-06-21 | 2020-12-22 | 北京百度网讯科技有限公司 | Method and device for training quality detection model and method and device for detecting quality |
JP6830685B1 (en) * | 2019-09-18 | 2021-02-17 | Assest株式会社 | Apple quality estimation program and system |
CN112560896A (en) * | 2020-11-19 | 2021-03-26 | 安徽理工大学 | Fruit quality screening and classifying system based on image processing |
-
2021
- 2021-08-09 CN CN202110906221.5A patent/CN113624759A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5152401A (en) * | 1989-10-13 | 1992-10-06 | The United States Of America As Representd By The Secretary Of Agriculture | Agricultural commodity condition measurement |
JP2004202489A (en) * | 2002-12-10 | 2004-07-22 | Mitsui Mining & Smelting Co Ltd | Article sorting system |
JP2014173982A (en) * | 2013-03-08 | 2014-09-22 | Zensho Holdings Co Ltd | Food inspection device and food inspection system |
WO2018002841A1 (en) * | 2016-06-29 | 2018-01-04 | Ser.Mac S.R.L. | An apparatus for detecting damaged fruit and vegetable products |
US20180088084A1 (en) * | 2016-09-28 | 2018-03-29 | International Business Machines Corporation | Food doneness monitor |
CN110148122A (en) * | 2019-05-17 | 2019-08-20 | 南京东奇智能制造研究院有限公司 | Apple presentation quality stage division based on deep learning |
CN112115752A (en) * | 2019-06-21 | 2020-12-22 | 北京百度网讯科技有限公司 | Method and device for training quality detection model and method and device for detecting quality |
JP6830685B1 (en) * | 2019-09-18 | 2021-02-17 | Assest株式会社 | Apple quality estimation program and system |
CN111680738A (en) * | 2020-06-03 | 2020-09-18 | 安徽中青检验检测有限公司 | Screening device for apple quality detection and detection method thereof |
CN112560896A (en) * | 2020-11-19 | 2021-03-26 | 安徽理工大学 | Fruit quality screening and classifying system based on image processing |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115406967A (en) * | 2022-11-01 | 2022-11-29 | 湖南木屋网络科技有限公司 | Method, system, equipment and storage medium for judging fruit quality |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110363746B (en) | Ultrasonic nondestructive detection signal classification method based on convolutional neural network | |
CN102147402A (en) | Machine vision technology based method for rapidly detecting egg freshness | |
CN110473179A (en) | A kind of film surface defects detection method, system and equipment based on deep learning | |
CN110781889B (en) | Deep learning-based nondestructive testing method for total sugar content in blueberry fruits | |
JP2011158373A (en) | Method for creation of teacher data for use in automatic defect classification, and method and apparatus for automatic defect classification | |
CN202421024U (en) | Broken rice rate on-line detection system | |
CN111652883B (en) | Glass surface defect detection method based on deep learning | |
CN109829895A (en) | A kind of AOI defect inspection method based on GAN | |
Sharma et al. | Grain quality detection by using image processing for public distribution | |
CN102494977B (en) | Method and system for detecting broken rice rate on line | |
CN111161237A (en) | Fruit and vegetable surface quality detection method, storage medium and sorting device thereof | |
CN111160451A (en) | Flexible material detection method and storage medium thereof | |
CN113252568A (en) | Lens surface defect detection method, system, product and terminal based on machine vision | |
CN107543788A (en) | A kind of urine erythrocyte abnormal rate detection method and system | |
CN114066848A (en) | FPCA appearance defect visual inspection system | |
CN116559111A (en) | Sorghum variety identification method based on hyperspectral imaging technology | |
CN111783616A (en) | Data-driven self-learning-based nondestructive testing method | |
CN113624759A (en) | Apple nondestructive testing method based on machine learning | |
CN117152152B (en) | Production management system and method for detection kit | |
CN112697984A (en) | Fruit defect nondestructive testing method based on neural network and fruit grading method | |
CN110991469A (en) | Fruit soluble solid online detection method and system | |
CN102768212A (en) | Fruit defect classification method based on compressed sensing | |
CN114898148B (en) | Egg offset detection method and system based on deep learning | |
CN117237747B (en) | Hardware defect classification and identification method based on artificial intelligence | |
CN117350967B (en) | Optical detection-based wafer appearance defect detection system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |