Hami melon pesticide residue qualitative detection method fused with microscopic fluorescence hyperspectral imaging feature information

Through microfluorescence hyperspectral imaging technology, the PLS-DA model is constructed, which solves the limitations of traditional detection methods in microscopic scale analysis, and realizes efficient and accurate detection and identification of pesticide residues in cantaloupe melons.

CN118961612APending Publication Date: 2024-11-15SHIHEZI UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411066155.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Traditional pesticide residue detection methods have limitations in microscopic analysis, and it is difficult to accurately capture the microscopic structure and component changes inside cantaloupe, and the chemical composition recognition ability is limited, especially for compounds that do not produce significant spectral characteristics.

Method used

Microfluorescence hyperspectral imaging technology is used to fuse spectral image features, and a pesticide residue detection model for cantaloupe melon is constructed through the PLS-DA classification model, combining spectral data and image information to achieve non-destructive detection and accurate identification.

Benefits of technology

It improves detection accuracy and efficiency, can provide high spatial resolution spectral information at the microscopic level, enhances chemical composition analysis capabilities, simplifies detection steps, and improves pesticide species identification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118961612A_ABST
    Figure CN118961612A_ABST
Patent Text Reader

Abstract

The invention provides a Hami melon pesticide residue qualitative detection method fused with microscopic fluorescence hyperspectral imaging characteristic information. The method comprises the following steps: (1) selecting Hami melons in a test field, applying different pesticide solutions, and preparing model training samples; (2) acquiring a microscopic fluorescence hyperspectral image of the pesticide residues of the Hami melons; (3) spectrum pretreatment and feature extraction; (4) analyzing image feature correlation; (5) a Hami melon pesticide residue identification model based on fusion spectrum and image feature information; and (6) identifying the pesticide residues of the Hami melons. The Hami melon pesticide residue identification model is constructed by using a microscopic fluorescence hyperspectral imaging technology and a partial least square discriminant analysis algorithm, and a method for fusing spectral features and image features is provided, so that information complementation is realized, and the classification precision is improved. And the identification accuracy of the three pesticide residue types of the Hami melons reaches 93.48%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of pesticide residue detection, and in particular relates to a method for qualitatively detecting pesticide residues in Hami melon by integrating microscopic fluorescence hyperspectral imaging feature information. Background Art

[0002] As a national geographical indication product, Xinjiang Hami melon is favored by consumers for its excellent taste, rich nutrition and unique flavor. However, Hami melon is invaded by whiteflies, powdery mildew and aphids from the fruit setting period to the harvest period, which seriously affects its edible value. At present, these pests and diseases are controlled by pesticides such as cypermethrin, fenpropimorph and acetamiprid. However, excessive use of pesticides will cause food safety problems in Hami melon.

[0003] Traditional methods for detecting pesticide residues include supercritical fluid chromatography (SFC), liquid chromatography (LC), and gas chromatography-mass spectrometry (GC-MS), which have high detection accuracy and sensitivity, but the detection steps are complicated and rely on many chemical reagents. Fluorescence hyperspectral imaging technology uses the fluorescence response of chemical components to achieve rapid screening of pesticide residues. However, it has limitations in microscopic scale analysis and it is difficult to accurately capture the microstructure and composition changes inside agricultural products. Microscopic hyperspectral imaging technology can capture subtle spectral changes at the microscopic level, but the lack of fluorescence characteristics may limit the identification of certain chemical components, especially for those compounds that do not produce significant spectral features.

[0004] In view of the above problems, in the present invention, a qualitative detection method for Hami melon pesticide residues that integrates microscopic fluorescence hyperspectral imaging feature information is proposed by utilizing microscopic fluorescence hyperspectral technology based on spectral image feature fusion. The purpose is to enhance the chemical composition analysis capability of samples and improve the detection accuracy by capturing the spectral data and image information of samples in the microscopic field. Summary of the invention

[0005] The present invention provides a method for qualitative detection of Hami melon pesticide residues by integrating microscopic fluorescence hyperspectral imaging feature information. The main purpose is to construct an identification model that can detect Hami melon pesticide residues by integrating the spectral features and image features of microscopic fluorescence hyperspectral images and using the PLS-DA classification model. The identification model can not only realize non-destructive detection of Hami melon pesticide residues, but also has high detection efficiency and can accurately identify different types of pesticides.

[0006] The present application provides a method for qualitative detection of Hami melon pesticide residues by integrating microscopic fluorescence hyperspectral imaging feature information, comprising the following steps:

