End-to-end deep learning Raman spectroscopy data classification method based on DRS-VGG

Through the end-to-end deep learning method of Deep Residual Shrinkage-VGG, the problems of noise interference and small samples in Raman spectrum data are solved, achieving high-accuracy recognition without preprocessing, balancing model performance and training time, and is suitable for complex Classification of Raman spectroscopy data.

CN114692773BActive Publication Date: 2024-10-18ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210368912.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2024-10-18
Estimated Expiration
2042-04-08

Smart Images

  • Figure CN114692773B_ABST
    Figure CN114692773B_ABST
Patent Text Reader

Abstract

The present invention discloses a classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG, comprising: obtaining Raman spectral data, performing first-order spline interpolation processing and zero padding, and randomly shuffling and dividing into a training set, a validation set, and a test set; constructing a classification model based on end-to-end deep learning of Deep Residual Shrinkage-VGG; training the classification model with the training set, adjusting the hyperparameters of the model with the validation set; and testing the performance with the test set. The method proposed in the present invention does not require spectral data correction preprocessing, is suitable for Raman spectral data with high noise, small samples, and super-multiple classifications, improves the accuracy and applicability of Raman spectral data classification problems, and improves the problem of slow training of deep learning network models to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Raman spectroscopy data classification, and in particular to an end-to-end deep learning Raman spectroscopy data classification method based on Deep ResidualShrinkage-VGG. Background Art

[0002] Raman spectroscopy is a vibrational spectrum that provides us with a fast, sensitive, non-contact, and non-destructive detection method in the field of analytical science. It analyzes the structure of materials through the Raman scattering generated by the material in the incident light source. Raman spectroscopy is suitable for qualitative and quantitative analysis of gases, liquids, and solids at different temperatures. Therefore, it has been widely used in the medical field, food science field, forensic field, and geology field.

[0003] The information contained in the Raman spectral signal is the key to the analysis. Since the Raman signal is easily affected by the fluorescence process, material density, environmental noise, and external light sources, the spectrum will have baseline drift and be interfered by noise signals. The intensity of the noise signal can be several orders of magnitude higher than that of Raman scattering, which seriously affects the analysis of the spectrum. Due to the existence of these limiting factors, the traditional Raman spectral analysis process usually requires data preprocessing such as denoising, smoothing, baseline elimination, and normalization. Many traditional machine learning methods have been applied to the qualitative and quantitative analysis of targets. Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Random Forest (RF), and Logistic Regression (LR) algorithms are several simple and effective classifiers. However, these algorithms are prone to overfitting problems in scenarios with small samples, class imbalance, and high noise data, and it is impossible to construct an end-to-end data classification model without preprocessing.

[0004] In recent years, deep learning algorithms have gradually been applied to the automated analysis of spectral data. Its purpose is to use abstract methods to continuously extract important features from low-level feature vectors. In contrast, deep learning algorithms are a more excellent choice. They have the following two advantages in the task of spectral recognition: (1) They can not only recognize relevant features, but also learn recognition patterns and knowledge. (2) Compared with machine learning algorithms, they have better classification results. In general, current research on Raman spectral recognition relies too much on feature engineering, focusing on the use of data enhancement methods to improve recognition accuracy, and less considering the trade-off between model performance and training time cost. We believe that constructing an end-to-end classification model that can automatically process data, has fast training speed and high accuracy is an indispensable means to parse and understand spectral information. Summary of the invention

[0005] The purpose of the present invention is to propose an end-to-end deep learning Raman spectroscopy data classification method based on DRS (Deep Residual Shrinkage)-VGG, which replaces the traditional preprocessing scheme with a deep learning method, realizes the recognition of multi-category Raman spectroscopy data rich in interference information, and achieves a trade-off between the performance of the deep learning network model and the training time cost.

[0006] The technical solution of the present invention is:

[0007] An end-to-end deep learning Raman spectroscopy data classification method based on Deep Residual Shrinkage-VGG, comprising the following steps:

