Hyperspectral detection method and sorting equipment for oil-tea fruit maturity based on deep learning

Through deep learning and hyperspectral imaging technology, combined with mechanical equipment, the rapid and accurate detection and sorting of camellia oleifera fruits are achieved, which solves the problems of low manual detection efficiency and high cost in the existing technology, and improves the processing efficiency and efficiency of the camellia oleifera industry. product quality.

CN114112932BActive Publication Date: 2024-09-20NANJING FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111314640.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-08
Publication Date
2024-09-20
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

The existing technology has low manual detection efficiency and high cost in the detection of camellia oleifera fruits, and cannot achieve fruit-by-fruit screening and selection, which affects the processing efficiency of the camellia oleifera industry.

Method used

A hyperspectral detection method based on deep learning is used, combined with a line scanning hyperspectral imaging system and mechanical equipment, to detect and sort the maturity of Camellia oleifera fruits through spectral feature analysis and deep convolutional neural networks to achieve automated sorting.

Benefits of technology

It achieves rapid detection and accurate classification of camellia oleifera fruits of different maturity, improves detection accuracy and production efficiency, reduces costs, replaces manual inspection, and improves the processing efficiency and product quality of the camellia oleifera industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114112932B
    Figure CN114112932B
Patent Text Reader

Abstract

The present invention discloses a hyperspectral detection method and sorting equipment for the maturity of oil-tea fruit based on deep learning. The method of the present invention comprises the steps of: firstly obtaining oil-tea fruit samples of different maturity, then obtaining the spectrum of each sample, then measuring the physical and chemical indicators of each sample and extracting a single comprehensive evaluation factor indicating the maturity information, then pre-processing the spectrum of the sample, using the pre-processed spectrum and texture information as the information input of the artificial intelligence deep convolutional neural network, using the maturity factor score as the prediction output, establishing a model prediction and evaluating the selection of the optimal pre-processing method and feature information combination; establishing a few-variable maturity prediction model and evaluating it; finally, migrating and implanting the deep learning simplified model into the main controller of the sorting equipment for prediction and sorting. The present invention can quickly detect fruits of different maturity, visualize the classified images, and perform sorting with the help of mechanical equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of nondestructive testing technology and equipment for woody grains, oils, forestry and fruits, and specifically relates to a hyperspectral detection method and sorting equipment for maturity of camellia oleifera fruits based on deep learning. Background Art

[0002] Camellia oleifera is a woody oil crop unique to my country and a few Southeast Asian countries. It has a history of thousands of years of cultivation in my country and is known as one of the world's four major oil crops, along with oil palm, coconut and olive. Camellia oleifera is widely distributed in China, with a national camellia planting area of ​​about 65.5 million mu, an annual output of 600,000 tons of camellia oil and an output value of nearly 100 billion yuan. The output of camellia oleifera in China's 15 major camellia oleifera producing provinces (regions) accounts for 99.99% of the country's total, and both output and variety richness rank first in the world. The tea oil extracted from camellia oleifera fruit has a high degree of unsaturation, comparable to olive oil. In recent years, global consumers' demand for high-quality woody edible oil has increased year by year. To produce high-quality camellia oil and maintain the core competitiveness of camellia oil, it is necessary to ensure that there are no immature and inferior camellia oleifera fruits in the fruit piles used for oil production. However, the degree of mechanization in the processing of post-harvest agricultural and forestry products in my country is low. For a long time, the work of detecting and sorting camellia oleifera fruits of different maturity has to be completed manually, which has low efficiency and high cost, and seriously affects the processing efficiency of the camellia oleifera industry.

[0003] Hyperspectral imaging nondestructive testing technology has been widely used in the detection of agricultural products such as fruits, vegetables, meat, eggs, and milk, but it started late in the detection of camellia oleifera. In view of the different maturity of camellia oleifera fruits that have affected the development of woody grain and oil industry in recent years, this study takes camellia oleifera fruits as the research object, because it will cause comprehensive changes in the external expression and internal composition of forest fruit tissues. From the perspective of the spectral characteristics of external contrast, disorder, randomness and other optical texture features (second-order moment, homogeneity, entropy, etc.) and the combined frequency and harmonic absorption of internal hydrogen-containing organic functional groups CH, NH, OH and SH vibrations, the differences in optical characteristic information are clarified, the basic characteristic parameters of the fingerprint spectrum are determined, and the identification is combined with chemometrics and deep learning methods to realize the transfer from simple artificial senses to optical model prediction and evaluation methods. It can overcome the shortcomings of low precision of manual detection and sorting, and the inability to screen and select each fruit. It integrates automatic switch control, replaces manual labor, and can improve the quality and grade of grain and oil production at the raw material level. Summary of the invention

[0004] To solve the above problems, the present invention discloses a hyperspectral detection method and sorting equipment for the maturity of camellia oleifera fruits based on deep learning, which can quickly detect fruits of different maturity levels, visualize the classified images, and perform sorting with the help of mechanical equipment.

[0005] To achieve the above object, the technical solution of the present invention is as follows:

