A method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence
By combining X-ray absorption spectroscopy and the RetNet neural network model, the shortcomings of existing flammable and explosive material detection methods in on-site detection are addressed, achieving efficient and accurate identification of flammable and explosive materials, and improving the safety and efficiency of security inspections and hazardous materials detection.
Patent Information
- Application Number
- CN202510302166.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-03-14
AI Technical Summary
Existing methods for detecting flammable and explosive materials suffer from problems such as long detection time, strict environmental requirements, high detection costs, susceptibility to environmental interference, low detection accuracy, and insufficient penetration when used in the field, and therefore cannot meet the needs of on-site detection of explosives.
Combining X-ray absorption spectroscopy and artificial intelligence technology, the RetNet neural network model is used to identify flammable and explosive materials. By acquiring X-ray absorption spectra and parameters, feature extraction and correction are performed using encoder and decoder subnetworks, achieving efficient and accurate identification of flammable and explosive materials.
It improves the accuracy and reliability of flammable and explosive material identification, and can adapt to different types of item identification tasks in different scenarios, thereby enhancing the safety and efficiency of security inspections and hazardous materials detection.
Smart Images

Figure CN119832344B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flammable and explosive material identification technology, and in particular to a method for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence. Background Technology
[0002] Currently, detection methods for flammable and explosive materials are mainly divided into two categories: trace detection technologies, including ion mobility spectrometry, mass spectrometry, gas chromatography, electrochemical sensors, and fluorescence methods; and volume detection technologies, including neutron analysis, terahertz time-domain spectroscopy, Raman spectroscopy, and X-ray backscattering. However, these commonly used methods have some shortcomings in on-site detection, limiting their application in explosives detection. First, while gas chromatography, mass spectrometry, and ion mobility spectrometry are the gold standard for detection, their long detection times, strict environmental requirements, sample preparation needs, and high costs mean that these detection technologies can generally only be performed in specialized laboratories or testing centers, making on-site detection in important public safety locations impossible. Secondly, while various types of chemical sensors offer high sensitivity and accuracy, they are easily affected by environmental factors, leading to reduced accuracy and missed or false detections. Finally, neutron analysis requires gamma rays, which have high radiation energy and necessitate high levels of protection. Terahertz time-domain spectroscopy has penetrating power, but its penetration through polar materials is significantly reduced. Raman spectroscopy can only acquire surface information and lacks penetrating power, failing to obtain information about the object's interior. X-ray backscattering signals are weak, resulting in low detection and recognition rates. Therefore, based on the above analysis, none of these detection methods are suitable for on-site detection of explosives. Summary of the Invention
[0003] In view of this, in order to achieve on-site detection of explosives, this invention proposes to use X-ray absorption spectroscopy combined with artificial intelligence technology for on-site detection of explosives.
[0004] According to one aspect of the present invention, a method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence is provided, comprising:
[0005] The X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object, are obtained; wherein, the parameters include the X-ray input voltage, current, and radiation distance.
[0006] Input it into a pre-trained RetNet neural network model to identify the type of the object to be identified and the corresponding correction result of the X-ray absorption spectrum;
[0007] The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork.
[0008] Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multi-layer sensing block connected together.
[0009] The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified and extract first spectral features via several encoder layers;
[0010] The decoder subnetwork is configured to extract features based on a first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features.
[0011] The encoder subnetwork is also configured to acquire the corrected X-ray absorption spectrum, extract third spectral features through several encoder layers, and classify the type of the object to be identified based on the acquired features.
[0012] In the above technical solution, the object to be identified exhibits a specific absorption spectrum under X-ray radiation. Since different substances have different atomic structures, their X-ray absorption characteristics also differ. Therefore, the absorption spectrum can reflect the composition information of the object and is an important basis for identifying the type of object. When recording the X-ray radiation of the object to be identified, parameters such as input voltage, current, and radiation distance must be accurately recorded. These parameters affect the intensity and penetrating power of X-rays, thus affecting the appearance of the absorption spectrum. Accurately recording these parameters helps in subsequent correction of the absorption spectrum and improves the accuracy of identification.
[0013] The RetNet neural network model consists of an encoder subnetwork and a decoder subnetwork, each composed of several stacked individual encoder layers. This structural design allows the model to deeply mine data features while maintaining good parallel computing performance. The encoder subnetwork is composed of several stacked individual encoder layers, each of which is connected by a gated multi-scale preservation module and a multilayer perceptron block. The gated multi-scale preservation module can consider information at different scales simultaneously, helping to better capture detailed features and overall trends in the absorption spectrum; the multilayer perceptron block can perform nonlinear transformations and combinations on the extracted features, further enhancing the expressive power of the features, enabling the model to more deeply understand and mine complex information in the absorption spectrum. The decoder subnetwork is also composed of several stacked individual encoder layers, with a similar structure to the encoder layers in the encoder subnetwork, also composed of gated multi-scale preservation modules and multilayer perceptron blocks. This structural design allows the decoder subnetwork to further mine and integrate information based on the encoder subnetwork, achieving effective correction of the absorption spectrum. The encoder subnetwork then acquires the corrected X-ray absorption spectrum again, extracting third spectral features through several encoder layers. These features are extracted based on the corrected absorption spectrum, more accurately reflecting the characteristics of the object. Finally, the item to be identified is classified based on the acquired third spectral features. This deep learning-based classification method can automatically learn the subtle differences in the absorption spectra of different item types, achieving efficient and accurate identification of flammable and explosive materials. Compared to traditional methods based on manual feature extraction and simple classification algorithms, this method based on the RetNet neural network model has stronger learning and generalization capabilities. It can automatically learn complex patterns and rules from large amounts of data without requiring manual pre-setting of complex feature extraction rules, and can better adapt to different scenarios and item identification tasks. Furthermore, correcting the absorption spectrum before classification further improves the accuracy and reliability of the classification, making it of significant practical value for the identification of flammable and explosive materials and other dangerous goods, effectively improving the safety and efficiency of security checks and hazardous materials detection.
[0014] In some embodiments, the X-ray absorption spectrum is collected by a linear array photon counting detector or a CdTe detector.
[0015] In the aforementioned technical solutions, the linear array photon counting detector possesses the ability to rapidly respond to X-ray signals, making it suitable for dynamic imaging scenarios and effectively capturing instantaneous absorption spectral changes of objects under X-ray radiation. Its linear array structure endows the detector with high spatial resolution, enabling more precise differentiation of absorption spectral differences among different components within the object. However, compared to CdTe detectors, the linear array photon counting detector is slightly inferior in energy resolution, potentially making it difficult to accurately distinguish X-ray photons of different energies in certain situations. CdTe detectors, on the other hand, have high energy resolution, accurately distinguishing X-ray photons of different energies. Their wider detection energy range covers X-rays from low to high energy, meeting the detection needs of various objects. Particularly in the hard X-ray region, CdTe detectors exhibit high quantum efficiency, effectively improving the signal-to-noise ratio and thus enhancing the accuracy of absorption spectral detection. However, compared to linear array photon counting detectors, CdTe detectors have higher manufacturing costs, increasing the overall economic burden of the system. Those skilled in the art should select the most suitable detector type based on actual application scenarios and needs, taking into account factors such as detector response speed, spatial resolution, energy resolution, detection energy range, quantum efficiency, and cost.
[0016] In some embodiments, the X-ray absorption spectrum of the object to be identified, and the X-ray parameters when irradiating the object to be identified are obtained; wherein the parameters include X-ray input voltage, current, and radiation distance, and further include:
[0017] Convert the X-ray absorption spectrum of the object to be identified into a digital X-ray image;
[0018] Based on edge detection and segmentation algorithms, the region of interest in the digital ray image is extracted.
[0019] Based on the pixel coordinates of the region of interest, extract spectral information;
[0020] This spectral information is used as the X-ray absorption spectrum of the object to be identified.
[0021] In the above technical solution, the acquired X-ray absorption spectrum is converted into a digital X-ray image. The digital X-ray image is presented in pixel form, where the grayscale value of each pixel represents the X-ray absorption intensity at the corresponding location. This digital form facilitates subsequent image processing and analysis, enabling the extraction of feature information from the object using mature digital image processing techniques. Edge detection algorithms (such as the Sobel operator and the Marr-Hildreth edge detector) are used to process the digital X-ray image to detect the contour edges of the object in the image. Edge detection highlights the shape features of the object, providing a basis for subsequent region segmentation. The coordinates of each pixel in the region of interest are determined; these coordinates correspond to specific locations in the original X-ray absorption spectrum. Based on the pixel coordinates, the spectral information at the corresponding location is extracted from the original X-ray absorption spectrum. The extracted spectral information contains the compositional features of the object within the region of interest. The extracted spectral information is used as the X-ray absorption spectrum of the object to be identified for subsequent artificial intelligence model recognition. This spectral information provides more accurate and representative compositional features of the object, helping to improve the accuracy and reliability of the identification.
[0022] In some embodiments, the X-ray absorption spectrum of the object to be identified, and the X-ray parameters when irradiating the object to be identified are obtained; wherein, the parameters include X-ray input voltage, current, and radiation distance, and the process further includes preprocessing the X-ray absorption spectrum; the preprocessing includes:
[0023] The absorption coefficient of the X-ray absorption spectrum is calculated based on the Lambert-Beer law, and the absorbance index of the spectrum is converted into the absorption coefficient index.
[0024] The calculated X-ray absorption spectrum is then normalized.
[0025] In the aforementioned technical solution, the Lambert-Beer law describes the direct proportionality between light absorption and the concentration of the absorbing substance and the thickness of the absorbing layer. In X-ray absorption spectroscopy, this law can be used to calculate the absorption coefficient. The absorption coefficient μ characterizes the probability of X-ray absorption by the sample, and its value is closely related to the sample's density, the atomic number of the element, and the X-ray energy. The absorbance index of the spectrum is converted into the absorption coefficient index, where the relationship between absorbance A and transmittance T is A = lg(1 / T), and transmittance T is the ratio of the emitted light intensity to the incident light intensity. By calculating the absorption coefficient, the absorption characteristics of the sample to X-rays can be more accurately reflected, providing fundamental data for subsequent analysis. Normalization aims to eliminate the influence of different sample thicknesses, densities, and other factors on the X-ray absorption spectrum, making the spectral data of different samples comparable. Normalization highlights the characteristic absorption peaks of the sample, facilitating subsequent feature extraction and identification. Normalization is typically achieved by dividing the absorption spectrum by the background absorption spectrum. The background absorption spectrum represents the absorption characteristics of the sample matrix; removing the background allows for clearer observation of the absorption characteristics of specific components in the sample. By calculating and normalizing the absorption coefficients, the X-ray absorption spectral data are standardized, making them unaffected by experimental conditions and sample differences, thus improving the stability and reliability of the data. The preprocessed spectral data can more accurately reflect the compositional characteristics of the sample, providing high-quality input data for subsequent artificial intelligence model recognition, and helping to improve the accuracy and reliability of recognition.
[0026] According to another aspect of the present invention, a training method for a RetNet neural network model is provided, based on the above-described method combining X-ray absorption spectroscopy and artificial intelligence for identifying flammable and explosive materials; the RetNet neural network model includes an encoder subnetwork and a decoder subnetwork; the method includes:
[0027] Acquire sample spectral data, along with the corresponding category labels and standard spectral data;
[0028] The encoder and decoder are trained based on the sample's spectral data, and the predicted and corrected spectral data is output.
[0029] Based on the predicted and corrected spectral data and the standard spectral data, the first loss value is calculated;
[0030] Based on the first loss value, the encoder subnetwork and the decoder subnetwork are trained;
[0031] Freeze the encoder subnetwork and decoder subnetwork, input the predicted and corrected spectral data into the encoder subnetwork of the model, and output the third spectral feature;
[0032] Based on this third spectral feature, the predicted category label is output;
[0033] A second loss value is calculated based on the predicted label of the category and the true label of the category;
[0034] The RetNet neural network model is trained based on this second loss value.
[0035] In the above technical solution, spectral data of the sample to be identified is collected. This data contains information on the absorption intensity of the sample at different wavelengths. The true category label is an accurate identifier of the sample's category and is used to supervise model training; standard spectral data is spectral data with known components and categories, serving as a target reference for training and correction. The encoder and decoder subnetworks of the RetNet model are trained using the sample spectral data. The encoder is responsible for extracting features from the spectral data, while the decoder attempts to reconstruct the spectral data. Through training, the model learns the feature representation and reconstruction rules of the spectral data. The trained model can output predicted and corrected spectral data based on the input sample spectral data. This data, after feature extraction and reconstruction by the model, is closer to the standard spectral data. The predicted and corrected spectral data is compared with the standard spectral data, and a first loss value is calculated. This loss value reflects the accuracy of the model's reconstruction of the spectral data; commonly used loss functions include mean squared error (MSE). The encoder and decoder subnetworks are optimized and trained using the first loss value. Through the backpropagation algorithm, the network parameters are adjusted so that the model can better reconstruct the spectral data and improve the similarity between the predicted and corrected spectral data and the standard spectral data. After completing the spectral data reconstruction training, the parameters of the encoder and decoder subnetworks are frozen, preventing them from participating in subsequent training. The predicted and corrected spectral data is input into the encoder subnetwork of the model, outputting a third spectral feature. These features are key information related to sample composition and category in the spectral data. Based on the third spectral feature, the model further performs category identification, outputting a predicted category label. The predicted category label is compared with the sample's true category label, calculating a second loss value. This loss value reflects the model's accuracy in the category identification task; commonly used loss functions include cross-entropy loss. The second loss value is used to optimize the entire RetNet neural network model. Through backpropagation, the model parameters are adjusted to enable the model to more accurately identify the sample category. The RetNet model can effectively correct and reconstruct spectral data, making it closer to standard spectral data, providing an accurate foundation for subsequent category identification. The model extracts features from the spectral data through the encoder subnetwork and performs category identification based on these features, accurately identifying the sample category. By calculating the first and second loss values and optimizing the model parameters based on these losses, the RetNet model can continuously improve the accuracy of spectral data reconstruction and category identification.
[0036] According to another aspect of the present invention, a RetNet neural network is provided, characterized in that it is based on the above-described method for identifying flammable and explosive materials by combining X-ray absorption spectroscopy and artificial intelligence.
[0037] The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork.
[0038] Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multi-layer sensing block connected together.
[0039] The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified and extract first spectral features via several encoder layers;
[0040] The decoder subnetwork is configured to extract features based on a first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features.
[0041] The encoder subnetwork is also configured to acquire the corrected X-ray absorption spectrum, extract third spectral features through several encoder layers, and classify the type of the object to be identified based on the acquired features.
[0042] In order to better utilize the above method, this application proposes a RetNet neural network. Each part of the network corresponds to each step of the above method. Its specific principle has been described above and will not be repeated here.
[0043] According to another aspect of the present invention, a device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence is provided, comprising:
[0044] The explosive detection module is used to acquire the X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object; wherein, the parameters include X-ray input voltage, current, and radiation distance;
[0045] The neural network module is used to input the X-ray absorption spectrum into a pre-trained RetNet neural network model to identify the type of the object to be identified and the corresponding correction result of the X-ray absorption spectrum.
[0046] The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork.
[0047] Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multi-layer sensing block connected together.
[0048] The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified and extract first spectral features via several encoder layers;
[0049] The decoder subnetwork is configured to extract features based on a first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features.
[0050] The encoder subnetwork is also configured to acquire the corrected X-ray absorption spectrum, extract third spectral features through several encoder layers, and classify the type of the object to be identified based on the acquired features.
[0051] In order to better utilize the above method, this application proposes a device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence. Each module corresponds to a step in the above method, and its specific principle has been described above and will not be repeated here.
[0052] According to another aspect of the present invention, a device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence is provided, comprising:
[0053] At least one processor and a memory communicatively connected to said at least one processor;
[0054] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described above.
[0055] In the above technical solution, to better operate and process the method, the method is stored in memory, and the processor executes the stored method. It should be noted that the principle and effect of each step have been described above and will not be elaborated upon here.
[0056] According to another aspect of the present invention, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described method.
[0057] In the above technical solution, to better operate and use the method, the method is stored in a computer-readable storage medium and implemented using a processor. It should be noted that the principle and effect of each step have been described above and will not be elaborated upon here. Attached Figure Description
[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a flowchart illustrating an embodiment of the present invention of a method for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence.
[0060] Figure 2 This is a schematic flowchart of an embodiment of a training method for a RetNet neural network model according to the present invention;
[0061] Figure 3 This is a schematic diagram of the structure of an explosive detection system according to an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials;
[0062] Figure 4 This is a schematic diagram of the Retention parallel mechanism of an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials;
[0063] Figure 5 This is a schematic diagram of the Retention loop mechanism of an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials;
[0064] Figure 6 This is a schematic diagram of the ResNet classification model structure of an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials.
[0065] Figure 7 This is a schematic diagram of spectral distortion in an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials.
[0066] Figure 8 This is a schematic diagram of two pixels dividing photon energy in an embodiment of an invention that combines X-ray absorption spectroscopy and artificial intelligence for identifying flammable and explosive materials.
[0067] Figure 9 This is a schematic diagram of the final structure of a ResNet model according to an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials.
[0068] Figure 10 This is a schematic diagram of image data from an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials.
[0069] Figure 11 This is a schematic diagram of ResNet model training in an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials.
[0070] Figure 12 This is a schematic diagram of the ResNet model inference process of an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for the identification of flammable and explosive materials;
[0071] Figure 13 This is a schematic diagram of an explosive detection system based on a CdTe detector, according to an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence for identifying flammable and explosive materials.
[0072] Figure 14 This is a schematic diagram of an embodiment of the present invention, which combines X-ray absorption spectroscopy and artificial intelligence to identify flammable and explosive materials. Detailed Implementation
[0073] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0074] To achieve on-site detection of explosives, this invention proposes using X-ray absorption spectroscopy combined with artificial intelligence technology for on-site detection of explosives.
[0075] Example 1
[0076] Please see Figure 1 A method for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence includes:
[0077] A1. Obtain the X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object; wherein, the parameters include X-ray input voltage, current, and radiation distance;
[0078] A2. Input it into a pre-trained RetNet neural network model to identify the type of the object to be identified and the corresponding correction result of the X-ray absorption spectrum;
[0079] The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork.
[0080] Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multilayer perceptron block connected together. The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified, extract a first spectral feature through several encoder layers, and classify the object to be identified based on the acquired feature. The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature.
[0081] In this embodiment, the item to be identified exhibits a specific absorption spectrum under X-ray radiation. Since different substances have different atomic structures, their X-ray absorption characteristics also differ. Therefore, the absorption spectrum can reflect the composition information of the item and is an important basis for identifying the type of item. When recording the X-ray radiation of the item to be identified, parameters such as input voltage, current, and radiation distance must be accurately recorded. These parameters affect the intensity and penetrating power of X-rays, thus affecting the appearance of the absorption spectrum. Accurately recording these parameters helps in subsequent correction of the absorption spectrum and improves the accuracy of identification.
[0082] The RetNet neural network model consists of an encoder subnetwork and a decoder subnetwork, each composed of several stacked individual encoder layers. This structural design allows the model to deeply mine data features while maintaining good parallel computing performance. The encoder subnetwork is composed of several stacked individual encoder layers, each of which is connected by a gated multi-scale preservation module and a multilayer perceptron block. The gated multi-scale preservation module can consider information at different scales simultaneously, helping to better capture detailed features and overall trends in the absorption spectrum; the multilayer perceptron block can perform nonlinear transformations and combinations on the extracted features, further enhancing the expressive power of the features, enabling the model to more deeply understand and mine complex information in the absorption spectrum. The decoder subnetwork is also composed of several stacked individual encoder layers, with a similar structure to the encoder layers in the encoder subnetwork, also composed of gated multi-scale preservation modules and multilayer perceptron blocks. This structural design allows the decoder subnetwork to further mine and integrate information based on the encoder subnetwork, achieving effective correction of the absorption spectrum. The encoder subnetwork then acquires the corrected X-ray absorption spectrum again, extracting third spectral features through several encoder layers. These features are extracted based on the corrected absorption spectrum, more accurately reflecting the characteristics of the object. Finally, the item to be identified is classified based on the acquired third spectral features. This deep learning-based classification method can automatically learn the subtle differences in the absorption spectra of different item types, achieving efficient and accurate identification of flammable and explosive materials. Compared to traditional methods based on manual feature extraction and simple classification algorithms, this method based on the RetNet neural network model has stronger learning and generalization capabilities. It can automatically learn complex patterns and rules from large amounts of data without requiring manual pre-setting of complex feature extraction rules, and can better adapt to different scenarios and item identification tasks. Furthermore, correcting the absorption spectrum before classification further improves the accuracy and reliability of the classification, making it of significant practical value for the identification of flammable and explosive materials and other dangerous goods, effectively improving the safety and efficiency of security checks and hazardous materials detection.
[0083] In this embodiment, the X-ray absorption spectrum is acquired using a linear array photon counting detector or a CdTe detector. Linear array photon counting detectors possess the ability to rapidly respond to X-ray signals, making them suitable for dynamic imaging scenarios and effectively capturing instantaneous changes in the absorption spectrum of an object under X-ray radiation. Their linear array structure provides high spatial resolution, enabling more precise differentiation of the absorption spectrum differences between different components within the object. However, compared to CdTe detectors, linear array photon counting detectors are slightly inferior in energy resolution, potentially making it difficult to accurately distinguish X-ray photons of different energies in certain situations. CdTe detectors, on the other hand, have high energy resolution, accurately distinguishing X-ray photons of different energies. Their wide detection energy range covers X-rays from low to high energy, meeting the detection needs of various objects. Especially in the hard X-ray region, CdTe detectors have high quantum efficiency, effectively improving the signal-to-noise ratio and thus enhancing the accuracy of absorption spectrum detection. However, compared to linear array photon counting detectors, CdTe detectors have higher manufacturing costs, increasing the overall economic burden of the system. Those skilled in the art should select the most suitable detector type based on actual application scenarios and needs, taking into account factors such as detector response speed, spatial resolution, energy resolution, detection energy range, quantum efficiency, and cost.
[0084] In this embodiment, the X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object, are obtained. The parameters include the X-ray input voltage, current, and radiation distance. The method further includes: converting the X-ray absorption spectrum of the object to be identified into a digital X-ray image; extracting the region of interest in the digital X-ray image based on an edge detection and segmentation algorithm; extracting spectral information based on the pixel coordinates of the region of interest; and using the spectral information as the X-ray absorption spectrum of the object to be identified.
[0085] In this embodiment, the acquired X-ray absorption spectrum is converted into a digital X-ray image. The digital X-ray image is presented in pixel form, where the grayscale value of each pixel represents the X-ray absorption intensity at the corresponding location. This digital format facilitates subsequent image processing and analysis, enabling the extraction of feature information from the object using mature digital image processing techniques. Edge detection algorithms (such as the Sobel operator and the Marr-Hildreth edge detector) are used to process the digital X-ray image to detect the contour edges of the object in the image. Edge detection highlights the shape features of the object, providing a basis for subsequent region segmentation. The coordinates of each pixel in the region of interest are determined; these coordinates correspond to specific locations in the original X-ray absorption spectrum. Based on the pixel coordinates, spectral information for the corresponding location is extracted from the original X-ray absorption spectrum. The extracted spectral information contains the compositional features of the object within the region of interest. This extracted spectral information is used as the X-ray absorption spectrum of the object to be identified for subsequent artificial intelligence model recognition. This spectral information provides more accurate and representative compositional features of the object, helping to improve the accuracy and reliability of the identification.
[0086] In this embodiment, the X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object, are obtained. These parameters include the X-ray input voltage, current, and radiation distance. The process also includes preprocessing the X-ray absorption spectrum. The preprocessing includes: calculating the absorption coefficient of the X-ray absorption spectrum based on the Lambert-Beer law, converting the absorbance index of the spectrum into an absorption coefficient index, and normalizing the calculated X-ray absorption spectrum.
[0087] In this embodiment, the Lambert-Beer law describes the direct proportionality between light absorption and the concentration of the absorbing material and the thickness of the absorbing layer. In X-ray absorption spectroscopy, this law can be used to calculate the absorption coefficient. The absorption coefficient μ characterizes the probability that X-rays are absorbed by the sample, and its value is closely related to the sample's density, the atomic number of the element, and the X-ray energy. The absorbance index of the spectrum is converted into the absorption coefficient index, where the relationship between absorbance A and transmittance T is A = lg(1 / T), and transmittance T is the ratio of the emitted light intensity to the incident light intensity. By calculating the absorption coefficient, the absorption characteristics of the sample to X-rays can be more accurately reflected, providing basic data for subsequent analysis. Normalization aims to eliminate the influence of different sample thicknesses, densities, and other factors on the X-ray absorption spectrum, making the spectral data of different samples comparable. Normalization highlights the characteristic absorption peaks of the sample, facilitating subsequent feature extraction and identification. Normalization is typically performed by dividing the absorption spectrum by the background absorption spectrum. The background absorption spectrum represents the absorption characteristics of the sample matrix; removing the background allows for clearer observation of the absorption characteristics of specific components in the sample. By calculating and normalizing the absorption coefficients, the X-ray absorption spectral data are standardized, making them unaffected by experimental conditions and sample differences, thus improving the stability and reliability of the data. The preprocessed spectral data can more accurately reflect the compositional characteristics of the sample, providing high-quality input data for subsequent artificial intelligence model recognition, and helping to improve the accuracy and reliability of recognition.
[0088] Example 2
[0089] Please see Figure 2 A training method for a RetNet neural network model, based on a method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence as described in one embodiment; the RetNet neural network model includes an encoder subnetwork and a decoder subnetwork; the method includes:
[0090] B1. Obtain sample spectral data, as well as the corresponding category labels and standard spectral data;
[0091] B2. Train the encoder and decoder based on the sample's spectral data, and output the predicted and corrected spectral data;
[0092] B3. Based on the predicted and corrected spectral data and the standard spectral data, calculate the first loss value;
[0093] B4. Based on the first loss value, train the encoder subnetwork and the decoder subnetwork;
[0094] B5. Freeze the encoder subnetwork and decoder subnetwork, input the predicted and corrected spectral data into the encoder subnetwork of the model, and output the third spectral feature;
[0095] B6. Based on this third spectral feature, output the predicted category label;
[0096] B7. Calculate a second loss value based on the predicted label of the category and the true label of the category;
[0097] B8. Based on the second loss value, train the RetNet neural network model.
[0098] In this embodiment, spectral data of the sample to be identified is collected. This data includes information on the absorption intensity of the sample at different wavelengths. The true category label is an accurate identifier of the sample's category and is used to supervise model training. Standard spectral data is spectral data with known components and categories, serving as a target reference for training and correction. The encoder and decoder subnetworks of the RetNet model are trained using the sample spectral data. The encoder is responsible for extracting features from the spectral data, while the decoder attempts to reconstruct the spectral data. Through training, the model learns the feature representation and reconstruction rules of the spectral data. The trained model can output predicted and corrected spectral data based on the input sample spectral data. This data, after feature extraction and reconstruction by the model, is closer to the standard spectral data. The predicted and corrected spectral data is compared with the standard spectral data, and a first loss value is calculated. This loss value reflects the accuracy of the model's reconstruction of the spectral data; commonly used loss functions include mean squared error (MSE). The encoder and decoder subnetworks are optimized using the first loss value. Through the backpropagation algorithm, the network parameters are adjusted so that the model can better reconstruct the spectral data and improve the similarity between the predicted and corrected spectral data and the standard spectral data. After completing the spectral data reconstruction training, the parameters of the encoder and decoder subnetworks are frozen, preventing them from participating in subsequent training. The predicted and corrected spectral data is input into the encoder subnetwork of the model, outputting a third spectral feature. These features are key information related to sample composition and category in the spectral data. Based on the third spectral feature, the model further performs category identification, outputting a predicted category label. The predicted category label is compared with the sample's true category label, calculating a second loss value. This loss value reflects the model's accuracy in the category identification task; commonly used loss functions include cross-entropy loss. The second loss value is used to optimize the entire RetNet neural network model. Through backpropagation, the model parameters are adjusted to enable the model to more accurately identify sample categories. The RetNet model effectively corrects and reconstructs spectral data, making it closer to standard spectral data, providing an accurate foundation for subsequent category identification. The model extracts features from the spectral data through the encoder subnetwork and performs category identification based on these features, accurately identifying sample categories. By calculating the first and second loss values and optimizing the model parameters based on these losses, the RetNet model continuously improves the accuracy of spectral data reconstruction and category identification.
[0099] Example 3
[0100] A RetNet neural network based on a method for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence, as described in one embodiment;
[0101] The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork.
[0102] Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multilayer perceptron block connected together. The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified and extract a first spectral feature through several encoder layers. The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features. The encoder subnetwork is also configured to acquire the corrected X-ray absorption spectrum, extract a third spectral feature through several encoder layers, and classify the type of the object to be identified based on the acquired features.
[0103] In this embodiment, in order to better utilize the above method, this application proposes a RetNet neural network. Each part of the network corresponds to each step of the above method. Its specific principle has been described above and will not be repeated here.
[0104] Example 4
[0105] To better explain and illustrate this invention, the following detailed description will be provided:
[0106] Step 1: First, construct the explosive detection system. The core components of the system include a linear array photon counting detector, an X-ray source, and a translation stage. The translation stage is controlled by a motion control system and carries the translational movement of the explosive sample. The X-ray source is powered by a high-voltage power supply, and its output voltage, current, and other parameters are controlled by an industrial control unit. The parameters of the linear array photon counting detector are controlled by the industrial control unit, including the operating mode, integration time, and number of channels. The linear array photon counting detector receives X-ray photons passing through the explosive sample. Each pixel counts the total number of X-ray photons at different energies and sends the collected data to the industrial control unit. The explosive detection system structure diagram is shown below. Figure 3 As shown.
[0107] Step 2: Build explosives classification and spectral correction models based on the Retention mechanism. The Retention mechanism, developed from the Attention mechanism, aims to solve the performance triangle that the Attention mechanism cannot achieve simultaneously: training parallelism, low inference cost, and strong modeling capability. The RetNet model built on the Retention mechanism outperforms the Transformer model in processing one-dimensional data. This is evident in the fact that as the input sequence increases, the RetNet model has significantly lower memory usage and latency than the Transformer model, while achieving greater throughput. Spectral data is also one-dimensional, and its complexity is lower than that of natural language data. Therefore, compared to other models, using a model built on the Retention mechanism to process spectral data can achieve high-performance processing of spectral data with fewer model parameters. Furthermore, this application introduces a decay factor γ in the multi-scale Retention mechanism to explicitly model the number of photons at different energies in the spectral sequence, effectively capturing the distance dependence at different energies in the spectral sequence and better capturing spectral features. Simultaneously, it effectively alleviates the problem of attention dilution. The multi-scale retention mechanism introduces a decay factor γ, which improves the model's robustness and tolerance to spectral noise. Spectral data may contain noise or outliers that can interfere with the model's inference results. By introducing the decay factor, the model can focus more on the relationships between nearby elements, thus reducing the impact of noise on the inference results and improving robustness. Introducing Group Norm effectively mitigates covariate shifts within the spectral data, making the model more stable during training. It also better handles dependencies at different energies in the spectral data, helping the model capture rich spectral features. Specifically:
[0108] It can process large amounts of spectral data simultaneously and quickly perform spectral correction and classification. The Retention mechanism has parallel and loop mechanisms, and its specific implementation is shown in Equations 1 and 2 below. Its structure is as follows: Figure 4 and Figure 5 As shown.
[0109]
[0110] In the formula, For rotation position encoding matrix, for The complex conjugate matrix, Q, represents the query vector, derived from the input. With weight matrix Multiply and then add to the parameter Perform element-wise multiplication ( (This indicates element-wise multiplication). K: Represents the key vector, obtained from the input. With weight matrix Multiply and then add to the parameter It is obtained by element-wise multiplication. V: represents the value vector, which is derived from the input. With weight matrix Multiply them to get the result. This indicates a retention operation. It is the product of the query and the transpose of the key. This indicates element-wise multiplication, where D is a lower triangular matrix that combines a mask matrix and a distance-exponentially decaying matrix. Indicates the first The state of the step, from the state of the previous step and the current step Adding them together, we get: It is an attenuation coefficient. It is the first Transpose of the step key It is the first The value of the step. Indicates the first The operation of retaining steps is determined by the query of the current step. and state Multiply them to get the result.
[0111] Similar to multi-head attention, the Retention mechanism can be extended to a Gated Multi-Scale Retention mechanism to enhance its modeling capabilities. Furthermore, a decay factor γ and a gating mechanism are introduced to further enhance the model's expressive power. The specific implementation of the Gated Multi-Scale Retention mechanism is shown in Equation 3 below:
[0112]
[0113] In the formula, This represents an attenuation coefficient, whose value is... ,in It generates an arithmetic sequence of length h. It is in Vectors in space. Indicates the first i Each attention head is calculated by the retention function, and the input is a sequence. X and (Right now The first in the vector i (elements). This indicates that the normalization is achieved through grouping ( The operation concatenates the outputs of all attention heads, where This indicates a splicing operation. This represents the number of groups after group normalization. This represents the result of the multi-scale retention operation, where... It is an activation function. and It is a weight matrix.
[0114] The Gated Multi-Scale Retention mechanism and the Multilayer Perceptron (MLP) are combined into a single encoder layer, and multiple layers are stacked to construct a complete encoder structure. Finally, a Global Average Pooling (GAP) layer and a classifier module are connected to the output of the Nth layer of the encoder to construct a complete classification model. The structural diagram is shown below. Figure 6 As shown, the explosive spectral data is first linearly mapped and then input into the model. The model outputs the predicted explosive category.
[0115] Linear array photon counting detectors exhibit spectral distortion, primarily due to factors such as pulse stacking and energy sharing. Pulse stacking occurs when two or more photons are simultaneously received by the detector but are treated as a single photon. Figure 7 As shown. Energy sharing occurs because charge (a) falls exactly on the boundary between two pixels, causing the two pixels to divide the photon's energy, as... Figure 8 As shown.
[0116] Therefore, based on the above classification model, a decoder structure is built. The encoder and decoder are combined to achieve spectral distortion correction. The model structure diagram is shown below. Figure 9 As shown in the figure. In this model, an encoder and decoder structure is used when correcting spectral data, but only the encoder model is used when classifying explosive samples.
[0117] Step 3: Spectral Data Preprocessing. The linear array photon counting detector has 128 pixels, each pixel has 128 channels, and each channel corresponds to a different X-ray photon energy. The object under test is moved by a translation stage, allowing the linear array photon counting detector to acquire image data. Simultaneously, the detector has energy resolution, thus acquiring the spectral information for each pixel. Therefore, by scanning the detector, image information of the object under test can be obtained, and the spectral information of each pixel can be obtained from its coordinates. A schematic diagram is shown below. Figure 10As shown in Figure 4, the data acquired by the linear array photon counting detector is the raw data after absorption, and its absorption coefficient needs to be calculated based on the Lambert-Beer law. Finally, the calculated absorption spectrum is normalized by minimax to eliminate the influence of voltage and current fluctuations of the conventional X-ray source on the data.
[0118]
[0119] In the formula, It represents the intensity of transmitted light, that is, the light intensity remaining after passing through the medium. This represents the initial intensity of the incident light, that is, the light intensity before it passes through the medium. The absorption coefficient is a parameter that describes the ability of a medium to absorb light, and it is related to factors such as the properties of the medium and the wavelength. This indicates the thickness of the material through which X-rays pass, i.e., the optical path length. It is the normalized absorption coefficient. It is the original absorption coefficient. It is the minimum value of the absorption coefficient. The maximum value of the absorption coefficient.
[0120] Step 4: Model Training and Testing. The collected data, after the preprocessing described above, is used as input to the neural network model, labeled with explosive category and standard spectral data. The training process consists of two steps. First, the encoder and decoder are trained. During training, distorted spectral data is imported into the model in batches, and its parameters are continuously optimized using gradient descent. The optimal solution is found through multiple rounds of training, and the encoder and decoder model parameters at the optimal solution are saved. Second, the encoder and decoder parameters are frozen, and the corrected spectral data is input into the encoder. At this point, the encoder outputs the pooling layer and classifier layer to obtain the model's predicted category. In this step, only the pooling layer and classifier layer parameters are optimized, and the best parameters from the training process are saved. The model training flowchart is as follows: Figure 11 As shown.
[0121] During model testing, data from all 128 channels are first accumulated to obtain a digital radiography (DR) image. Then, the Sobel algorithm is used for edge detection and segmentation to extract the region of interest (ROI). Next, the pixel coordinates of the ROI are read to extract spectral information. The extracted spectral information is then preprocessed, and the preprocessed spectral data is input into the calibration model to obtain the corrected spectrum. Finally, the corrected spectrum is input into the classification model to obtain the predicted category. The flowchart is as follows: Figure 12 As shown.
[0122] As an alternative implementation, a CdTe detector is used. This type of detector is also a photon counting detector, but it has only a single pixel. An X-ray absorption spectroscopy acquisition system built based on this type of detector is shown below. Figure 13 As shown, similarly, the industrial control host controls the relevant parameters of the X-ray source and detector, and controls the movement of the rotary table and translation table through the motion control system. The X-rays emitted by the source pass through the object being measured and are received by the detector. The detector counts the total number of X-ray photons at different energies and sends the collected data to the industrial control host.
[0123] Compared with the X-ray absorption spectroscopy acquisition system built using a linear array photon counting detector, the differences are: 1. In this system, the sample under test is placed on a rotating stage, and data can be acquired at different angles by rotation; 2. The CdTe detector is placed on a translation stage, and data can be acquired at different positions by translation.
[0124] Comparing the two X-ray absorption spectroscopy acquisition systems: 1. The CdTe detector is a single-pixel detector, capable of acquiring data only at a single point and only spectral data, not image data; the linear array photon counting detector is a multi-pixel detector, capable of acquiring both spectral and image data. 2. The CdTe detector takes longer to acquire data than the linear array photon counting detector, resulting in lower efficiency. 3. The CdTe detector system requires control of both a translation stage and a rotation stage, making the control system more complex; the linear array photon counting detector system only requires control of the translation stage, with the detector remaining stationary, resulting in a simpler control system. 4. The linear array photon counting detector system can acquire multiple sample data simultaneously, resulting in high efficiency; the CdTe detector system can only acquire one sample data at a time, resulting in lower efficiency. 5. The CdTe detector has a larger pixel area and higher energy resolution than the linear array photon counting detector. Under the same conditions, it can acquire more photons per unit time than the linear array photon counting detector, obtaining more accurate spectral data.
[0125] The advantages of this invention are as follows:
[0126] 1. This invention proposes a novel method for on-site detection of explosives using X-ray absorption spectroscopy. This method utilizes a conventional X-ray source, effectively reducing detection costs. Simultaneously, the penetrating power of X-rays enables non-destructive testing of explosives.
[0127] 2. An encoder model based on the Retention mechanism is proposed. An encoder classification model is built based on the Retention mechanism to encode and classify spectral data.
[0128] 3. A spectral correction model for encoder-decoder based on the retention mechanism is proposed to solve the spectral distortion problem caused by energy sharing and pulse stacking.
[0129] 4. A method for acquiring explosive data using a linear array photon counting detector is proposed. This detector can not only obtain perspective image information of the object under test, but also obtain spectral information for each pixel. By fusing one-dimensional spectral data and two-dimensional image data, explosive detection is performed, enriching the detection information.
[0130] Example 5
[0131] Please see Figure 14 A device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence includes: an explosive detection module for acquiring the X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object; wherein the parameters include X-ray input voltage, current, and radiation distance;
[0132] A neural network module is used to input X-ray absorption spectra into a pre-trained RetNet neural network model to identify the type of the object to be identified and the corresponding correction result of the X-ray absorption spectrum. The RetNet neural network model includes an encoder sub-network and a decoder sub-network. Both the encoder and decoder sub-networks are composed of several stacked individual encoder layers, each encoder consisting of a gated multi-scale retention module and a multilayer perceptron block. The encoder sub-network is configured to acquire the X-ray absorption spectrum of the object to be identified, extract first spectral features through several encoder layers, and classify the type of the object based on the acquired features. The decoder sub-network is configured to perform feature extraction based on the first spectral features and X-ray parameters, extract second spectral features through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features.
[0133] In this embodiment, in order to better utilize the methods described in Embodiments 1 to 4, this application proposes a device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence. Each module corresponds to a step in the above method, and its specific principle has been described above and will not be repeated here.
[0134] Example 6
[0135] A device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence includes: at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
[0136] In this embodiment, to better run and process the methods described in embodiments one through four, the above methods are stored in a memory, and the stored methods are executed using a processor. It should be noted that the principles and effects of each step have been described above and will not be elaborated upon here.
[0137] Example 7
[0138] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in one to four embodiments.
[0139] In this embodiment, to better operate and use the methods described in Embodiments 1 to 4, the above methods are stored in a computer-readable storage medium, and the methods are implemented using a processor. It should be noted that the principles and effects of each step have been described above and will not be elaborated upon here.
[0140] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, characterized in that, include: The X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object, are obtained by using a linear array photon counting detector or a CdTe detector; wherein, the parameters include the X-ray input voltage, current, and radiation distance. Input it into a pre-trained RetNet neural network model to identify the type of the object to be identified and the corresponding correction result of the X-ray absorption spectrum; The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork. Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multi-layer sensing block connected together. The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified and extract first spectral features via several encoder layers; The decoder subnetwork is configured to extract features based on a first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features. The encoder subnetwork is also configured to acquire the corrected X-ray absorption spectrum, extract third spectral features through several encoder layers, and classify the type of the object to be identified based on the acquired features.
2. The method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence as described in claim 1, characterized in that, Acquire the X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object; these parameters include the X-ray input voltage, current, and radiation distance, and subsequently include: Convert the X-ray absorption spectrum of the object to be identified into a digital X-ray image; Based on edge detection and segmentation algorithms, the region of interest in the digital ray image is extracted. Based on the pixel coordinates of the region of interest, extract spectral information; This spectral information is used as the X-ray absorption spectrum of the object to be identified.
3. The method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence as described in claim 1 or 2, characterized in that, The X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object, are obtained. These parameters include the X-ray input voltage, current, and radiation distance. The process then includes preprocessing the X-ray absorption spectrum. The preprocessing includes: The absorption coefficient of the X-ray absorption spectrum is calculated based on the Lambert-Beer law, and the absorbance index of the spectrum is converted into the absorption coefficient index. The calculated X-ray absorption spectrum is then normalized.
4. A training method for a RetNet neural network model, characterized in that, A method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, based on any one of claims 1-3; wherein the RetNet neural network model includes an encoder subnetwork and a decoder subnetwork; the method includes: Acquire sample spectral data, along with the corresponding category labels and standard spectral data; The encoder and decoder are trained based on the sample's spectral data, and the predicted and corrected spectral data is output. Based on the predicted and corrected spectral data and the standard spectral data, the first loss value is calculated, and Based on the first loss value, the encoder subnetwork and the decoder subnetwork are trained; Freeze the encoder subnetwork and decoder subnetwork, input the predicted and corrected spectral data into the encoder subnetwork of the model, and output the third spectral feature; Based on this third spectral feature, the predicted category label is output; A second loss value is calculated based on the predicted label of the category and the true label of the category, and The RetNet neural network model is trained based on this second loss value.
5. A RetNet neural network, characterized in that, A method for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence, as described in any one of claims 1-3; The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork. Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multi-layer sensing block connected together. The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified and extract first spectral features via several encoder layers; The decoder subnetwork is configured to extract features based on a first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features. The encoder subnetwork is also configured to acquire the corrected X-ray absorption spectrum, extract third spectral features through several encoder layers, and classify the type of the object to be identified based on the acquired features.
6. A device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence, characterized in that, include The explosive detection module is used to acquire the X-ray absorption spectrum of the object to be identified, as well as the X-ray parameters when irradiating the object; wherein, the parameters include X-ray input voltage, current, and radiation distance; The neural network module is used to input the X-ray absorption spectrum into a pre-trained RetNet neural network model to identify the type of the object to be identified and the corresponding correction result of the X-ray absorption spectrum. The RetNet neural network model includes an encoder subnetwork and a decoder subnetwork. Both the encoder subnetwork and the decoder subnetwork are composed of several stacked individual encoder layers. Each encoder consists of a gated multi-scale retention module and a multi-layer sensing block connected together. The encoder subnetwork is configured to acquire the X-ray absorption spectrum of the object to be identified and extract first spectral features via several encoder layers; The decoder subnetwork is configured to extract features based on a first spectral feature and X-ray parameters, extract a second spectral feature through several encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired features. The encoder subnetwork is also configured to acquire the corrected X-ray absorption spectrum, extract third spectral features through several encoder layers, and classify the type of the object to be identified based on the acquired features.
7. A device for identifying flammable and explosive materials that combines X-ray absorption spectroscopy and artificial intelligence, characterized in that, include: At least one processor and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 4.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 4.
Citation Information
Patent Citations
X-ray photon counting detector spectrum distortion correction method based on improved Transform model
CN115730514A
Radio frequency signal fingerprint identification method and system based on RFSFD-T network
CN116049650A
News abstract generation method and device based on deep learning, equipment and medium
CN117390178A