[0008] Step 1, obtaining Raman spectrum data, performing first-order spline interpolation processing, filling the interpolation points that exceed the original spectrum wavenumber range with zero, and randomly shuffling the processed Raman spectrum data and dividing them into a training set, a validation set, and a test set;

[0009] Step 2: Build an end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG;

[0010] Step 3: Use the training set to train an end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, use the validation set to adjust the model's hyperparameters, and preliminarily evaluate the model's performance;

[0011] Step 4: Use the test set to test the classification model performance of the end-to-end deep learning based on Deep Residual Shrinkage-VGG.

[0012] In step 1, the Raman spectrum data is obtained and first-order spline interpolation processing is performed, which specifically includes: using formula (1) to perform first-order spline interpolation processing on the Raman spectrum data. Due to different sampling conditions, each sample is not in the same wavenumber range, and interpolation processing is required to make the data size consistent. The corresponding spectral intensity value is obtained from the specified wavenumber value, so that each Raman spectrum is evenly sampled within the specified wavenumber range:

[0013]

[0014] In the formula, x i-1 and x i+1 is the wave value of the Raman spectrum data at the left and right endpoints of a segment interval before interpolation; i-1 and i+1 is the Raman spectrum data intensity value of the left and right endpoints of the segment interval before interpolation; X iis the wave value of the Raman spectrum data after interpolation in this interval; Y i is the interpolated Raman spectrum data intensity value in this interval;

[0015] Filling the interpolation points beyond the wavenumber range of the original spectrum with zeros, specifically including: if the given interpolation interval is larger than the wavenumber range of the original Raman spectrum data, after performing first-order spline interpolation within the wavenumber range of the original Raman spectrum data, the intensity values ​​of the interpolated data outside the range are filled with the value 0;

[0016] The processed Raman spectral data are randomly shuffled and divided into a training set, a validation set and a test set, specifically including: 30% of the randomly shuffled Raman spectral data are divided into a test set, and during the division process, the data are transferred according to the proportion of each label in the original data set to make the sample distribution the same; the same division strategy is adopted to divide 80% of the remaining data into a training set and 20% of the remaining data into a validation set.

[0017] In step 2, an end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG is constructed, which includes:

[0018] The constructed end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG consists of two convolutional modules, three DRS modules, two fully connected modules and a Softmax output layer.

[0019] The convolution module is composed of a convolution layer, a ReLU activation function, a convolution layer, a ReLU activation function, and a maximum pooling layer in sequence;

[0020] The DRS module is composed of a convolutional layer, a ReLU activation function, a global average pooling layer, a fully connected layer, a batch normalization layer, a Sigmoid activation function, and a maximum pooling layer. The main body of the module is four convolutional layers connected in sequence, and two branches are added at different stages of the main body. An identity mapping is added to one branch, so that the gradient can flow back to the upper layer more effectively during the parameter back propagation process to reduce the difficulty of training the convolutional neural network. In another branch, the attention mechanism is used to automatically realize the soft thresholding of features. Its main function is to eliminate features whose absolute values ​​are less than a certain threshold to 0, and at the same time, other features are also adjusted towards 0, expressed as:

[0021]

[0022] In the formula, represents the jth intensity value of the ith channel after soft thresholding; z ij represents the jth intensity value of the i-th channel before processing; λ irepresents the i-th intensity value after the global average pooling layer; w i Represents the i-th intensity value after the Sigmoid activation function, which represents the λ i Weight, λ i With w i The multiplication of represents the threshold corresponding to each layer of channels;

[0023] The output of the DRS module is expanded as the input of the fully connected layer; the fully connected module is composed of a fully connected layer, a batch normalization layer, a ReLU activation function, and a Dropout layer with a dropout rate of 0.5;

[0024] The output of the fully connected module is used as the input of the Softmax output layer, and the classification prediction results in the form of probability distribution are obtained through the Softmax output layer.

[0025] DRS in DRS-VGG means Deep Residual Shrinkage, which means that the entire model has a deeper structure. Shrinkage does not mean a pyramid-like network structure, but means that the main module can continuously refine and retain the important information contained in the signal.