[0007] Step 1, select Hami melon samples with regular shape and similar size in the test field, randomly divide them into three groups, spray different pesticide solutions evenly on the surface of each group, freeze-dry after slicing, and store the samples in a -20°C refrigerator for 10-12 hours;

[0008] Step 2: using a microscopic fluorescence hyperspectral imaging system to collect microscopic fluorescence hyperspectral data of Hami melon pesticide residues, and extracting spectral data and image data of the microscopic fluorescence hyperspectral image;

[0009] Step 3, taking the average of the obtained microscopic fluorescence hyperspectral data, and then performing standard normalization SNV preprocessing;

[0010] Step 4: Use the continuous projection algorithm SPA to extract spectral features, and use Pearson correlation analysis to screen strong correlation features in the image data;

[0011] Step 5: The spectral features of the Hami melon samples after feature extraction are spliced ​​with the image features, and the samples are divided into a training set and a test set. The partial least squares discriminant analysis (PLS-DA) model is used for classification, and a discriminant model for qualitative analysis of Hami melon pesticide residues is constructed to identify the types of pesticide residues.

[0012] As a preferred embodiment of the present application, in step 1, the pesticide solution comprises three solutions of cypermethrin, difenoconazole and acetamiprid, and the pesticides and clean water in the three solutions are mixed in a volume ratio of 1:50.

[0013] As a preferred embodiment of the present application, in step 2, the microscopic fluorescence hyperspectral imaging system comprises a box 1 with a blue inner surface, a mercury lamp light source 2, an inverted microscope 4 and a data acquisition terminal 7, wherein an imaging spectrometer is arranged in the box 1. The Hami melon sample is placed on a movable sample stage 3; the mercury lamp light source 2 can adjust the brightness of the imaging spectrometer's field of view; the inverted fluorescence microscope can observe the microscopic fluorescence hyperspectral image of the Hami melon sample on the hand-displacement controlled sample stage 3, and the imaging spectrometer can obtain the microscopic fluorescence hyperspectral data of the Hami melon sample on the displacement controlled sample stage 3; the data acquisition terminal 7 is used to collect and store the microscopic fluorescence hyperspectral data.

[0014] As a preferred solution of the present application, the exposure time of the imaging spectrometer and the magnification of the inverted fluorescence microscope are adjusted to 200 ms and 200× respectively.

[0015] As a preferred solution of the present application, in step 4, SPA extracts characteristic wavelengths by gradually selecting variables that are as orthogonal as possible in space. This method optimizes feature selection and determines the location and number of characteristic wavelengths through a search strategy of projection operation and variable screening. The SPA algorithm for extracting effective wavelengths is specifically as follows:

[0016]

[0017] Among them, x j Represents the original band data in the spectral dataset, x i Indicates the selected characteristic band data. Indicates band x j The transpose of x j Convert the column vector to a row vector. Indicates band x i The transpose of x i The column vector is converted into a row vector, Px j Represents the characteristic band data after projection operation and variable screening by SPA algorithm.

[0018] As a preferred solution of the present application, in step 4, PLS-DA performs classification by establishing a partial least squares regression model between the independent variable matrix (X) and the dependent variable matrix (Y). The classification algorithm of PLS-DA is specifically as follows:

[0019] 1) Center the feature matrix X1 and category matrix Y1 of the modeling set to ensure that the mean of each feature is zero:

[0020]

[0021] in, and are the column mean vectors of X1 and Y1 respectively, and Represents the centered feature matrix and category matrix.

[0022] 2) Perform PLS regression for each category j in Y1 and calculate the weight vector θ j The score vector t j It is derived from the following formula:

[0023] t j =X1θ j

[0024] Load vector p j By the score vector t j The calculation results in:

[0025]

[0026] Compute the residual for class j:

[0027]

[0028] Among them, t j Represents the score vector, which is composed of X1 and weight vector θj It is calculated that p j represents the load vector, which is represented by the score vector t j Calculated. res,j represents the residual of category j, which represents the difference between the data of category j in the original category matrix Y1 and the data of category j predicted by the PLS regression model.

[0029] 3) Use K-fold cross validation to select and adjust model parameters to ensure the generalization ability of the model:

[0030] Randomly divide the entire data set and The model is divided into K mutually exclusive subsets. In each iteration, one subset is set aside as a validation set, and the other k-1 subsets are used as training sets to train the model. Finally, the performance of the model on the validation set is calculated for each iteration.

[0031] 4) Use the weight vector θ j Compute class scores for the training and test sets:

[0032]

