Flammable and explosive object identification method combining X-ray absorption spectrum and artificial intelligence
By combining X-ray absorption spectroscopy and artificial intelligence technology, using the RetNet neural network model for detection of flammable and explosive substances, the problems of long detection time, high environmental requirements and low accuracy in the existing technology are solved, and fast and accurate on-site detection is achieved.
Patent Information
- Application Number
- CN202510302166.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-03-14
AI Technical Summary
The existing flammable and explosive detection methods have problems such as long time, strict environmental requirements, high cost and environmental interference during on-site inspection, making it difficult to achieve on-site inspection in important and safe public places.
X-ray absorption spectroscopy combined with artificial intelligence technology, by obtaining the X-ray absorption spectrum and related parameters of the item to be identified, the pre-trained RetNet neural network model is used for item identification and spectral correction.
It realizes the rapid and accurate identification of flammable and explosive items in on-site inspection, improves the safety and efficiency of inspection, and reduces costs and environmental requirements.
Smart Images

Figure CN119832344A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inflammable and explosive material identification, and in particular to an inflammable and explosive material identification method combining X-ray absorption spectroscopy and artificial intelligence. Background Art
[0002] At present, the detection methods of flammable and explosive items are mainly divided into two categories. One is micro-trace detection technology: including ion migration method, mass spectrometry, gas chromatography, electrochemical sensor method and fluorescence method; the other is volume detection technology: including neutron analysis, terahertz time-domain spectroscopy, Raman spectroscopy and X-ray backscattering method. However, these commonly used methods have some shortcomings in on-site detection, which limits their application in explosive detection. First of all, gas chromatography, mass spectrometry, ion migration method and other methods are the gold standard for detection, but their detection time is long, the environment requirements are strict, the sample preparation is required, and the detection cost is high. The disadvantages make these detection technologies generally only completed in professional laboratories or testing centers, and cannot be realized in important safety public places. On-site detection. Secondly, various types of chemical sensors are highly sensitive and accurate in detection, but they are easily interfered by environmental factors, which reduces the accuracy of detection and leads to missed detection or false detection. Finally, neutron analysis requires the use of gamma rays, which have high radiation energy and require a high level of protection. Terahertz time-domain spectroscopy is penetrating, but its penetrability to polar materials is greatly reduced. Raman spectroscopy can only obtain surface information of objects but has no penetration and cannot obtain internal information of objects. X-ray backscattering signals are weak and the detection recognition rate is low. Therefore, based on the above analysis, these detection methods are not suitable for on-site detection of explosives. Summary of the invention
[0003] In view of this, in order to realize on-site detection of explosives, the present invention proposes to use X-ray absorption spectroscopy combined with artificial intelligence technology to perform on-site detection of explosives.
[0004] According to one aspect of the present invention, there is provided a method for identifying inflammable and explosive materials by combining X-ray absorption spectroscopy and artificial intelligence, comprising: Obtaining an X-ray absorption spectrum of the object to be identified, and X-ray parameters when irradiating the object to be identified; wherein the parameters include 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; Among them, the RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder sub-network and the decoder sub-network are both stacked by a number of single encoder layers, and each encoder is composed of a gated multi-scale preservation module and a multi-layer perceptron block connected; The encoder sub-network is configured to obtain an X-ray absorption spectrum of the object to be identified and extract a first spectral feature via a plurality of encoder layers; The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and the X-ray parameter, extract the second spectral feature via a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature; The encoder sub-network is further configured to obtain the corrected X-ray absorption spectrum, extract third spectrum features through several encoder layers, and classify the type of the object to be identified based on the obtained features.
[0005] In the above technical solution, the object to be identified will present a specific absorption spectrum under the action of X-ray radiation. Since the atomic structures of different substances are different, their absorption characteristics of X-rays are also different. 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, it is necessary to accurately record parameters such as input voltage, current, and radiation distance. These parameters will affect the intensity and penetration of the X-rays, and thus affect the expression of the absorption spectrum. Accurately recording these parameters will help to calibrate the absorption spectrum later and improve recognition accuracy.
[0006] The RetNet neural network model consists of an encoder subnetwork and a decoder subnetwork, each of which is composed of several single encoder layers stacked together. This structural design enables the model to deeply mine data features while maintaining good parallel computing performance. The encoder subnetwork is composed of several single encoder layers stacked together, each of which is composed of a gated multi-scale retention module and a multi-layer perceptron block. The gated multi-scale retention module can simultaneously consider information of different scales, which helps to better capture the detailed features and overall trends in the absorption spectrum; the multi-layer perceptron block can perform nonlinear transformation and combination on the extracted features, further enhancing the expressive power of the features, so that the model can more deeply understand and mine the complex information in the absorption spectrum. The decoder subnetwork is also composed of several single encoder layers stacked together, and its structure is similar to that of the encoder layer in the encoder subnetwork, and is also composed of a gated multi-scale retention module and a multi-layer perceptron block. This structural design enables the decoder subnetwork to further mine and integrate information on the basis of the encoder subnetwork, and realize effective correction of the absorption spectrum. The encoder subnetwork obtains the corrected X-ray absorption spectrum again, and extracts the third spectral features through several encoder layers. These features are extracted based on the corrected absorption spectrum and more accurately reflect the characteristics of the object. Finally, the type of the object to be identified is classified based on the acquired third spectral feature. Through this classification method based on deep learning, the subtle differences in the absorption spectra of different types of objects can be automatically learned, and efficient and accurate identification of inflammable and explosive objects can be achieved. Compared with the traditional method based on manual feature extraction and simple classification algorithm, this method based on the RetNet neural network model has stronger learning and generalization capabilities. It can automatically learn complex patterns and rules from a large amount of data, without the need to manually pre-set complex feature extraction rules, and can better adapt to different scenarios and different types of object identification tasks. At the same time, by correcting the absorption spectrum before classification, the accuracy and reliability of the classification are further improved, which has important practical application value for the identification of dangerous objects such as inflammable and explosive objects, and can effectively improve the safety and efficiency of security inspections, dangerous goods detection and other scenes.
[0007] In some embodiments, the X-ray absorption spectrum is collected using a linear array photon counting detector or a CdTe detector.
[0008] In the above technical solution, the linear array photon counting detector has the ability to respond quickly to X-ray signals, is suitable for dynamic imaging scenarios, and can effectively capture the instantaneous absorption spectrum changes of objects under X-ray radiation. Its linear array structure gives the detector a higher spatial resolution, so that it can more finely distinguish the absorption spectrum differences of different components inside the object. However, compared with the CdTe detector, the linear array photon counting detector is slightly insufficient in energy resolution, and it may be difficult to accurately distinguish X-ray photons of different energies in some cases. The CdTe detector has a higher energy resolution and can accurately distinguish X-ray photons of different energies. Its detection energy range is wide, covering X-rays from low energy to high energy, meeting the detection needs of different objects. Especially in the hard X-ray region, the quantum efficiency of the CdTe detector is high, which can effectively improve the signal-to-noise ratio of the signal, thereby enhancing the detection accuracy of the absorption spectrum. However, compared with the linear array photon counting detector, the manufacturing cost of the CdTe detector is higher, which will increase the economic burden of the entire system. Technical personnel in this field should select the most appropriate detector type based on actual application scenarios and requirements, taking into account factors such as the detector's response speed, spatial resolution, energy resolution, detection energy range, quantum efficiency and cost.
[0009] In some embodiments, an X-ray absorption spectrum of an object to be identified and 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 then further include: Convert the X-ray absorption spectrum of the object to be identified into a digital radiographic image; Extracting the region of interest in the digital radiographic image based on edge detection and segmentation algorithms; Extracting spectral information based on pixel coordinates of the region of interest; The spectral information is used as the X-ray absorption spectrum of the object to be identified.
[0010] 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 the form of pixels, and the grayscale value of each pixel represents the X-ray absorption intensity at the corresponding position. This digital form facilitates subsequent image processing and analysis, and can use mature digital image processing technology to extract the characteristic information of the object. The digital X-ray image is processed using an edge detection algorithm (such as the Sobel operator, the Marr-Hildreth edge detector, etc.) to detect the contour edge of the object in the image. Edge detection can highlight the shape characteristics of the object and provide a basis for subsequent regional segmentation. The coordinate position of each pixel in the region of interest is determined, and these coordinates correspond to specific positions in the original X-ray absorption spectrum. According to the pixel coordinates, the spectral information of the corresponding position is extracted from the original X-ray absorption spectrum. The extracted spectral information contains the composition characteristics of the object in 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. These spectral information can provide more accurate and representative composition characteristics of the object, which helps to improve the accuracy and reliability of recognition.
[0011] In some embodiments, an X-ray absorption spectrum of an object to be identified and 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 then the X-ray absorption spectrum is preprocessed; the preprocessing includes: Calculating the absorption coefficient of the X-ray absorption spectrum based on the Lambert-Beer law, and converting the absorbance index of the spectrum into an absorption coefficient index; The calculated X-ray absorption spectrum is normalized.
[0012] In the above technical solution, the Lambert-Beer law describes the proportional relationship between the amount of light absorption and the concentration of the absorbing substance and the thickness of the absorption layer. In X-ray absorption spectroscopy analysis, this law can be used to calculate the absorption coefficient. The absorption coefficient μ represents the probability that the X-ray is absorbed by the sample, and its value is closely related to the density of the sample, the atomic number of the element, and the energy of the X-ray. The absorbance index of the spectrum is converted into an absorption coefficient index, where the relationship between the absorbance A and the transmittance T is A=lg(1 / T), and the transmittance T is the ratio of the intensity of the outgoing light to the intensity of the incident light. 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. The normalization process aims to eliminate the influence of factors such as different sample thickness and density on the X-ray absorption spectrum, so that the spectral data of different samples are comparable. Through normalization, the characteristic absorption peak of the sample can be highlighted, which is convenient for subsequent feature extraction and identification. Normalization is usually performed by dividing the absorption spectrum by the background absorption spectrum. The background absorption spectrum represents the absorption characteristics of the sample matrix. After removing the background, the absorption characteristics of specific components in the sample can be more clearly observed. Through absorption coefficient calculation and normalization processing, the X-ray absorption spectrum data is standardized so that it is not affected by experimental conditions and sample differences, improving the stability and reliability of the data. The pre-processed spectrum data can more accurately reflect the composition characteristics of the sample, providing high-quality input data for subsequent artificial intelligence model recognition, which helps to improve the accuracy and reliability of recognition.
[0013] According to another aspect of the present invention, a training method for a RetNet neural network model is provided, based on the above-mentioned method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence; the RetNet neural network model includes an encoder subnetwork and a decoder subnetwork; the method includes: Obtain sample spectral data, as well as category true labels and standard spectral data corresponding to the spectral data; Based on the sample spectral data, an encoder and a decoder are trained to output predicted and corrected spectral data; Calculating a first loss value based on the predicted and corrected spectral data and the standard spectral data; Based on the first loss value, training the encoder sub-network and the decoder sub-network; Freeze the encoder sub-network and the decoder sub-network, input the predicted and corrected spectral data into the encoder sub-network of the model, and output a third spectral feature; Based on the third spectral feature, output a category prediction label; Calculate a second loss value based on the predicted label of the category and the true label of the category; Based on the second loss value, the RetNet neural network model is trained.
[0014] In the above technical solution, the spectral data of the sample to be identified are collected, which contains the absorption intensity information of the sample at different wavelengths. The true category label is the accurate identification of the category to which the sample belongs, which is used to supervise the model training; the standard spectral data is the spectral data of known composition and category, which is used as the target reference for training and correction. The encoder subnetwork and decoder subnetwork of the RetNet model are trained using the sample spectral data. The encoder is responsible for extracting the features of the spectral data, and the decoder attempts to reconstruct the spectral data. Through training, the model can learn the feature representation and reconstruction rules of the spectral data. The trained model can output the predicted and corrected spectral data based on the input sample spectral data. After the feature extraction and reconstruction of the model, the data is closer to the standard spectral data. The predicted and corrected spectral data are compared with the standard spectral data to calculate the first loss value. The loss value reflects the accuracy of the model to reconstruct the spectral data. Commonly used loss functions include mean square error (MSE) and the like. The encoder subnetwork and the decoder subnetwork are optimized and trained using the first loss value. Through the back propagation 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, freeze the parameters of the encoder subnetwork and the decoder subnetwork so that they no longer participate in the subsequent training process. Input the predicted and corrected spectral data into the encoder subnetwork of the model, and output the third spectral feature. These features are key information related to the sample composition and category in the spectral data. Based on the third spectral feature, the model further performs category recognition and outputs the category prediction label. Compare the category prediction label with the true category label of the sample to calculate the second loss value. This loss value reflects the accuracy of the model in the category recognition task. Commonly used loss functions include cross entropy loss, etc. The entire RetNet neural network model is optimized and trained using the second loss value. Through the back propagation algorithm, the model parameters are adjusted so that the model can more accurately identify the category of the sample. The RetNet model can effectively correct and reconstruct the spectral data to make it closer to the standard spectral data, providing an accurate basis for subsequent category recognition. The model extracts the features of the spectral data through the encoder subnetwork, and performs category recognition based on these features, which can accurately identify the category of the sample. By calculating the first loss value and the second loss value, and optimizing the model parameters based on these loss values, the RetNet model can continuously improve the accuracy of spectral data reconstruction and category recognition.
[0015] According to another aspect of the present invention, there is provided a RetNet neural network, characterized in that it is based on the above-mentioned method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence; The RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder sub-network and the decoder sub-network are both stacked by a number of single encoder layers, and each encoder is composed of a gated multi-scale preservation module and a multi-layer perceptron block connected; The encoder sub-network is configured to obtain an X-ray absorption spectrum of the object to be identified and extract a first spectral feature via a plurality of encoder layers; The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and the X-ray parameter, extract the second spectral feature via a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature; The encoder sub-network is further configured to obtain the corrected X-ray absorption spectrum, extract third spectrum features through several encoder layers, and classify the type of the object to be identified based on the obtained features.
[0016] In the above technical solution, in order to better use the above method, the present application proposes a RetNet neural network, and each part of the network corresponds to each step of the above method. The specific principles have been described above and will not be repeated here.
[0017] According to another aspect of the present invention, there is provided a device for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, comprising: An explosive detection module, used to obtain the X-ray absorption spectrum of the object to be identified, and the X-ray parameters when irradiating the object to be identified; wherein the parameters include X-ray input voltage, current, and radiation distance; A neural network module, 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; Among them, the RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder sub-network and the decoder sub-network are both stacked by a number of single encoder layers, and each encoder is composed of a gated multi-scale preservation module and a multi-layer perceptron block connected; The encoder sub-network is configured to obtain an X-ray absorption spectrum of the object to be identified and extract a first spectral feature via a plurality of encoder layers; The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and the X-ray parameter, extract the second spectral feature via a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature; The encoder sub-network is further configured to obtain the corrected X-ray absorption spectrum, extract third spectrum features through several encoder layers, and classify the type of the object to be identified based on the obtained features.
[0018] In the above technical scheme, in order to better use the above method, the present application proposes a flammable and explosive material identification device combining X-ray absorption spectroscopy and artificial intelligence. Each module corresponds to each step of the above method. The specific principles have been described above and will not be repeated here.
[0019] According to another aspect of the present invention, there is provided a device for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, comprising: at least one processor and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above method.
[0020] In the above technical solution, in order to better run and process the method, the above method is stored in a memory, and the stored method is executed by a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, storing a computer program, wherein the computer program implements the above method when executed by a processor.
[0022] In the above technical solution, in order to better run and use the method, the above method is stored in a computer-readable storage medium, and the above method is implemented by a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 It is a flow chart of an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Figure 2 It is a flow chart of an embodiment of a training method of a RetNet neural network model of the present invention; Figure 3 It is a schematic diagram of the structure of an explosive detection system according to an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence; Figure 4It is a schematic diagram of a Retention parallel mechanism of an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Figure 5 It is a schematic diagram of the retention cycle mechanism of an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Figure 6 It is a schematic diagram of the structure of a ResNet classification model of an embodiment of a method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Figure 7 It is a schematic diagram of the spectrum distortion phenomenon of an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Figure 8 It is a schematic diagram of photon energy divided by two pixels in an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Fig. 9 This is a schematic diagram of the final structure of a ResNet model of an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Fig.10 This is a schematic diagram of image data of an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Fig.11 This is a ResNet model training diagram of an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Fig.12 It is a schematic diagram of the ResNet model reasoning process of an embodiment of a method for identifying flammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence according to the present invention; Fig.13 It is a schematic diagram of the structure of an explosive detection system based on a CdTe detector according to an embodiment of a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence in the present invention; Fig.14 It is a structural schematic diagram of an embodiment of a flammable and explosive material identification device combining X-ray absorption spectroscopy and artificial intelligence according to the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0026] In order to realize on-site detection of explosives, the present invention proposes to use X-ray absorption spectroscopy combined with artificial intelligence technology to perform on-site detection of explosives.
[0027] Embodiment 1 See also Figure 1 , a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, comprising: A1. Obtaining the X-ray absorption spectrum of the object to be identified and the X-ray parameters when irradiating the object to be identified; wherein the parameters include X-ray input voltage, current, and radiation distance; 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; Among them, the RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder subnetwork and the decoder subnetwork are both stacked by a plurality of single encoder layers, each encoder being composed of a gated multi-scale retention module and a multi-layer perceptron block connected together; the encoder subnetwork is configured to obtain an X-ray absorption spectrum of an object to be identified, extract a first spectral feature through a plurality of encoder layers, and classify the type of 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 an X-ray parameter, extract a second spectral feature through a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature.
[0028] In this embodiment, the object to be identified will present a specific absorption spectrum under the action of X-ray radiation. Since the atomic structures of different substances are different, their absorption characteristics of X-rays are also different. 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, it is necessary to accurately record parameters such as input voltage, current, and radiation distance. These parameters will affect the intensity and penetration of the X-rays, and thus affect the expression of the absorption spectrum. Accurately recording these parameters will help to calibrate the absorption spectrum later and improve the recognition accuracy.
[0029] The RetNet neural network model consists of an encoder subnetwork and a decoder subnetwork, each of which is composed of several single encoder layers stacked together. This structural design enables the model to deeply mine data features while maintaining good parallel computing performance. The encoder subnetwork is composed of several single encoder layers stacked together, each of which is composed of a gated multi-scale retention module and a multi-layer perceptron block. The gated multi-scale retention module can simultaneously consider information of different scales, which helps to better capture the detailed features and overall trends in the absorption spectrum; the multi-layer perceptron block can perform nonlinear transformation and combination on the extracted features, further enhancing the expressive power of the features, so that the model can more deeply understand and mine the complex information in the absorption spectrum. The decoder subnetwork is also composed of several single encoder layers stacked together, and its structure is similar to that of the encoder layer in the encoder subnetwork, and is also composed of a gated multi-scale retention module and a multi-layer perceptron block. This structural design enables the decoder subnetwork to further mine and integrate information on the basis of the encoder subnetwork, and realize effective correction of the absorption spectrum. The encoder subnetwork obtains the corrected X-ray absorption spectrum again, and extracts the third spectral features through several encoder layers. These features are extracted based on the corrected absorption spectrum and more accurately reflect the characteristics of the object. Finally, the type of the object to be identified is classified based on the acquired third spectral feature. Through this classification method based on deep learning, the subtle differences in the absorption spectra of different types of objects can be automatically learned, and efficient and accurate identification of inflammable and explosive objects can be achieved. Compared with the traditional method based on manual feature extraction and simple classification algorithm, this method based on the RetNet neural network model has stronger learning and generalization capabilities. It can automatically learn complex patterns and rules from a large amount of data, without the need to manually pre-set complex feature extraction rules, and can better adapt to different scenarios and different types of object identification tasks. At the same time, by correcting the absorption spectrum before classification, the accuracy and reliability of the classification are further improved, which has important practical application value for the identification of dangerous objects such as inflammable and explosive objects, and can effectively improve the safety and efficiency of security inspections, dangerous goods detection and other scenes.
[0030] In this embodiment, the X-ray absorption spectrum is collected by a linear array photon counting detector or a CdTe detector. The linear array photon counting detector has the ability to respond quickly to X-ray signals, is suitable for dynamic imaging scenarios, and can effectively capture the instantaneous absorption spectrum changes of objects under X-ray radiation. Its linear array structure gives the detector a higher spatial resolution, so that it can more finely distinguish the absorption spectrum differences of different components inside the object. However, compared with the CdTe detector, the linear array photon counting detector is slightly insufficient in energy resolution, and it may be difficult to accurately distinguish X-ray photons of different energies in some cases. The CdTe detector has a higher energy resolution and can accurately distinguish X-ray photons of different energies. Its detection energy range is wide, covering X-rays from low energy to high energy, meeting the detection needs of different objects. Especially in the hard X-ray region, the quantum efficiency of the CdTe detector is high, which can effectively improve the signal-to-noise ratio of the signal, thereby enhancing the detection accuracy of the absorption spectrum. However, compared with the linear array photon counting detector, the manufacturing cost of the CdTe detector is higher, which will increase the economic burden of the entire system. Technical personnel in this field should select the most appropriate detector type based on actual application scenarios and requirements, taking into account factors such as the detector's response speed, spatial resolution, energy resolution, detection energy range, quantum efficiency and cost.
[0031] In this embodiment, an X-ray absorption spectrum of an object to be identified and 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 then the following steps are further included: converting the X-ray absorption spectrum of the object to be identified into a digital radiographic image; extracting a region of interest in the digital radiographic image based on edge detection and segmentation algorithms; extracting spectral information based on pixel coordinates of the region of interest; and using the spectral information as the X-ray absorption spectrum of the object to be identified.
[0032] 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 the form of pixels, and the grayscale value of each pixel represents the X-ray absorption intensity at the corresponding position. This digital form facilitates subsequent image processing and analysis, and can use mature digital image processing technology to extract the characteristic information of the object. The digital X-ray image is processed using an edge detection algorithm (such as the Sobel operator, the Marr-Hildreth edge detector, etc.) to detect the contour edge of the object in the image. Edge detection can highlight the shape characteristics of the object and provide a basis for subsequent regional segmentation. The coordinate position of each pixel in the region of interest is determined, and these coordinates correspond to specific positions in the original X-ray absorption spectrum. According to the pixel coordinates, the spectral information of the corresponding position is extracted from the original X-ray absorption spectrum. The extracted spectral information contains the composition characteristics of the object in 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. These spectral information can provide more accurate and representative composition characteristics of the object, which helps to improve the accuracy and reliability of recognition.
[0033] In this embodiment, an X-ray absorption spectrum of an object to be identified and 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 then the X-ray absorption spectrum is preprocessed; 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.
[0034] In this embodiment, the Lambert-Beer law describes the proportional relationship between the amount of light absorption and the concentration of the absorbing substance and the thickness of the absorption layer. In X-ray absorption spectrum analysis, this law can be used to calculate the absorption coefficient. The absorption coefficient μ characterizes the probability that the X-ray is absorbed by the sample, and its value is closely related to the density of the sample, the atomic number of the element, and the energy of the X-ray. The absorbance index of the spectrum is converted into an absorption coefficient index, where the relationship between the absorbance A and the transmittance T is A=lg(1 / T), and the transmittance T is the ratio of the intensity of the outgoing light to the intensity of the incident light. 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. The normalization process aims to eliminate the influence of factors such as different sample thickness and density on the X-ray absorption spectrum, so that the spectral data of different samples are comparable. Through normalization, the characteristic absorption peak of the sample can be highlighted, which is convenient for subsequent feature extraction and identification. Normalization is usually performed by dividing the absorption spectrum by the background absorption spectrum. The background absorption spectrum represents the absorption characteristics of the sample matrix. After removing the background, the absorption characteristics of specific components in the sample can be more clearly observed. Through absorption coefficient calculation and normalization processing, the X-ray absorption spectrum data is standardized so that it is not affected by experimental conditions and sample differences, improving the stability and reliability of the data. The pre-processed spectrum data can more accurately reflect the composition characteristics of the sample, providing high-quality input data for subsequent artificial intelligence model recognition, which helps to improve the accuracy and reliability of recognition.
[0035] Embodiment 2 See also 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 of the embodiments; the RetNet neural network model includes an encoder subnetwork and a decoder subnetwork; the method includes: B1. Obtain sample spectral data and the category true label and standard spectral data corresponding to the spectral data; B2, training the encoder and decoder based on the sample spectral data, and outputting the predicted and corrected spectral data; B3, calculating a first loss value based on the predicted and corrected spectrum data and the standard spectrum data; B4. Based on the first loss value, training the encoder sub-network and the decoder sub-network; B5, freezing the encoder sub-network and the decoder sub-network, inputting the predicted and corrected spectral data into the encoder sub-network of the model, and outputting the third spectral feature; B6. Outputting a category prediction label based on the third spectral feature; B7, calculating a second loss value based on the predicted label of the category and the true label of the category; B8. Based on the second loss value, train the RetNet neural network model.
[0036] In this embodiment, the spectral data of the sample to be identified are collected, and these data contain the absorption intensity information of the sample at different wavelengths. The true category label is an accurate identifier of the category to which the sample belongs, which is used to supervise the model training; the standard spectral data is spectral data of known composition and category, which is used as the target reference for training and correction. The encoder subnetwork and decoder subnetwork of the RetNet model are trained using the sample spectral data. The encoder is responsible for extracting the features of the spectral data, and the decoder attempts to reconstruct the spectral data. Through training, the model can learn the feature representation and reconstruction rules of the spectral data. The trained model can output the predicted and corrected spectral data based on the input sample spectral data. After the feature extraction and reconstruction of the model, the data is closer to the standard spectral data. The predicted and corrected spectral data are compared with the standard spectral data to calculate the first loss value. The loss value reflects the accuracy of the model to reconstruct the spectral data. Commonly used loss functions include mean square error (MSE) and the like. The encoder subnetwork and the decoder subnetwork are optimized and trained using the first loss value. Through the back propagation 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, freeze the parameters of the encoder subnetwork and the decoder subnetwork so that they no longer participate in the subsequent training process. Input the predicted and corrected spectral data into the encoder subnetwork of the model, and output the third spectral feature. These features are key information related to the sample composition and category in the spectral data. Based on the third spectral feature, the model further performs category recognition and outputs the category prediction label. Compare the category prediction label with the true category label of the sample to calculate the second loss value. This loss value reflects the accuracy of the model in the category recognition task. Commonly used loss functions include cross entropy loss, etc. The entire RetNet neural network model is optimized and trained using the second loss value. Through the back propagation algorithm, the model parameters are adjusted so that the model can more accurately identify the category of the sample. The RetNet model can effectively correct and reconstruct the spectral data, making it closer to the standard spectral data, providing an accurate basis for subsequent category recognition. The model extracts the features of the spectral data through the encoder subnetwork, and performs category recognition based on these features, which can accurately identify the category of the sample. By calculating the first loss value and the second loss value, and optimizing the model parameters based on these loss values, the RetNet model can continuously improve the accuracy of spectral data reconstruction and category recognition.
[0037] Embodiment 3 A RetNet neural network, based on a method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence as described in one of the embodiments; The RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder subnetwork and the decoder subnetwork are both stacked by a number of single encoder layers, each encoder being composed of a gated multi-scale retention module and a multi-layer perceptron block connected together; the encoder subnetwork is configured to obtain an X-ray absorption spectrum of an object to be identified, and extract a first spectral feature through a number of 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 a number of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature; the encoder subnetwork is also configured to obtain a corrected X-ray absorption spectrum, extract a third spectral feature through a number of encoder layers, and classify the type of the object to be identified based on the acquired feature.
[0038] In this embodiment, in order to better use the above method, the present application proposes a RetNet neural network, and various parts of the network correspond to various steps of the above method. The specific principles have been described above and will not be repeated here.
[0039] Embodiment 4 In order to better explain the present invention, the following will be further described in detail, as follows: Step 1: First, build the explosive detection system. The core components of the system include linear array photon counting detectors, X-ray light sources and translation stages. The translation stage is controlled by a motion control system and carries the translational movement of the explosive sample. The X-ray light source is powered by a high-voltage power supply, and the output voltage, current and other parameters of the X-ray light source are controlled by the industrial control host. The relevant parameters of the linear array photon counting detector are controlled by the industrial control host, and the main parameters include working 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 host. The structure diagram of the explosive detection system is shown in the figure. Figure 3 shown.
[0040] Step 2: Build an explosive classification model and a spectral correction model based on the Retention mechanism. The Retention mechanism is developed from the Attention mechanism, and is committed to solving the performance triangle that the Attention mechanism cannot achieve, namely, training parallelism, low inference cost, and strong modeling ability (the three cannot be met at the same time). The RetNet model built based on the Retention mechanism is better than the Transformer model in processing one-dimensional data. As the input sequence increases, the memory occupancy rate and latency of the RetNet model are much lower than those of the Transformer model, while achieving greater throughput. Spectral data is also one-dimensional data, and its data complexity is lower than the complexity of natural language data. Therefore, compared with other models, using a model built based on the Retention mechanism to process spectral data can achieve high-performance processing of spectral data with smaller model parameters. Furthermore, the present application introduces an attenuation factor γ in the multi-scale Retention mechanism, explicitly models the number of photons at different energies in the spectral sequence, effectively captures the distance dependence at different energies in the spectral sequence, and better captures the spectral features. At the same time, it can effectively alleviate the problem of attention dilution. The multi-scale Retention mechanism introduces the attenuation factor γ, which improves the robustness of the model and the tolerance to spectral noise. In the spectral data, there may be some noise or outliers, which will interfere with the reasoning results of the model. After introducing the attenuation factor, the model can pay more attention to the relationship between elements with close distances, thereby reducing the impact of noise on the model reasoning results to a certain extent and improving the robustness of the model. The introduction of Group Norm can effectively alleviate the internal covariate shift of spectral data and make the model more stable during the training process. At the same time, it can better handle the dependency relationship of spectral data at different energies, which helps the model capture the rich characteristic information of the spectrum. Specifically: For example, it can process large quantities of spectral data at the same time and quickly implement spectral correction and classification. The retention mechanism has a parallel and cyclic mechanism, and its specific implementation is shown in the following formulas 1 and 2. Its structure is as follows Figure 4 and Figure 5 shown.
[0041]
[0042] In the formula, is the rotation position encoding matrix, for The complex conjugate matrix of Q represents the query vector, which is composed of the input With the weight matrix After multiplication, add the parameter Perform element-wise multiplication ( K: represents the key vector, which is obtained by input With the weight matrix After multiplication, add the parameter Element-by-element multiplication is performed. V: represents the value vector, which is obtained by input With the weight matrix Multiply them together to get . Retention operation. is the transposed product of the query and the key, represents element-by-element multiplication, and D is a lower triangular matrix that combines the mask matrix and the distance exponential decay. Indicates The state of the step is determined by the state of the previous step. and the current step Add together to get, is an attenuation coefficient, It is Transpose of step keys, It is The value of the step. Indicated in The reserved operation of the step is determined by the query of the current step. and status Multiply them together to get .
[0043] Like the Multi-Head Attention mechanism, the Retention mechanism can be extended to the Gated Multi-Scale Retention mechanism to enhance its modeling capabilities. At the same time, the attenuation factor γ and the gating mechanism are introduced to further enhance the expressiveness of the model. The specific implementation of the Gated Multi-Scale Retention mechanism is shown in the following formula 3:
[0044] In the formula, Represents an attenuation coefficient, whose value is ,in is to generate an arithmetic progression of length h, is a A vector in space. Indicates i attention heads, calculated by the retention function, with the input being a sequence X and (Right now The first i elements). represents the normalization by group ( ) operation concatenates the outputs of all attention heads, where Represents a splicing operation, Indicates the number of groups for group normalization. Represents the result of the Multi-Scale Retention operation, where is the activation function, and is the weight matrix.
[0045] The Gated Multi-Scale Retention mechanism and the Multilayer Perceptron (MLP) block are combined into a single encoder layer and stacked in multiple layers to build a complete encoder structure. Finally, the output of the Nth layer of the encoder is connected to the Global Average Pooling (GAP) layer and the classifier module to build a complete classification model. The structural diagram is shown below. Figure 6 As shown in Figure 2, the explosive spectrum data is first input into the model after linear mapping, and the model output is the predicted explosive category.
[0046] Linear array photon counting detectors have spectral distortion, mainly due to factors such as pulse pileup and energy sharing. Pulse pileup is caused by the fact that two or more photons are received by the detector at the same time and are considered as one photon. Figure 7 As shown. The energy sharing is because the charge (a) falls exactly on the boundary of two pixels, causing the two pixels to divide the energy of the photon, as shown Figure 8 shown.
[0047] Therefore, based on the above classification model, a decoder structure is built. The encoder and decoder are combined to achieve spectrum distortion correction. The model structure is shown in the figure Fig. 9 In this model, both the encoder and decoder structures are used when correcting the spectral data, but only the encoder model is used when classifying explosive samples.
[0048] 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 linear array photon counting detector can acquire image data by moving the object under test through the translation stage. At the same time, the detector has energy resolution, so it can also acquire spectral information under each pixel. Therefore, the image information of the object under test can be obtained by scanning the detector, and the spectral information of the pixel point can be obtained according to the coordinates of the pixel point in the image. The schematic diagram is as follows Fig.10As shown. The data collected 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 to the maximum and minimum to eliminate the influence of the voltage and current fluctuations of the conventional X-ray light source on the data. The calculation formula is shown in Formula 4 below.
[0049]
[0050] In the formula, It represents the intensity of transmitted light, that is, the light intensity remaining after passing through the medium. It represents the initial intensity of the incident light, that is, the light intensity before passing through the medium. It represents the absorption coefficient, which is a parameter that describes the medium's ability to absorb light and is related to factors such as the properties of the medium and the wavelength. It represents the thickness of the material through which X-rays pass, i.e. the optical path length. is the normalized absorption coefficient, is the original absorption coefficient, is the minimum value of the absorption coefficient, The maximum value of the absorption coefficient.
[0051] Step 4: Model training and testing. The collected data is preprocessed as above and used as the input of the neural network model, labeled as explosive category and standard spectral data. The training process is divided into two steps. First, the encoder and decoder are trained. During the training process, the distorted spectral data is imported into the model in batches for training, and its parameters are continuously optimized based on the gradient descent method. Finally, the optimal solution is found through multiple rounds of training, and the encoder and decoder model parameters under the optimal solution are saved. Secondly, freeze the encoder and decoder parameters, and input the corrected spectral data into the encoder. At this time, the encoder outputs the direct pooling layer and classifier layer to obtain the model prediction category. In this step, only the pooling layer and classifier layer parameters are optimized, and the best parameters in the training process are saved. The model training flow chart is as follows: Fig.11 shown.
[0052] When testing the model, first accumulate the data under 128 channels to obtain a digital radiography (DR) image, then use the Sobel algorithm to perform edge detection and segmentation on the image to extract the region of interest, then read the pixel coordinates of the region of interest, and then extract the spectral information. After that, preprocess the extracted spectral information, input the preprocessed spectral data into the correction model to obtain the corrected spectrum, and finally input the corrected spectrum into the classification model to obtain the predicted category. The flowchart is as follows Fig.12 shown.
[0053] As an optional implementation, the detector uses a CdTe detector. This type of detector is also a photon counting detector, but it has only a single pixel. The X-ray absorption spectrum acquisition system based on this type of detector is as follows: Fig.13 Similarly, the industrial control host controls the relevant parameters of the X-ray light source and detector, and controls the movement of the rotating stage and the translation stage through the motion control system. The X-rays emitted by the light source pass through the object to be 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.
[0054] Compared with the X-ray absorption spectrum acquisition system built using a linear array photon counting detector, the differences are: 1. In this system, the sample to be tested is placed on a rotating table, and data can be collected at different angles by rotation; 2. The CdTe detector is placed on a translation table, and data can be collected at different positions by translation.
[0055] Compare the two X-ray absorption spectrum acquisition systems: 1. The CdTe detector is a single-pixel detector that can only collect data at a single point, and can only collect spectral data, but cannot obtain image data; the linear array photon counting detector is a multi-pixel detector that can obtain both spectral data and image data. 2. The CdTe detector takes longer to collect data than the linear array photon counting detector, and its efficiency is lower. 3. The CdTe detector system needs to control the translation stage and the rotation stage, and the control system is more complicated; the linear array photon counting detector system only needs to control the movement of the translation stage, the detector is fixed, and the control system is simpler. 4. The linear array photon counting detector system can collect multiple sample data at a time, which is highly efficient; the CdTe detector system can only collect one sample data at a time, which is relatively inefficient. 5. The pixel area of the CdTe detector is larger than that of the linear array photon counting detector, and the energy resolution is higher. Under the same conditions, it can collect more photons per unit time than the linear array photon counting detector, and obtain more accurate spectral data.
[0056] The advantages of the present invention are as follows: 1. The present invention proposes a new method for on-site detection of explosives using X-ray absorption spectroscopy. This method uses a conventional X-ray light source, effectively reducing the detection cost. At the same time, X-rays are penetrating and can achieve non-destructive detection of explosives.
[0057] 2. Propose an encoder model based on the retention mechanism. Build an encoder classification model based on the retention mechanism to encode and classify spectral data.
[0058] 3. Propose an encoder-decoder spectral correction model based on the retention mechanism to solve the spectral distortion problem caused by energy sharing and pulse accumulation.
[0059] 4. It is proposed to use a linear array photon counting detector for explosive data collection. This detector can not only obtain the perspective image information of the object being tested, but also obtain the spectral information under each pixel, integrating one-dimensional spectral data and two-dimensional image data to detect explosives, enriching the detection information.
[0060] Embodiment 5 See also Fig.14 , a device for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, comprising: an explosive detection module, for obtaining an X-ray absorption spectrum of an object to be identified, and X-ray parameters when irradiating the object to be identified; wherein the parameters include X-ray input voltage, current, and radiation distance; A neural network module is used to input an 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; wherein the RetNet neural network model includes an encoder subnetwork and a decoder subnetwork; the encoder subnetwork and the decoder subnetwork are both stacked by a plurality of single encoder layers, and each encoder is composed of a gated multi-scale retention module and a multi-layer perceptron block; the encoder subnetwork is configured to obtain the X-ray absorption spectrum of the object to be identified, extract a first spectral feature through a plurality of encoder layers, and classify the type of 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 a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature.
[0061] In this embodiment, in order to better use the methods described in embodiments one to four, the present application proposes a flammable and explosive material identification device that combines X-ray absorption spectroscopy and artificial intelligence. Each module corresponds to each step of the above method. The specific principles have been described above and will not be repeated here.
[0062] Embodiment 6 A device for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence comprises: 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the above method.
[0063] In this embodiment, in order to better run and process the methods described in Embodiments 1 to 4, the above methods are stored in a memory, and a processor is used to execute the stored methods. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.
[0064] Embodiment 7 A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the method described in one to four embodiments is implemented.
[0065] In this embodiment, in order to better run and use the methods described in Embodiments 1 to 4, the above methods are stored in a computer-readable storage medium, and the above methods are implemented using a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.
[0066] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for identifying flammable and explosive materials by combining X-ray absorption spectroscopy and artificial intelligence, characterized in that: include: Obtaining an X-ray absorption spectrum of the object to be identified, and X-ray parameters when irradiating the object to be identified; wherein the parameters include 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; Among them, the RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder sub-network and the decoder sub-network are both stacked by a number of single encoder layers, and each encoder is composed of a gated multi-scale preservation module and a multi-layer perceptron block connected; The encoder sub-network is configured to obtain an X-ray absorption spectrum of the object to be identified and extract a first spectral feature via a plurality of encoder layers; The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and the X-ray parameter, extract the second spectral feature via a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature; The encoder sub-network is further configured to obtain the corrected X-ray absorption spectrum, extract third spectrum features through several encoder layers, and classify the type of the object to be identified based on the obtained features.
2. The method for identifying inflammable and explosive materials by combining X-ray absorption spectroscopy and artificial intelligence as claimed in claim 1, characterized in that: The X-ray absorption spectrum is collected using a linear array photon counting detector or a CdTe detector.
3. The method for identifying inflammable and explosive materials by combining X-ray absorption spectroscopy and artificial intelligence as claimed in claim 1, characterized in that: Obtaining the X-ray absorption spectrum of the object to be identified and the X-ray parameters when irradiating the object to be identified; wherein the parameters include X-ray input voltage, current, and radiation distance, and then also include: Convert the X-ray absorption spectrum of the object to be identified into a digital radiographic image; Extracting the region of interest in the digital radiographic image based on edge detection and segmentation algorithms; Extracting spectral information based on pixel coordinates of the region of interest; The spectral information is used as the X-ray absorption spectrum of the object to be identified.
4. A method for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence as claimed in claim 2 or 3, characterized in that: Obtaining an X-ray absorption spectrum of the object to be identified and X-ray parameters when irradiating the object to be identified; wherein the parameters include X-ray input voltage, current, and radiation distance, and then 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, and converting the absorbance index of the spectrum into an absorption coefficient index; The calculated X-ray absorption spectrum is normalized.
5. 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 to 4; the RetNet neural network model includes an encoder subnetwork and a decoder subnetwork; the method includes: Obtain sample spectral data, as well as category true labels and standard spectral data corresponding to the spectral data; Based on the sample spectral data, an encoder and a decoder are trained to output predicted and corrected spectral data; Based on the predicted and corrected spectral data and the standard spectral data, a first loss value is calculated, and Based on the first loss value, training the encoder sub-network and the decoder sub-network; Freeze the encoder sub-network and the decoder sub-network, input the predicted and corrected spectral data into the encoder sub-network of the model, and output a third spectral feature; Based on the third spectral feature, output a category prediction label; Calculate a second loss value based on the predicted label of the category and the true label of the category, and Based on the second loss value, the RetNet neural network model is trained.
6. A RetNet neural network, 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 to 4; The RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder sub-network and the decoder sub-network are both stacked by a number of single encoder layers, and each encoder is composed of a gated multi-scale preservation module and a multi-layer perceptron block connected; The encoder sub-network is configured to obtain an X-ray absorption spectrum of the object to be identified and extract a first spectral feature via a plurality of encoder layers; The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and the X-ray parameter, extract the second spectral feature via a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature; The encoder sub-network is further configured to obtain the corrected X-ray absorption spectrum, extract third spectrum features through several encoder layers, and classify the type of the object to be identified based on the obtained features.
7. A device for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, characterized in that: include An explosive detection module, used to obtain the X-ray absorption spectrum of the object to be identified, and the X-ray parameters when irradiating the object to be identified; wherein the parameters include X-ray input voltage, current, and radiation distance; A neural network module, 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; Among them, the RetNet neural network model includes an encoder sub-network and a decoder sub-network; The encoder sub-network and the decoder sub-network are both stacked by a number of single encoder layers, and each encoder is composed of a gated multi-scale preservation module and a multi-layer perceptron block connected; The encoder sub-network is configured to obtain an X-ray absorption spectrum of the object to be identified and extract a first spectral feature via a plurality of encoder layers; The decoder subnetwork is configured to perform feature extraction based on the first spectral feature and the X-ray parameter, extract the second spectral feature via a plurality of encoder layers, and correct the X-ray absorption spectrum of the object to be identified based on the acquired feature; The encoder sub-network is further configured to obtain the corrected X-ray absorption spectrum, extract third spectrum features through several encoder layers, and classify the type of the object to be identified based on the obtained features.
8. A device for identifying inflammable and explosive materials combining X-ray absorption spectroscopy and artificial intelligence, characterized in that: include: at least one processor and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as claimed in any one of claims 1 to 5.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Neural network training method, object detection method and intelligent terminal equipment
CN115049917A
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
Building municipal information natural language question generation method based on RetNet
CN117291171A
News abstract generation method and device based on deep learning, equipment and medium
CN117390178A