[0026] In step 3, the training set is used to train the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, and the validation set is used to adjust the model's hyperparameters and preliminarily evaluate the model's performance, including:

[0027] 1) Set the input size of the input layer according to the one-dimensional data size so that the data passes through each layer of the classification model in sequence;

[0028] 2) Use he_uniform to assign the weights of the convolutional layer according to a uniform distribution. The weights are initialized as follows:

[0029]

[0030] Where W i,j represents the jth weight of the i-th convolution kernel of a convolutional layer; U represents uniform distribution; n in Represents the number of input units in the weight tensor; W i,j from Extract values ​​from the uniform distribution in;

[0031] 3) Use the Adam optimizer to train the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG built in step 2, using the cross entropy loss function. The cross entropy loss function expression is:

[0032]

[0033] Where L is the sum of the loss errors between the model input data and output data; L i is the loss error value of sample i; N is the total number of input data Raman spectra; M is the total number of input data categories; y ic is a symbolic function with a value of 0 or 1. If the true category of sample i is equal to c, it takes 1, otherwise it takes 0; p ic is the predicted probability that the observed sample i belongs to category c;

[0034] 4) Take the samples in the training set as input and divide them into multiple batches of appropriate batch_size, set the appropriate learning rate to train the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, so that the loss function converges;

[0035] 5) Use the validation set to evaluate the error and classification accuracy of the trained end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, so as to adjust the model parameters and save the optimal end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG.

[0036] In step 4, the test set is used to test the performance of the classification model based on end-to-end deep learning of Deep Residual Shrinkage-VGG, including:

[0037] Use the test set to test the performance of the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG saved in step 3, and use correctness, accuracy, recall, F1 score, GFLOPs, early stopping time, and trainable parameters as evaluation indicators of the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG.

[0038] Compared with the prior art, the present invention has the following advantages:

[0039] Compared with the existing machine learning and deep learning methods, the classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG proposed by the present invention completes the end-to-end recognition of Raman spectral data, improves the accuracy of Raman spectral data super-multiple classification problems without preprocessing, and achieves a trade-off between model performance and training time cost. The classification model based on end-to-end deep learning of Deep Residual Shrinkage-VGG of the present invention ignores the differences between features in a deeper network structure by adding identity mapping and DRS modules, accelerates the learning speed of the model by feature reuse, and solves the problems of high computational complexity, long training time, and easy gradient anomalies in the training process of complex deep learning models.

[0040] The present invention proposes an end-to-end deep learning Raman spectroscopy data classification method based on Deep Residual Shrinkage-VGG, which does not require spectral data correction preprocessing and is suitable for Raman spectroscopy data with high noise, small samples, and very many classifications. It improves the accuracy and applicability of Raman spectroscopy data classification problems and improves the problem of slow training of deep learning network models to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0042] Figure 1 It is a flow chart of a classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG in an embodiment of the present invention.

[0043] Figure 2 This is the DRS module structure diagram.

[0044] Figure 3 It is the structure diagram of the convolution module.

[0045] Figure 4 It is a fully connected module structure diagram. DETAILED DESCRIPTION

[0046] The following will describe the implementation modes of the present invention in detail with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0047] like Figures 1 to 4As shown, a Raman spectroscopy data classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG includes the following steps:

[0048] Step 1: Obtain Raman spectrum data, perform first-order spline interpolation processing, fill the interpolation points that exceed the original spectrum wavenumber range with zero, and randomly shuffle the processed Raman spectrum data and divide them into training set, validation set and test set.

[0049] Due to different sampling conditions, each sample is not in the same wave number range, and interpolation is required to make the data size consistent. The Raman spectrum data is processed by first-order spline interpolation using formula (1), starting from 50 cm -1 To 1650cm -1 Wave number range is 1cm -1 To interpolate evenly at intervals, 1601 intensity values ​​corresponding to the wave number are obtained. The first-order spline interpolation method is as follows:

[0050]

