Model training method, material detection method, system and equipment
Through the neural network model training method, plasma radiation spectral data and feature data are used to solve the problem of low accuracy in material classification, and achieve higher material detection classification accuracy.
Patent Information
- Application Number
- CN202510495117.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-04-21
AI Technical Summary
When classifying materials, LIBS technology is disturbed by various external conditions due to the complexity and variability of the spectral signal, resulting in low classification accuracy.
Using the neural network model training method, the trained neural network model is used for material detection to improve classification accuracy by obtaining plasma radiation spectral data and plasma feature data in the sample training set.
By combining plasma radiation spectral data and feature data, the trained neural network model can more accurately classify materials, improving the classification accuracy of material detection.
Smart Images

Figure CN120011899A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of spectral detection technology, and in particular relates to a model training method, a material detection method, a system and a device. Background Art
[0002] In recent years, laser-induced breakdown spectroscopy (LIBS) has attracted widespread attention from researchers because of its many advantages such as minimal damage detection, low detection limit, rapid detection, high sensitivity, and real-time analysis. It has been applied in many fields such as industry, agriculture, biology, archaeology, and aerospace.
[0003] LIBS is widely used in the field of industrial detection. By analyzing the changes in spectral characteristics caused by differences in the types and contents of elements in different materials, LIBS technology can distinguish materials. However, due to the complexity and variability of LIBS spectral signals, it is not only affected by the types and contents of material elements in the sample, but also by a variety of external conditions such as laser energy, plasma state, sample surface conditions, and environmental factors. These interference factors lead to low accuracy in classifying materials using LIBS technology. Summary of the invention
[0004] The embodiments of the present application provide a model training method, a material detection method, a system and a device to solve or improve the technical problem of low accuracy in classifying materials using LIBS technology in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a neural network model training method, comprising: Acquire a sample training set; wherein each sample data in the sample training set includes plasma radiation spectrum data, plasma characteristic data and sample label information corresponding to each sample; Taking the plasma radiation spectrum data and the plasma characteristic data of each sample as input and the sample label information corresponding to each sample as output, training to obtain the neural network model; The plasma radiation spectrum data includes the first plasma radiation spectrum data of each sample and / or the plasma radiation spectrum data obtained by preprocessing the first plasma radiation spectrum data.
[0006] In a possible implementation manner of the first aspect, the plasma radiation spectrum data includes plasma spectrum characteristic data of each sample; The plasma spectrum characteristic data of each sample is obtained by performing data dimension reduction processing on the first plasma radiation spectrum data of each sample or on the plasma radiation spectrum data obtained after the preprocessing; Taking the plasma radiation spectrum data and the plasma characteristic data of each sample as input and the sample label information corresponding to each sample as output, training a neural network model; comprising: The neural network model is trained by taking the plasma spectrum characteristic data of each sample and the plasma characteristic data as input and taking the sample label information corresponding to each sample as output.
[0007] In a possible implementation of the first aspect, the plasma characteristic data includes: physical information characteristics of the plasma image, shape characteristics of the plasma image, and texture characteristics of the plasma image; The physical information features of the plasma image, the shape features of the plasma image and the texture features of the plasma image are obtained based on plasma event flow data; And / or, the data dimension reduction processing method includes principal component analysis, random projection, multi-scale scaling or non-negative matrix decomposition; And / or, the label information includes a model number; And / or, the plasma spectrum characteristic data of each sample includes a plurality of main component plasma spectrum characteristic data of each sample, and the cumulative contribution rate of the plurality of main components in the plurality of main component plasma spectrum characteristic data of each sample is greater than or equal to a preset cumulative contribution rate threshold; And / or, the preprocessing includes background removal, baseline correction and / or noise reduction; And / or, the physical information features of the plasma image include the plasma image area, the circularity of the plasma image and / or the number of events of the plasma image.
[0008] In a possible implementation manner of the first aspect, the neural network model training method further includes acquiring the plasma characteristic data; acquiring the plasma characteristic data includes: Acquiring plasma event flow data of each sample; reconstructing a plasma image according to the plasma event flow data; Plasma characteristic data of each sample is extracted based on the plasma image.
[0009] In a possible implementation manner of the first aspect, reconstructing a plasma image according to the plasma event flow data comprises: Reconstructing a plasma image based on the plasma event flow data using a deep neural network, a pulse neural network, cluster analysis or event accumulation; The plasma image is a first plasma image generated based on the plasma event flow data or a Gaussian filtered plasma image obtained by performing Gaussian filtering on the first plasma image; The step of extracting plasma characteristic data of each sample based on the plasma image comprises: Extracting plasma shape contour features based on the plasma image to form a plasma shape contour, and calculating the area and near circularity of a region enclosed by the plasma shape contour to obtain the area and near circularity of the plasma image; The plasma image is processed to obtain shape features and texture features of the plasma image.
[0010] In a second aspect, an embodiment of the present application provides a material detection method, comprising: Acquire detection data of each material to be classified; the detection data includes plasma radiation spectrum data and plasma characteristic data of the material; The detection data of each material to be classified is input into the neural network model obtained by using the neural network model training method, and the label information of each material is output.
[0011] In a possible implementation manner of the second aspect, The plasma radiation spectrum data of each material includes first plasma radiation spectrum data of each material and / or plasma radiation spectrum data obtained by preprocessing the first plasma radiation spectrum data; The plasma characteristic data of each material includes: physical information characteristics of the plasma image, shape characteristics of the plasma image and texture characteristics of the plasma image.
[0012] In a possible implementation manner of the second aspect, the plasma radiation spectrum data of each material includes plasma spectrum characteristic data of each material; The plasma spectrum characteristic data of each material is obtained by performing data dimension reduction processing on the first plasma radiation spectrum data of each material or on the plasma radiation spectrum data obtained after the preprocessing; And / or, the plasma spectrum characteristic data of each material includes multiple main component plasma spectrum characteristic data of each material, and the cumulative contribution rate of the multiple main components in the multiple main component plasma spectrum characteristic data of each material is greater than or equal to a preset cumulative contribution rate threshold.
[0013] In a third aspect, an embodiment of the present application provides a laser induced breakdown spectroscopy system, comprising: Optical path system; A laser, connected to an optical path system; A delay controller connected to the laser; The spectrometer is connected with the computer, the optical path system and the delay controller respectively; Dynamic vision sensors to obtain plasma event flow data of materials or samples; and a computer, respectively connected to the spectrometer and the dynamic vision sensor, for: Acquire detection data of each material to be classified; the detection data includes plasma radiation spectrum data and plasma characteristic data of the material; the plasma characteristic data is obtained based on processing the plasma event flow data; The detection data of each material to be classified is input into the neural network model obtained by using the neural network model training method, and the label information of each material is output.
[0014] In a fourth aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the model training method and the material detection method when executing the computer program.
[0015] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the model training method and the material detection method are implemented.
[0016] In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device executes the model training method and material detection method described in any one of the above-mentioned first aspects.
[0017] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0018] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The model training method, material detection method, system and equipment of the embodiments of the present application use the plasma radiation spectrum data and the plasma characteristic data of each sample as input, and the sample label information corresponding to each sample as output. The neural network model obtained by training can be used to perform material detection, and materials can be accurately classified, thereby improving the accuracy of material detection classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 Schematic diagram of a laser induced breakdown spectroscopy system provided in one embodiment of the present application.
[0021] Figure 2 It is a flowchart of a neural network model training method according to an embodiment of the present application.
[0022] Figure 3 It is a structural diagram of the neural network model framework.
[0023] Figure 4 This is a schematic diagram of the principal component analysis of 900 LIBS test spectra of carbon steel samples.
[0024] Figure 5 It is a structural diagram of the contribution rate and cumulative contribution rate of the main components of a total of 900 LIBS test spectra of carbon steel samples.
[0025] Figure 6 It is a flowchart of a neural network model training method according to another embodiment of the present application.
[0026] Figure 7 It is a flowchart of a neural network model training method according to another embodiment of the present application.
[0027] Figure 8 It is a flow chart of the method for obtaining the plasma characteristic data.
[0028] Fig. 9 This is a plasma image restored based on plasma event flow data according to an embodiment of the present application; wherein (a) is an original plasma grayscale image reconstructed based on plasma event flow data; and (b) is a Gaussian filtered plasma image obtained by Gaussian filtering image (a).
[0029] Fig.10 It is a flow chart of a material detection method according to an embodiment of the present application.
[0030] Fig.11 It is a structural diagram of a neural network model training system according to an embodiment of the present application.
[0031] Fig.12 It is a structural schematic diagram of a material detection system according to an embodiment of the present application.
[0032] Fig.13 This is a diagram of the confusion matrix of the best classification effect obtained in verifying the model effect. DETAILED DESCRIPTION
[0033] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0034] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0035] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0036] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0037] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0038] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0039] Before introducing the embodiments of the present application, the relevant names in the embodiments of the present application are explained: 1. Laser-induced breakdown spectroscopy (LIBS): The principle is to use high-energy laser pulses to ablate the sample surface to form a high-temperature, high-electron-density plasma. During the cooling process of the plasma, part of the energy is radiated in the form of a spectrum. The spectrum signal is collected by a spectrometer to obtain the wavelength and intensity of the spectrum line. The element attribution of the spectrum line can be determined by the wavelength of the spectrum line, and the intensity of the spectrum line can reflect the element content to a certain extent.
[0040] LIBS is widely used in the field of industrial detection. By analyzing the changes in spectral characteristics caused by differences in the types and contents of elements in different materials, LIBS technology can distinguish materials. However, due to the complexity and variability of LIBS spectral signals, it is not only affected by the types and contents of material elements in the sample, but also by a variety of external conditions such as laser energy, plasma state, sample surface conditions, and environmental factors. These interference factors lead to low accuracy in classifying materials using LIBS technology.
[0041] 2. Plasma event stream data: Plasma event stream data refers to the real-time, continuously changing data stream collected from plasma when high-energy laser pulses ablate the sample surface to form a high-temperature, high-electron-density plasma. It can be collected using a high-speed camera or a dynamic vision sensor.
[0042] 3. Plasma radiation spectrum data: High-energy laser pulses ablate the sample surface to form a high-temperature, high-electron-density plasma. During the cooling process of the plasma, part of the energy is radiated in the form of a spectrum, which is collected by a spectrometer to form a spectral signal.
[0043] 4. Plasma image: generated based on the reconstruction of plasma event stream data. Exemplarily, a dynamic vision sensor can be used to obtain plasma event stream data. It can be understood that the dynamic vision sensor is different from a traditional camera or a high-speed camera. Its output is not a frame image, but a pixel coordinate (x, y), a timestamp t, and an event polarity p. When the light intensity changes beyond the threshold, the pixel will respond, generating an ON event (p=1) when the brightness increases, and an OFF event (p=0) when the brightness decreases. The dynamic vision sensor outputs the above events and data numbers in the form of event stream data.
[0044] 5. Plasma characteristic data: refers to a collection of parameters and information that can reflect various properties and states of plasma. Plasma characteristic data can be the number of events obtained based on plasma event flow data, a plasma image reconstructed based on plasma event flow data, and a plasma image area, a plasma image shape feature, and a plasma image texture feature obtained based on the plasma image.
[0045] 6. Number of events: generated based on plasma event stream data. Plasma event stream data can be obtained by accumulating event data of plasma generated by the sample under laser ablation through a dynamic vision sensor within a certain period of time. When the sample generates plasma by laser ablation, each time the brightness change of the plasma exceeds the threshold of the dynamic vision sensor, it is recorded as an event, and the pixel data of each event, i.e., event data, is recorded. The pixel data includes pixel points, timestamps, and event polarity; the events generated within a certain period of time are accumulated to generate plasma event stream data, and the number of events generated within a certain period of time is counted to generate the number of events.
[0046] 7. Circularity of plasma image: refers to the degree to which the outline of the plasma image is close to a circle.
[0047] 8. Shape features of plasma images: refers to shape-related features in plasma images such as arcs, angles, straight lines, broken lines, etc.
[0048] 9. Texture features of plasma images: used to describe the spatial distribution of grayscale, color or brightness of pixels in plasma images. Common texture features include roughness, contrast, directionality, linearity, etc.
[0049] 10. Plasma image area: refers to the area of the region enclosed by the plasma shape contour calculated based on the plasma shape contour features extracted from the plasma image to form the plasma shape contour.
[0050] 11. Data dimensionality reduction: It is a technique used to reduce the number of features in a data set, simplify the data structure, and improve data processing efficiency and model performance without losing key information. Data dimensionality reduction includes principal component analysis, random projection, multi-scale scaling, and non-negative matrix decomposition.
[0051] 12. Principal Component Analysis: Principal Component Analysis (PCA) is a commonly used multivariate statistical analysis method. It is a multivariate statistical analysis method that uses linear transformation to select a small number of important variables. Its purpose is to transform multiple indicator variables with certain correlation into a few comprehensive indicator variables through dimensionality reduction technology. These comprehensive indicator variables can retain as much information as possible from the original variables and are independent of each other.
[0052] 13. Random projection: Random projection is a technique used for data dimensionality reduction. Random projection is a method of mapping high-dimensional data to a low-dimensional space. The original high-dimensional data is projected into a low-dimensional subspace through a randomly generated projection matrix to achieve the purpose of data dimensionality reduction.
[0053] 14. Multi-scale scaling: Multi-scale scaling is a technology widely used in many fields. It transforms data, images, etc. at different scales to obtain information or features at different scales. The core purpose of multi-scale scaling is to make full use of data information at different scales to better adapt to the diversity and complexity of data in various practical application scenarios and improve the performance and generalization ability of models or algorithms.
[0054] 15. Deep Neural Network: It is a machine learning algorithm based on artificial neural network, which can automatically learn complex and abstract feature representations from raw input data without manual feature engineering, and can improve the generalization ability and performance of the model.
[0055] 16. Spiking neural network: It is a type of neural network that processes information based on neuron spike sequences. It simulates the spike coding method of retinal ganglion cells to quickly extract and process features such as edges and motion in images.
[0056] 17. Cluster analysis: Cluster analysis is an unsupervised learning method that aims to divide objects in a data set into different groups or classes so that objects in the same class have high similarity, while objects in different classes have large differences. Cluster analysis is based on the similarity measurement between data objects for grouping. Common similarity measurement methods include Euclidean distance, Manhattan distance, cosine similarity, etc. For example, Euclidean distance is the straight-line distance between two data points in multidimensional space. The closer the distance, the higher the similarity. By calculating the similarity between each object in the data set, objects with high similarity are classified into the same class, and objects with low similarity are classified into different classes.
[0057] 18. Event accumulation: Event accumulation refers to the process of collecting, summarizing and analyzing a series of related events within a certain time or space range. The identified events are accumulated according to certain rules. This may involve time sequence, that is, arranging and summarizing events in the order in which they occurred; it may also involve spatial scope, such as centralizing the processing of similar events occurring in a certain area. In the accumulation process, it is necessary to organize the relevant information of the event, such as the type of event, frequency of occurrence, scope of impact, etc.
[0058] In order to solve or improve the technical problem of low accuracy in classifying materials using LIBS technology in the related art and to improve the accuracy of material detection and classification, the embodiments of the present application provide the following inventive concepts.
[0059] The embodiment of the present application adds a dynamic vision sensor to the laser induced breakdown spectroscopy system of the related art to form a new laser induced breakdown spectroscopy system.
[0060] The laser induced breakdown spectroscopy system of the related technology can ablate the sample surface through high-energy laser pulses to form a high-temperature, high-electron density plasma. During the cooling process of the plasma, part of the energy is radiated in the form of a spectrum. The spectral signal is collected by a spectrometer to generate the plasma radiation spectrum data of the sample.
[0061] In order to eliminate the interference of certain factors, the plasma radiation spectrum data of the sample is further preprocessed such as background removal, baseline correction and / or noise reduction to obtain the plasma radiation spectrum data of the sample.
[0062] High-energy laser pulses ablate the sample surface to form a high-temperature, high-electron-density plasma. During the cooling process, the plasma can collect not only plasma radiation spectrum data, but also plasma event flow data. For example, a dynamic vision sensor can be used to synchronously acquire the plasma event flow data of the sample while collecting the plasma radiation spectrum data of the sample. In addition, plasma feature data that is helpful in improving the accuracy of sample classification can be extracted based on the plasma event flow data.
[0063] By combining the plasma radiation spectrum data and plasma characteristic data of the sample, the accuracy of sample classification can be improved. The specific technical solution is as follows.
[0064] The technical solution of the embodiment of the present application can be applied to various laser induced breakdown spectroscopy systems. Exemplarily, the technical solution of the embodiment of the present application can be applied to a system consisting of adding a dynamic vision sensor to various traditional laser induced breakdown spectroscopy systems, wherein the dynamic vision sensor is used to capture the plasma event flow data of the sample from the time when the sample is ablated to generate plasma to the end of the plasma cooling, and the plasma event flow data can be used to reconstruct the plasma image. It can be understood that the dynamic vision sensor can be replaced by a high-speed camera, but the dynamic vision sensor generates a smaller amount of data than the high-speed camera, and is more conducive to extracting plasma feature data from the plasma event flow data to reconstruct the plasma image. Therefore, in the embodiment of the present application, a dynamic vision sensor is used to capture the plasma event flow data of the sample from the time when the sample is ablated to generate plasma to the end of the plasma cooling.
[0065] For example, Figure 1 It is a laser induced breakdown spectroscopy system suitable for the embodiments of the present application. Figure 1 The technical solution of the embodiment of the present application is also applicable when the dynamic vision sensor is replaced by a high-speed camera.
[0066] See also Figure 1 As shown, the laser induced breakdown spectroscopy system includes a laser 101 , a delay controller 102 , a spectrometer 103 , a computer 104 , a dynamic vision sensor 105 , an optical path system 106 , and a sample and sample excitation stage 107 .
[0067] The laser 101 is connected to the optical path system 106. The laser 101, the delay controller 102, the spectrometer 103, the computer 104 and the dynamic vision sensor 105 are connected in sequence. The optical path of the optical path system points to the sample and the sample excitation platform 107. The spectrometer 103 receives the plasma spectrum generated by the sample and the sample on the sample excitation platform 107. The dynamic vision sensor 105 is used to capture the event data generated by the brightness change of the plasma during the ablation of the sample. By selecting the appropriate laser energy, light collection angle and spectrometer delay time, a spectral signal with higher signal-to-noise ratio, signal-to-background ratio, etc. can be obtained. In addition, a set of dynamic vision sensors is added to capture plasma signals.
[0068] In order to improve the accuracy of LIBS technology in classifying materials in related technologies, an embodiment of the present application provides a model training method. The method can be run in the computer of the above-mentioned laser induced breakdown spectroscopy system, or it can be run in the above-mentioned laser induced breakdown spectroscopy system after the computer is replaced with other devices. The other devices can be mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA) and other terminal devices. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.
[0069] For example, the terminal device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set top box (STB), a customer premises equipment (CPE) and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network, etc.
[0070] As an example but not limitation, when the terminal device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0071] Figure 2 is a flowchart of a neural network model training method according to an embodiment of the present application. Figure 2 As shown, in one embodiment of the present application, a neural network model training method can be applied to the above-mentioned laser induced breakdown spectroscopy system, which includes the steps of: A1. Obtain a sample training set; wherein each sample data in the sample training set includes plasma radiation spectrum data, plasma characteristic data, and sample label information corresponding to each sample; It can be understood that the sample data in the sample training set comes from materials that can be detected by plasma radiation spectroscopy technology, such as metal materials, such as carbon steel, etc. Each sample data may include plasma radiation spectrum data of a certain material, and plasma feature data acquired synchronously or asynchronously when acquiring the plasma radiation spectrum data of the certain material. The plasma feature data may include physical information features of the plasma image, shape features of the plasma image, and texture features of the plasma image; optionally, the physical information features of the plasma image include the plasma image area, the circularity of the plasma image, and / or the number of events of the plasma image. The physical information features of the plasma image, the shape features of the plasma image, and the texture features of the plasma image can all be obtained based on the plasma event flow data; The sample label information includes the model of the material, such as 001, etc. The sample label information may also include the material name. For example, when the material is carbon steel, the sample label information may be carbon steel-001.
[0072] A2. Taking the plasma radiation spectrum data and the plasma characteristic data of each sample as input and the sample label information corresponding to each sample as output, training the neural network model; The plasma radiation spectrum data of each sample and the plasma characteristic data of each sample can be input together, or the plasma radiation spectrum data of each sample can be input first and then the plasma characteristic data of each sample. Each sample label information has a corresponding relationship with the plasma radiation spectrum data of each sample and the plasma characteristic data of each sample.
[0073] The neural network model trained in the above way can be used for material classification, especially for distinguishing the types of materials of the same type, such as the difference between carbon steel series materials.
[0074] For example, the framework model of the neural network model can be adopted Figure 3 As shown in Figure 1. Specifically, the neural network model contains four convolutional modules, each of which consists of a 3x3 convolutional layer, a batch normalization layer, and a ReLU activation layer. Each module is followed by a maximum pooling layer to reduce the size of the feature map. The number of filters in the convolutional layer is gradually increased to 128, 256, 512, and 512, respectively, to capture more complex features. After feature extraction, the network is integrated through a fully connected layer, nonlinearity is introduced using the ReLU activation function, and overfitting is prevented by a dropout layer (50% dropout rate). Finally, the network outputs the number of nodes of the category through a fully connected layer, and the output is converted into a probability distribution using a Softmax layer. Finally, the classification layer is used to calculate the loss and evaluate the model performance. During the training process, the Adam optimization algorithm is used, the initial learning rate is 0.001, and the learning rate is gradually reduced through the segmented learning rate adjustment strategy. The maximum number of training rounds is set to 1000, the mini-batch size is 32, and the data is shuffled at each epoch to improve the robustness of the training. In addition, L2 regularization (with a coefficient of 0.001) is used to further prevent overfitting.
[0075] The plasma radiation spectrum data includes the first plasma radiation spectrum data of each sample and / or the plasma radiation spectrum data obtained after preprocessing the first plasma radiation spectrum data. Exemplarily, the first plasma radiation spectrum data can be raw plasma radiation spectrum data obtained by using a spectrometer without preprocessing, and the plasma radiation spectrum data is obtained by preprocessing the raw plasma radiation spectrum data, and the preprocessing includes background removal, baseline correction and / or noise reduction.
[0076] Since the spectral dimension is large and most features are not representative, in order to extract effective features, prevent the analysis model from overfitting, and reduce the computational cost, it is necessary to perform data dimension reduction on the spectral data to extract features. Considering that there are many components in each material, the amount of data that needs to be processed when training the above-mentioned neural network model is very large. In order to reduce the amount of data for training the neural network model and reduce the influence of interfering components on the classification results and improve the accuracy of classification, the plasma radiation spectrum data of each sample in the training set or the plasma radiation spectrum data is subjected to dimension reduction processing. Specifically, the plasma radiation spectrum data includes the plasma spectrum characteristic data of each sample; the plasma spectrum characteristic data of each sample is obtained by performing data dimension reduction processing on the first plasma radiation spectrum data of each sample or the plasma radiation spectrum data obtained after the preprocessing.
[0077] Optionally, principal component analysis is used as a method for data dimensionality reduction processing. The threshold value of the preset cumulative contribution rate in the plasma spectrum characteristic data of the multiple principal components of each sample is 85%. Exemplarily, taking carbon steel as an example, principal component analysis is used to perform dimensionality reduction processing on the plasma radiation spectrum data of the carbon steel sample. LIBS tests were performed on 9 carbon steel samples, each sample was measured 100 times, a total of 900 times, and the information of the 9 carbon steel samples is shown in Table 1.
[0078] Table 1 Information of 9 carbon steel samples
[0079] Here we use principal component analysis as an example to obtain Figure 4 and 5 The principal component analysis results are shown in Figure 1. According to the scatter plots of the first and second principal components, the samples show obvious clustering, indicating that the spectral data can distinguish different materials to a certain extent. According to the contribution rate and cumulative contribution rate as the number of principal components changes, it can be seen that the contribution of the first principal component reaches 30%, and the cumulative contribution rate of the first 100 principal components reaches more than 85%. Therefore, the first 100 principal components can be taken as the input of the model.
[0080] See also Figure 6 As shown, step A2. taking the plasma radiation spectrum data and the plasma characteristic data of each sample as input and the sample label information corresponding to each sample as output, training a neural network model; comprising: A21. Train a neural network model using the plasma spectrum characteristic data and the plasma characteristic data of each sample as input and the sample label information corresponding to each sample as output.
[0081] A03. Extracting plasma characteristic data of each sample based on the plasma image; comprising: A031. Extracting plasma shape contour features based on the plasma image to form a plasma shape contour, and calculating the area and near circularity of the region enclosed by the plasma shape contour to obtain the plasma image area and near circularity; A032. Perform image processing on the plasma image to obtain shape features of the plasma image and texture features of the plasma image.
[0082] See also Figure 7 and 8 As shown, the neural network model training method further includes A0. obtaining the plasma characteristic data; A0. obtaining the plasma characteristic data includes: A01. Obtaining plasma event flow data for each sample; A02. Reconstructing a plasma image based on the plasma event flow data; A03. Extracting plasma characteristic data of each sample based on the plasma image.
[0083] Optionally, A02. Reconstructing a plasma image according to the plasma event flow data; comprising: A021. Reconstructing a plasma image based on the plasma event flow data using a deep neural network, a pulse neural network, a cluster analysis or event accumulation; The plasma image is a first plasma image generated based on the plasma event flow data or a Gaussian filtered plasma image obtained by Gaussian filtering the first plasma image. The first plasma image may be an original plasma image directly reconstructed from the plasma event flow data.
[0084] Exemplary References Fig. 9 As shown in the figure, the event frame image of the plasma can be reconstructed by event accumulation. The plasma event flow data can be obtained by accumulating the event data within a certain time range. The plasma image can be obtained through the plasma event flow data. Fig. 9 As shown in the figure, the accumulation time is 200ms, and the accumulation time can also be selected according to the actual plasma event data. Fig. 9 (a) is a plasma image generated based on the plasma event flow data, Fig. 9 (b) is the Gaussian filtered plasma image obtained after Gaussian filtering of (a). The subsequent steps can be Fig. 9The image in (a) or (b) extracts the area of the region enclosed by the plasma shape contour, the circularity of the plasma image, or other plasma feature data such as the shape features of the plasma image, the texture features of the plasma image, and the like.
[0085] It is understandable that for plasma images, the boundaries of the plasma need to be identified, which usually involves the use of image processing algorithms, such as Canny operators, Sobel operators, etc., to detect edges in the image. Based on spectral data or image data, key parameters of the plasma, such as temperature, density, etc., are calculated. Image generation requires the use of image processing software or algorithms to reconstruct plasma images from plasma event flow data. These images can be two-dimensional grayscale images or color images, or three-dimensional stereo images.
[0086] See also Fig.10 As shown, the embodiment of the present application provides a material detection method, comprising: S1. Acquire detection data of each material to be classified; the detection data includes plasma radiation spectrum data and plasma characteristic data of the material; S2. Input the detection data of each material to be classified into the neural network model obtained by using the neural network model training method, and output the label information of each material.
[0087] Optionally, the plasma radiation spectrum data of each material includes first plasma radiation spectrum data of each material and / or plasma radiation spectrum data obtained by preprocessing the first plasma radiation spectrum data; The plasma characteristic data of each material includes: physical information characteristics of the plasma image, shape characteristics of the plasma image and texture characteristics of the plasma image.
[0088] Optionally, the plasma radiation spectrum data of each material includes plasma spectrum characteristic data of each material, and the plasma spectrum characteristic data of each material is obtained by performing data dimension reduction processing on the first plasma radiation spectrum data of each material or the plasma radiation spectrum data obtained after the preprocessing; the plasma spectrum characteristic data of each material includes multiple main component plasma spectrum characteristic data of each material, and the cumulative contribution rate of the multiple main components in the multiple main component plasma spectrum characteristic data of each material is greater than or equal to a preset cumulative contribution rate threshold; preferably, the preset cumulative contribution rate threshold is 85%.
[0089] Exemplarily, based on the 9 types of carbon steel samples in Table 1, the effect of the neural network model obtained by using the neural network model training method is verified.
[0090] The plasma spectrum characteristic data of the first 100 principal components of each sample of 9 types of carbon steel samples (referred to as LIBS-PCA) are used as the input of the neural network model obtained by the above neural network model training method, and the label information of the corresponding carbon steel samples, such as model information, is used as the output to obtain the verification data of LIBS-PCA; The plasma shape feature data (denoted as DVS-T) of each sample of the nine types of carbon steel samples is used as the input of the neural network model obtained by the above neural network model training method, and the label information of the corresponding carbon steel samples, such as model information, is used as the output to obtain the verification data of DVS-T; The plasma texture feature data (denoted as DVS-F) of each sample of 9 types of carbon steel samples is used as the input of the neural network model obtained by the above neural network model training method, and the label information of the corresponding carbon steel samples, such as model information, is used as the output to obtain the verification data of DVS-F; The plasma spectrum characteristic data of the first 100 principal components of each sample of 9 types of carbon steel samples (referred to as LIBS-PCA) and the plasma shape characteristic data of each sample (referred to as DVS-T) are used as the input of the neural network model obtained by the above neural network model training method, and the label information of the corresponding carbon steel samples, such as model information, is used as the output to obtain the verification data of DVS-T+LIBS-PCA; The plasma spectrum feature data of the first 100 principal components of each sample of the 9 types of carbon steel samples (recorded as LIBS-PCA) and the plasma texture feature data of each sample of the 9 types of carbon steel samples (recorded as DVS-F) are used as the input of the neural network model obtained by the above neural network model training method, and the label information of the corresponding carbon steel samples such as model information is used as the output to obtain the verification data of DVS-F+LIBS-PCA. The verification data of the above 9 types of carbon steel materials for testing the above neural network model are summarized as shown in Table 2 below. And generate the confusion matrix of the best classification effect, refer to Fig.13 shown.
[0091] Table 2 Model validation results
[0092] From the experimental results, it can be seen that different data have a significant impact on the performance of the convolutional neural network model. Among them, when LIBS-PCA data is used alone, the model performs poorly (accuracy 73.5%), indicating that the spectral feature information is limited. In contrast, the model obtained using DVS data shows a superior feature expression ability, especially the neural network model DVS-F, with an accuracy of 95.67%, which is significantly better than the 92.89% of the neural network model DVS-T. When LIBS-PCA is fused with DVS data, the classification performance is further improved, among which the combination of neural network model DVS-F+LIBS-PCA achieves a higher performance with an accuracy of 98.39%. This shows that the fusion of LIBS-PCA and DVS data can effectively complement each other, fully mine feature information, and improve the classification ability of the model.
[0093] Confusion matrix reference for best classification results Fig.13 As shown in the figure, the confusion matrix shows that the overall classification performance of the model is high, and the prediction accuracy of most categories is close to 100%, such as the classification of true categories 1, 3, 6, and 7 is completely correct. However, some categories have certain misclassification phenomena, for example, 1.8% of category 2 is misclassified as category 9, 0.51% of category 4 is misclassified as category 5, and a small number of category 5 is misclassified as category 8 and category 9.
[0094] Therefore, the method of the embodiment of the present application uses the plasma radiation spectrum data and the plasma characteristic data of each sample as input, and the sample label information corresponding to each sample as output. The trained neural network model has high accuracy. By using the neural network model to perform material detection, materials can be accurately classified, thereby improving the accuracy of material detection and classification.
[0095] It is understandable that the above neural network training method and material detection method can be used in a laser induced breakdown spectroscopy system. Figure 1 As shown, the embodiment of the present application also provides a laser induced breakdown spectroscopy system, including: an optical path system 106; a laser 101, connected to the optical path system; a delay controller 102, connected to the laser; a spectrometer 103, connected to a computer, the optical path system and the delay controller respectively; a dynamic vision sensor 105, used to obtain plasma event flow data of a material or sample; and a computer 104, connected to the spectrometer and the dynamic vision sensor respectively, for: A1. Acquire detection data of each material to be classified; the detection data includes plasma radiation spectrum data and plasma characteristic data of the material; the plasma characteristic data is obtained based on processing of the plasma event flow data; A2. Inputting the detection data of each material to be classified into the neural network model obtained by the neural network model training method, and outputting the label information of each material; S1. Acquire detection data of each material to be classified; the detection data includes plasma radiation spectrum data and plasma characteristic data of the material; S2. Input the detection data of each material to be classified into the neural network model obtained by using the neural network model training method, and output the label information of each material.
[0096] It is understandable that the above-mentioned laser induced breakdown spectroscopy system can also execute other method steps of the above-mentioned neural network model training method and material detection method, and the effects are the same or similar to the corresponding features in the above-mentioned neural network model training method and material detection method, which will not be repeated here.
[0097] See also Fig.11 As shown, the embodiment of the present application also provides a neural network model training system 200, including: A sample data acquisition unit 201 is used to acquire the plasma characteristic data; The sample data acquisition unit 201 includes: a first acquisition unit 2011, used to acquire the plasma event flow data of each sample; a second acquisition unit 2012, used to acquire the plasma radiation spectrum data of each sample; a generation unit 2013, used to reconstruct the plasma image according to the plasma event flow data of each sample; an extraction unit 2014, used to extract the plasma feature data of each sample based on the plasma image; and a training unit 202; used to train the neural network model with the plasma radiation spectrum data of each sample and the plasma feature data of each sample as input and the sample label information corresponding to each sample as output.
[0098] It is understandable that each unit in the above-mentioned neural network model training system can also execute other corresponding method steps in the above-mentioned neural network model training method, and the effect is the same or similar to the corresponding technical features in the above-mentioned neural network model training method, which will not be repeated here.
[0099] See also Fig.12 As shown, the embodiment of the present application also provides a material detection system 300, including: a third acquisition unit 301, used to obtain detection data of each material to be classified; a detection unit 303, including a neural network model obtained by using a neural network model training method; an input unit 302, used to input the detection data of each material to be classified into the detection unit; an output unit 304, used to output the detection result of the detection unit; the detection result includes label information of each material to be classified.
[0100] It can be understood that each unit in the above-mentioned material detection system can also execute other corresponding method steps in the above-mentioned material detection method, and the effects are the same or similar to the corresponding technical features in the above-mentioned material detection method, which will not be repeated here.
[0101] An embodiment of the present application also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the model training method and the material detection method when executing the computer program.
[0102] An embodiment of the present application also provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the model training method and the material detection method are implemented.
[0103] An embodiment of the present application also provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the model training method and material detection method described in any one of the first aspects above.
[0104] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0106] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0107] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0108] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0109] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the technical solution of this embodiment.
[0110] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A neural network model training method, characterized in that: include: Acquire a sample training set; wherein each sample data in the sample training set includes plasma radiation spectrum data, plasma characteristic data and sample label information corresponding to each sample; Taking the plasma radiation spectrum data and the plasma characteristic data of each sample as input and the sample label information corresponding to each sample as output, training to obtain the neural network model; The plasma radiation spectrum data includes the first plasma radiation spectrum data of each sample and / or the plasma radiation spectrum data obtained by preprocessing the first plasma radiation spectrum data.
2. The neural network model training method according to claim 1, characterized in that: The plasma radiation spectrum data includes plasma spectrum characteristic data of each sample; The plasma spectrum characteristic data of each sample is obtained by performing data dimension reduction processing on the first plasma radiation spectrum data of each sample or on the plasma radiation spectrum data obtained after the preprocessing; Taking the plasma radiation spectrum data and the plasma characteristic data of each sample as input and the sample label information corresponding to each sample as output, training a neural network model; comprising: The neural network model is trained by taking the plasma spectrum characteristic data of each sample and the plasma characteristic data as input and taking the sample label information corresponding to each sample as output.
3. The neural network model training method according to claim 2, characterized in that: The plasma characteristic data includes: physical information characteristics of the plasma image, shape characteristics of the plasma image and texture characteristics of the plasma image; The physical information features of the plasma image, the shape features of the plasma image and the texture features of the plasma image are obtained based on plasma event flow data; And / or, the data dimension reduction processing method includes principal component analysis, random projection, multi-scale scaling or non-negative matrix decomposition; And / or, the label information includes a model number; And / or, the plasma spectrum characteristic data of each sample includes a plurality of main component plasma spectrum characteristic data of each sample, and the cumulative contribution rate of the plurality of main components in the plurality of main component plasma spectrum characteristic data of each sample is greater than or equal to a preset cumulative contribution rate threshold; And / or, the preprocessing includes background removal, baseline correction and / or noise reduction; And / or, the physical information features of the plasma image include the plasma image area, the circularity of the plasma image and / or the number of events of the plasma image.
4. The neural network model training method according to claim 2, characterized in that: The method further comprises acquiring the plasma characteristic data; The acquiring of the plasma characteristic data comprises: Acquiring plasma event flow data of each sample; reconstructing a plasma image according to the plasma event flow data; Plasma characteristic data of each sample is extracted based on the plasma image.
5. The neural network model training method according to claim 4, characterized in that: The step of reconstructing a plasma image according to the plasma event flow data comprises: Reconstructing a plasma image based on the plasma event flow data using a deep neural network, a pulse neural network, cluster analysis or event accumulation; The plasma image is a first plasma image generated based on the plasma event flow data or a Gaussian filtered plasma image obtained by performing Gaussian filtering on the first plasma image; The step of extracting plasma characteristic data of each sample based on the plasma image comprises: Extracting plasma shape contour features based on the plasma image to form a plasma shape contour, and calculating the area and near circularity of a region enclosed by the plasma shape contour to obtain the area and near circularity of the plasma image; The plasma image is processed to obtain shape features and texture features of the plasma image.
6. A material detection method, characterized in that: include: Acquire detection data of each material to be classified; the detection data includes plasma radiation spectrum data and plasma characteristic data of the material; The detection data of each material to be classified is input into a neural network model obtained by the neural network model training method according to any one of claims 1 to 5, and the label information of each material is output.
7. The material detection method according to claim 6, characterized in that: The plasma radiation spectrum data of each material includes first plasma radiation spectrum data of each material and / or plasma radiation spectrum data obtained by preprocessing the first plasma radiation spectrum data; The plasma characteristic data of each material includes: physical information characteristics of the plasma image, shape characteristics of the plasma image and texture characteristics of the plasma image.
8. The material detection method according to claim 7, characterized in that: The plasma radiation spectrum data of each material includes plasma spectrum characteristic data of each material; The plasma spectrum characteristic data of each material is obtained by performing data dimension reduction processing on the first plasma radiation spectrum data of each material or on the plasma radiation spectrum data obtained after the preprocessing; And / or, the plasma spectrum characteristic data of each material includes multiple main component plasma spectrum characteristic data of each material, and the cumulative contribution rate of the multiple main components in the multiple main component plasma spectrum characteristic data of each material is greater than or equal to a preset cumulative contribution rate threshold.
9. A laser induced breakdown spectroscopy system, characterized in that: include: Optical path system; A laser is connected to the optical path system; A delay controller connected to the laser; The spectrometer is connected with the computer, the optical path system and the delay controller respectively; Dynamic vision sensors to obtain plasma event flow data of materials or samples; and a computer, respectively connected to the spectrometer and the dynamic vision sensor, for: Acquire detection data of each material to be classified; the detection data includes plasma radiation spectrum data and plasma characteristic data of the material; Plasma characteristic data is obtained based on processing the plasma event flow data; The detection data of each material to be classified is input into the neural network model obtained by using the neural network model training method, and the label information of each material is output.
10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 or any one of claims 6 to 7 is implemented.
Citation Information
Patent Citations
Traditional Chinese medicinal material production place determination method based on principal component analysis and BP neural network
CN107677647A
Method and apparatus for measuring plasma state
CN111935892A
Sample classification method and system based on laser-induced breakdown spectroscopy technology
CN116030310A
Modeling method for chlorophyll content of corn canopy
CN118212525A
Cited By
Neural network model training method, material detection method, system and equipment
CN121009922A