CN114067169A - Raman spectrum analysis method based on convolutional neural network - Google Patents

Raman spectrum analysis method based on convolutional neural network Download PDF

Info

Publication number
CN114067169A
CN114067169A CN202111203315.2A CN202111203315A CN114067169A CN 114067169 A CN114067169 A CN 114067169A CN 202111203315 A CN202111203315 A CN 202111203315A CN 114067169 A CN114067169 A CN 114067169A
Authority
CN
China
Prior art keywords
neural network
stage
convolution
output
shape
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111203315.2A
Other languages
Chinese (zh)
Inventor
张怡龙
方子安
王海霞
陈朋
梁荣华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202111203315.2A priority Critical patent/CN114067169A/en
Publication of CN114067169A publication Critical patent/CN114067169A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Investigating, Analyzing Materials By Fluorescence Or Luminescence (AREA)

Abstract

A method for Raman spectrum identification based on a convolutional neural network comprises the following steps: 1) collecting an original Raman spectrum through a Raman spectrometer, and simultaneously dividing the original Raman spectrum into a training set and a verification set; 2) establishing a neural network model, setting the number of convolution layers, the size of a convolution kernel, training parameters and a loss function, inputting the picture obtained in the step 1) into the neural network, and operating the neural network to obtain a final recognition result. The method uses the convolutional neural network, can directly distinguish the type of the substance to be detected from the original Raman spectrum image, does not need to carry out complex pretreatment on the Raman spectrum, thereby reducing the requirement on hardware, improving the efficiency and reducing the cost; the strong calculation capacity of the GPU and a large number of collected original Raman spectrograms are utilized to train the convolutional neural network, all parameters of the recognition model are determined, and the rapid automatic recognition of the type of the substance to be detected of the Raman spectrograms can be realized.

Description