[0006] A hyperspectral detection method for maturity of camellia oleifera fruit based on deep learning, the method comprising the following steps:

[0007] S1. Obtain tea fruit samples of different maturity.

[0008] S2. Obtain the spectrum of each sample obtained in S1. The specific method is as follows:

[0009] S21. Use line scanning hyperspectral imaging system to collect hyperspectral images of camellia fruit to obtain the original hyperspectral image R o ;

[0010] S22. The original hyperspectral image R obtained from S21 o Perform black and white calibration, and calculate the formula as (1). Turn on the light source, and after 10-15 minutes, when the light source illumination is stable, collect the hyperspectral image W of the white reference plate with a reflectivity of 100%. Then, when the collection environment is stable, turn off the light source, cover the camera lens cap so that the reflectivity is 0%, and collect the hyperspectral image D of the black reference plate. The original hyperspectral image R o The corrected hyperspectral image R is obtained by the following formula: c ,

[0011]

[0012] S23. The black-and-white corrected Camellia oleifera hyperspectral image is subjected to illumination and curvature correction and cropping using formula (2), specifically, for each pixel point P of the image at a certain wavelength: λ The spectral intensity value is normalized, and then the sum of the spectral intensity values ​​of all pixels under all wavelengths (n) is obtained. The final data cube X λ It is a hyperspectral image that is independent of illumination, light source direction and curvature.

[0013]

[0014] S24. The hyperspectral image after illumination and curvature correction is combined with a band mathematical algorithm to determine the region of interest to remove the spectral information of unnecessary pixels including the background and the edge of the culture dish to extract only the pure sample part, and the image at the high reflectivity 700nm band is subtracted from the image at the low reflectivity 425nm band to obtain a band operation image, and the pixel part greater than or equal to the threshold of 0.25 is extracted from the band operation image to generate a region of interest ROI, and the average spectrum corresponding to each tea fruit sample is extracted;

[0015] S3. The physical and chemical indicators of each sample obtained in S1 are measured, including fruit height, fruit diameter, hardness, as well as physical and chemical indicators such as shell moisture content, internal seed oil content, lignin, and starch content; Pearson correlation analysis, principal component analysis, or KMO and Bartlett test factor analysis are performed on the measured physical and chemical indicators, and formula (3) is used to extract a single comprehensive evaluation factor indicating maturity information.

[0016] CMI=C 1 ×X 1 +C 2 ×X 2 +...+C n ×X n (3)

[0017] In the formula, CMI represents the comprehensive evaluation factor, C represents the weight contribution rate, X is the parameter index, and n is the number of parameters;

[0018] S4. Preprocess the spectrum of the sample obtained in step S2, and the preprocessing methods include standardization, SNV, MSC, detrending, and derivative; at the same time, extract the texture information features including mean, contrast, correlation, energy, homogeneity, variance, difference, etc. from the principal component image in the ROI, as follows:

[0019] Find the mean

[0020]

[0021] Find the contrast

[0022]

[0023] Find the correlation

[0024]

[0025] Energy

[0026]

[0027] Homogeneity

[0028]

[0029] Find the variance

[0030]

[0031] Seeking dissimilarity

[0032]

[0033] Entropy

[0034]

[0035] In the formula, g(i,j) represents the gray-level co-occurrence matrix, X is the number of columns of the gray-level co-occurrence matrix, and Y is the number of rows of the gray-level co-occurrence matrix, where:

[0036]

[0037]

[0038]

[0039]

[0040] S5. The spectrum and texture information pre-processed in step S4 are used as information input of the artificial intelligence deep convolutional neural network, and the maturity factor score is used as the prediction output to establish a model prediction and evaluate the selection of the optimal pre-processing method and feature information combination;

[0041] S6. Perform two-dimensional correlation spectroscopy analysis on the pre-processed spectrum in step S4, use the maturity information obtained in step S5 as perturbation, select the characteristic wavelength of the automatic peak of the synchronous spectrum that changes dramatically with maturity, and use it as the input of the simplified deep learning model to establish a few-variable maturity prediction model and evaluate it;

[0042] S7. The simplified deep learning model obtained in step S6 is migrated and implanted into the main controller of the sorting device for predictive sorting; the specific process is:

[0043] The tea fruit falls from the feed box (1), is separated by the channel partition (15) and enters different channels (16), and the tea fruit moves forward continuously under the interaction of the dynamic sorting rod (14) and the static sorting rod (13). The diameter of the front section of the sorting rod is large and the diameter of the rear section is small. The dynamic sorting rod is provided with a threaded belt (17). The power source comes from the motor (5) to drive the power output shaft (4), the pulley (3) and the belt transmission to drive the reducer (2) to rotate. As the dynamic sorting rod (14) rotates, the tea fruit is transported to the other end of the device under the push of the threaded belt (17), and the static sorting rod (13) plays a supporting role. The diameter of the conveying pipe (9) at the first falling point is large and the diameter of the conveying pipe (9) at the latter falling point is small, that is, the gap between the dynamic and static sorting rods will change with the distance from the feed box (1), and the gap will be larger as the distance from the feed box is larger, so that during the transportation of the tea fruit on the sorting rod, small fruits fall first and large fruits fall later, thereby completing the size classification of the tea fruit.

