Aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net
By combining differential Raman spectroscopy and the SE-Res2Net neural network model, the problem of conventional Raman spectroscopy being interfered during detection is solved, efficient identification of aflatoxin is achieved, and detection accuracy and feature extraction capabilities are enhanced.
Patent Information
- Application Number
- CN202410093578.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-23
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-01-23
AI Technical Summary
Conventional Raman spectroscopy is affected by ambient light, fluorescence and background noise during detection, resulting in limitations in detection and identification, especially in the detection of trace substances.
Combining differential Raman spectroscopy and the SE-Res2Net neural network model, the interference signal is removed through differential processing and feature extraction modules, the characteristic peaks of the Raman spectrum are enhanced, and the detection accuracy is improved through the gating mechanism and multi-scale feature extraction.
It effectively removes interference in Raman spectrum, improves detection accuracy, enhances the detection ability of characteristic peaks, and achieves rapid and efficient identification of aflatoxin.
Smart Images

Figure CN118090699B
Abstract
Description
Technical Field
[0001] The present invention relates to differential Raman spectroscopy technology, and in particular to a method for detecting aflatoxin by combining differential Raman spectroscopy and SE-Res2Net. Background Art
[0002] Aflatoxin is widely present in nature. Foods such as cereals, dairy products and nuts are prone to aflatoxin contamination during production, processing and transportation. Among them, aflatoxin B1 is known as the most toxic natural carcinogen, and the World Health Organization classifies it as a Class I carcinogen. Existing aflatoxin detection methods include thin layer chromatography (TLC), high performance liquid chromatography (HPLC), enzyme linked immunosorbent assay (ELISA) and methods combining immunology with instruments. Although these methods have good performance in sensitivity and accuracy, they are complicated to operate and time-consuming. Therefore, it is of great significance to study faster and more efficient detection methods for aflatoxin.
[0003] Raman spectroscopy is an advanced non-invasive detection technology with many advantages such as simple operation, rapidity and non-destructive testing. It can quickly realize qualitative and quantitative detection and analysis of samples, and has been widely studied in the analysis and detection of agricultural products and food. However, conventional Raman spectroscopy is usually subject to a lot of interference during detection, and the scattering intensity of the signal is also affected by ambient light, fluorescence and background noise. The Raman intensity directly stripped from the environmental background is not accurate, resulting in certain limitations in detection and identification, especially for the detection of trace substances.
[0004] In recent years, deep learning has been able to learn multi-level representation features from a large amount of raw data with its flexible architecture and efficient algorithms, and has achieved good performance in many fields such as computer vision, natural language processing, and speech recognition. Similarly, deep learning can also be used in the field of material identification, combining differential Raman spectroscopy to detect aflatoxin. Summary of the invention
[0005] The purpose of the present invention is to solve the problem that conventional Raman spectroscopy is subject to a lot of interference during detection, and the scattering intensity of the signal is affected by ambient light, fluorescence and background noise, resulting in limitations in detection and identification. A method for detecting aflatoxin combining differential Raman spectroscopy and SE-Res2Net is proposed.
[0006] In order to achieve the above object, the technical solution provided by the present invention is:
[0007] The aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net comprises:
[0008] The differential Raman spectra of the test objects containing aflatoxin and not containing aflatoxin are measured, and the differential Raman spectra of the test objects are used as training sets;
[0009] Build the SE-Res2Net neural network model and initialize the parameters of the SE-Res2Net neural network model;
[0010] The differential Raman spectrum of aflatoxin and the differential Raman spectrum of the object to be tested are respectively input into two feature extraction modules of the SE-Res2Net neural network model to extract feature maps, and the extracted feature maps are spliced to obtain a feature map X;
[0011] Input feature map X into the Res2Net module of the SE-Res2Net neural network model to obtain feature map Y5;
[0012] Input the feature map Y5 into the SE module of the SE-Res2Net neural network model to obtain the feature map f′;
[0013] Connect the feature map X to the feature map f′ through skip connection to obtain the feature map f;
[0014] The feature graph f is passed through the output module of the SE-Res2Net neural network model to obtain the probability of whether the object to be tested contains aflatoxin, and the parameters of the SE-Res2Net neural network model are updated according to the probability to complete the training of the SE-Res2Net neural network model;
[0015] A mixture solution containing aflatoxin and a mixture solution not containing aflatoxin were prepared, and the differential Raman spectra of the mixture solutions were measured as a validation set, and the validation set was identified using the trained SE-Res2Net neural network model.
[0016] Furthermore, the differential Raman spectra of the test object containing aflatoxin and not containing aflatoxin are measured, including:
[0017] Two original Raman spectra of the same object are collected by using two excitation wavelengths with a known slight wavelength offset;
[0018] Preprocessing two sets of original Raman spectral data to obtain two sets of preprocessed spectra;
[0019] Performing differential processing on the two pre-processed spectra to obtain a differential image and the intensity value of the differential image;
[0020] The intensity value of the to-be-reconstructed Raman spectrum is initialized to 0, the intensity value of the differential image is added to the intensity value of the to-be-reconstructed Raman spectrum with a displacement difference of Δv, and the to-be-reconstructed Raman spectrum is updated to obtain a differential Raman spectrum.
[0021] Furthermore, the preprocessing includes denoising and smoothing, normalization, baseline correction and removal of abnormal samples.
[0022] Furthermore, the differential processing is expressed by the following formula:
[0023] D(v)=R1(v)-R2(v)
[0024] Wherein, R1(v) and R2(v) represent the Raman light intensities of the two preprocessed spectra at wave number v, respectively, and D(v) represents the intensity value of the difference image obtained after subtraction.
[0025] Furthermore, the step of inputting the feature map X into the Res2Net module of the SE-Res2Net neural network model to obtain the feature map Y5 includes:
[0026] The feature map X passes through a 2D convolution layer, which divides the feature map X into 4 groups, denoted as X1, X2, X3 and X4 respectively;
[0027] Convolution operations are performed on feature maps X2, X3, and X4 respectively, and the convolution operation is denoted as K i (), the four feature maps Y i It can be expressed by the following formula:
[0028]
[0029] Among them, Y i represents the feature map obtained after the feature map X1, feature map X2, feature map X3 and feature map X4 are processed accordingly, i∈[1,4], X i represents the i-th group of feature maps divided into feature maps X, K i (X i ) indicates that in the i-th group, the feature map X i Perform convolution operation, It means that the output Y of the convolution operation of the i-1th group is first i-1 and door a i-1 Multiply by channel, and then add the result to the feature map X in the i-th group i Add, and perform convolution operation on the result of the addition.
[0030] The feature map Y i After concatenation, the output layer of the Res2Net module is input to obtain the feature map Y5, which can be expressed by the following formula:
[0031] Y5=ReLU(BN(Conv1(CAT(Y1, Y2, Y3, Y4))))
[0032] Among them, Y5 represents the output of the Res2Net module, CAT represents the concatenation operation, Conv1 represents the one-dimensional convolution operation, BN represents the normalization operation, and ReLU represents the ReLU function.
[0033] Furthermore, the feature maps obtained after the convolution operation of the second and third groups of feature maps are firstly extracted by average pooling, and then transformed by the fully connected layer and the Sigmoid function to obtain the gate a i-1 , which can be expressed as follows:
[0034] a i-1 =Sigmoid(FC(Avg(Y i-1 )))
[0035] Among them, i∈[3, 4], Avg represents average pooling, FC represents the fully connected layer, and Sigmoid represents the Sigmoid function.
[0036] Furthermore, the feature map Y5 is input into the SE module of the SE-Res2Net neural network model to obtain the feature map f′, including:
[0037] Use global average pooling to compress feature map Y5 to obtain feature map Y′5;
[0038] The feature map Y′5 passes through the fully connected layer, ReLU function, fully connected layer and Sigmoid activation function in sequence to obtain the channel weight vector f c ;
[0039] The channel weight vector f c Cross-multiply with the feature map Y5 to obtain the output feature map f′ of the SE module.
[0040] Furthermore, the output module includes a ReLU function and two fully connected layers, wherein a dropout operation is used in the training phase.
[0041] Compared with the prior art, the present invention has the following significant advantages: 1. Differential Raman spectroscopy can effectively remove interference caused by fluorescence, ambient light, etc. in Raman spectra based on a combination of physical principles, software and algorithms, enhance characteristic peaks in Raman spectra, and further improve detection accuracy. 2. The Res2Net module groups feature channels and obtains hierarchical connections in the form of filter groups to obtain finer receptive fields of multiple granularities and extract multi-scale features. 3. The SE module is embedded in the residual connection to adaptively recalibrate the feature responses between channels and improve the performance of the Res2Net module. 4. A gating mechanism is added on the basis of the Res2Net module to dynamically select channel features according to the input, select channels with strong correlation with spectral characteristic peaks, suppress channels with weaker correlation, and finely control the features. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a network architecture of aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net of the present invention;
[0043] Figure 2 is a flow chart of the present invention for training the SE-Res2Net neural network model;
[0044] Figure 3 It is a Res2Net module structure diagram of the present invention;
[0045] Figure 4 It is the SE module structure diagram of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0047] The present invention provides a method for detecting aflatoxin by combining differential Raman spectroscopy and SE-Res2Net, which specifically comprises the following steps:
[0048] 1) The differential Raman spectra of the test object containing aflatoxin and the test object without aflatoxin are measured, and the differential Raman spectra of the test object are used as a training set, which specifically includes the following steps:
[0049] (11) Aflatoxin with different contents (including 0 content) is dissolved in different substances, i.e., the test objects, and two excitation wavelengths with a known slight wavelength shift (e.g., 784 nm and 785 nm) are used to obtain two sets of original Raman spectrum data of the same test object.
[0050] (12) The raw Raman spectral data is preprocessed by first performing denoising, smoothing, normalization, and baseline correction. The baseline correction can align the obtained spectral baseline to effectively reduce the impact of environmental noise on the Raman spectrum. Then, the spectral outliers are eliminated by removing abnormal samples, thereby improving the accuracy of the detection model.
[0051] (13) Perform differential processing on the two pre-processed spectra obtained in the previous step to obtain a differential image. The differential processing formula is as follows:
[0052] D(v)=R1(v)-R2(v)#(1)
[0053] Wherein, R1(v) and R2(v) represent the Raman light intensities of the two pre-processed spectra at wave number v, respectively, and D(v) represents the intensity value of the difference image obtained after subtraction.
[0054] Then, the intensity value D(v) of the differential image is added to the intensity value R(v-Δv) of the differential Raman spectrum to be reconstructed with a displacement difference of Δv to update the differential Raman spectrum to be reconstructed. The spectrum produced by irradiating the same material with different wavelengths has an offset, and the displacement difference refers to this offset. Before adding, the intensity values of the differential Raman spectrum to be reconstructed need to be initialized to 0:
[0055] R(v)=D(v)+R(v-Δv)#(2)
[0056] After the above operation, the differential Raman spectrum can be obtained. The above operation is the conventional operation of the shift differential Raman spectroscopy (SERDS), which will not be described in detail in this article.
[0057] 14) The differential Raman spectra of the objects to be tested are measured as training sets, of which the positive spectra (containing aflatoxin) and the negative spectra (not containing aflatoxin) each account for half.
[0058] 2) See Figure 1 , build the SE-Res2Net neural network model, set parameters, and perform training. The entire training process of the SE-Res2Net neural network model is as follows Figure 2 shown.
[0059] (21) The entire SE-Res2Net neural network model can be divided into three parts: The first part consists of two one-dimensional convolutional networks and a feature concatenation layer. The size of each one-dimensional convolutional network is 7*1*16. The input data are the differential Raman spectra of aflatoxin and the analyte, respectively, with a data size of 1753*1. Features are extracted through these two one-dimensional convolutional networks, and then the two extracted 16 features are concatenated to obtain a feature map X of 32 features.
[0060] The two inputs use a Siamese neural network structure, where the spectral pair is input into two basic networks, and then the output features of the two networks are concatenated as the subsequent input. This network structure is trained to compare two inputs and a loss function.
[0061] The second part uses the SE-Res2Net module for feature extraction, which includes a Res2Net module and a SE module. Figure 3 The Res2Net module structure, the first part of the feature map X first passes through a 2D convolution layer with a convolution kernel size of 1*1, and then the feature map X is divided into 4 groups, respectively denoted as X1, X2, X3, and X4. Except for X1, each group of feature maps will undergo a 3*3 convolution, and the convolution operation is denoted as K i (), i∈[1,4]. In addition to X1 and X2, the feature map X of the i-th group i First, with the previous group K i-1 () output, and the result after addition is K i () operation. The above operation can be expressed by the following formula:
[0062]
[0063] Among them, Y i It represents the feature map obtained after the feature map X1, feature map X2, feature map X3 and feature map X4 are processed accordingly, X i Represents the i-th group of feature maps into which the feature map X is segmented.
[0064] The gating mechanism first extracts key features through average pooling, and then converts them through a fully connected layer with a Sigmoid function to obtain the gate a. i-1 :
[0065] a i-1 =Sigmoid(FC(Avg(Y i-1 )))#(4)
[0066] Among them, i∈[3, 4], Avg represents average pooling, FC represents the fully connected layer, and Sigmoid represents the Sigmoid function.
[0067] The Res2Net module uses a residual connection between feature groups. This residual connection is achieved by direct addition between channels. However, the importance of each channel is different. Channel features should be dynamically selected according to the input, and channels with strong correlation with spectral feature peaks should be selected, while channels with weak correlation should be suppressed. Adding a gating mechanism on the basis of the Res2Net module can finely control the features, improve the perception of information of different scales and the expression of features, thereby improving the performance of the Res2Net module.
[0068] Finally, the feature maps obtained by concatenating the feature maps obtained by the four groups are sent to the output layer of the Res2Net module for a 1*1 convolution operation:
[0069] Y5=ReLU(BN(Conv1(CAT(Y1, Y2, Y3, Y4))))#(5)
[0070] Among them, Y5 represents the output of the Res2Net module, CAT represents the concatenation operation, Conv1 represents the one-dimensional convolution operation, BN represents the normalization operation, and ReLU represents the ReLU function.
[0071] The output of the Res2Net module is a combination of different convolution kernels in different groups after channel grouping, thus obtaining multiple receptive fields of different granularities and increasing the scale representation of output features.
[0072] After being processed by the Res2Net module, in order to prevent the channel grouping from losing the correlation between channels, the output Y5 of the Res2Net module is sent to the SE module to adaptively recalibrate the feature response between channels. Figure 4 As shown in the figure, in this module, the feature map is firstly compressed, and the global average pooling is realized in the spatial dimension, and the feature map Y5∈R w×h×b×C Compressed into Y′5∈R 1×1×1×C ; Then, the FC fully connected layer is used to learn and obtain the feature map with channel attention; finally, the Sigmoid activation function is used for normalization. Therefore, the weight vector of the channel is:
[0073] f c =Sigmoid(FC(ReLU(FC(Y5))))#(6)
[0074] Among them, FC represents the fully connected layer.
[0075] The original input feature map Y5 and the channel attention feature map f c Multiply the weight coefficient channel by channel, and finally get the output of the SE module:
[0076] f′=f c ×Y5#(7)
[0077] In SE-Res2Net, the original features are recalibrated in the channel dimension to complete the feature adjustment.
[0078] Finally, the input X of the Res2Net module is connected to the output f′ of the SE module through a skip connection to achieve residual mapping to facilitate the back propagation of gradients. The final output of the SE-Res2Net module is obtained:
[0079] f=f′+X#(8)
[0080] The third part is the output part of the SE-Res2Net neural network model. After the feature extraction in the second part, the output feature map f is processed by the ReLU function and then enters the fully connected layer. After this fully connected layer, the dropout operation is used to improve the robustness of the model. After that, the output feature map enters the second fully connected layer to obtain the final output, which contains two probability values, respectively indicating the probability of whether the analyte contains aflatoxin.
[0081] Differential Raman spectroscopy can help extract weak features in samples, while SE-Res2Net can better learn the representation of these features. The combination of the two enables the model to capture the information in the spectrum more effectively.
[0082] (22) Initialize the parameters of the SE-Res2Net neural network model, load the one-dimensional differential Raman spectroscopy data and the differential Raman spectrum of aflatoxin in the training set into the SE-Res2Net neural network model for training, and update the parameters of the SE-Res2Net neural network model according to the output probability.
[0083] 3) Using the trained SE-Res2Net neural network model, the Raman spectrum of the analyte containing aflatoxin is verified and identified. The process is as follows:
[0084] Continue to prepare mixed solutions of aflatoxin with different contents (including 0 content), and measure their differential Raman spectra respectively as the validation set to verify the accuracy of the SE-Res2Net neural network model. Then, input the data in the validation set and the differential Raman spectrum of aflatoxin into the trained model, and finally output whether the mixture solution to be tested contains aflatoxin.
[0085] The above-mentioned embodiments only express one or several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for detecting aflatoxin by combining differential Raman spectroscopy and SE-Res2Net, characterized in that: The aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net comprises: The differential Raman spectra of the test objects containing aflatoxin and not containing aflatoxin are measured, and the differential Raman spectra of the test objects are used as training sets; Build the SE-Res2Net neural network model and initialize the parameters of the SE-Res2Net neural network model; The differential Raman spectra of aflatoxin and the differential Raman spectra of the object to be tested are respectively input into the two feature extraction modules of the SE-Res2Net neural network model to extract feature maps, and the extracted feature maps are spliced to obtain feature maps. X ; The feature map X Input the Res2Net module of the SE-Res2Net neural network model to obtain the feature map ; The feature map Input the SE module of the SE-Res2Net neural network model to obtain the feature map ; The feature map is connected by skipping X Connect to feature map On top, we get the feature map ; The feature graph f is passed through the output module of the SE-Res2Net neural network model to obtain the probability of whether the object to be tested contains aflatoxin, and the parameters of the SE-Res2Net neural network model are updated according to the probability to complete the training of the SE-Res2Net neural network model; A mixture solution containing aflatoxin and a mixture solution not containing aflatoxin were prepared, and the differential Raman spectrum of the mixture solution was measured as a validation set, and the validation set was identified using the trained SE-Res2Net neural network model; The differential Raman spectra of the test object containing aflatoxin and not containing aflatoxin are measured, including: Two original Raman spectra of the same object are collected by using two excitation wavelengths with a known slight wavelength offset; Preprocessing two sets of original Raman spectral data to obtain two sets of preprocessed spectra; Performing differential processing on the two pre-processed spectra to obtain a differential image and the intensity value of the differential image; Initialize the intensity value of the Raman spectrum to be reconstructed to 0, and convert the intensity value of the differential image to the displacement difference The intensity values of the Raman spectrum to be reconstructed are added, and the Raman spectrum to be reconstructed is updated to obtain a differential Raman spectrum; The feature map X Input the Res2Net module of the SE-Res2Net neural network model to obtain the feature map ,include: Feature Map X After a 2D convolution layer, the feature map X Divide into 4 groups, respectively X 1. X 2. X 3 and X 4; For feature maps X 2. Feature Map X 3 and feature map X 4 respectively perform convolution operations and record the convolution operations as K i (), the four feature maps obtained It can be expressed by the following formula: ; in, Represents the feature map X 1. Feature map X 2. Feature Map X 3 and feature map X 4 The feature map obtained after corresponding processing, , Representation feature map X Divided into i Group feature map, Indicated in i Group Pair Feature Map Perform convolution operation, Indicates that first i -1 group of convolution operation output AND Gate Multiply by channel, and then add the result to the i Group feature plot Add, and perform convolution operation on the result of addition; The feature map After splicing, input the output layer of the Res2Net module to obtain the feature map , which can be expressed by the following formula: ; in, Represents the output of the Res2Net module, Represents a splicing operation, represents a one-dimensional convolution operation, represents the normalization operation, express function.
2. The aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net according to claim 1, characterized in that: The preprocessing includes denoising and smoothing, normalization, baseline correction and removal of abnormal samples.
3. The aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net according to claim 1, characterized in that: The differential processing is expressed by the following formula: ; in, and Respectively represent the two preprocessed spectra at wavenumber The Raman intensity at Represents the intensity value of the difference image obtained after subtraction.
4. The aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net according to claim 1, characterized in that: The feature maps obtained after convolution operation of the second and third groups of feature maps are first extracted by average pooling, and then converted by the fully connected layer and Sigmoid function to obtain the gate , which can be expressed as follows: ; in, i ∈[3,4], represents average pooling, represents the fully connected layer, express function.
5. The aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net according to claim 1, characterized in that: The feature map Input the SE module of the SE-Res2Net neural network model to obtain the feature map ,include: Use global average pooling to transform the feature map Compress to get the feature map ; The feature map After the fully connected layer, Function, fully connected layer and Sigmoid Activation function to get the channel weight vector ; The weight vector of the channel With feature map Perform cross multiplication to obtain the output feature map of the SE module .
6. The aflatoxin detection method combining differential Raman spectroscopy and SE-Res2Net according to claim 1, characterized in that: The output module includes a ReLU function and two fully connected layers, wherein a dropout operation is used in the training phase.