[0033] 5) Score according to category a yc , j and a yp , j and the residual ys j Make category attribution judgment and calculate the classification accuracy:

[0034]

[0035]

[0036] Among them, C1 and C2 represent the number of correctly classified samples in the training set and test set, respectively, and n1 and n2 represent the total number of samples in the training set and test set, respectively.

[0037] 6) Identify the gray samples in the results and exclude them from the evaluation, then output the final test category ytes t And classification accuracy CCR and CVR.

[0038] As a preferred embodiment of the present application, in step 2, the microscopic fluorescence hyperspectral data of each Hami melon sample are collected along the equatorial direction, and each Hami melon sample is rotated 90° along the equatorial direction to collect a piece of microscopic fluorescence hyperspectral data, and the specific method of averaging the acquired microscopic fluorescence hyperspectral data includes: first inputting the microscopic fluorescence hyperspectral image into MatlabR2016a software to process the microscopic fluorescence hyperspectral image, selecting the complete fluorescence area in the image as the region of interest ROI, and averaging the ROI area to obtain spectral data.

[0039] As a preferred embodiment of the present application, in step 2, the spectral resolution of the hyperspectral image of the Hami melon sample is obtained to be 6.20 nm, and the spectral range is 400-1000 nm.

[0040] The present application also provides a method for identifying pesticide residues in Hami melon, which is characterized by comprising the following steps:

[0041] 1) Prepare a Hami melon slice sample to be tested, use a line-by-line scanning mode in a microscopic fluorescence hyperspectral imaging system to obtain a microscopic fluorescence hyperspectral image of the Hami melon slice sample to be tested, extract spectral data and image data of the microscopic fluorescence hyperspectral image, and perform SNV preprocessing on the spectral data; use the Pearson correlation analysis method to extract the four most correlated features from the nine image features;

[0042] 2) inputting the data after the fusion of the spectrum and the image, and using the identification model constructed in the method for constructing a Hami melon pesticide residue identification model according to any one of claims 1 to 9 to analyze and identify the data after the fusion of the spectrum and the image;

[0043] 3) Output the identification results of pesticide residues in Hami melon.

[0044] Compared with the prior art, the advantage of the Hami melon pesticide residue identification method and the identification model construction method in the present application is that the microscopic fluorescence hyperspectral imaging technology is used to obtain the microscopic fluorescence hyperspectral data of different pesticide residues of Hami melon. Since the spectral reflectance of different types of pesticide residues is slightly different, but the change trend of the spectral curve is similar, it is not only convenient for the subsequent identification of the types of Hami melon pesticide residues, but also the steps are concise and time-consuming compared with the chemical detection method. Secondly, the technology can provide spectral information with high spatial resolution at the microscopic level, increase the diversity of the identification model detection and improve the detection accuracy of the identification model. At the same time, the spectral features screened by SPA are fused with the image features obtained by Pearson correlation analysis, which increases the dimension of the data set and can more comprehensively describe the characteristics of the Hami melon pesticide residue sample. Therefore, the fusion spectrum feature data is input into the PLS-DA classification model to obtain the optimal solution, and the optimal solution can be used to construct a classification accuracy and a higher identification model with higher detection accuracy. In this way, when the identification model is used to detect Hami melon pesticide residues, the detection accuracy and the identification accuracy of the pesticide types can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a flow chart of the method for constructing an identification model provided in Example 1 of the present invention.

[0046] Figure 2This is a schematic diagram of the structure of the microscopic fluorescence hyperspectral imaging system provided in Example 1 of the present invention.

[0047] Figure 3 This is a Pearson correlation analysis diagram of image features provided in Example 1 of the present invention.

[0048] Figure 4 A schematic diagram of the confusion matrix of the classification results using the PLS-DA, ELM, and KNN classification models provided in the first embodiment of the present invention.

[0049] Figure numerals: 1. box, 2. mercury lamp light source, 3. displacement-controlled sample stage, 4. inverted microscope, 5. eyepiece, 6. coarse (fine) focusing screw, 7. data acquisition terminal (7). DETAILED DESCRIPTION

[0050] The present invention will be further described in detail below in conjunction with specific implementations and with reference to the accompanying drawings. It should be emphasized that the following description is merely exemplary and is not intended to limit the scope of the present invention and its application.

