A convolutional neural network fluorescence spectrum feature extraction method
By using a combination method of convolutional neural network and EPLS algorithm in fluorescence spectrum data, combined with large, medium and small scale convolution kernels and LReLU activation function, the problem of poor feature extraction effect in the existing technology is solved and more efficient features are achieved. Extraction and dimensionality reduction improve the accuracy of the model.
Patent Information
- Application Number
- CN202111641007.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In the existing technology, in the feature extraction of fluorescence spectrum data, the PCA algorithm ignores important information, while the local neighborhood parameters and noise of the LLE algorithm affect the dimensionality reduction effect, resulting in poor feature extraction results and increasing the time and complexity of network training. .
The convolutional neural network fluorescence spectrum feature extraction method is used, by preprocessing in the input layer, using the DeepSpectra model and adding the EPLS algorithm as a sparse constraint, combining large, medium and small scale convolution kernels to extract features in each convolution layer, and through LReLU Activation function and Adam optimizer reduce noise and improve feature extraction efficiency.
Effectively find feature information in the original data, reduce network training time and complexity, improve the effectiveness of feature extraction, strengthen important information while weakening important information, and improve the accuracy of the prediction model.
Smart Images

Figure CN114399642B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a feature extraction technology of fluorescence spectrum, in particular to a convolutional neural network fluorescence spectrum feature extraction method, which is used in the field of feature extraction of images and hyperspectral spectrum. Background Art
[0002] In recent years, due to the intensification of seawater eutrophication, phytoplankton in water bodies has reproduced in large numbers, frequently causing algal blooms, which has become the main pollution of the marine ecological environment. Therefore, the measurement of algae species and quantity is of great significance to ecological environment detection. The pigments contained in phytoplankton have a fluorescence effect, so fluorescence spectroscopy analysis is an effective measurement method. Among them, three-dimensional fluorescence spectroscopy is widely used in algae measurement. However, there are many three-dimensional fluorescence data, but not all wavelength variables in the spectral region contain useful information. Only a few spectral regions contain material characteristics. The participation of redundant regional fluorescence information in modeling will affect the prediction accuracy and increase the calculation of the model. It is necessary to extract features from the fluorescence data before building the model.
[0003] Related concepts include the following:
[0004] EPLS: A simple unsupervised sparse feature learning algorithm with no meta-parameters. The discriminative features provided by this method are very useful for classification because they jointly capture relevant spatial and spectral image characteristics. The method iteratively builds a sparse target from the output of a layer and optimizes for this specific target.
[0005] DeepSpectra: A convolutional neural network model with features such as sparse connections, parameter sharing, pooling, and deep hierarchical structures. The model includes convolutional layers, stretching layers, fully connected layers, and output layers of the neural network. In convolutional neural networks, the DeepSpectra model not only increases the depth of the convolutional neural network model, but also increases the width of the convolutional neural network model.
[0006] PCA (Principal Component Analysis): principal component analysis.
[0007] LLE (locally linear embedding): Locally linear embedding algorithm.
[0008] At present, some commonly used methods in this regard are:
[0009] 1. Use the PCA algorithm to reduce the dimension of the spectral data, and then use the reduced-dimensional data to establish a content prediction model.
[0010] 2. Reduce the dimension of spectral data through LLE algorithm, and then use the reduced dimension data to establish a content prediction model.
[0011] Principal component analysis:
[0012] PCA eliminates the correlation between variables by reducing the dimension. The single-sample three-dimensional fluorescence data matrix is straightened into one-dimensional data in the column direction, and multiple straightened one-dimensional fluorescence data samples form a two-dimensional data matrix X n×m , containing n fluorescence spectrum samples and m wavelengths, then the projection of X in the low-dimensional space is T = XP, and the projection of T back to the m-dimensional space is:
[0013]
[0014] Where T is the score vector, p i is the load vector. Multiply p on the right i ,get:
[0015]
[0016] The larger the score vector ti is, The greater the change in the pi direction.
[0017] First, the training spectrum and test spectrum data matrix X is centralized; secondly, the load vector P∈R corresponding to the first k eigenvalues of the training spectrum data is m×k Will be retained. The number of principal components is determined by the cumulative contribution rate of the variance, and the number of principal components is selected by calculating the cumulative contribution rate of the first k principal components.
[0018] Locally Linear Embedding Algorithm:
[0019] The purpose of LLE is to find a low-dimensional manifold embedded in a high-dimensional observation space, that is, a feature in the usual sense, and to have an overall optimal solution without the need for iteration, thus avoiding the problem of local extreme values. Let the three-dimensional fluorescence spectrum signal be X, where X = [x1, x2, …, x n ], x i ∈R m , m is the dimension of the fluorescence spectrum signal, and the signal mapped to the low-dimensional space is Y = [y1, y2, ..., y n ],y i ∈R d , d is the dimension of the fluorescence spectrum signal after dimension reduction. The main steps of the LLE algorithm are as follows:
[0020] The k nearest neighbor method was used to find the k nearest neighbor points of the spectral signal of each algae species.
[0021] The local reconstruction weight matrix of the sample point is calculated based on the neighboring points of each algae species spectrum, and the error function is required to be minimized, that is:
[0022]
[0023] in, When x j Does not belong to x i When the neighbor of ij =0.
[0024] The output value of the sample point calculated by the local reconstruction weight matrix of the fluorescence spectrum of the algae species and its neighboring points, that is, the d-dimensional embedding value y i , the mapping condition should satisfy: the loss function is minimal, that is:
[0025]
[0026] In order to ensure that the above formula has a unique solution, the low-dimensional embedding y i Should meet:
[0027]
[0028]
[0029] The disadvantages of the prior art are:
[0030] (1) The PCA algorithm treats all samples as a whole to find the optimal linear projection with the minimum mean square error, while ignoring other attributes. The projection direction it ignores may contain important information. This may result in the extracted features not being effective in training the prediction model.
[0031] (2) The LLE algorithm requires dense sampling, and the algorithm's local neighborhood parameter k, embedding dimension d, and noise in the signal will affect the dimensionality reduction effect of the high-dimensional space. Summary of the invention
[0032] The technical problem to be solved by the present invention is to provide a convolutional neural network fluorescence spectrum feature extraction method, which is convenient for better finding feature information in the original data, reducing the time and complexity of network training, and improving the effectiveness of feature extraction, so that important feature information is continuously strengthened and unimportant information is gradually weakened.
[0033] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0034] A convolutional neural network fluorescence spectrum feature extraction method, comprising the following contents:
[0035] First, the raw data is preprocessed at the input layer of the convolutional neural network, and the important spectral regions are found by integrating the feature regions.
[0036] Secondly, the convolutional neural network adopts the DeepSpectra model, which increases the network depth while reducing the length of each feature map. The EPLS algorithm is added before the input of each convolutional layer as a sparse constraint of the network to improve the effectiveness of feature extraction. At the same time, the convolution kernel of each convolutional layer uses three scales of large, medium and small for feature extraction, and the fused information is used as a feature map to enhance the extraction effect of each layer.
[0037] A further improvement of the technical solution of the present invention is that it comprises the following steps:
[0038] (1) The measured three-dimensional spectral data are expanded into a row by connecting the excitation wavelengths end to end, retaining the spectral information of the complete wavelength points;
[0039] (2) Divide the spectral region into several unit regions according to the interval between the excitation wavelength and the emission wavelength in the spectral region. The unit region threshold is set to one third of the maximum integral value of the unit region. The spectral data with integral values greater than the threshold are retained as the input layer of the network.
[0040] (3) The convolutional neural network is set to include 1 input layer, 3 convolutional layers, 2 fully connected layers, and 1 stretching layer. Each convolutional layer includes 1 pooling layer. The maximum pooling method is adopted. The sampling window width is 2, and the maximum value in the sampling window is used as the feature value. The 3 convolutional layers are Conv1, Conv2, and Conv3. The 2 fully connected layers are F1 and F2. The 1 stretching layer is Flatten.
[0041] (4) The output data of step (2) is used as the input of the network and sparsely represented through EPLS sparse constraints;
[0042] (5) The sparsely represented data is used as the input of the convolution layer Conv1. Nine convolution kernels are used in Conv1, three of which have a size of 3 for small-scale feature extraction, three have a size of 5 for medium-scale feature extraction, and three have a size of 8 for large-scale feature extraction. The step size of each convolution kernel is 2, and the feature length of the original input spectrum is reduced and represented by nine feature dimensions. Conv1 extracts relevant information from the sparsely represented noisy spectral data and removes noise.
[0043] (6) The output of Conv1 is used as the input of the convolution layer Conv2 after EPLS sparse constraint. 18 convolution kernels are used in Conv2, 6 of which are of size 3 for small-scale feature extraction, 6 of which are of size 5 for medium-scale feature extraction, and 6 of which are of size 8 for large-scale feature extraction. The step size of each convolution kernel is 2. The feature length of the spectral data is reduced again and represented by 18 feature dimensions. Conv2 learns more complex and abstract features.
[0044] (7) The output of Conv2 is used as the input of the convolution layer Conv3 after EPLS sparse constraint. 36 convolution kernels are used in Conv3, 12 of which have a size of 3 for small-scale feature extraction, 12 have a size of 5 for medium-scale feature extraction, and 12 have a size of 8 for large-scale feature extraction. The step size of each convolution kernel is 2. The feature length of the spectral data is reduced again and represented by 36 feature dimensions.
[0045] (8) The 36 feature maps of different lengths output by the convolution layer Conv3 are converted into a one-dimensional vector by a stretching layer, and the vector is input into the fully connected layer F1. The F1 layer contains 134 neurons and finally outputs 134 features. The F2 layer has 3 neurons, corresponding to 3 spectral categories.
[0046] (9) Use the LReLU function as the activation function of Conv1, Conv2, Conv3, F1, and F2 to speed up the convergence and make gradient descent and back propagation more efficient. Select Adam as the gradient descent optimizer and the categorical cross entropy loss function as the loss function.
[0047] (10) Set the number of training sets of the dataset to 40, the training batch size to 30, and the training batch to 50. The training batch size is called batch-size, and the training batch is called epochs. Shuffle the original dataset, take out batch-size samples and corresponding labels after the shuffled order to train the convolutional neural network, and adjust the weights once every batch-size samples. After the training is completed, the features obtained by the F1 layer are used as the final extracted feature vector, and there is another dimension corresponding to the sample index.
[0048] A further improvement of the technical solution of the present invention is that the preprocessing of the raw data includes:
[0049] The characteristic region of the fluorescence spectrum data is found by integrating the fluorescence area. The entire fluorescence area is divided into several unit areas within the characteristic area. Since the three-dimensional fluorescence spectrum data is discrete data, the volume integral of the unit area is
[0050]
[0051] Where I(λ EX ,λ EM ) is the excitation wavelength λ EX , emission wavelength λ EM The fluorescence intensity at EX is the excitation wavelength interval, Δλ EM is the emission wavelength interval.
[0052] A further improvement of the technical solution of the present invention is that the basic convolution calculation formula of the convolution layer is expressed as follows:
[0053]
[0054] Among them, * represents the convolution operation, l represents the current convolution layer, is the jth feature map output by the current convolutional layer l, ω ij is the jth group of convolution kernels on the i-th feature map in the convolution layer l-1, is the i-th feature map of layer l-1, is the bias term of the jth convolution kernel in the current layer, is the number of feature maps output by the jth group of convolution kernel operations between the l-1 layer and the l layer. This convolution layer has a total of K feature maps. The activation function operation is represented by f(). The value in the convolution kernel is initially set randomly. The essence of the convolution operation is the weighted sum of the value in the convolution kernel and the value of the local receptive field. After multiple operations, the parameters in the convolution kernel are continuously optimized and updated, and eventually converge.
[0055] A further improvement of the technical solution of the present invention is that: the operation expression of the pooling layer is:
[0056]
[0057] Among them, down() represents the sampling process; l represents the current convolution layer, is the jth feature map output by the current pooling layer l; is the j-th feature map output by the l-1 layer; is a multiplicative bias term; is an additive bias term; the activation function operation is represented by f().
[0058] A further improvement of the technical solution of the present invention is that the calculation formula of the fully connected layer is:
[0059] h ω,b (x) = f(ω T x+b)
[0060] Among them, h ω,b is the output of the current neuron; x is the one-dimensional feature vector of the input neural network; ω is the weight vector of the current neuron connection; b is the bias vector; f() represents the activation function.
[0061] A further improvement of the technical solution of the present invention is that the LReLU function is used as an activation function, and its calculation formula is as follows:
[0062]
[0063] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is:
[0064] The present invention finds the spectral data of the main feature area according to the concavity and convexity of the spectral spectrum, adds sparsity constraints in the convolution layer to improve the network extraction performance, and uses a three-layer neural network plus three-scale convolution kernels to extract spectral features from different levels and receptive fields, which can better find the feature information in the original data.
[0065] First, the raw data is preprocessed in the input layer of the convolutional neural network, and the important spectral regions are found through feature area integration, which reduces the time and complexity of network training.
[0066] Secondly, sparse constraints are added before the input of each convolutional layer to improve the effectiveness of feature extraction.
[0067] The LReLU activation function sets the negative values after convolution to zero, so that important feature information is continuously strengthened and unimportant information is gradually weakened. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a schematic diagram of the convolutional neural network analysis model;
[0069] Figure 2 Schematic diagram of the convolution calculation process;
[0070] Figure 3 Schematic diagram of maximum pooling and mean pooling process;
[0071] Figure 4 This is a comparison chart of classification effects after feature extraction. DETAILED DESCRIPTION
[0072] The present invention is further described in detail below in conjunction with embodiments:
[0073] like Figures 1 to 4 As shown, the present invention continuously amplifies and extracts important fluorescence information in the original fluorescence spectrum data, and extracts new comprehensive variables to reflect most of the information of the original variables.
[0074] This technology first preprocesses the original fluorescence spectrum data, with the aim of removing unnecessary information before inputting the convolutional neural network, reducing the input and feature extraction time of the model, and increasing the efficiency and accuracy of the extraction. First, it is necessary to perform regional integration on the original three-dimensional fluorescence data to find the spectral feature area, and the spectral data in the feature area is used as the input of the convolutional neural network. The convolutional neural network uses the DeepSpectra model, which includes three convolutional layers, a stretching layer, a fully connected layer, and an output layer. The EPLS algorithm is added before each convolutional layer as a sparse constraint of the network. Through unsupervised learning of the features of the input data, the network parameters are reasonably set to help the DeepSpectra model better obtain the features of the spectral data.
[0075] Spectral data preprocessing principle:
[0076] The characteristic region of the fluorescence spectrum data is found by integrating the fluorescence area. The entire fluorescence area is divided into several unit areas within the characteristic area. Since the three-dimensional fluorescence spectrum data is discrete data, the volume integral of the unit area is
[0077]
[0078] Where I(λ EX ,λ EM ) is the excitation wavelength λ EX , emission wavelength λ EM The fluorescence intensity at EX is the excitation wavelength interval (taken as 5nm), Δλ EM is the emission wavelength interval (5nm).
[0079] DeepSpectra model of convolutional neural network:
[0080] Convolutional neural network can obtain spectral features from the original spectrum through features such as sparse connection and weight sharing. It is composed of multiple layers of neurons connected regularly, such as input layer, hidden layer and output layer. Figure 1 As shown. Its hidden layer is usually composed of alternating convolutional layers and pooling layers plus fully connected layers. The convolutional layer can extract multiple local features from the input information layer by layer. The pooling layer merges multiple adjacent feature points to reduce the amount of data and improve computing efficiency. The fully connected layer can complete nonlinear classification tasks. Whether it is the convolution kernel or the fully connected layer, its weight is not determined manually, but is learned through back propagation and learning of a large number of samples. We don’t know what the convolution layer will convolute into, nor do we know what specific features each convolution layer extracts. However, through a large number of sample back propagation, gradient descent, and iteration, the weights of the convolution kernel and the weights of the fully connected layer are automatically learned. This is exactly where the convolutional neural network needs to be trained.
[0081] (1) Convolutional layer: The convolutional layer is the core algorithm module of CNN. It is usually located after the input layer and before the pooling operation layer. It is the most important component of the convolutional neural network. The convolutional layer consists of a set of filters with trainable parameters. These filters usually have a small perception area and are also called convolution kernels. During the forward propagation of the network, each convolution kernel will slide in a certain direction on the input data and perform a convolution operation on the covered area. The basic convolution calculation formula is expressed as follows:
[0082]
[0083] Among them, * represents the convolution operation, l represents the current convolution layer, is the jth feature map output by the current convolutional layer l, ω ij is the jth group of convolution kernels on the i-th feature map in the convolution layer l-1, is the i-th feature map of layer l-1, is the bias term of the jth convolution kernel in the current layer, is the number of feature maps output by the jth convolution kernel operation between the l-1 layer and the l layer. The convolution layer has a total of K feature maps. The activation function operation is represented by f(). The value in the convolution kernel is initially set randomly. The essence of the convolution operation is the weighted sum of the value in the convolution kernel and the value of the local receptive field. After multiple operations, the parameters in the convolution kernel are continuously optimized and updated, and eventually converge. Figure 2 This is a simple example of a convolution operation. The convolution kernel is 3*3, the sliding step size is 1, and the output feature map is obtained.
[0084] (2) Pooling layer: The pooling layer is usually located after the convolution layer. Its function is to sample the feature maps generated by the convolution layer operation, so it can also be called a sampling layer. The operation of the pooling layer does not reduce the number of feature maps, but reduces the dimension of each feature map, reduces the amount of data, and can improve the operation speed and enhance the robustness of the neural network model. Formula (2-20) is the general operation expression of the pooling layer:
[0085]
[0086] Among them, down() represents the sampling process; l represents the current convolution layer, is the jth feature map output by the current pooling layer l; is the j-th feature map output by the l-1 layer; is a multiplicative bias term; is an additive bias term; the activation function operation is represented by f(). Figure 3 It is the operation process of maximum pooling and average pooling.
[0087] (3) Fully connected layer: After the operation of the convolution layer and the pooling layer, the neural network extracts local and global features from the input data that were not directly available at first. The fully connected layer is composed of one or more layers of neurons, where neurons are usually interconnected with all neurons in the adjacent layers. Its function is to receive the output results of the convolution and pooling layers and classify local and global features. The calculation formula of the fully connected layer is:
[0088] h ω,b (x) = f(ω T x+b)
[0089] Among them, h ω,b is the output of the current neuron; x is the one-dimensional feature vector of the input neural network; ω is the weight vector of the current neuron connection; b is the bias vector; f() represents the activation function.
[0090] h ω,b Input to the softmax classifier. h ω,b The value can be positive or negative. The role of the softmax classifier is to convert h ω,b Normalized to the range of 0 to 1. The output of softmax σ(h ω,b ) represents the probability that the spectrum belongs to each category.
[0091] For the convolutional layer and the fully connected layer, the leaky rectified linear unit (LReLU) is used as the activation function, and its calculation formula is as follows:
[0092]
[0093] The LReLU activation function sets the negative values after convolution to zero, so that important feature information is continuously strengthened and unimportant information is gradually weakened.
[0094] The training and optimization of convolutional neural networks rely on the loss function, which calculates the error between the predicted value and the true value. The error is propagated from the last layer to each layer of the network through the back propagation algorithm and the weights are updated. The updated parameters continue to participate in the training, and the cycle repeats until the loss function value reaches the minimum, that is, the final training purpose is achieved. This model uses the cross entropy loss function as the objective function. At the same time, in order to prevent the model from overfitting, the L2 regularization method is used. The objective equation is as follows:
[0095]
[0096] Among them, N is the total number of training samples, y n is the actual category of the sample, is the predicted category of the sample, λ is the regularization coefficient, and w is the weight that needs to be regularized.
[0097] The DeepSpectra model consists of three convolutional layers, one stretching layer, and two fully connected layers. Each convolutional layer includes a pooling layer, which is used to reduce the dimension of each feature. The second fully connected layer can be regarded as the output layer. The number of neurons in the second fully connected layer can be set according to the specific material category. The first fully connected layer is the feature data obtained after the original data is convolved and pooled.
[0098] Large-scale training samples in convolutional neural network systems are redundant and sparse. Sparsity is manifested in activation time sparsity and sample distribution sparsity. Activation time sparsity describes the high abundance of neuronal response distribution, and sample distribution sparsity describes that only a few neuronal units are in an activated state at any time, which provides a convenient representation for input data. Two sparsity constraints are introduced through the EPLS algorithm to perform unsupervised learning on the input data. The specific steps of the EPLS algorithm are:
[0099] Construct a sparse matrix T from the network layer output H, let H l,b is the output matrix of the l-th layer network, which consists of dimension N h l N b The output vector is composed of N samples. l,b is the sparse matrix obtained after EPLS sparseness, with the same dimension as H l,b Same, initially T l,b is all zero, the EPLS algorithm selects the jth element h of the row vector h j , find out h j Subtract inhibitory factor a j The element position k with the largest value in the vector after is used as the activation position, which can ensure the sparse distribution of samples. The initial value of the suppression factor a is an all-zero vector with the same dimension as h. It can count the number of times a position is selected as the activation position, and the activation time sparsity is ensured by penalizing the position. Update T l,b The element at this position in the matrix is set to 1, and the suppression factor a is updated. Traverse all row vectors to obtain the sparse representation T of the original data l,b .
[0100] Specific implementation steps of this technology:
[0101] (1) The measured three-dimensional spectral data is expanded into a row by connecting the excitation wavelengths end to end, retaining the spectral information of the complete wavelength point
[0102] (2) The spectral region is divided into several unit regions according to the interval between the excitation wavelength and the emission wavelength in the spectral region. The threshold of the unit region is set to one third of the maximum integral value of the unit region. The spectral data with integral values greater than the threshold are retained as the input layer of the network.
[0103] (3) The convolutional neural network is configured with one input layer, three convolutional layers (Conv1, Conv2, and Conv3), two fully connected layers (F1 and F2), and one stretching layer (Flatten). Each convolutional layer includes one pooling layer. The maximum pooling method is adopted, and the sampling window width is 2. The maximum value in the sampling window is taken as the feature value.
[0104] (4) The output data of step (2) is used as the input of the network and sparsely represented after being constrained by EPLS.
[0105] (5) The sparsely represented data is used as the input of the convolution layer Conv1. In Conv1, 9 convolution kernels are used, 3 of which are of size 3 for small-scale feature extraction, 3 of which are of size 5 for medium-scale feature extraction, and 3 of which are of size 8 for large-scale feature extraction. The step size of each convolution kernel is 2, and the feature length of the original input spectrum is reduced and represented by 9 feature dimensions. Conv1 extracts relevant information from the sparsely represented noisy spectral data and removes the noise.
[0106] (6) The output of Conv1 is subjected to EPLS sparse constraint as the input of convolution layer Conv2. In Conv2, 18 convolution kernels are used, 6 of which are of size 3 for small-scale feature extraction, 6 of which are of size 5 for medium-scale feature extraction, and 6 of which are of size 8 for large-scale feature extraction. The step size of each convolution kernel is 2. The feature length of the spectral data is reduced again and represented by 18 feature dimensions. Conv2 learns more complex and abstract features.
[0107] (7) The output of Conv2 is subjected to EPLS sparse constraint as the input of convolution layer Conv3. 36 convolution kernels are used in Conv3, 12 of which have a size of 3 for small-scale feature extraction, 12 have a size of 5 for medium-scale feature extraction, and 12 have a size of 8 for large-scale feature extraction. The step size of each convolution kernel is 2. The feature length of the spectral data is reduced again and represented by 36 feature dimensions.
[0108] (8) The stretching layer converts the 36 feature maps of different lengths output by the convolutional layer Conv3 into a one-dimensional vector and inputs the vector into the fully connected layer F1. The F1 layer contains 134 neurons and finally outputs 134 features. The F2 layer has 3 neurons, corresponding to 3 spectral categories.
[0109] (9) The LReLU function is used as the activation function of Conv1, Conv2, Conv3, F1, and F2 to speed up the convergence and make gradient descent and back propagation more efficient. Adam is selected as the gradient descent optimizer and the categorical cross entropy loss function is used as the loss function.
[0110] (10) The number of training sets in the dataset is 40, the batch size is 30, and the number of epochs is 50. The original dataset is shuffled, and batch-size samples and corresponding labels are taken out for convolutional neural network training. The weights are adjusted once batch-size samples are used. After the training is completed, the features obtained by the F1 layer are used as the final extracted feature vector, and the other dimension is the corresponding sample index.
[0111] In order to verify the effect of feature extraction, the fluorescence spectra of Aureobasidium anophagenum, Synechococcus elongatus and Chlorella vulgaris were used as identification objects. The feature vectors were returned as the input of the support vector machine classification model after feature extraction by PCA, LLE and CNN respectively. The classification effects were compared. The average classification accuracy was as follows: Figure 4 As shown, the average classification accuracy is significantly improved.
Claims
1. A convolutional neural network fluorescence spectrum feature extraction method, Features: Includes the following: First, the raw data is preprocessed at the input layer of the convolutional neural network, and the important spectral regions are found by integrating the feature regions. Secondly, the convolutional neural network uses the DeepSpectra model, which increases the network depth while reducing the length of each feature map. The EPLS algorithm is added before the input of each convolutional layer as a sparse constraint of the network to improve the effectiveness of feature extraction. At the same time, the convolution kernel of each convolutional layer uses three scales of large, medium and small for feature extraction, and the fused information is used as a feature map to enhance the extraction effect of each layer. The following steps are involved: (1) The measured three-dimensional spectral data are expanded into a row by connecting the excitation wavelengths end to end, retaining the spectral information of the complete wavelength points; (2) Divide the spectral region into several unit regions according to the interval between the excitation wavelength and the emission wavelength in the spectral region. The unit region threshold is set to one third of the maximum integral value of the unit region. The spectral data with integral values greater than the threshold are retained as the input layer of the network. (3) The convolutional neural network is set to include 1 input layer, 3 convolutional layers, 2 fully connected layers, and 1 stretching layer. Each convolutional layer includes 1 pooling layer. The maximum pooling method is adopted. The sampling window width is 2, and the maximum value in the sampling window is used as the feature value. The 3 convolutional layers are Conv1, Conv2, and Conv3. The 2 fully connected layers are F1 and F2. The 1 stretching layer is Flatten. (4) The output data of step (2) is used as the input of the network and sparsely represented through EPLS sparse constraints; (5) The sparsely represented data is used as the input of the convolution layer Conv1. Nine convolution kernels are used in Conv1, three of which have a size of 3 for small-scale feature extraction, three have a size of 5 for medium-scale feature extraction, and three have a size of 8 for large-scale feature extraction. The step size of each convolution kernel is 2, and the feature length of the original input spectrum is reduced and represented by nine feature dimensions. Conv1 extracts relevant information from the sparsely represented noisy spectral data and removes noise. (6) The output of Conv1 is used as the input of the convolution layer Conv2 after EPLS sparse constraint. 18 convolution kernels are used in Conv2, 6 of which are of size 3 for small-scale feature extraction, 6 of which are of size 5 for medium-scale feature extraction, and 6 of which are of size 8 for large-scale feature extraction. The step size of each convolution kernel is 2. The feature length of the spectral data is reduced again and represented by 18 feature dimensions. Conv2 learns more complex and abstract features. (7) The output of Conv2 is used as the input of the convolution layer Conv3 after EPLS sparse constraint. 36 convolution kernels are used in Conv3, 12 of which have a size of 3 for small-scale feature extraction, 12 have a size of 5 for medium-scale feature extraction, and 12 have a size of 8 for large-scale feature extraction. The step size of each convolution kernel is 2. The feature length of the spectral data is reduced again and represented by 36 feature dimensions. (8) The 36 feature maps of different lengths output by the convolution layer Conv3 are converted into a one-dimensional vector through the stretching layer, and the vector is input into the fully connected layer F1. The F1 layer contains 134 neurons and finally outputs 134 features. The F2 layer has 3 neurons, corresponding to 3 spectral categories; (9) Use the LReLU function as the activation function of Conv1, Conv2, Conv3, F1, and F2 to speed up convergence and make gradient descent and back propagation more efficient. Select Adam as the gradient descent optimizer and the categorical cross entropy loss function as the loss function. (10) Set the number of training sets of the dataset to 40, the training batch size to 30, and the training batch to 50. The training batch size is called batch-size, and the training batch is called epochs. Shuffle the original dataset, take out batch-size samples and corresponding labels after the shuffled order to train the convolutional neural network, and adjust the weights once every batch-size samples. After the training is completed, the features obtained by the F1 layer are used as the final extracted feature vector, and there is another dimension corresponding to the sample index.
2. A convolutional neural network fluorescence spectrum feature extraction method according to claim 1, Features: The preprocessing of the raw data includes: The characteristic region of the fluorescence spectrum data is found by integrating the fluorescence area. The entire fluorescence area is divided into several unit areas within the characteristic area. Since the three-dimensional fluorescence spectrum data is discrete data, the volume integral of the unit area is Where I(λ EX ,λ EM ) is the excitation wavelength λ EX , emission wavelength λ EM The fluorescence intensity at EX is the excitation wavelength interval, Δλ EM is the emission wavelength interval.
3. The method for extracting fluorescence spectrum features using a convolutional neural network according to claim 1, Features: The basic convolution calculation formula of the convolution layer is expressed as follows: Among them, * represents the convolution operation, l represents the current convolution layer, is the jth feature map output by the current convolutional layer l, ω ij is the jth group of convolution kernels on the i-th feature map in the convolution layer l-1, is the i-th feature map of layer l-1, is the bias term of the jth convolution kernel in the current layer, is the number of feature maps output by the jth group of convolution kernel operations between the l-1 layer and the l layer. This convolution layer has a total of K feature maps. The activation function operation is represented by f(). The value in the convolution kernel is initially set randomly. The essence of the convolution operation is the weighted sum of the value in the convolution kernel and the value of the local receptive field. After multiple operations, the parameters in the convolution kernel are continuously optimized and updated, and eventually converge.
4. The method for extracting fluorescence spectrum features using a convolutional neural network according to claim 1, Features: The operation expression of the pooling layer is: Among them, down() represents the sampling process; l represents the current convolution layer, is the jth feature map output by the current pooling layer l; is the j-th feature map output by the l-1 layer; is a multiplicative bias term; is an additive bias term; the activation function operation is represented by f().
5. The method for extracting fluorescence spectrum features using a convolutional neural network according to claim 1, Features: The calculation formula of the fully connected layer is: h ω,b (x)=f(ω T x+b) Among them, h ω,b is the output of the current neuron; x is the one-dimensional feature vector of the input neural network; ω is the weight vector of the current neuron connection; b is the bias vector; f() represents the activation function.
6. The method for extracting fluorescence spectrum features using a convolutional neural network according to claim 1, Features: The LReLU function is used as an activation function, and its calculation formula is as follows:
Citation Information
Patent Citations
Convolutional neural network hyperspectral image sharpening method based on hierarchical feature fusion
CN110544212A
Hyperspectral unmixing algorithm based on denoised three-dimensional convolutional self-encoding network
CN111260576A
Multi-scale face detection method based on feature fusion and visual receptive field network
CN111695430A
Extended interior methods and systems for spectral, optical, and photoacoustic imaging
US20110282181A1
Method and system for detection and classification of cells using convolutional neural networks
US20190065817A1