[0044] After the oil-tea fruit falls into the drop box (12), it enters the sorting system. Under the action of gravity, the oil-tea fruit falls from the drop box (12) into the conveying pipe (9). A multispectral sensor box (10) is fixed on the upper end of the conveying pipe, and three multispectral cameras (18) are built in. The microcomputer brings the captured multispectral image into the deep learning model established in steps S1-S6 for predictive analysis. According to the analysis results, the paddle (7) below the sorting pipe (8) is controlled to shift the oil-tea fruits of different maturity into different collection boxes (6).

[0045] Furthermore, the method of the present invention further comprises the step of performing Monte Carlo Cross-Validation (MCCV) to eliminate singular samples to ensure the accuracy of model prediction after obtaining the spectrum of each sample in step S2. The specific method of Monte Carlo Cross-Validation is: randomly selecting M samples each time t samples, select A principal components to establish a partial least squares model, and the remaining M p (MM t ) samples are used for prediction, and M is calculated p The mean μ of the prediction residuals of each sample m and standard deviation σ m ;

[0046]

[0047]

[0048] Repeat this random process K times, then each sample will have a set of prediction residuals. Let the number of times the mth sample enters the prediction set in MCCV be T m , each residual is denoted as R mn (0≤n≤K);

[0049] For all samples, m -σ m Distribution diagram. Since the prediction residuals of normal samples approximately obey a normal distribution with a low mean, the prediction residuals of singular samples generally have a higher mean and present a more obvious tailing distribution. On this distribution diagram, singular samples can be intuitively found and eliminated.

[0050] Furthermore, after obtaining the texture information features in step S4, the method also includes applying one or more algorithms selected from the group consisting of continuous projection method, competitive adaptive weighted algorithm, ant colony optimization algorithm, particle swarm optimization algorithm, simulated annealing algorithm, random frog leaping algorithm or genetic algorithm to respectively establish simplified models and compare them, and selecting the optimal simplified model to be implanted into the sorting equipment.

[0051] Furthermore, the rotation of the paddle is driven by a motor, and the rotation of the motor is controlled by a microcomputer to achieve the sorting of the oil-tea fruit, and the delay control time is about 0.05 seconds.

[0052] Another object of the present invention is to provide a hyperspectral detection and sorting device for maturity of oil-tea fruit based on deep learning, comprising a frame, a material box is arranged on the frame, an inclined material discharge channel is arranged at the material discharge port of the material box, a group of parallel channel partitions are arranged on the material discharge channel, each of the channel partition bottom plates is provided with a static sorting rod, a dynamic sorting rod is arranged between each two adjacent static sorting rods, a threaded belt is wound around the dynamic sorting rod, the dynamic sorting rod is connected to a driving device, the static sorting rod and the dynamic sorting rod are both tapered rods with one end larger than the other, and one end of the straight rod close to the material box is The diameter of the moving sorting rod is larger than the diameter of the other end thereof; a row of closely arranged blanking boxes are arranged under each adjacent dynamic sorting rod and the static sorting rod; a conveying pipe is arranged under each of the blanking boxes; a multispectral sensor box is fixed on the upper end of each of the conveying pipes, and three multispectral cameras are built in; the multispectral cameras are connected to a microcomputer; the microcomputer has a built-in deep learning model established in steps S1-S6 to perform predictive analysis on the captured multispectral images; a sorting tube is arranged at the bottom of the conveying tube; a paddle is arranged at the bottom of the sorting tube; the paddle is driven to rotate by a motor, and the rotation of the motor is controlled by a microcomputer.

[0053] Furthermore, three multispectral cameras are installed in the multispectral sensor box, and each camera has an angle of 120°.

[0054] Furthermore, the static sorting rod and the dynamic sorting rod are made of nylon, and both ends are supported and fixed by bearing seats.

[0055] Furthermore, the conveying pipe and the sorting pipe are made of transparent materials.

[0056] Furthermore, each of the static sorting rod and the dynamic sorting rod has a length set to 3050 mm, a maximum diameter set to 50 mm, and a minimum diameter set to 20 mm.

[0057] The beneficial effects of the present invention are as follows: the detection method of the present invention can realize rapid detection of tea fruit samples of different maturity levels with an accuracy rate of more than 90%, and the sorting equipment provides a way for rapid detection and sorting of woody grain, oil, forest and fruit production areas.

[0058] 1. The method for detecting the maturity of tea oil fruit by combining hyperspectral detection with artificial intelligence deep learning provided by the present invention expands the application scope of hyperspectral non-destructive detection and realizes non-destructive, real-time, rapid and accurate detection of woody grain and oil fruits.

[0059] 2. The sorting equipment provided by the present invention can replace manual labor to improve the overall efficiency of camellia fruit production area processing by more than 80% and save 30% of the cost.

[0060] 3. The overall structure of the sorting equipment is simple, easy to install and disassemble, and optical detection does not require the introduction of chemical reagents. It is green, pollution-free, low-carbon and environmentally friendly.