Raman spectrum analysis method based on convolutional neural network
Technical Field
The invention relates to the field of spectral analysis methods, in particular to a Raman spectral analysis method based on a convolutional neural network.
Background
The raman spectrum is often affected by fluorescence, noise, baseline drift and cosmic rays, which causes errors in subsequent spectral analysis, increases the difficulty in extracting data information and greatly affects the accuracy of identification, so that complicated preprocessing steps such as image denoising and baseline correction are usually performed before the raman spectrum identification.
Meanwhile, due to the influences of physical characteristics (such as granularity, filling density, uniformity and the like) of a substance to be detected, environment temperature, nonlinear response of a detector and the like, a certain nonlinear relation exists between a Raman spectrum and the content of the substance to be detected and components, but most of Raman spectrum qualitative or quantitative correction methods at the present stage are linear models and cannot well represent the nonlinear models.
In the prior art, parameters are mostly preset according to experience when a recognition model is established, on one hand, the accuracy of spectral analysis is limited by the method, on the other hand, the parameters of the recognition model need to be adjusted according to different characteristics of substances to be detected, so that the prediction model set according to experience can only be used for recognizing some specific substances, and the neural network model needs to be adjusted every time different substances are measured, which not only causes the poor universality of the recognition model, but also more importantly, the accuracy of the recognition model is difficult to ensure.
Disclosure of Invention
Aiming at the defects of the existing Raman spectrum analysis technology, the invention provides a Raman spectrum analysis method based on a convolutional neural network, which aims to identify substances, adopts a self-adaptive learning method to train and obtain the parameters of an identification model, and the established neural network model has wider applicability and more accurate identification accuracy.
In order to achieve the purpose, the invention adopts the technical scheme that the Raman spectrum analysis method based on the convolutional neural network comprises the following steps:
1) the original Raman spectrum is collected by a Raman spectrometer and is divided into a training set and a verification set.
2) Establishing a neural network model, setting the number of convolution layers of the neural network, the size of a convolution kernel, training parameters and a loss function, inputting the original Raman spectrogram obtained in the step 1) into the neural network, and operating the neural network to obtain a final recognition result.
Further, in the step 1), the process of acquiring the original Raman spectrum comprises the steps of shooting an original Raman spectrum image, namely placing a quartz cuvette filled with a substance to be detected on an object stage, and capturing a Raman image of the sample by using a Raman spectrometer.
Further, in the step 2), the process of constructing the neural network includes the following steps:
2.1) constructing a convolution neural network;
constructing a residual convolutional neural network model, wherein the whole residual convolutional neural network comprises 5 stages,
the stage 1 has a simpler structure compared with the stage 2, and can be regarded as preprocessing of input, the following four stages are all composed of bottleecks, the structure is similar, the stage 2 comprises three bottleecks, and the rest three stages respectively comprise 4,6 and 3 bottleecks.
Each stage will now be described in detail.
Stage 1:
(3,224,224) indicates the number of channels (channel), height (height) and width (width) of the Input, i.e. (C, H, W), and the stage first performs Convolution (Convolution), the size of the Convolution kernel is 7 × 7, the number of Convolution kernels is 64 (i.e. the number of channels output by the Convolution layer), the step size of the Convolution kernel is 2, then performs Batch Normalization (BN layer), the activation function is ReLU, and the second layer in the stage is MAXPOOL, i.e. the maximum pooling layer, whose Convolution kernel size is 3 × 3 and the step size is 2.
(64,56,56) are the number of channels, height and width, of the output of the stage, where 64 equals the number of convolution kernels in the first layer convolution layer of the stage, and 56 equals 224/2/2 (a step size of 2 would halve the input size).
Generally, at this stage, the raman spectrogram in the shape of (3,224,224) passes through the convolution layer, the BN layer, the ReLU activation function, and the MaxPooling layer in sequence to obtain an output in the shape of (64,56, 56).
And (2) stage:
the stage 2 mainly comprises two types of Bottleneck structures, which respectively correspond to the following two cases, wherein the number of input channels and output channels is different (Bottleneck1) and the number of input channels and output channels is the same (Bottleneck 2).
First, Bottleneck2 is introduced, wherein the input with the shape (c, w, w) is x, the three volume blocks of Bottleneck2 are function F (x), and after the addition of the function F (x) and the function F (x), the output of Bottleneck2 is obtained through a ReLU activation function, and the shape of the output is unchanged.
Compared with the Bottleneck2, Bottleneck1 has one more convolution layer, denoted as G (x), and the input picture passes through the convolution layer, changes x to G (x), and then is summed with the convolution block (F (x)) + G (x)). The output layer of the network is a fully-connected layer with 15 neurons, and the probability of each category is output through an activation function Softmax to determine a recognition result.
And (3) stage:
stage 3 consists of one bottleeck 1 and three bottleeck 2, the input shape of the stage is (256,56,56), the output is (512,28,28) after passing through bottleeck 1, and the shape of the final output is (512,28,28) because bottleeck 2 does not change.
And (4) stage:
stage 2 consists of one bottleeck 1 and five bottleeck 2, the input shape of the stage is (512,28,28), the output is (1024,14,14) after the stage passes through the bottleeck 1, and the shape of the stage is not changed by the bottleeck 2, so the final output shape is (1024,14, 14).
And (5) stage:
stage 5 consists of one bottleeck 1 and two bottleeck 2, the input shape of the stage is (1024,14,14), the output is (2048,7,7) after passing through bottleeck 1, and the shape of the final output shape is (2048,7,7) because bottleeck 2 does not change.
2.2) operating a neural network;
the input of the neural network is an image with the size 224 x 3, parameters of the convolutional neural network are determined, the image is input into the neural network, and iterative optimization is carried out by using an Adam optimizer, so that a loss function is continuously reduced, wherein the loss function is defined as a cross entropy error:
Figure BDA0003305885610000031
and when the loss function is not reduced any more, namely the training of the neural network is finished, inputting the newly acquired Raman spectrum image into the neural network to obtain the identification result of the type of the substance to be detected.
The invention has the following beneficial effects:
aiming at the wide application of the current Raman spectrum recognition technology to material recognition, in order to meet the requirements of high efficiency, low cost and rapidity, the Raman spectrum recognition technology is combined with a deep learning technology, and a Raman spectrum analysis method based on a convolutional neural network is disclosed.
1) Reduce the cost
The convolution neural network is used, the type of a substance to be detected can be directly distinguished from an original Raman spectrum image, and complex preprocessing is not needed to be carried out on the Raman spectrum, so that the requirement on hardware is reduced, the efficiency is improved, and the cost is reduced.
2) Faster automatic identification
The strong calculation capacity of the GPU and a large number of collected original Raman spectrograms are utilized to train the convolutional neural network, all parameters of the recognition model are determined, and the rapid automatic recognition of the type of the substance to be detected of the Raman spectrograms can be realized.
Drawings
FIG. 1 is a system flow diagram of the method of the present invention;
FIG. 2 is a schematic diagram of a hardware platform of an automatic identification system for a substance to be detected based on Raman spectrum analysis and a convolutional neural network;
FIG. 3 is a block diagram of a convolutional neural network of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings:
referring to fig. 1 to 3, a raman spectrum analysis method based on a convolutional neural network includes the steps of:
1) referring to fig. 2, the process of taking the original raman spectrum image is to place a quartz cuvette containing the substance to be measured on a stage and capture a raman image of the sample using a raman spectrometer.
2) Constructing a convolutional neural network model, setting a training parameter and a loss function, inputting the original Raman spectrum image obtained in the step 1) into a convolutional neural network, and training the convolutional neural network to obtain a final recognition result, wherein the method comprises the following steps:
2.1) constructing a neural network;
referring to fig. 3, a residual convolutional neural network model is constructed, the whole residual convolutional neural network comprises 5 stages,
the stage 1 is simpler than the stage 2 in structure, and can be regarded as preprocessing of input, the last four stages are all composed of Bottleneecks, the structure is similar, the stage 2 comprises three Bottleneecks, and the rest three stages respectively comprise 4,6 and 3 Bottleneecks.
Each stage will now be described in detail.
Stage 1:
(3,224,224) indicates the number of channels (channel), height (height) and width (width) of the Input, i.e. (C, H, W), and the stage first performs Convolution (Convolution), the size of the Convolution kernel is 7 × 7, the number of Convolution kernels is 64 (i.e. the number of channels output by the Convolution layer), the step size of the Convolution kernel is 2, then performs Batch Normalization (BN layer), the activation function is ReLU, and the second layer in the stage is MAXPOOL, i.e. the maximum pooling layer, whose Convolution kernel size is 3 × 3 and the step size is 2.
(64,56,56) are the number of channels, height and width, of the output of the stage, where 64 equals the number of convolution kernels in the first layer convolution layer of the stage, and 56 equals 224/2/2 (a step size of 2 would halve the input size).
Generally, at this stage, the raman spectrogram in the shape of (3,224,224) passes through the convolution layer, the BN layer, the ReLU activation function, and the MaxPooling layer in sequence to obtain an output in the shape of (64,56, 56).
And (2) stage:
the stage 2 mainly comprises two types of Bottleneck structures, which respectively correspond to the following two cases, wherein the number of input channels and output channels is different (Bottleneck1) and the number of input channels and output channels is the same (Bottleneck 2).
First, Bottleneck2 is introduced, wherein the input with the shape (c, w, w) is x, the three volume blocks of Bottleneck2 are function F (x), and after the addition of the function F (x) and the function F (x), the output of Bottleneck2 is obtained through a ReLU activation function, and the shape of the output is unchanged.
Compared with the bottleeck 2, the bottleeck 1 has one more convolution layer, which is g (x), and the input picture passes through the convolution layer, changes x to g (x), and then sums with the convolution block (f (x)) + g (x)). And after passing through an output layer of the network, the network is a fully-connected layer with 15 neurons, and the probability of each category is output through an activation function Softmax to determine a recognition result.
And (3) stage:
stage 3 consists of one bottleeck 1 and three bottleeck 2, the input shape of the stage is (256,56,56), the output is (512,28,28) after passing through bottleeck 1, and the shape of the final output is (512,28,28) because bottleeck 2 does not change.
And (4) stage:
stage 4 consists of one bottleeck 1 and five bottleeck 2, the input shape of the stage is (512,28,28), the output is (1024,14,14) after passing through bottleeck 1, and the shape of the final output is (1024,14,14) because bottleeck 2 does not change.
And (5) stage:
stage 5 consists of one bottleeck 1 and two bottleeck 2, the input shape of the stage is (1024,14,14), the output is (2048,7,7) after passing through bottleeck 1, and the shape of the final output shape is (2048,7,7) because bottleeck 2 does not change.
2.2) running neural networks
The input of the neural network is an image with the size 224 x 3, parameters of the convolutional neural network are determined, the image is input into the neural network, and iterative optimization is carried out by using an Adam optimizer, so that a loss function is continuously reduced, wherein the loss function is defined as a cross entropy error:
Figure BDA0003305885610000061
and when the loss function is not reduced any more, namely the training of the neural network is finished, inputting the newly acquired Raman spectrum image into the neural network to obtain the identification result of the type of the substance to be detected.
The embodiments described in this specification are merely illustrative of implementations of the inventive concept and the scope of the present invention should not be considered limited to the specific forms set forth in the embodiments but rather by the equivalents thereof as may occur to those skilled in the art upon consideration of the present inventive concept.

