CN117054396B - Raman spectrum detection method and device based on double-path multiplicative neural network - Google Patents

Raman spectrum detection method and device based on double-path multiplicative neural network Download PDF

Info

Publication number
CN117054396B
CN117054396B CN202311308971.8A CN202311308971A CN117054396B CN 117054396 B CN117054396 B CN 117054396B CN 202311308971 A CN202311308971 A CN 202311308971A CN 117054396 B CN117054396 B CN 117054396B
Authority
CN
China
Prior art keywords
path
multiplication
neural network
raman spectrum
dual
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.)
Active
Application number
CN202311308971.8A
Other languages
Chinese (zh)
Other versions
CN117054396A (en
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.)
Tianjin University
Original Assignee
Tianjin University
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 Tianjin University filed Critical Tianjin University
Priority to CN202311308971.8A priority Critical patent/CN117054396B/en
Publication of CN117054396A publication Critical patent/CN117054396A/en
Application granted granted Critical
Publication of CN117054396B publication Critical patent/CN117054396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/62Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light
    • G01N21/63Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light optically excited
    • G01N21/65Raman scattering
    • 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
    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Chemical & Material Sciences (AREA)
  • Biochemistry (AREA)
  • Analytical Chemistry (AREA)
  • Pathology (AREA)
  • Immunology (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Investigating, Analyzing Materials By Fluorescence Or Luminescence (AREA)

Abstract

The application provides a Raman spectrum detection method and device based on a dual-path multiplicative-free neural network, wherein the method comprises the following steps: acquiring a Raman spectrum of a standard sample acquired by a handheld Raman spectrometer, and constructing a dual-path multiplicationless neural network based on the Raman spectrum of the standard sample; performing network training on the constructed double-path multiplicative-free neural network; the Raman spectrum of the sample to be detected, which is acquired through the handheld Raman spectrometer, is acquired, the Raman spectrum of the sample to be detected is input into a pre-trained dual-path multiplication-free neural network, class probability representing the Raman spectrum is output, and the class of the sample to be detected is obtained based on the class probability. The Raman spectrum detection method and device based on the dual-path multiplicative-free neural network can be conveniently deployed on a handheld Raman spectrometer for real-time detection without an external computing server, so that the system cost and the detection time are reduced.

Description

Raman spectrum detection method and device based on double-path multiplicative neural network
Technical Field
The application belongs to the technical field of Raman spectrum detection, and particularly relates to a Raman spectrum detection method and device based on a dual-path multiplicaless neural network.
Background
The Raman spectrum is a scattering spectrum capable of reflecting molecular vibration information, can provide material molecular fingerprint information, is an important analysis technology, has the advantages of no damage, rapidness and no pollution, and is widely applied to various research fields. Traditional raman spectrometers are expensive and bulky and can only be operated in the laboratory by professionals. The hand-held Raman spectrometer developed in recent years can be as large as a mobile phone, and the application range of Raman spectrum detection is greatly expanded.
The traditional Raman spectrum detection process is complex, the characteristic selection is seriously dependent on manual experience and the like, the deep learning method can optimize the analysis flow, improve the analysis efficiency, facilitate the application of Raman spectrum detection to the automatic direction, greatly improve the accuracy of substance detection and expand the application range of the technology in actual production.
The existing deep learning Raman spectrum detection method cannot be applied to handheld equipment, and the main problems are that: the existing Raman spectrum detection deep neural network mostly adopts a convolutional neural network structure, the bottom operation is matrix multiplication operation, the calculation complexity is high, a large amount of calculation resources and storage resources are needed to be completed, the existing Raman spectrum detection network mostly operates on a server or a workstation, and the existing Raman spectrum detection network cannot be deployed on handheld equipment. Most of the existing handheld raman detection devices only have a spectrum acquisition function, and a key spectrum detection algorithm still needs to be run on a server. Therefore, the handheld raman detection device still needs to be configured with a network (for spectral data transmission) or a mass storage (for spectral data copying), and needs a server with higher computation power to cooperate to complete the whole detection process, and the handheld raman detection device alone cannot complete the whole detection process.
Disclosure of Invention
In view of this, the present application aims to propose a raman spectrum detection method and device based on a dual-path multiplicaeless neural network, so as to solve the problem that the existing raman spectrum detection deep neural network mostly adopts a convolutional neural network structure, and the bottom operation is a matrix multiplication operation, so that the computation complexity is high.
In order to achieve the above purpose, the technical scheme of the application is realized as follows:
in a first aspect, the present application provides a raman spectrum detection method based on a dual path multiplicative-free neural network, the method comprising:
acquiring a Raman spectrum of a standard sample acquired by a handheld Raman spectrometer, and constructing a dual-path multiplicationless neural network based on the Raman spectrum of the standard sample;
performing network training on the constructed double-path multiplicative-free neural network;
acquiring a Raman spectrum of a sample to be detected acquired by a handheld Raman spectrometer, inputting the Raman spectrum of the sample to be detected into a pre-trained dual-path multiplication-free neural network, outputting class probability representing the Raman spectrum, and obtaining the class of the sample to be detected based on the class probability; the dual-path multiplication-free neural network is deployed on the handheld Raman spectrometer, and the dual-path multiplication-free calculation is performed to obtain an output result.
In a second aspect, based on the same inventive concept, the present application further provides a raman spectrum detection apparatus based on a dual path multiplicative neural network, comprising:
the acquisition module is configured to acquire a Raman spectrum of a standard sample acquired by a handheld Raman spectrometer and construct a dual-path multiplicative-free neural network based on the Raman spectrum of the standard sample;
the network training module is configured to perform network training on the constructed double-path multiplicative-free neural network;
the device comprises a result output module, a detection module and a detection module, wherein the result output module is configured to acquire a Raman spectrum of a sample to be detected, which is acquired by a handheld Raman spectrometer, input the Raman spectrum of the sample to be detected into a pre-trained dual-path multiplication-free neural network, output class probability representing the Raman spectrum, and acquire the class of the sample to be detected based on the class probability; the dual-path multiplication-free neural network is deployed on the handheld Raman spectrometer, and the dual-path multiplication-free calculation is performed to obtain an output result.
In a third aspect, based on the same inventive concept, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the raman spectrum detection method based on the dual path multiplicative free neural network according to the first aspect when executing the program.
In a fourth aspect, based on the same inventive concept, the present application further provides a non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium stores computer instructions for causing a computer to perform the dual-path multiplicative-free neural network-based raman spectrum detection method according to the first aspect.
Compared with the prior art, the Raman spectrum detection method and device based on the dual-path multiplicaless neural network have the following beneficial effects:
according to the Raman spectrum detection method and device based on the dual-path multiplication-free neural network, the handheld Raman spectrometer is used for measuring the sample to be detected to obtain the Raman spectrum of the sample to be detected, the Raman spectrum of the sample to be detected is input into the dual-path multiplication-free neural network to obtain the type of the sample to be detected, the calculation power requirement of the deep neural network can be remarkably reduced, real-time detection can be conveniently carried out on the handheld Raman spectrometer, and an external calculation server is not needed, so that the system cost and detection time are reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
fig. 1 is a schematic flow chart of a raman spectrum detection method based on a dual-path multiplicative-free neural network according to an embodiment of the application;
FIG. 2 is a schematic diagram of a dual-path multiplicative-free neural network according to an embodiment of the present application;
FIG. 3 shows a multiplicative layer OP according to an embodiment of the present application 1 Is a circuit design schematic diagram of the circuit;
FIG. 4 shows a multiplicative layer OP according to an embodiment of the present application 2 Is a circuit design schematic diagram of the circuit;
FIG. 5 is a schematic diagram of a dual-path multiplicaless neural network deployment on an FPGA according to an embodiment of the application;
fig. 6 is a schematic structural diagram of a raman spectrum detection apparatus based on a dual-path multiplicative neural network according to an embodiment of the present application;
fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings.
It should be noted that unless otherwise defined, technical or scientific terms used in the embodiments of the present application should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present application belongs. The terms "first," "second," and the like, as used in embodiments of the present application, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
Embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a raman spectrum detection method based on a dual-path multiplicative-free neural network according to one embodiment of the present application includes the following steps:
and step S101, acquiring a Raman spectrum of a standard sample acquired by a handheld Raman spectrometer, and constructing a dual-path multiplicationless neural network based on the Raman spectrum of the standard sample.
Specifically, as shown in fig. 2, a raman spectrum of the collected standard sample is obtained, and input features X of the raman spectrum are extracted, wherein X is a matrix with a size of n×1;
inputting the input feature X into the first PATH 1 And a second PATH 2 The non-multiplication layers OP are alternately used in each path 1 No multiplication layer OP 2 Performing calculation, and before each layer of calculation, performing special calculation by downsampling layerThe sign size is reduced by 1/2;
first PATH 1 Downsampling the input feature X and performing a multiplication-free layer OP 1 Operation, next down-sampling and multiplication-free layer OP 2 Operation, downsampling again and multiplication-free layer OP 1 The operation, the operational flow may be expressed as:
PATH 1 (X)=OP 1 (DS(OP 2 (DS(OP 1 (DS(X))))));
no multiplication layer OP 1 Representing a neural network layer that does not contain multiplication, it computes the input feature X and the network layer weights W as follows:
OP 1 (X,W)=SGN(X)·SGN(W)·MIN(|W|,|X|);
no multiplication layer OP 1 The gradient back-propagation formula of (2) is:
wherein DS represents a downsampling operation, SGN represents a sign taking operation, MIN represents a minimum taking operation, I represents an absolute taking operation, and downsampling ratio is 2;
second PATH 2 Downsampling the input feature X and performing a multiplication-free layer OP 2 Operation, next down-sampling and multiplication-free layer OP 1 Operation, downsampling again and multiplication-free layer OP 2 The operation, the operation flow is expressed as:
PATH 2 (X)=OP 2 (DS(OP 1 (DS(OP 2 (DS(X))))));
no multiplication layer OP 2 Representing a neural network layer that does not contain multiplication, it computes the input feature X and the network layer weights W as follows:
OP 2 (X,W)=SGN(X)·SGN(W)·(|W|+|X|);
no multiplication layer OP 2 Gradient back transfer of (2)The broadcasting formula is:
wherein DS represents a downsampling operation, SGN represents a symbolizing operation, I represents an absolute value taking operation,representing a dirac function, the downsampling ratio is 2;
the first PATH 1 And a second PATH 2 The output results of the (2) are connected together, and after global maximum pooling and a full connection layer, a final output result is obtained, the output result represents the category probability of the Raman spectrum, and the flow can be expressed as follows;
OUT(X)=FC(MAXPOOL(CONCAT(PATH 1 (X),PATH 2 (X))));
where FC represents the fully connected layer, MAXPOOL represents the maximum pooling layer, and CONCAT represents the output connection of the two paths.
And step S102, performing network training on the constructed double-path multiplicative-free neural network.
In some embodiments, the process of training the dual-path multiplicative neural network comprises four steps of single spectrum acquisition, training data set construction, raman spectrum pretreatment and neural network training.
Specifically, a handheld Raman spectrometer is used for collecting Raman spectra of a standard sample, and training data (X, C) is constructed, wherein X represents the Raman spectrum data, and C represents a corresponding sample class label; repeating the collection for a plurality of times, each time collecting and replacing different samples, constructing a data set containing a plurality of pieces of training data, randomly dividing the data set into a training set and a verification set, wherein the dividing ratio of the training set to the verification set is 7:3, a step of;
preprocessing Raman spectrum data X in a training set, wherein the preprocessing comprises three steps of filtering, baseline correction and dark current removal; the filtering adopts low-pass filtering, baseline correction can adopt polynomial fitting, uniform B spline fitting, self-adaptive iteration weighting punishment least square method and the like, and dark current removal can adopt spectral subtraction, namely sample spectrum minus space sampling spectrum.
All Raman spectrum data X in the preprocessed training set are sent into a double-path multiplication-free neural network to obtain network output Y, and a cross entropy loss function between the Y and a corresponding sample class label C is calculated, namely:
wherein Y represents the network output, Y is a matrix of size L×M, C represents the actual sample class label in the dataset, C is a matrix of size L×M, Y 1c Representing the 1 st row, C column element, C in matrix Y lc Representing the 1 st row and C column elements of matrix C, for element C of matrix C lc If c=1, then C lc =1, if c+.l, then C lc =0。
After the cross entropy loss is calculated, error counter propagation calculation is carried out by adopting optimizers such as random gradient descent, adam, adamW and the like, network parameter values are updated, and after multiple iterations, neural network training is completed;
and verifying the trained dual-path multiplicative-free neural network through the verification set, and inputting the Raman spectrum of the sample to be tested into the verified dual-path multiplicative-free neural network to obtain an output result.
Dual path multiplicative-free neural network deployment:
the hand-held Raman spectrometer has limited computing resources and only comprises a singlechip with low computational power or a small-scale FPGA chip, and the embodiment provides a circuit-level deployment method of the double-path multiplication-free neural network, which can be conveniently deployed on the singlechip with low computational power or the small-scale FPGA chip, and the FPGA chip is taken as an example to describe the deployment method of the double-path multiplication-free neural network.
No multiplication layer OP 1 The circuit level implementation of (1) is shown in FIG. 3, wherein SGN symbol taking operation is onBy directly taking out the sign bits of X and W, the absolute value taking operation is realized through a tri-state gate, taking X with the bit width of 16 as an example of absolute value taking:
|X|=X[15] ? 1+(~X[14:0]):X[14:0];
the minimum value is taken and realized by a numerical comparator, and finally the sign bits of X and W are subjected to AND operation and are given to the sign bit of the minimum value, and finally the multiplication-free layer OP is realized 1 And (5) calculating.
No multiplication layer OP 2 The circuit level implementation method of (a) is shown in figure 4, wherein SGN sign taking operation is realized by directly taking out sign bits of X and W, absolute value taking operation is realized by a tri-state gate, the absolute value of X and the absolute value of W are added by an adder to obtain the addition value of the X and the W, and finally the sign bits of X and the W are subjected to AND operation and are assigned to the sign bits of the addition value, so that the multiplication-free layer OP is finally realized 2 And (5) calculating.
The deployment flow of the dual-path multiplication-free neural network on the FPGA is shown in figure 5, firstly, the network model programming is carried out by using a high-level programming language, the code is written by taking C++ as an example, then, the code is synthesized by using a high-level synthesis tool to obtain a Verilog file, the Verilog file is expressed by a v file, and meanwhile, the multiplication-free layer OP is realized 1 No multiplication layer OP 2 And (3) packaging the circuit implementation of the circuit, and adding the circuit implementation into the generated Verilog file.
Further, the Verilog file is exported to be an RTL file, the RTL file is converted into a circuit through Vivado, and finally, the circuit is deployed into an FPGA chip on the handheld Raman spectrometer.
Step S103, acquiring a Raman spectrum of a sample to be detected acquired by a handheld Raman spectrometer, inputting the Raman spectrum of the sample to be detected into a pre-trained dual-path multiplication-free neural network, outputting class probability representing the Raman spectrum, and obtaining the class of the sample to be detected based on the class probability; the dual-path multiplication-free neural network is deployed on the handheld Raman spectrometer, and the output result is obtained by performing dual-path multiplication-free calculation.
Specifically, the handheld Raman spectrometer is deployed with a dual-path multiplicative-free neural network, namely, the handheld Raman spectrometer has a Raman spectrum real-time detection function.
The detection steps are as follows: firstly, measuring a sample to be measured by using a handheld Raman spectrometer to obtain a Raman spectrum X of the sample to be measured; and then inputting the Raman spectrum X of the sample to be detected into a double-path multiplication-free neural network to perform on-chip calculation, and obtaining the neural network output Y, namely the type of the sample to be detected.
It should be noted that, the handheld raman spectrometer is only equipped with a single chip microcomputer with low calculation power or a small-scale FPGA chip, the calculation power is limited, and the existing deep neural network cannot be deployed on the handheld raman spectrometer for real-time detection.
According to the Raman spectrum detection method based on the dual-path multiplication-free neural network, the handheld Raman spectrometer is used for measuring the sample to be detected to obtain the Raman spectrum of the sample to be detected, the Raman spectrum of the sample to be detected is input into the dual-path multiplication-free neural network to obtain the type of the sample to be detected, the calculation force requirement of the deep neural network can be remarkably reduced, the Raman spectrum detection method can be conveniently deployed on the handheld Raman spectrometer for real-time detection, and an external calculation server is not needed, so that the system cost and the detection time are reduced.
It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope of the following claims. In some cases, the acts or steps recited in the present application may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same inventive concept, the embodiment of the application also provides a Raman spectrum detection device based on the dual-path multiplicaless neural network, which corresponds to the method of any embodiment.
As shown in fig. 6, the raman spectrum detection apparatus based on the dual-path multiplicative-free neural network includes:
an acquisition module 11 configured to acquire a raman spectrum of a standard sample acquired by a handheld raman spectrometer and construct a dual-path multiplicative-free neural network based on the raman spectrum of the standard sample;
a network training module 12 configured to perform network training on the constructed dual-path multiplicative-free neural network;
the result output module 13 is configured to acquire a Raman spectrum of a sample to be detected acquired through a handheld Raman spectrometer, input the Raman spectrum of the sample to be detected into a pre-trained dual-path multiplication-free neural network, output class probability representing the Raman spectrum, and obtain the class of the sample to be detected based on the class probability; the dual-path multiplication-free neural network is deployed on the handheld Raman spectrometer, and the dual-path multiplication-free calculation is performed to obtain an output result.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in the same piece or pieces of software and/or hardware when implementing the embodiments of the present application.
The device of the foregoing embodiment is configured to implement the corresponding raman spectrum detection method based on the dual-path multiplicative-free neural network in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein.
Based on the same inventive concept, corresponding to the method of any embodiment, the embodiment of the application further provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the raman spectrum detection method based on the dual-path multiplicationless neural network according to any embodiment.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to the embodiment, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit ), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 1020 may store an operating system and other application programs, and when the embodiments of the present specification are implemented in software or firmware, the associated program code is stored in memory 1020 and executed by processor 1010.
The input/output interface 1030 is used to connect with an input/output module for inputting and outputting information. The input/output module may be configured as a component in a device (not shown in the figure) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
Communication interface 1040 is used to connect communication modules (not shown) to enable communication interactions of the present device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 1050 includes a path for transferring information between components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040).
It should be noted that although the above-described device only shows processor 1010, memory 1020, input/output interface 1030, communication interface 1040, and bus 1050, in an implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The electronic device of the foregoing embodiment is configured to implement the corresponding raman spectrum detection method based on the dual-path multiplicative-free neural network in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, corresponding to any of the above embodiments of the method, the present application further provides a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the raman spectrum detection method based on the dual path multiplicative-free neural network as described in any of the above embodiments.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiment stores computer instructions for causing the computer to execute the raman spectrum detection method based on the dual-path multiplicative-free neural network according to any one of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the application is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the present application, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure the embodiments of the present application. Furthermore, the devices may be shown in block diagram form in order to avoid obscuring the embodiments of the present application, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform on which the embodiments of the present application are to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the application, it should be apparent to one skilled in the art that embodiments of the application can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the present application has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalents, improvements and/or the like which are within the spirit and principles of the embodiments are intended to be included within the scope of the present application.