[0051] In the formula, x i-1 and x i+1 is the wave value of the Raman spectrum data at the left and right endpoints of a certain segment interval before interpolation; i-1 and i+1 is the Raman spectrum data intensity value of the left and right endpoints of the segment interval before interpolation; X i is the wave value of the Raman spectrum data after interpolation in this interval; Y i is the interpolated Raman spectrum data intensity value in this interval.

[0052] The intensity values ​​that exceed the wavenumber range of the original Raman spectrum data are padded with the value 0.

[0053] The processed Raman spectral data are randomly shuffled and divided into a training set, a validation set and a test set, specifically including: 30% of the randomly shuffled Raman spectral data are divided into a test set, and during the division process, the data are transferred according to the proportion of each label in the original data set to make the sample distribution the same; the same division strategy is adopted to divide 80% of the remaining data into a training set and 20% of the remaining data into a validation set.

[0054] Step 2: Build an end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG.

[0055] The end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG is composed of two convolutional modules, three DRS modules, two fully connected modules and a Softmax output layer.

[0056] The convolution module is composed of a convolution layer, a ReLU activation function, a convolution layer, a ReLU activation function, and a maximum pooling layer.

[0057] The number of channels of the convolution layer in the first convolution module is 64, the convolution kernel size is 3, and the stride is 1. The number of channels of the convolution layer in the second convolution module is 128, the convolution kernel size is 3, and the stride is 1. The kernel size of the maximum pooling layer in the convolution module is 2, and the stride is 2.

[0058] The DRS module is composed of a convolutional layer, a ReLU activation function, a global average pooling layer, a fully connected layer, a batch normalization layer, a Sigmoid activation function, and a maximum pooling layer. The main body of the module is four one-dimensional convolutional layers with 128 channels, a kernel size of 3, and a stride of 1. Each convolutional layer is followed by a ReLU activation function. Two branches are added to the convolutional layer at different stages of the main body. An identity mapping is added to one branch; in the other branch, the soft thresholding of features is automatically realized with the help of the attention mechanism. Its main function is to eliminate features whose absolute values ​​are less than a certain threshold to 0, and at the same time, other features are also adjusted towards 0, expressed as:

[0059]

[0060] In the formula, represents the jth intensity value of the ith channel after soft thresholding; z ij represents the jth intensity value of the i-th channel before processing; λ i represents the i-th intensity value after the global average pooling layer; w i Represents the i-th intensity value after the Sigmoid activation function, which represents the λ i Weight, λ i With w i The multiplication of represents the threshold corresponding to each layer channel.

[0061] λ is an output of the global average pooling layer after taking the absolute value. w is the output after the Sigmoid activation function, which can be regarded as the importance coefficient of each layer channel. z is the output of the fourth convolutional layer. τ i is the threshold of the i-th channel, which is used to eliminate redundant information. It is the i-th value of the dot product of λ and w.

[0062] The output after soft thresholding The output of the DRS module is obtained by adding it to the input of the DRS module and passing through a maximum pooling layer with a kernel size of 2 and a stride of 2.

[0063] The output of the DRS module is expanded as the input of the fully connected layer. The fully connected module is composed of a fully connected layer, a batch normalization layer, a ReLU activation function, and a Dropout layer with a dropout rate of 0.5.

[0064] The output of the fully connected module is used as the input of the Softmax output layer, and the classification prediction results in the form of probability distribution are obtained through the Softmax output layer.

[0065] Step 3: Use the training set to train an end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, use the validation set to adjust the model's hyperparameters, and preliminarily evaluate the model's performance.

[0066] 1) According to the one-dimensional data size, the input size of the input layer is set to (1601,1) so that the data passes through each layer of the classification model in sequence.

[0067] 2) Use he_uniform to assign the weights of the convolutional layer according to a uniform distribution. The weights are initialized as follows:

[0068]

[0069] Where W i,j Represents the jth weight of the i-th convolution kernel of a convolutional layer; n in Represents the number of input units in the weight tensor; W i,j from Draw values ​​from a uniform distribution in .

[0070] 3) Use the Adam optimizer to train the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG built in step 2, using the cross entropy loss function. The cross entropy loss function expression is:

[0071]

[0072] Where L is the sum of the loss errors between the model input data and output data; L i is the loss error value of sample i; N is the total number of input data Raman spectra; M is the total number of input data categories; y ic is a symbolic function with a value of 0 or 1. If the true category of sample i is equal to c, it takes 1, otherwise it takes 0; p ic is the predicted probability that the observed sample i belongs to category c.

[0073] 4) Take the samples in the training set as input, divide the batch_size to 64, set the learning rate to 0.0001, and train the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG to make the loss function converge.

[0074] 5) Use the validation set to evaluate the error and classification accuracy of the trained end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, so as to adjust the model parameters and save the optimal end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG.

[0075] Step 4: Use the test set to test the classification model performance of the end-to-end deep learning based on Deep Residual Shrinkage-VGG.

[0076] Use the test set to test the performance of the Deep Residual Shrinkage-VGG based end-to-end deep learning classification model saved in step 3.

[0077] The spectral samples with sample numbers ranging from 6 to 50 in the Unrated_oriented and Unrated_unoriented subsets of the RRUFF database were selected, which included a total of 5618 Raman spectral samples of 343 types of minerals. As for the dataset as a whole, there are many categories, the sample distribution is uneven, and a large number of labeled samples are too few. As for the individual samples in the dataset, the feature dimension is large, the data is not preprocessed, is rich in noise, has a wide intensity range, and has obvious baseline drift.

[0078] Through performance testing of the selected data sets, we explore the breakthroughs of the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG in solving high noise non-standard, multi-classification, and small sample problems.

[0079] The performance of the method of the present invention is compared with traditional machine learning methods applied to Raman spectroscopy data classification and deep learning models used in this field.

[0080] The accuracy, precision, recall, and F1 score are used as evaluation indicators for machine learning methods. The accuracy, precision, recall, F1 score, early stopping time, GFLOPs, and trainable parameters are used as evaluation indicators for deep learning models.

[0081] The traditional machine learning methods adopted include: support vector machine (SVM), K nearest neighbor (KNN), random forest (RF), and logistic regression (LR) algorithm.

[0082] The support vector machine algorithm uses a linear kernel function with a penalty coefficient of C = 250. The k of the K nearest neighbor algorithm is 1. Before the support vector machine and random forest prediction, the data is first reduced in dimension by principal component analysis with N = 100.

[0083] The LeNet-5, VGG-19, DeepSpectra, and ResidualSpectra models applied in the field of Raman spectroscopy recognition are selected as comparative representatives of deep learning models.

[0084] To reduce the impact of randomness on the fairness of the results, each group of experiments was repeated 100 times.

[0085] The evaluation results of the classification performance of the method of the present invention and other machine learning methods are shown in Table 1.

[0086] Table 1 Evaluation results of classification performance of the method of the present invention and other machine learning methods

[0087]

[0088] Compared with other machine learning methods, this method shows excellent classification performance, and all evaluation indicators are far superior to traditional machine learning methods. In terms of average accuracy, it is 35.52%, 35.02%, 21.18%, and 54.46% higher than the machine learning models respectively. The huge performance difference shows that traditional machine learning methods are not suitable for high-noise and non-standard Raman spectral data. Traditional machine learning methods can only fit Raman spectral data that has been pre-processed by denoising, baseline correction, and standardization.

[0089] The evaluation results of the classification performance of the method of the present invention and other deep learning methods are shown in Table 2. The early stopping time represents the training time required for the model to complete convergence, in seconds. Floating point operations (FLOPs) are floating point operations, which can be understood as the amount of calculation. 1GFLOPs represents 1 billion floating point operations. The unit of trainable parameters is million.

[0090] Table 2 Evaluation results of classification performance of the method of the present invention and other deep learning methods

[0091]

[0092] The deep learning model is a data-hungry model. The number of single-label samples and the total number of samples in the training set affect the classification results, and the model structure is closely related to the classification results. The evaluation results of the classification performance of the method of the present invention and other deep learning methods show that the method has a high prediction accuracy for positive samples, the misclassification phenomenon is not prominent, and the reliability is high.