Claims (3)

1. A Raman spectrum analysis method based on a convolutional neural network is characterized by comprising the following steps:
1) collecting an original Raman spectrum through a Raman spectrometer, and simultaneously dividing the original Raman spectrum into a training set and a verification set;
2) establishing a neural network model, setting the number of convolution layers of the neural network, the size of a convolution kernel, training parameters and a loss function, inputting the original Raman spectrogram obtained in the step 1) into the neural network, and operating the neural network to obtain a final recognition result.
2. A method of raman spectral analysis based on a convolutional neural network as defined in claim 1, wherein: in the step 1), the acquiring of the original raman spectrum specifically includes:
the process of shooting the original Raman spectrum image comprises the steps of placing a quartz cuvette filled with a substance to be detected on an objective table, and capturing a Raman image of a sample by using a Raman spectrometer.
3. A method of raman spectral analysis based on a convolutional neural network as defined in claim 1, wherein: in the step 2), the process of constructing the neural network comprises the following steps:
2.1) constructing a convolution neural network;
constructing a residual convolutional neural network model, wherein the whole residual convolutional neural network comprises 5 stages,
the stage 2 comprises three Bottleneecks, and the rest three stages respectively comprise 4,6 and 3 Bottleneecks;
stage 1:
(3,224,224) indicates the number of channels (channel), height (height) and width (width) of Input, i.e., (C, H, W), the stage first performs Convolution (Convolution), the size of Convolution kernel is 7 × 7, the number of Convolution kernels is 64 (i.e., the number of channels output by the Convolution layer), and the step size of Convolution kernel is 2; then, Batch Normalization (BN layer) is performed, the activation function is ReLU, the second layer in this stage is MAXPOOL, i.e., the maximum pooling layer, the size of the convolution kernel is 3 × 3, and the step size is 2;
(64,56,56) are the number of channels, height and width, of the output of the stage, where 64 equals the number of convolution kernels in the first layer convolutional layer of the stage, and 56 equals 224/2/2 (a step size of 2 would halve the input size);
at this stage, the raman spectrogram with the shape of (3,224,224) passes through the convolution layer, the BN layer, the ReLU activation function, and the MaxPooling layer in sequence to obtain an output with the shape of (64,56, 56);
and (2) stage:
the stage 2 comprises two types of Bottleneck structures which respectively correspond to the following two cases, wherein the number of input channels and the number of output channels are different (Bottleneck1) and the number of input channels and the number of output channels are the same (Bottleneck 2);
firstly, describing Bottleneck2, wherein an input with the shape of (c, w, w) is x, three volume blocks of Bottleneck2 are functions F (x), and after the input is added, a ReLU activation function is passed to obtain an output of Bottleneck2, and the shape of the output is unchanged;
compared with the Bottleneck2, Bottleneck1 has one more convolution layer, which is G (x), and the input picture passes through the convolution layer, changes x into G (x), and then sums with the convolution block (F (x)) + G (x); outputting the probability of each category through an activation function Softmax and determining a recognition result, wherein the output layer of the network is a full connection layer with 15 neurons;
stage 3, which consists of one Bottleneck1 and three Bottleneck2, wherein the input shape of the stage is (256,56,56), the output is (512,28,28) after passing through the Bottleneck1, the shape of the Bottleneck2 is not changed, so that the final output shape is (512,28, 28);
stage 4, which consists of one Bottleneck1 and five Bottleneck2, wherein the input shape of the stage is (512,28,28), the output is (1024,14,14) after passing through the Bottleneck1, the shape of the Bottleneck2 is not changed, so that the final output shape is (1024,14, 14);
stage 5, which consists of one Bottleneck1 and two Bottleneck2, wherein the input shape of the stage is (1024,14,14), the output is (2048,7,7) after passing through the Bottleneck1, and the Bottleneck2 does not change the shape, so the final output shape is (2048,7, 7);
2.2) operating a neural network;
the input of the neural network is an image with the size 224 x 3, parameters of the convolutional neural network are determined, the image is input into the neural network, and iterative optimization is carried out by using an Adam optimizer, so that a loss function is continuously reduced, wherein the loss function is defined as a cross entropy error:
Figure FDA0003305885600000031
and when the loss function is not reduced any more, namely the training of the neural network is finished, inputting the newly acquired Raman spectrum image into the neural network to obtain the identification result of the type of the substance to be detected.
CN202111203315.2A 2021-10-15 2021-10-15 Raman spectrum analysis method based on convolutional neural network Pending CN114067169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111203315.2A CN114067169A (en) 2021-10-15 2021-10-15 Raman spectrum analysis method based on convolutional neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111203315.2A CN114067169A (en) 2021-10-15 2021-10-15 Raman spectrum analysis method based on convolutional neural network