Claims (7)

1. A raman spectrum detection method based on a dual-path multiplicative neural network, the method comprising:
acquiring a Raman spectrum of a standard sample acquired by a handheld Raman spectrometer, and constructing a dual-path multiplicationless neural network based on the Raman spectrum of the standard sample;
acquiring a Raman spectrum of the collected standard sample, and extracting an input characteristic X of the Raman spectrum;
inputting the input feature X into the first PATH 1 And a second PATH 2 The non-multiplication layers OP are alternately used in each path 1 No multiplication layer OP 2 Calculating;
first PATH 1 Downsampling the input feature X and performing a multiplication-free layer OP 1 Operation, next down-sampling and multiplication-free layer OP 2 Operation, downsampling again and multiplication-free layer OP 1 The operation, the operation flow is expressed as:
PATH 1 (X)=OP 1 (DS(OP 2 (DS(OP 1 (DS(X))))));
no multiplication layer OP 1 Representing a neural network layer that does not contain multiplication, it computes the input feature X and the network layer weights W as follows:
OP 1 (X,W)=SGN(X)·SGN(W)·MIN(|W|,|X|);
no multiplication layer OP 1 The gradient back-propagation formula of (2) is:
wherein DS represents a downsampling operation, SGN represents a sign taking operation, MIN represents a minimum taking operation, and I represents an absolute taking operation;
second PATH 2 Downsampling the input feature X and performing a multiplication-free layer OP 2 Operation ofNext, downsampling and multiplying-free layer OP 1 Operation, downsampling again and multiplication-free layer OP 2 The operation, the operation flow is expressed as:
PATH 2 (X)=OP 2 (DS(OP 1 (DS(OP 2 (DS(X))))));
no multiplication layer OP 2 Representing a neural network layer that does not contain multiplication, it computes the input feature X and the network layer weights W as follows:
OP 2 (X,W)=SGN(X)·SGN(W)·(|W|+|X|);
no multiplication layer OP 2 The gradient back-propagation formula of (2) is:
wherein DS represents a downsampling operation, SGN represents a sign taking operation, I represents an absolute value taking operation, and delta represents a Dirac function;
the first PATH 1 And a second PATH 2 The output results of the two are connected together, and the final output result is obtained after global maximum pooling and a full connection layer;
performing network training on the constructed double-path multiplicative-free neural network;
acquiring a Raman spectrum of a sample to be detected acquired by a handheld Raman spectrometer, inputting the Raman spectrum of the sample to be detected into a pre-trained dual-path multiplication-free neural network, outputting class probability representing the Raman spectrum, and obtaining the class of the sample to be detected based on the class probability; the dual-path multiplication-free neural network is deployed on the handheld Raman spectrometer, and the dual-path multiplication-free calculation is performed to obtain an output result.
2. The substrate according to claim 1A Raman spectrum detection method of a dual-PATH multiplicative-free neural network is characterized in that the first PATH is 1 And a second PATH 2 The output results of the (2) are connected together, and the final output result is obtained after global maximum pooling and a full connection layer, comprising:
OUT(X)=FC(MAXPOOL(CONCAT(PATH 1 (X),PATH 2 (X))));
where FC represents the fully connected layer, MAXPOOL represents the max pooled layer, and CONCAT represents the output connection of the two paths.
3. The raman spectrum detection method based on the dual path non-multiplicative neural network according to claim 1, wherein the raman spectrum of a sample to be detected acquired by a handheld raman spectrometer is acquired, the raman spectrum of the sample to be detected is input into a pre-trained dual path non-multiplicative neural network, category probabilities representing the raman spectrum are output, and the category of the sample to be detected is obtained based on the category probabilities; the dual-path multiplication-free neural network is deployed on the handheld Raman spectrometer, and performs dual-path multiplication-free calculation to obtain an output result, and the method comprises the following steps:
acquiring Raman spectra of the collected standard sample, and constructing training data, wherein the training data comprises Raman spectrum data and a sample type label corresponding to the Raman spectrum data;
constructing a data set containing a plurality of pieces of training data, and dividing the data set into a training set and a verification set;
carrying out data preprocessing on Raman spectrum data in the training set;
training the dual-path multiplicative-free neural network by utilizing the training set after data preprocessing, and verifying the trained dual-path multiplicative-free neural network through the verification set;
and inputting the Raman spectrum of the sample to be detected into the verified double-path multiplicative neural network to obtain an output result.
4. The raman spectrum detection method based on a dual path multiplicative-free neural network of claim 3, wherein said training the dual path multiplicative-free neural network by using the training set after data preprocessing, and verifying the trained dual path multiplicative-free neural network by the verification set, comprises:
inputting the Raman spectrum data in the preprocessed training set into a dual-path multiplicative-free neural network to obtain a network output result, and calculating a cross entropy loss function between the network output result and a corresponding sample type label, wherein the cross entropy loss function has the following calculation formula:
wherein Y represents the network output, Y is a matrix of size L×M, C represents the actual sample class label in the dataset, C is a matrix of size L×M, Y lc Representing the element of row i and column C in matrix Y, C lc Representing the element of row C of matrix C, for element C of matrix C lc If c=1, then C lc =1, if c+.l, then C lc =0;
And (3) performing error back propagation calculation by using an optimizer, updating network parameter values, and completing the dual-path multiplicaeless neural network training after multiple updating iterations.
5. A dual-path multiplicative neural network-based raman spectrum detection apparatus, comprising:
the acquisition module is configured to acquire a Raman spectrum of a standard sample acquired by a handheld Raman spectrometer and construct a dual-path multiplicative-free neural network based on the Raman spectrum of the standard sample;
acquiring a Raman spectrum of the collected standard sample, and extracting an input characteristic X of the Raman spectrum;
inputting the input feature X into the first PATH 1 And a second PATH 2 The non-multiplication layers OP are alternately used in each path 1 No multiplication layer OP 2 Calculating;
first PATH 1 Downsampling the input feature X and performing a multiplication-free layer OP 1 Operation, next down-sampling and multiplication-free layer OP 2 Operation, downsampling again and multiplication-free layer OP 1 The operation, the operation flow is expressed as:
PATH 1 (X)=OP 1 (DS(OP 2 (DS(OP 1 (DS(X))))));
no multiplication layer OP 1 Representing a neural network layer that does not contain multiplication, it computes the input feature X and the network layer weights W as follows:
OP 1 (X,W)=SGN(X)·SGN(W)·MIN(|W|,|X|);
no multiplication layer OP 1 The gradient back-propagation formula of (2) is:
wherein DS represents a downsampling operation, SGN represents a sign taking operation, MIN represents a minimum taking operation, and I represents an absolute taking operation;
second PATH 2 Downsampling the input feature X and performing a multiplication-free layer OP 2 Operation, next down-sampling and multiplication-free layer OP 1 Operation, downsampling again and multiplication-free layer OP 2 The operation, the operation flow is expressed as:
PATH 2 (X)=OP 2 (DS(OP 1 (DS(OP 2 (DS(X))))));
no multiplication layer OP 2 Representing a neural network layer that does not contain multiplication, it computes the input feature X and the network layer weights W as follows:
OP 2 (X,W)=SGN(X)·SGN(W)·(|W|+|X|);
no multiplication layer OP 2 The gradient back-propagation formula of (2) is:
wherein DS represents a downsampling operation, SGN represents a sign taking operation, I represents an absolute value taking operation, and delta represents a Dirac function;
the first PATH 1 And a second PATH 2 The output results of the two are connected together, and the final output result is obtained after global maximum pooling and a full connection layer;
the network training module is configured to perform network training on the constructed double-path multiplicative-free neural network;
the device comprises a result output module, a detection module and a detection module, wherein the result output module is configured to acquire a Raman spectrum of a sample to be detected, which is acquired by a handheld Raman spectrometer, input the Raman spectrum of the sample to be detected into a pre-trained dual-path multiplication-free neural network, output class probability representing the Raman spectrum, and acquire the class of the sample to be detected based on the class probability; the dual-path multiplication-free neural network is deployed on the handheld Raman spectrometer, and the dual-path multiplication-free calculation is performed to obtain an output result.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the dual path multiplicaless neural network-based raman spectrum detection method of any one of claims 1-4 when the program is executed by the processor.
7. A non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium stores computer instructions for causing a computer to perform the dual-path multiplicative-free neural network-based raman spectrum detection method of any one of claims 1-4.
CN202311308971.8A 2023-10-11 2023-10-11 Raman spectrum detection method and device based on double-path multiplicative neural network Active CN117054396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311308971.8A CN117054396B (en) 2023-10-11 2023-10-11 Raman spectrum detection method and device based on double-path multiplicative neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311308971.8A CN117054396B (en) 2023-10-11 2023-10-11 Raman spectrum detection method and device based on double-path multiplicative neural network