[0093] It can be seen from Table 2 that in the classification scenario of this data set, the deep learning model with low computational complexity has a low classification accuracy. Since the model is shallow, it cannot extract effective features from too much interference, and the recognition of key feature peaks is fuzzy, resulting in a low recall rate, which means poor classification performance.

[0094] In addition, both this method and VGG-19 have shown the ability to extract good features on non-standard data sets, and both can separate interference information from complex spectra. However, from the comparison of GFLOPs, trainable parameters, and early stopping time, it can be seen that the VGG-19 model has a greater computational complexity and requires longer training time.

[0095] Through the comparison of model structures and analysis of performance evaluation results, it can be proved that the end-to-end deep learning classification model of Deep Residual Shrinkage-VGG has the following characteristics:

[0096] 1) Deeper network structures can ignore the differences between features and do not require feature variables to be on the same comparison scale, so they can be applied to data that has not been numerically standardized.

[0097] 2) In the DRS module of Deep Residual Shrinkage-VGG, the identity mapping can propagate gradients losslessly, avoiding the problem of gradient anomalies caused by stacking deep structures, and feature reuse speeds up the learning speed of the model.

[0098] 3) The soft threshold layer with automatically generated parameters is embedded in the DRS module, which weakens unimportant features and eliminates redundant information without professional knowledge, making the gradient of some features 0, thereby extracting deep features with stronger judgment ability, making the classification task not restricted by preprocessing such as denoising.

[0099] 4) Compared with the existing technology, Deep Residual Shrinkage-VGG has both good accuracy and speed in Raman spectroscopy multi-classification tasks, high computational parallelism and strong robustness.

[0100] This method combines the characteristics of Raman spectral data with the deep learning network structure, and uses deep learning methods to replace the traditional pre-processing scheme to achieve the recognition of Raman spectral data rich in interference information.

Claims

1. An end-to-end deep learning Raman spectroscopy data classification method based on Deep Residual Shrinkage-VGG, comprising the following steps: Step 1, obtaining Raman spectrum data, performing first-order spline interpolation processing, filling the interpolation points that exceed the original spectrum wavenumber range with zero, and randomly shuffling the processed Raman spectrum data and dividing them into a training set, a validation set, and a test set; Step 2: Build an end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, which includes: The constructed end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG consists of two convolutional modules, three DRS modules, two fully connected modules and a Softmax output layer. The convolution module is composed of a convolution layer, a ReLU activation function, a convolution layer, a ReLU activation function, and a maximum pooling layer in sequence; The DRS module is composed of a convolutional layer, a ReLU activation function, a global average pooling layer, a fully connected layer, a batch normalization layer, a Sigmoid activation function, and a maximum pooling layer. The main body of the DRS module is four convolutional layers connected in sequence. Two branches are added at different stages of the main body. An identity mapping is added to one branch. During the parameter back propagation process, the gradient can flow back to the upper layer more effectively to reduce the difficulty of training the convolutional neural network. In the other branch, the attention mechanism is used to automatically realize the soft thresholding of features. Its main function is to eliminate the features whose absolute value is less than a certain threshold to 0, and at the same time, other features are also adjusted towards 0, which is expressed as: In the formula, represents the jth intensity value of the ith channel after soft thresholding; z ij represents the jth intensity value of the i-th channel before processing; λ i represents the i-th intensity value after the global average pooling layer; w i Represents the i-th intensity value after the Sigmoid activation function, which represents the λ i Weight, λ i With w i The multiplication of represents the threshold corresponding to each layer of channels; The output of the DRS module is expanded as the input of the fully connected layer. The fully connected module is composed of a fully connected layer, a batch normalization layer, a ReLU activation function, and a Dropout layer with a dropout rate of 0.

5. The output of the fully connected module is used as the input of the Softmax output layer, and the classification prediction results in the form of probability distribution are obtained through the Softmax output layer; Step 3: Use the training set to train an end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, use the validation set to adjust the model's hyperparameters, and preliminarily evaluate the model's performance; Step 4: Use the test set to test the classification model performance of the end-to-end deep learning based on Deep Residual Shrinkage-VGG.