[0051] The purpose of the present invention is to provide a method for qualitative detection of pesticide residues in Hami melon using microscopic fluorescence hyperspectral imaging technology. Microscopic fluorescence hyperspectral data of highly effective cypermethrin, difenoconazole and acetamiprid pesticide residues in Hami melon were collected using microscopic fluorescence hyperspectral imaging technology, and spectral information and image information were extracted to form a qualitative spectral data set of Hami melon pesticide residues. In order to optimize the classification results of the model, the best spectral features selected by the SPA method were fused with the image features obtained by Pearson correlation analysis. The results show that based on the fused data set, PLS-DA produces the best results in all performance evaluation indicators (specificity, sensitivity, precision and accuracy).

[0052] Step 1, collecting Hami melon pesticide residue microfluorescence hyperspectral data, extracting spectral feature data and image feature data, and forming a Hami melon pesticide residue qualitative spectral data set;

[0053] In this embodiment, Hami melon sprayed with high-efficiency cypermethrin, difenoconazole, and acetamiprid is used as an example to illustrate that the qualitative spectral data set can be obtained by the following steps:

[0054] Step 1.1: 120 Hami melons were selected from the Hami melon experimental field (Xizhou Mi No. 17) in Paotai Town, Shihezi City, and divided into 3 groups on average; highly effective cypermethrin (active ingredient content of 4.5%, emulsifiable concentrate, Jiangsu Yixing Xingnong Chemical Products Co., Ltd.), difenoconazole (active ingredient content of 20%, microemulsion, Chengdu Kaililong Biochemistry Co., Ltd.) and acetamiprid (active ingredient content of 70%, water dispersible granules, Shandong Baixin Biotechnology Co., Ltd.) were purchased from Wanxiang Agricultural Products Market in Shihezi City as experimental drugs. During the fruit setting and fruit expansion period of Hami melon, the three pesticide aqueous solutions with a volume ratio of 1:50 were sprayed every 5 days, with a spraying volume of 8 ml each time, and a total of 7 sprays. At the eight-point ripe stage, 92 samples with regular shapes and uniform sizes were selected from the Hami melons treated with pesticides, including 29 samples treated with highly effective cypermethrin, 30 samples treated with difenoconazole and 33 samples treated with acetamiprid. All cantaloupe samples were dried naturally in a well-ventilated indoor environment for 10-12 hours.

[0055] Step 1.2: The Hami melon samples obtained above were sliced, and the slices were located 6 mm below the Hami melon skin, with a size of 2.5×5×0.8 cm. One slice was cut along the equator every 90 degrees, and each Hami melon sample could produce 4 slices, with a total of 368 slices as experimental materials. Freeze drying was performed using a freeze dryer (model: ChristAlpha1-2LDplus, Suzhou Synes Instrument Co., LTD), the cold trap temperature was set to -45°C, and the cooling rate reached -50°C in 0.8 hours. The vacuum process transitioned from atmospheric pressure to 15 Pa, and the freezing time was 10 hours. Finally, all samples were numbered and stored in a refrigerator (model: BCD-260WTPZM (E), Hefei Midea Refrigerator Co., LTD.), the temperature was set to -20°C, and the refrigeration time was 10-12 hours.

[0056] Step 2.1: For each cantaloupe slice sample, collect microscopic fluorescence hyperspectral data once. After all samples are collected, a total of 368 microscopic fluorescence hyperspectral spectral data are obtained.

[0057] Step 2.2: Input the microscopic fluorescence hyperspectral data into Matlab R2016a software to process the microscopic fluorescence hyperspectral data, select the complete fluorescence area as the ROI area, and average the ROI area to obtain the spectral data.

[0058] Step 2.3: Input the microscopic fluorescence hyperspectral data into Matlab R2016a software for processing, select the complete fluorescence area as the ROI area, and use the color statistics method to extract the RGB, HSV and Lab mean of the pixels in the ROI area to obtain 9 color features of the pesticide residue area of ​​Hami melon.

[0059] Step 3: For the collected spectra of cantaloupe pesticide residues, standard normal variable transformation is used to eliminate the effects of solid particle size, surface scattering, and optical path length change on the spectrum. The standard normal variable transformation formula is:

[0060]

[0061] Where x is the original spectral data, m is the number of wavelength points, k = 1, 2, ..., m, and x0 is the spectral data obtained after maximum and minimum normalization processing.

[0062] Step 4: Select SPA as the spectral feature extraction method and use Pearson correlation analysis as a method to screen strong correlation features in image data. The specific steps are as follows:

[0063] Step 4.1, SPA is used as the spectral feature extraction method of the optimization algorithm. SPA is an efficient optimization algorithm that gradually eliminates the collinearity in the vector space, thereby extracting key characteristic wavelengths in the full band range, thereby reducing the redundant information in the original spectral data. Compared with the commonly used optimization algorithms, the continuous projection algorithm SPA has the advantages of simple calculation, easy implementation, stable convergence, etc., and can find the approximate optimal solution to the problem in a short time. This embodiment selects SPA to extract characteristic wavelengths from the input spectral image data, which can significantly reduce the collinearity between variables, thereby improving the accuracy of the model.

[0064] In this step, the SPA algorithm for extracting characteristic wavelengths is specifically as follows:

[0065] First, initialize the selection variable counter n = 1, and then select the initial band x from the spectral data set χ j Next, construct a set S containing all unselected bands. For each band x in the set S j , calculate its difference with the selected band x i The projection map Px j , the formula is:

[0066]

[0067] Among them, x j Represents the original band data in the spectral dataset, x iRepresents the selected characteristic band data, Represents band x j The transpose of, that is, converting the column vector of x j Into a row vector. Represents band x i The transpose of, that is, converting the column vector of x i Into a row vector, Px j Represents the characteristic band data after projection operation and variable screening by the SPA algorithm.

[0068] In the set S, select the band k(n) with the maximum projection length, which is determined by the following formula:

[0069]

[0070] Then, update the band data to the corresponding projection mapping Px j , and increment the selected variable counter n. If n < N, return to step 2 to continue selecting a new band. When the counter n reaches N, stop the iteration, and finally determine the selected band sequence {k(n); n = 0, …, N - 1}.

[0071] Step 4.2: Select Pearson correlation analysis as the method for screening strongly correlated features in the image data. Pearson correlation coefficient analysis reveals the relationship between two variables by calculating the degree of linear correlation between them. The value range of the Pearson correlation coefficient is from -1 to 1, where 1 represents perfect positive correlation, -1 represents perfect negative correlation, and 0 means no linear correlation. The advantage of this method lies in its intuitiveness and ease of understanding, which can help identify highly correlated features, thereby removing redundancy in the feature extraction and dimensionality reduction processes and improving the efficiency and accuracy of the model. In this embodiment, by analyzing the correlation between 9 color features, the correlation coefficients between V and B, and between L and G channels are both 0.98, showing a high degree of positive correlation, that is, G, B, V, and L are selected as the image color feature combination.

[0072] In step 5, fuse the spectral data of the cantaloupe samples after feature extraction by the SPA algorithm and the image data after Pearson correlation analysis, and divide the fused data into a test set and a training set. Among them, the number of cantaloupe samples in the test set and the training set is 3:1. That is, among 368 pieces of fused data, there are 276 pieces in the training set and 92 pieces in the test set.

[0073] In step 5, PLS-DA is selected as the classification model. PLS-DA is a data analysis technology widely used in the field of hyperspectral image processing. This method is based on partial least squares regression and realizes dimensionality reduction and classification of data by constructing a linear model between a feature matrix and a response variable. It is particularly suitable for data classification problems with high feature dimensions and large intra-class differences. It has been found that the K nearest neighbor (KNN) algorithm is based on similarity measurement and is classified by a majority voting mechanism. It is suitable for classification problems with low feature dimensions and uniform data distribution, but it is less efficient when processing large data sets. The extreme learning machine (ELM) algorithm is a fast single hidden layer feedforward neural network, which is suitable for large-scale data sets and occasions that require rapid training, but it may be necessary to adjust parameters to obtain optimal performance. Therefore, this embodiment has been determined to select the PLS-DA algorithm with better classification performance as the classification model.

[0074] The present embodiment has been found through research that, compared with the PLS-DA classification model constructed from hyperspectral data after multivariate scatter correction (MSC) and smoothing filter (SG) preprocessing, the PLS-DA model constructed from hyperspectral data after SNV preprocessing has better classification effect and higher model accuracy (82.25%). Therefore, the present embodiment is suitable for preprocessing the microscopic fluorescence hyperspectral data of pesticide residues in Hami melon samples using the SNV preprocessing method, and the PLS-DA model constructed from the microscopic fluorescence hyperspectral data preprocessed by this preprocessing method has a higher classification accuracy.

[0075] At the same time, the present embodiment has been found through research that the full band (FS), competitive adaptive reweighting algorithm (CARS) are used to extract characteristic wavelengths, the genetic algorithm (GA) is used to extract characteristic wavelengths, and the SPA is used to extract characteristic wavelengths. Based on the spectral features obtained by the above methods, three classification models of PLS-DA, ELM and KNN are used for classification, that is, the final 12 identification models are compared. The SPA-PLS-DA model shows the best recognition result, achieving 89.35% and 86.99% accuracy on the training and test sets, respectively. Compared with the full spectrum information modeling, the accuracy is improved by 1.75%. Therefore, the present embodiment is suitable for extracting features from the microscopic fluorescence hyperspectral data of pesticide residues in Hami melon samples using the SPA feature extraction method, and the PLS-DA model constructed using the microscopic fluorescence hyperspectral data of the feature extraction method has a high classification accuracy.

[0076] In this step, PLS-DA performs classification by establishing a partial least squares regression model between the independent variable matrix (X) and the dependent variable matrix (Y). The PLS-DA classification algorithm is as follows:

[0077] 1) Center the feature matrix X1 and category matrix Y1 of the modeling set to ensure that the mean of each feature is zero:

[0078]

[0079] in, and are the column mean vectors of X1 and Y1 respectively, and Represents the centered feature matrix and category matrix.

[0080] 2) Perform PLS regression for each category j in Y1 and calculate the weight vector θ j The score vector t j It is derived from the following formula:

[0081] t j =X1θ j

[0082] Load vector p j By the score vector t j The calculation results in:

[0083]

[0084] Compute the residual for class j:

[0085]

[0086] Among them, t j Represents the score vector, which is composed of X1 and weight vector θ j It is calculated that p j represents the load vector, which is represented by the score vector t j Calculated. res,j represents the residual of category j, which represents the difference between the data of category j in the original category matrix Y1 and the data of category j predicted by the PLS regression model.

[0087] 3) Use 10-fold cross validation to select and adjust model parameters to ensure the generalization ability of the model:

[0088] Randomly divide the entire data set and The model is divided into K mutually exclusive subsets. In each iteration, one subset is set aside as the validation set, and the other 9 subsets are used as training sets to train the model. Finally, the performance of the model on the validation set is calculated for each iteration.

[0089] 4) Use the weight vector θ j Compute class scores for the training and test sets:

[0090]

[0091] 5) Score according to category ayc , j and a yp , j and the residual ys j Make category attribution judgment and calculate the classification accuracy:

[0092]

[0093]

[0094] Among them, C1 and C2 represent the number of correctly classified samples in the training set and test set, respectively, and n1 and n2 represent the total number of samples in the training set and test set, respectively.

[0095] 6) Identify the gray samples in the results and exclude them from the evaluation, then output the final test category y test And classification accuracy CCR and CVR.

[0096] The embodiment of the present invention relates to a classification model that integrates spectral features and image features, which is used to test the classification performance of the PLS-DA model. Specifically, this embodiment integrates 67 spectral information features extracted by the SPA algorithm and 4 color features extracted by correlation analysis, and uses three classification models of PLS-DA, ELM and KNN to process the data. The method uses 368 microscopic fluorescence hyperspectral data as training and test data sets, and other conditions are the same.

[0097] See Table 1 for the final classification accuracy results of the three models provided in this embodiment.

[0098] Table 1

[0099]

[0100] As shown in Table 1, the PLS-DA model of fused data used in the present invention shows excellent accuracy performance on the training set and the test set. Specifically, the accuracy of the PLS-DA model on the training set ranges from 91.58% to 100%, and the accuracy on the test set ranges from 90% to 100%. The model not only analyzes the correlation between the test variables and the response variables, but also considers the relationship between the test variables, and can effectively classify when there are multiple covariates or highly correlated test variables. Compared with the ELM model and the KNN model, the PLS-DA model using fused feature data performs best in terms of accuracy, specificity, sensitivity and precision. This result confirms that the PLS-DA model constructed by combining image and spectral information has significant advantages over the single spectral model.

[0101] In this embodiment, in order to demonstrate the superiority of the PLS-DA classification model based on the fusion of spectral features and image features in overall performance, Figure 4 The classification results of three classification models - PLS-DA, ELM and KNN - established using a test set of 92 microfluorescence hyperspectral data are shown. Figure 4 middle, Figure 4 a shows the confusion matrix of the PLS-DA classification model. Figure 4 b shows the confusion matrix of the ELM model, while Figure 4 c shows the confusion matrix of the KNN model.

[0102] In this Figure 4 In the figure, 1 on the horizontal and vertical axes represents the high-efficiency cypermethrin sprayed on Hami melon, 2 represents the difenoconazole sprayed on Hami melon, and 3 represents the acetamiprid sprayed on Hami melon. In terms of overall recognition ability, the PLS-DA model performs relatively stably with fewer classification errors, among which there are a few misclassifications between high-efficiency cypermethrin and acetamiprid; the ELM model has a large error in the classification of acetamiprid, with 5 misclassifications as difenoconazole; the KNN model has a high misclassification rate in the classification of difenoconazole, with 4 misclassifications as acetamiprid, but performs better in the classification of high-efficiency cypermethrin. The experimental results show that the classification accuracy of the PLS-DA model is higher than that of the ELM model and the KNN model, and it has a good classification accuracy for different types of pesticide residues, and can be used for the identification of pesticide residues in Hami melon.

[0103] In summary, this embodiment uses microfluorescence hyperspectral technology to collect spectrum and image data of Hami melon under different pesticide residue conditions. The obtained data is analyzed by PLS-DA model, showing that both the training set and the test set have a high accuracy of 91.58% to 100%. This model not only analyzes the correlation between the test variable and the response variable, but also considers the relationship between the test variables, effectively processing multivariate and highly correlated data sets. The results show that the fusion of spectrum and image data significantly enhances the sample characteristics, thereby improving the accuracy of the model. The PLS-DA model that fuses spectrum and image data performs well in accuracy, specificity, sensitivity and precision, and is suitable for constructing a higher classification and detection accuracy identification model, especially in Hami melon pesticide residue detection, which can improve the detection and identification accuracy.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the above embodiments describe the present invention in detail, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some of the technical features therein with equivalents. These modifications or replacements will not essentially deviate the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information, characterized in that: The steps include: Step 1, select Hami melon samples with regular shape and similar size in the test field, randomly divide them into three groups, spray different pesticide solutions evenly on the surface of each group, freeze-dry after slicing, and store the samples in a -20°C refrigerator for 10-12 hours; Step 2: using a microscopic fluorescence hyperspectral imaging system to collect microscopic fluorescence hyperspectral data of Hami melon pesticide residues, and extracting spectral data and image data of the microscopic fluorescence hyperspectral image; Step 3, taking an average of the obtained microscopic fluorescence hyperspectral data, and then performing normalized SNV preprocessing; Step 4: Use the continuous projection algorithm SPA to extract spectral features, and use Pearson correlation analysis to screen strong correlation features in the image data; Step 5: The spectral features of the Hami melon samples after feature extraction are spliced ​​with the image features, and the samples are divided into a training set and a test set. The partial least squares discriminant analysis (PLS-DA) model is used for classification, and a discriminant model for qualitative analysis of Hami melon pesticide residues is constructed to identify the types of pesticide residues.

2. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information as claimed in claim 1, characterized in that: The step 1 is specifically implemented according to the following steps: Step 1.1, the spraying time is from the 16th day after Hami melon fruit setting to the 25th day after fruit expansion, spraying once every 5 days, and a total of 7 sprayings are completed; Step 1.2, the applied pesticide solution includes cypermethrin, difenoconazole and acetamiprid, and the volume ratio of the pesticide to clean water is 1:

50. The Hami melon sample is sliced ​​at 6 mm below the skin, and one slice is cut every 90° along the equatorial direction; Step 1.3: The cut Hami melon pesticide residue samples were processed by freeze drying and stored in a -20°C refrigerator for 10-12 hours.

3. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information as claimed in claim 1, characterized in that: In step 2, the microscopic fluorescence hyperspectral imaging system comprises a box 1 with a blue inner surface, a mercury lamp light source 2, an inverted microscope 4 and a data acquisition terminal 7, wherein an imaging spectrometer is arranged in the box 1. The cantaloupe sample is placed on a movable sample stage 3; the mercury lamp light source 2 can adjust the brightness of the imaging spectrometer's field of view; the inverted fluorescence microscope can observe the microscopic fluorescence hyperspectral image of the cantaloupe sample on the hand-displacement controlled sample stage 3, and the imaging spectrometer can obtain the microscopic fluorescence hyperspectral data of the cantaloupe sample on the displacement controlled sample stage 3; the data acquisition terminal 7 is used to collect and store the microscopic fluorescence hyperspectral data.

4. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information as claimed in claim 3, characterized in that: The exposure time of the spectral camera was adjusted to 200 ms, and the distance between the objective lens of the inverted microscope and the sample was 0.05-0.1 mm.

5. The method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information according to claim 1, characterized in that: In step 3, the spectral data are converted into a standard normal distribution form using the SNV preprocessing method to eliminate the scattering effect and enhance the spectral characteristics.