Publications (1)

Publication Number Publication Date
CN114067169A true CN114067169A (en) 2022-02-18

Family

ID=80234690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111203315.2A Pending CN114067169A (en) 2021-10-15 2021-10-15 Raman spectrum analysis method based on convolutional neural network

Country Status (1)

Country Link
CN (1) CN114067169A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114912348A (en) * 2022-04-15 2022-08-16 东莞理工学院 Method for removing optical fiber Raman background in optical fiber SERS probe
CN117290669A (en) * 2023-11-24 2023-12-26 之江实验室 Optical fiber temperature sensing signal noise reduction method, device and medium based on deep learning
CN114912348B (en) * 2022-04-15 2024-10-01 东莞理工学院 Method for removing optical fiber Raman background in optical fiber SERS probe

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114912348A (en) * 2022-04-15 2022-08-16 东莞理工学院 Method for removing optical fiber Raman background in optical fiber SERS probe
CN114912348B (en) * 2022-04-15 2024-10-01 东莞理工学院 Method for removing optical fiber Raman background in optical fiber SERS probe
CN117290669A (en) * 2023-11-24 2023-12-26 之江实验室 Optical fiber temperature sensing signal noise reduction method, device and medium based on deep learning
CN117290669B (en) * 2023-11-24 2024-02-06 之江实验室 Optical fiber temperature sensing signal noise reduction method, device and medium based on deep learning