2. The Raman spectroscopy data classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG according to claim 1, characterized in that: In step 1, first-order spline interpolation processing is performed, which specifically includes: Formula (1) is used to perform first-order spline interpolation processing on the Raman spectrum data, and the corresponding spectral intensity value is obtained from the specified wave number value, so that each Raman spectrum is evenly sampled within the specified wave number range: In the formula, x i-1 and x i+1 is the wave value of the Raman spectrum data at the left and right endpoints of a certain segment interval before interpolation; i-1 and i+1 is the Raman spectrum data intensity value of the left and right endpoints of the segment interval before interpolation; X i is the wave value of the Raman spectrum data after interpolation in this interval; Y i is the interpolated Raman spectrum data intensity value in this interval.

3. The Raman spectroscopy data classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG according to claim 1, characterized in that: In step 1, the interpolation points that exceed the original spectrum wavenumber range are filled with zeros, specifically including: If the given interpolation interval is larger than the wavenumber range of the original Raman spectrum data, after first-order spline interpolation is performed within the wavenumber range of the original Raman spectrum data, the intensity value of the interpolated data outside the range is padded with the value 0.

4. The Raman spectroscopy data classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG according to claim 1, characterized in that: In step 1, the processed Raman spectral data is randomly shuffled and divided into a training set, a validation set, and a test set, specifically including: 30% of the randomly shuffled Raman spectroscopy data is divided into a test set. During the division process, the data is transferred according to the proportion of each label in the original data set to make the sample distribution the same; the same division strategy is adopted to divide 80% of the remaining data into a training set and 20% of the remaining data into a validation set.

5. The Raman spectroscopy data classification method based on end-to-end deep learning of Deep Residual Shrinkage-VGG according to claim 1, characterized in that: In step 3, the training set is used to train the end-to-end deep learning classification model based on Deep ResidualShrinkage-VGG, and the validation set is used to adjust the hyperparameters of the model and preliminarily evaluate the performance of the model, including: 3.1) Set the input size of the input layer according to the one-dimensional data size so that the data passes through each layer of the classification model in sequence; 3.2) Use he_uniform to assign the weights of the convolutional layer according to a uniform distribution. The weights are initialized as follows: Where W i,j represents the jth weight of the i-th convolution kernel of a convolutional layer; U represents uniform distribution; n in Represents the number of input units in the weight tensor; W i,j from Extract values ​​from the uniform distribution in; 3.3) Use the Adam optimizer to train the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG built in step 2, using the cross entropy loss function. The cross entropy loss function expression is: Where L is the sum of the loss errors between the model input data and output data; L i is the loss error value of sample i; N is the total number of input data Raman spectra; M is the total number of input data categories; y ic is a symbolic function with a value of 0 or 1. If the true category of sample i is equal to c, it takes 1, otherwise it takes 0; p ic is the predicted probability that the observed sample i belongs to category c; 3.4) Take the samples in the training set as input and divide them into multiple batches of appropriate batch_size, set the appropriate learning rate to train the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, so that the loss function converges; 3.5) Use the validation set to evaluate the error and classification accuracy of the trained end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG, so as to adjust the model parameters and save the optimal end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG.

6. The end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG according to claim 1, characterized in that: In step 4, the test set is used to test the performance of the classification model based on end-to-end deep learning of Deep Residual Shrinkage-VGG, including: Use the test set to test the performance of the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG saved in step 3, and use correctness, accuracy, recall, F1 score, GFLOPs, early stopping time, and trainable parameters as evaluation indicators of the end-to-end deep learning classification model based on Deep Residual Shrinkage-VGG.

Citation Information

Patent Citations

  • Raman spectrum analysis method for identifying target object in complex environment by using deep forest

    CN109858477A

  • CNN transfer learning method based on polynomial reconstruction algorithm for Raman spectroscopy

    CN113947117A