6. The method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information according to claim 1, characterized in that: In step 4, SPA is used as a spectral feature extraction method, and the Pearson correlation analysis method is adopted to extract the four features with the strongest correlation from the nine image features.

7. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information, characterized in that: The step 5 is specifically implemented according to the following steps: The spectral feature data and image feature data were combined using the feature splicing method, and the processed data were randomly allocated into training sets and test sets in a ratio of 3:1 for model training and evaluation.

8. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information as claimed in claim 3, characterized in that: In step 4, SPA extracts characteristic wavelengths by gradually selecting variables that are as orthogonal as possible in space. This method optimizes feature selection and determines the location and number of characteristic wavelengths through a search strategy of projection operation and variable screening. The specific algorithm for extracting effective wavelengths by SPA is: Among them, x j Represents the original band data in the spectral dataset, x i Indicates the selected characteristic band data. Indicates band x j The transpose of x j Convert the column vector to a row vector. Indicates band x i The transpose of x i The column vector is converted into a row vector, Px j Represents the characteristic band data after projection operation and variable screening by SPA algorithm.

9. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information as claimed in claim 3, characterized in that: In step 5, PLS-DA performs classification by establishing a partial least squares regression model between the independent variable matrix (X) and the dependent variable matrix (Y). The PLS-DA classification algorithm is as follows: 1) Center the feature matrix X1 and category matrix Y1 of the modeling set to ensure that the mean of each feature is zero: in, and are the column mean vectors of X1 and Y1 respectively, and Represents the centered feature matrix and category matrix. 2) Perform PLS regression for each category j in Y1 and calculate the weight vector θ j The score vector t j It is derived from the following formula: t j =X1θ j Load vector p j By the score vector t j The calculation results in: Compute the residual for class j: Among them, t j Represents the score vector, which is composed of X1 and weight vector θ j It is calculated that p j represents the load vector, which is represented by the score vector t j Calculated. res,j represents the residual of category j, which represents the difference between the data of category j in the original category matrix Y1 and the data of category j predicted by the PLS regression model. 3) Use K-fold cross validation to select and adjust model parameters to ensure the generalization ability of the model: Randomly divide the entire data set and The model is divided into K mutually exclusive subsets. In each iteration, one subset is set aside as a validation set, and the other k-1 subsets are used as training sets to train the model. Finally, the performance of the model on the validation set is calculated for each iteration. 4) Use the weight vector θ j Compute class scores for the training and test sets: 5) Score according to category a yc,j and a yp,j and the residual ys j Make category attribution judgment and calculate the classification accuracy: Among them, C1 and C2 represent the number of correctly classified samples in the training set and test set, respectively, and n1 and n2 represent the total number of samples in the training set and test set, respectively. 6) Identify the gray samples in the results and exclude them from the evaluation, then output the final test category y test And classification accuracy CCR and CVR.

10. The method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information as claimed in claim 1, characterized in that: The specific method for extracting spectral data of the hyperspectral image included in step 2 is: first, the microscopic fluorescence hyperspectral image is imported into Matlab R2016a software for processing, the complete fluorescence area in the image is selected as the region of interest, and an average operation is performed on the region of interest to obtain spectral data.

11. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information as claimed in claim 1, characterized in that: In step 2, the spectral resolution of the microscopic fluorescence hyperspectral image of the cantaloupe sample is 6.20 nm, and the spectral range is 400-1000 nm.

12. A method for qualitative detection of Hami melon pesticide residues integrating microscopic fluorescence hyperspectral imaging feature information, characterized in that: The specific steps include: 1) Prepare cantaloupe slice samples to be tested, and obtain microscopic fluorescence hyperspectral images of the samples to be tested in a microscopic fluorescence hyperspectral imaging system in a line-by-line scanning mode. Extract spectral data and image data of the microscopic fluorescence hyperspectral image, perform SNV preprocessing on the spectral data, and use the SPA algorithm to extract features from the preprocessed spectral data; use the Pearson correlation analysis method to extract the 4 most correlated features from the 9 image features; 2) inputting the fused spectrum and image feature data, and analyzing and detecting the fused feature data using the method for constructing a Hami melon pesticide residue identification model described in any one of claims 1 to 11; 3) Output the identification results of pesticide residues in Hami melon.

Citation Information

Cited By

  • Intelligent automatic pesticide residue detection method

    CN119715490A

  • Soybean grain single-band image classification method and system based on deep learning

    CN119904707A

  • Carbon quantum dot, preparation method, detection method and application of XGBoost in identification of Tongxikang components

    CN120349318A