Publications (2)

Publication Number Publication Date
CN117054396A CN117054396A (en) 2023-11-14
CN117054396B true CN117054396B (en) 2024-01-05

Family

ID=88669581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311308971.8A Active CN117054396B (en) 2023-10-11 2023-10-11 Raman spectrum detection method and device based on double-path multiplicative neural network

Country Status (1)

Country Link
CN (1) CN117054396B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103411952A (en) * 2013-08-08 2013-11-27 浙江大学 Alga sort classification identification method based on Raman spectroscopy technique
CN105893477A (en) * 2016-03-25 2016-08-24 中国科学技术大学 Distance preserving Hash method based on double-circuit neural network
CN107860473A (en) * 2017-10-25 2018-03-30 暨南大学 A kind of intelligent handhold spectrometer based on cloud data
CN107886081A (en) * 2017-11-23 2018-04-06 武汉理工大学 Two-way U Net deep neural network mine down-holes hazardous act is intelligently classified discrimination method
CN108088834A (en) * 2017-09-13 2018-05-29 新疆大学 Echinococcosis serum Raman spectrum diagnostic equipment based on optimization reverse transmittance nerve network
WO2019192121A1 (en) * 2018-04-04 2019-10-10 平安科技(深圳)有限公司 Dual-channel neural network model training and human face comparison method, and terminal and medium
CN110458801A (en) * 2019-06-24 2019-11-15 深圳市未来媒体技术研究院 A kind of 3D dual path neural network and the pulmonary nodule detection method based on the network
CN111582401A (en) * 2020-05-15 2020-08-25 中原工学院 Sunflower seed sorting method based on double-branch convolutional neural network
CN113128675A (en) * 2021-04-21 2021-07-16 南京大学 Multiplication-free convolution scheduler based on impulse neural network and hardware implementation method thereof
WO2021174774A1 (en) * 2020-07-30 2021-09-10 平安科技(深圳)有限公司 Neural network relationship extraction method, computer device, and readable storage medium
CN114154409A (en) * 2021-11-24 2022-03-08 灵译脑科技(上海)有限公司 Shallow and deep cortex dual-path framework-based convolutional neural network model compression optimization method
CN115630329A (en) * 2022-08-23 2023-01-20 北京信息科技大学 Edible essence classification method based on convolutional neural network
CN116012657A (en) * 2023-02-14 2023-04-25 南京大学 Neural network-based 3D point cloud data processing method and accelerator
WO2023144519A1 (en) * 2022-01-25 2023-08-03 Oxford University Innovation Limited Determining optical aberration

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018004557A1 (en) * 2016-06-29 2018-01-04 Intel Corporation Multiplication-free approximation for neural networks and sparse coding
US10540589B2 (en) * 2017-10-24 2020-01-21 Deep North, Inc. Image quality assessment using similar scenes as reference
WO2019222724A1 (en) * 2018-05-18 2019-11-21 Google Llc Deep neural networks with no multiplications and no floating point operations
US10789462B2 (en) * 2019-01-15 2020-09-29 International Business Machines Corporation Weakly and fully labeled mammogram classification and localization with a dual branch deep neural network
US11976972B2 (en) * 2019-05-21 2024-05-07 Ohio State Innovation Foundation Portable spectrometer system and methods for determining nutritional and quality traits

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103411952A (en) * 2013-08-08 2013-11-27 浙江大学 Alga sort classification identification method based on Raman spectroscopy technique
CN105893477A (en) * 2016-03-25 2016-08-24 中国科学技术大学 Distance preserving Hash method based on double-circuit neural network
CN108088834A (en) * 2017-09-13 2018-05-29 新疆大学 Echinococcosis serum Raman spectrum diagnostic equipment based on optimization reverse transmittance nerve network
CN107860473A (en) * 2017-10-25 2018-03-30 暨南大学 A kind of intelligent handhold spectrometer based on cloud data
CN107886081A (en) * 2017-11-23 2018-04-06 武汉理工大学 Two-way U Net deep neural network mine down-holes hazardous act is intelligently classified discrimination method
WO2019192121A1 (en) * 2018-04-04 2019-10-10 平安科技(深圳)有限公司 Dual-channel neural network model training and human face comparison method, and terminal and medium
CN110458801A (en) * 2019-06-24 2019-11-15 深圳市未来媒体技术研究院 A kind of 3D dual path neural network and the pulmonary nodule detection method based on the network
CN111582401A (en) * 2020-05-15 2020-08-25 中原工学院 Sunflower seed sorting method based on double-branch convolutional neural network
WO2021174774A1 (en) * 2020-07-30 2021-09-10 平安科技(深圳)有限公司 Neural network relationship extraction method, computer device, and readable storage medium
CN113128675A (en) * 2021-04-21 2021-07-16 南京大学 Multiplication-free convolution scheduler based on impulse neural network and hardware implementation method thereof
CN114154409A (en) * 2021-11-24 2022-03-08 灵译脑科技(上海)有限公司 Shallow and deep cortex dual-path framework-based convolutional neural network model compression optimization method
WO2023144519A1 (en) * 2022-01-25 2023-08-03 Oxford University Innovation Limited Determining optical aberration
CN115630329A (en) * 2022-08-23 2023-01-20 北京信息科技大学 Edible essence classification method based on convolutional neural network
CN116012657A (en) * 2023-02-14 2023-04-25 南京大学 Neural network-based 3D point cloud data processing method and accelerator

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Mallah,Maen M.A.A.MULTIPLICATION FREE NEURAL NETWORKS.《Bilkent Universities》.2023,第13、31-39页. *
基于一维卷积神经网络的雌激素粉末拉曼光谱定性分类;赵勇;荣康;谈爱玲;;光谱学与光谱分析(第12期);全文 *
面向短文本情感分析的多特征融合方法研究;陶永才;张鑫倩;石磊;卫琳;;小型微型计算机系统(第06期);全文 *

Also Published As

Publication number Publication date
CN117054396A (en) 2023-11-14

Similar Documents

Publication Publication Date Title
Banerjee et al. Nearest neighbour distributions: New statistical measures for cosmological clustering
Zhang et al. Machine learning on FPGAs to face the IoT revolution
CN107633254A (en) Establish device, method and the computer-readable recording medium of forecast model
WO2014205167A1 (en) Apparatus and methods of spectral searching using wavelet transform coefficients
CN107229731A (en) Method and apparatus for grouped data
US20130197861A1 (en) Method for spectrometric analysis and related device
CN117054396B (en) Raman spectrum detection method and device based on double-path multiplicative neural network
CN114449439A (en) Method and device for positioning underground pipe gallery space
CN115839344B (en) Wear supervision method, device, equipment and storage medium for slurry pump
Men et al. PulsarX: a new pulsar searching package-I. A high performance folding program for pulsar surveys
CN112016636A (en) Crop spectral clustering analysis processing method based on Hadoop frame
CN111798263A (en) Transaction trend prediction method and device
CN113239237B (en) Cross-media big data searching method and device
CN113890833B (en) Network coverage prediction method, device, equipment and storage medium
CN114067169A (en) Raman spectrum analysis method based on convolutional neural network
Ticco et al. Keeping computational performance analysis simple: an evaluation of the NEMO BENCH test
US20200013061A1 (en) System and method for measuring user behavior consistency based on complex correspondence system
CN115994235B (en) Chromatographic analysis method library construction method, chromatographic analysis device library construction equipment and chromatographic analysis computer medium
CN114528907B (en) Industrial abnormal data detection method and device
CN114580064B (en) Data analysis method and device for geological modeling and storage medium
CN117934019B (en) Copper concentrate sample tracing method and system based on deep learning
CN117250521B (en) Charging pile battery capacity monitoring system and method
CN117917678A (en) Method for assisting engineering inspection and acceptance and related equipment
CN117273260A (en) Multi-functional intelligent rod supervision method, device, equipment and medium based on big data
CN117648630A (en) Fault identification method, device, equipment and medium for power transmission line

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
GR01 Patent grant
GR01 Patent grant