[0061] 4. The harvested tea-oil fruits are sorted for quality, so that consumers can buy the produced grain and oil with confidence on demand. The overall market will develop healthily, improve economic efficiency, and help establish brands and enhance overall domestic and international competitiveness.

[0062] 5. Combining the characteristic wavelength selection method to find fingerprint spectrum information will help to reduce the overall cost of the equipment and develop related instruments in the direction of portability. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A flow chart of a hyperspectral detection method for the maturity of camellia oleifera fruit based on deep learning provided in an embodiment of the present invention;

[0064] Figure 2 A deep convolutional neural network framework for modeling Camellia oleifera hyperspectral information;

[0065] Figure 3 Determine the characteristic wavelength indicating the maturity of Camellia oleifera fruit for two-dimensional correlation spectroscopy;

[0066] Figure 4 It is a hyperspectral detection and sorting device for the maturity of camellia oleifera fruit based on deep learning;

[0067] Figure 5 It is a dynamic and static sorting rod;

[0068] Figure 6 It is the terminal sorting system structure;

[0069] The markings of the accompanying drawings are:

[0070] In the figure: 1-feeding box; 2-reducer; 3-pulley; 4-power output shaft; 5-motor; 6-collection box; 7-paddle; 8-sorting tube; 9-conveying tube; 10-multispectral sensor box; 11-frame; 12-dropping box; 13-static sorting rod; 14-dynamic sorting rod; 15-channel partition; 16-channel; 17-threaded belt; 18-multispectral camera. DETAILED DESCRIPTION

[0071] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0072] In the first aspect, the embodiment of the present invention provides a hyperspectral detection method for the maturity of camellia oleifera fruit based on deep learning. The whole process is as follows: Figure 1 As shown, including:

[0073] Step a: Collect a large number of camellia oleifera fruit samples from different batches of growth and development at different maturity time points (immature, harvest maturity, edible maturity, physiological maturity, overripe) to form a sample library (N samples), and remove samples with obvious variations, diseases or insect infestations.

[0074] Step b: Use a hyperspectral imaging system to collect hyperspectral images. The system includes a spectrometer, a detector (sCMOS camera), a white food-grade conveyor belt, a lighting system consisting of 12 50W halogen lamps and a diffuse reflection dome, and a computer. The stage on which the object to be tested is placed on the conveyor belt is driven by a stepper motor, and the dark box is used to shield the interference of external stray light on data collection. Collect hyperspectral images of two oil-tea camellia fruits and crop them into a single hyperspectral image of oil-tea camellia fruits with a size of 230×290×150. The collected samples are corrected by the following formula:

[0075]

[0076] Among them, R e is the corrected diffuse reflectance spectrum image data, R 0 is the original diffuse reflectance spectrum image number of the sample, D is the dark image data, and W is the diffuse reflectance image data of the white board.

[0077] In order to avoid the problem of uneven illumination caused by the height and angle of the light source, the illumination and surface curvature are corrected to correct the morphological effect. The main thing is to first correct each pixel point P of the image at a certain wavelength. λ The spectral intensity value is normalized, and then the sum of the spectral intensity values ​​of all pixels under all wavelengths (n) is obtained. The final data cube X λ It is a hyperspectral image that is independent of illumination, light source direction and curvature. The specific calculation is shown in the following formula.

[0078]

[0079] Step c: N samples were tested for physical and chemical quality indicators including oil content. The fruit height and diameter of the oil-tea fruit were measured and recorded using a vernier caliper. The fresh fruit mass and fresh seed mass of the oil-tea fruit were measured using an analytical balance with an accuracy of 0.01 g. The fresh oil-tea fruit was shelled and dried in a drying oven, and the mass of the shell after drying was measured. The moisture content calculation formula of the oil-tea fruit shell was obtained as shown below, where M 干壳 is the mass of the dried husk, M 鲜果 is the quality of fresh camellia oleifera fruit, M 鲜籽 is the quality of fresh tea seeds, R 水 It is the moisture content of camellia oleifera shell.

[0080]

[0081] The oil content of camellia seeds is determined using a fat analyzer in accordance with the method specified in GB5009.6-2016. First, weigh 2.000g of camellia kernels, grind them and move them into a filter paper tube, and place the filter paper tube into the extraction tube of a Soxhlet extractor, connect it to a receiving bottle that has been dried to a constant mass, add 60mL of anhydrous ether from the upper end of the extractor condenser to 2 / 3 of the bottle volume, heat it in a water bath, and allow the anhydrous ether to reflux and extract for 6 hours. Then remove the receiving bottle, recover the anhydrous ether, and evaporate it in a water bath when there is 1 to 2mL of solvent remaining in the receiving bottle, then dry it in a 100°C drying oven for 1 hour, cool it in a dryer for 0.5 hours, and then weigh it. Finally, calculate the oil content of camellia seeds. The formula is as follows, where: R ratio is the oil content of camellia seeds, M oil is the oil output, M seed For the quality of tea kernels.

[0082]

[0083] Step d: Determination and quantification of maturity-related indicators, including moisture content, seed oil yield, hardness, lignin content, starch content, etc. The Pearson correlation analysis of the above parameter indicators is numerically equal to the covariance cov(X, Y) divided by the product of the standard deviation (σX, σY). The stronger the correlation, the more collinear the parameters are. Further KMO and Bartlett tests are performed on the original maturity parameter indicators. The partial correlation or independence between variables is calculated in combination with the test coefficient value to test whether it is suitable for factor analysis. The principal component characteristics are extracted and rotated using the maximum balance value method, the maximum variance method, and the maximum fourth-order method. The results before and after the rotation are compared and the maximum common factor of the contribution rate in the analysis is extracted and selected as the main comprehensive evaluation information reflecting the maturity from the perspective of the difference parameters, as shown in the following formula.

[0084]

[0085] In the formula, X is the difference parameter index, a represents the factor loading, F represents the common factor, and ε represents the special factor. F and ε are unrelated, and the covariance is 0, while F 1 …F m Also uncorrelated is a set of factors that are perpendicular to each other.

[0086] Based on the load information, the common factor with the highest contribution rate is standardized and defined as the comprehensive maturity index (CMI). All parameter indicators are linearly fitted and a comprehensive evaluation function is constructed (see the formula). The weight coefficient reflects the importance of the parameter in the comprehensive factor.

[0087] CMI=C 1 ×X 1 +C2 ×X 2 +...+C n ×X n

[0088] In the formula, CMI represents the comprehensive evaluation factor, C represents the weight contribution rate, X is the parameter index, and n is the number of parameters.

[0089] Step e: Extract the fingerprint spectrum information indicating maturity information. First, use Mosaic to stitch images of various levels, and perform data dimension reduction, signal-to-noise ratio enhancement, and pure pixel extraction based on PCA, spectral angle mapping (SAM), etc.; further, on the pure image after preprocessing, use the spatial distribution of pixels and their corresponding image changes, fingerprint spectrum changes, etc. to achieve the spectrum data characterization of maturity. The corresponding chemometric algorithm is planned to be studied in the spectrum together with MCA, XCA or Bayesian-XCA methods for data mining and specific information extraction. Image texture is planned to be based on GLCM, LBP, mathematical morphology and other methods to extract the reflection of lignin accumulation, texture color changes, microcracks, and whether the arrangement is tight at the macroscopic image level. For example, a series of texture features such as entropy, inverse moment, energy, and contrast are used for feature mining and extraction. The specific method is as follows:

[0090] Find the mean

[0091]

[0092] Find the contrast

[0093]

[0094] Find the correlation

[0095]

[0096] Energy

[0097]

[0098] Homogeneity

[0099]

[0100] Find the variance

[0101]

[0102] Seeking dissimilarity

[0103]

[0104] Entropy

[0105]

[0106] In the formula, g(i,j) represents the gray-level co-occurrence matrix, X is the number of columns of the gray-level co-occurrence matrix, and Y is the number of rows of the gray-level co-occurrence matrix, where:

[0107]

[0108]

[0109]

[0110]

[0111] Step f: Model building: The complex changes in the physiological characteristics of Camellia oleifera at different maturity stages lead to changes in the optical characteristics of the time series, which is a nonlinear process. In order to use the hyperspectral spectrum information to accurately build a detection model, it is planned to use all the collected time series spectrum data as the basis and combine chemometric methods to explore a large sample size of simulated human brain neural network to understand the data modeling method. The acquired image is first calibrated for black and white plates, and then based on the principal component image, band operation, pixel point cloud distribution and other feature interactive analysis methods to enhance the signal-to-noise ratio and extract pure pixel spectra. For the spectrum, PCA, two-dimensional correlation spectroscopy and other methods are used to explore the spectrum changes caused by maturity and determine the characteristic spectrum image fingerprint information.

[0112] The simulation adopts the artificial intelligence deep convolutional neural network (deep CNN) method, which is based on the structure of network blocks. It is concise and neat and contains enough depth to ensure the accuracy of the deep estimation results of maturity information. The basic framework of the network is as follows Figure 2 shown.

[0113] Step g: Extract features: Take the maturity of tea fruit t as external disturbance information, perform two-dimensional correlation spectrum analysis, and the minimum value T of the external disturbance variable t min and the maximum value T max The spectral intensity between is y(v,t), and the variable v can be any suitable spectral quantization parameter. Then the dynamic spectrum induced by the external disturbance is It can be defined as:

[0114]

[0115] in represents the reference value of the spectral intensity at variable v. Although the choice of the spectral intensity reference value is not fixed, in general, the average value of the spectrum at variable v in the sample spectrum obtained during the entire surrounding process can be used as Right now,

[0116]

[0117] In practical applications, matrices are often used to represent discrete data sets. For the convenience of expression, the dynamic spectrum in the formula can be It can be represented as the following column vector:

[0118]

[0119] The average value of the spectral intensity is expressed as,

[0120]

[0121] Calculate the two-dimensional correlation synchronous spectrum and asynchronous spectrum, and extract characteristic information that can indicate the maturity of tea fruit from the synchronous spectrum, such as Figure 3 The following table shows the selected characteristic wavelength variables within 10.

[0122] Step h: Establish a simplified model: Select the two-dimensional correlation spectrum and texture feature information as the input of the deep learning framework, and establish a simplified model with fewer variables corresponding to the predicted maturity factor in order to reduce the model running speed, reduce the calculation processing time, and achieve rapid detection; evaluate the simplified model and apply the coefficient of determination (R 2 ) and root mean square error (RMSE) and residual predictive deviation (RPD). 2 The larger the value, the greater the correlation. Generally, in regression analysis, the coefficient of determination is numerically equal to the square of the correlation coefficient. The calculation formula is as follows:

[0123]

[0124] Where N is the total number of samples; y t is the actual value of the tth sample; is the predicted value of the tth sample; is the average of all sample actual values.

[0125]

[0126] Where N is the total number of samples; y t is the actual value of the tth sample; is the predicted value of the tth sample.

[0127]

[0128] In the formula, SD is the standard deviation of the data set and RMSE is the root mean square error.

[0129] Step i: Maturity visualization: The visualization technology of hyperspectral images plays an important role as a bridge of information between data and observers. Since hyperspectral images have not only spectral information but also image information, the spectral information can correspond one-to-one with the pixels in the image, so for each pixel, the quality index value at each pixel can form a qualitative or quantitative model prediction distribution map of the sample.

[0130] The visualization of tea fruit with different maturity mainly includes the following three steps: (1) Process the hyperspectral image, mask the background and unnecessary parts to make their reflectivity 0, select the image under the characteristic wavelength, resize it, and save it as a multispectral image; (2) Write a program to introduce the established simplified multispectral model into the multispectral image. Each pixel point has a maturity factor prediction value, and the pixels are spliced ​​to form an image; (3) Adjust and select appropriate colors, color scale ranges, scales, etc. to make the two-dimensional visualization image of the indicator prediction clear, obvious, and easy to understand.

[0131] In the second aspect, a hyperspectral detection and sorting device for the maturity of camellia oleifera fruit based on deep learning is provided. Figure 4-6 The device is described in further detail.

[0132] A hyperspectral detection and sorting device for tea fruit maturity based on deep learning Figure 4 As shown, camellia fruits of different maturity are poured into the feed box 1, which is mounted on a frame 11. The camellia fruits roll in under the action of gravity and are separated into different sorting channels 16 by channel partitions 15, and enter the size sorting system. The size sorting system consists of a dynamic sorting rod 14 and a static sorting rod 13. The dynamic sorting rod is provided with a threaded belt 17, as shown in FIG. Figure 5 As shown, the power source comes from the motor 5 driving the power output shaft 4, the pulley 3 and the belt transmission, driving the reducer 2 to rotate, and with the rotation of the dynamic sorting rod 14, the oil tea fruit will be transported to the other end of the equipment under the push of the threaded belt 17, and the static sorting rod 13 plays a supporting role. The diameter of the conveying pipe 9 at the first drop is large and the diameter of the conveying pipe 9 at the later drop is small, that is, the gap between the dynamic and static sorting rods will change with the distance from the feed box 1, and the farther the distance from the feed box, the larger the gap. Therefore, during the transportation of the oil tea fruit on the sorting rod, the small fruit falls first and the large fruit falls later, thereby completing the size classification of the oil tea fruit.

[0133] After the oil-tea fruit falls into the drop box 12, it enters the sorting system, and its structure is as follows: Figure 6As shown, under the action of gravity, the tea fruit falls from the drop box 12 into the conveying pipe 9. A multispectral sensor box 10 is fixed on the upper end of the conveying pipe, which has three multispectral cameras 18 built in. A camera is placed every 120° on the same horizontal plane, so that the tea fruit passing through this section can be photographed 360° without blind spots. The microcomputer will bring the captured multispectral image into the deep learning model established in the method for predictive analysis, and according to the analysis results, the paddle 7 under the sorting tube 8 is controlled with delay to shift the tea fruits of different maturity into different collection boxes 6.

[0134] In this embodiment, in order to reduce the weight of the sorting rod, the static sorting rod 13 and the dynamic sorting rod 14 are made of nylon, and the two ends are supported and fixed by bearing seats; three multispectral cameras 18 are installed in the multispectral sensor box 10, and each camera has an angle of 120°, so that the spectral texture information of the oil-tea fruit can be obtained without blind spots; there are no special requirements for the strength of the conveying pipe 9 and the sorting pipe 8, and they are required to be transparent and made of modified organic glass; the paddle 7 is required to withstand a certain drop impact, and Q215 is selected as the material to increase the service life; the collection box 6 is made of Q235 and is made by stamping and welding. The paddle is driven by a motor, and the motor is controlled by a microcomputer to achieve the sorting of the oil-tea fruit. The delay control time is about 0.05 seconds. The static sorting rod and the dynamic sorting rod are each set to a length of 3050mm, a maximum diameter of 50mm, and a minimum diameter of 20mm.

[0135] It should be noted that the above content only illustrates the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications all fall within the protection scope of the claims of the present invention.

Claims

1. A hyperspectral detection method for the maturity of camellia oleifera fruit based on deep learning, characterized in that: The method comprises the following steps: S1. Obtain tea fruit samples of different maturity. S2. Obtain the spectrum of each sample obtained in S1. The specific method is as follows: S21. Use line scanning hyperspectral imaging system to collect hyperspectral images of camellia fruit to obtain the original hyperspectral image R o ; S22. The original hyperspectral image R obtained from S21 o Perform black and white calibration, and calculate the formula as (1). Turn on the light source, and after 10-15 minutes, when the light source illumination is stable, collect the hyperspectral image W of the white reference plate with a reflectivity of 100%. Then, when the collection environment is stable, turn off the light source, cover the camera lens cap so that the reflectivity is 0%, and collect the hyperspectral image D of the black reference plate. The original hyperspectral image R o The corrected hyperspectral image R is obtained by the following formula: c , S23. The black-and-white corrected Camellia oleifera hyperspectral image is subjected to illumination and curvature correction and cropping using formula (2), specifically, for each pixel point P of the image at a certain wavelength: λ The spectral intensity value is normalized, and then compared with the sum of the spectral intensity values ​​of all pixels under all n wavelengths. The final data cube X λ It is a hyperspectral image that is independent of illumination, light source direction and curvature. S24. The hyperspectral image after illumination and curvature correction is combined with a band mathematical algorithm to determine the region of interest to remove the spectral information of unnecessary pixels including the background and the edge of the culture dish to extract only the pure sample part, and the image at the high reflectivity 700nm band is subtracted from the image at the low reflectivity 425nm band to obtain a band operation image, and the pixel part greater than or equal to the threshold of 0.25 is extracted from the band operation image to generate a region of interest ROI, and the average spectrum corresponding to each tea fruit sample is extracted; S3. For each sample obtained in S1, the maturity-related indicators were measured and quantified, including fruit height, fruit diameter, hardness, moisture content, seed oil yield, hardness, lignin content, and starch content. The Pearson correlation analysis of the above parameter indicators was numerically equal to the covariance cov(X, Y) divided by the product of the standard deviation (σX, σY). The stronger the correlation, the more collinear the parameters. The original maturity parameter indicators were further tested by KMO and Bartlett tests. The partial correlation or independence between variables was calculated based on the test coefficient values. The suitability for factor analysis was tested, the principal component characteristics were extracted, and the maximum equilibrium value method, maximum variance method, and maximum quartic method were used for rotation. The results before and after the rotation were compared and the maximum common factor of the contribution rate in the analysis was extracted as the main comprehensive evaluation information reflecting the maturity from the perspective of the difference parameters, as shown in the following formula: In the formula, X is the difference parameter index, a represents the factor loading, F represents the common factor, and ε represents the special factor. F and ε are unrelated and have a covariance of 0, while F1…F m Also uncorrelated is a set of factors that are perpendicular to each other; Based on the load information, the common factor with the highest contribution rate is standardized and defined as a single comprehensive evaluation factor CMI. All parameter indicators are linearly fitted and a comprehensive evaluation function is constructed, as shown in the following formula: CMI=C1×X1+C2×X2+...+C n ×X n (3) In the formula, CMI represents the comprehensive evaluation factor, C represents the weight contribution rate, X is the parameter index, and n is the number of parameters; S4. Preprocess the spectrum of the sample obtained in step S2, and the preprocessing methods include standardization, SNV, MSC, detrending, and derivative; at the same time, extract the principal component image within the ROI including mean, contrast, correlation, energy, homogeneity, and variance, as follows: Find the mean Find the contrast Find the correlation Energy Homogeneity Find the variance Seeking dissimilarity Entropy In the formula, g(i,j) represents the gray-level co-occurrence matrix, X is the number of columns of the gray-level co-occurrence matrix, and Y is the number of rows of the gray-level co-occurrence matrix, where: S5. The spectrum and texture information pre-processed in step S4 are used as information input of the artificial intelligence deep convolutional neural network, and the maturity factor score is used as the prediction output to establish a model prediction and evaluate the selection of the optimal pre-processing method and feature information combination; S6. Perform two-dimensional correlation spectroscopy analysis on the pre-processed spectrum in step S4, use the maturity information obtained in step S5 as perturbation, select the characteristic wavelength of the automatic peak of the synchronous spectrum that changes dramatically with maturity, and use it as the input of the deep learning model to establish a few-variable maturity prediction model and evaluate it; S7. The deep learning model obtained in step S6 is migrated and implanted into the main controller of the sorting device for predictive sorting; the specific process is: The tea fruit falls from the feed box (1), is separated by the channel partition (15) and enters different channels (16), and the tea fruit moves forward continuously under the interaction of the dynamic sorting rod (14) and the static sorting rod (13). The diameter of the front section of the sorting rod is large and the diameter of the rear section is small. The dynamic sorting rod is provided with a threaded belt (17). The power source comes from the motor (5) to drive the power output shaft (4), the pulley (3) and the belt transmission to drive the reducer (2) to rotate. As the dynamic sorting rod (14) rotates, the tea fruit is transported to the other end of the device under the push of the threaded belt (17), and the static sorting rod (13) plays a supporting role. The diameter of the conveying pipe (9) at the first falling point is large and the diameter of the conveying pipe (9) at the latter falling point is small, that is, the gap between the dynamic and static sorting rods will change with the distance from the feed box (1), and the gap will be larger as the distance from the feed box is larger, so that during the transportation of the tea fruit on the sorting rod, small fruits fall first and large fruits fall later, thereby completing the size classification of the tea fruit. After the oil-tea fruit falls into the material drop box (12), it enters the sorting system. Under the action of gravity, the oil-tea fruit falls from the material drop box (12) into the conveying tube (9). A multispectral sensor box (10) is fixed at the upper end of the conveying tube, and three multispectral cameras (18) are built in. The microcomputer brings the captured multispectral images into the deep learning model established in steps S1-S6 for predictive analysis. According to the analysis results, the paddle (7) below the sorting tube (8) is controlled to shift the oil-tea fruits of different maturity into different collection boxes (6); The method also includes the step of performing Monte Carlo cross validation to remove singular samples after obtaining the spectrum of each sample in step S2 to ensure the accuracy of model prediction. The specific method of Monte Carlo cross validation is: randomly select M t samples, select A principal components to establish a partial least squares model, and the remaining M p (MM t ) samples are used for prediction, and M is calculated p The mean μ of the prediction residuals of each sample m and standard deviation σ m ; Repeat this random process K times, then each sample will have a set of prediction residuals. Let the number of times the mth sample enters the prediction set in MCCV be T m , each residual is denoted as R mn (0≤n≤K); For all samples, m -σ m Distribution graph: Since the prediction residuals of normal samples approximately follow a normal distribution with a low mean, the prediction residuals of singular samples generally have a higher mean and present a more obvious tailing distribution. In this distribution graph, singular samples can be intuitively found and eliminated; After obtaining the texture information features in step S4, the method further includes applying one or more algorithms selected from the group consisting of continuous projection method, competitive adaptive weighted algorithm, ant colony optimization algorithm, particle swarm optimization algorithm, simulated annealing algorithm, random frog leaping algorithm or genetic algorithm to respectively establish simplified models and compare them, and selecting the optimal simplified model to be implanted into the sorting equipment.

2. The method for hyperspectral detection of oil-tea fruit maturity based on deep learning according to claim 1 is characterized in that: The rotation of the paddle is driven by a motor, and the rotation of the motor is controlled by a microcomputer to achieve the sorting of the oil-tea fruit, and the delay control time is about 0.05 seconds.

3. The hyperspectral detection and sorting equipment for the maturity of camellia oleifera fruit based on deep learning is characterized by: The method for hyperspectral detection of maturity of camellia oleifera fruit based on deep learning as described in any one of claims 1 to 2 is adopted, comprising a frame, a material box is arranged on the frame, an inclined material discharge channel is arranged at the material discharge port of the material box, a group of parallel channel partitions are arranged on the material discharge channel, each of the channel partition bottom plates is provided with a static sorting rod, a dynamic sorting rod is arranged between each two adjacent static sorting rods, a threaded belt is wound around the dynamic sorting rod, the dynamic sorting rod is connected to a driving device, the static sorting rod and the dynamic sorting rod are both tapered rods with one end larger than the other, and one end of the static sorting rod close to the material box is provided with a static sorting rod. The diameter is larger than the diameter of the other end. A row of tightly arranged blanking boxes are arranged under each adjacent dynamic sorting rod and the static sorting rod. A conveying pipe is arranged under each of the blanking boxes. A multispectral sensor box is fixed on the upper end of each of the conveying pipes. Three multispectral cameras are built in. The multispectral cameras are connected to a microcomputer. The microcomputer has a built-in deep learning model established in steps S1-S6 to predict and analyze the captured multispectral images. A sorting tube is arranged at the bottom of the conveying tube. A paddle is arranged at the bottom of the sorting tube. The paddle is driven to rotate by a motor, and the rotation of the motor is controlled by a microcomputer.

4. The deep learning-based hyperspectral detection and sorting equipment for tea fruit maturity according to claim 3 is characterized in that: Three multispectral cameras are installed in the multispectral sensor box, and each camera has an angle of 120°.

5. The deep learning-based hyperspectral detection and sorting equipment for oil-tea fruit maturity according to claim 3 is characterized in that: The static sorting rod and the dynamic sorting rod are made of nylon, and both ends are supported and fixed by bearing seats.

6. The deep learning-based hyperspectral detection and sorting equipment for oil-tea fruit maturity according to claim 3 is characterized in that: The conveying pipe and the sorting pipe are made of transparent materials.

7. The deep learning-based hyperspectral detection and sorting equipment for camellia fruit maturity according to claim 3 is characterized in that: Each of the static sorting rod and the dynamic sorting rod has a length set to 3050 mm, a maximum diameter set to 50 mm, and a minimum diameter set to 20 mm.