Similar Documents

Publication Publication Date Title
CN108846835B (en) Image change detection method based on depth separable convolutional network
CN107729721B (en) Metabolite identification and disorder pathway analysis method
CN108446616B (en) Road extraction method based on full convolution neural network ensemble learning
CN106248621B (en) A kind of evaluation method and system
CN110243806A (en) Component of mixture recognition methods under Raman spectrum based on similarity
CN111210402A (en) Face image quality scoring method and device, computer equipment and storage medium
CN111709775A (en) House property price evaluation method and device, electronic equipment and storage medium
CN114755357A (en) Automatic integration method, system, equipment and medium for chromatographic mass spectrometry
CN114611582B (en) Method and system for analyzing substance concentration based on near infrared spectrum technology
CN117909836A (en) Raman spectrum identification method and system suitable for complex system
CN114067169A (en) Raman spectrum analysis method based on convolutional neural network
CN114494756A (en) Improved clustering algorithm based on Shape-GIoU
CN114216877A (en) Automatic detection and reconstruction method and system for spectral peak in tea near infrared spectral analysis
CN118016199A (en) Column chromatography prediction method based on machine learning
CN113567605A (en) Method and device for constructing automatic interpretation model of mass chromatogram and electronic equipment
CN110751400B (en) Risk assessment method and device
CN109063767B (en) Near infrared spectrum modeling method based on sample and variable consensus
CN113487550B (en) Target detection method and device based on improved activation function
CN115527193A (en) Chinese medicinal material type identification method
CN114187242A (en) Guidance optical fiber surface defect detection and positioning method based on deep learning
CN114141316A (en) Method and system for predicting biological toxicity of organic matters based on spectrogram analysis
CN113496485A (en) Satellite remote sensing image quality evaluation method and device
CN115795225B (en) Screening method and device for near infrared spectrum correction set
CN114550840B (en) Fentai-ni substance detection method and device based on twin network
CN118470014B (en) Industrial anomaly detection method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination