Method, device and equipment for classifying explosive substances based on hyperspectral patterns

CN115908936BActive Publication Date: 2026-09-15SHENZHEN URBAN PUBLIC SAFETY & TECH INST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211549168.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2026-09-15
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

[0004]因此,本发明要解决的技术问题在于克服现有技术中的无法保证对燃爆物质高光谱图谱进行分类与识别的准确性的缺陷,从而提供一种基于高光谱图谱的燃爆物质分类的方法、装置及设备

Benefits of technology

[0016] This invention provides a method, apparatus, and device for classifying flammable and explosive substances based on hyperspectral images. The method includes: acquiring one-dimensional spectral data of the flammable and explosive substance; inputting the one-dimensional spectral data into a preset flammable and explosive substance spectral classification network model; performing offset sampling on the one-dimensional spectral data to obtain offset sampling feature quantities; the preset flammable and explosive substance spectral classification network model is generated by training based on the one-dimensional spectral sample data of the flammable and explosive substance; grouping and assigning weights to the offset sampling feature quantities to obtain hyperspectral image data; and performing classification processing based on the hyperspectral image data to determine the category of the flammable and explosive substance. By acquiring one-dimensional spectral data of the flammable and explosive substance, i.e., spectral curve data in the spectral dimension, one-dimensional spectral sample data of the flammable and explosive substance is formed, effectively avoiding the problem of difficulty in acquiring spatial dimension spectral image data. Furthermore, one-dimensional spectral data is input into a pre-defined spectral classification network model for combustible and explosive substances. By offset sampling of the one-dimensional spectral data, the offset sampling position is made more suitable for the size and shape of the object itself, thereby effectively sampling key feature curves. By grouping and assigning weights to the offset sampling features, the interference of background information is suppressed through weight learning. In this way, the accuracy of hyperspectral image classification and recognition of combustible and explosive substances is improved through the pre-defined spectral classification network model for combustible and explosive substances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908936B_ABST
    Figure CN115908936B_ABST
Patent Text Reader

Abstract

The application provides a method, device and equipment for classifying explosive substances based on hyperspectral images, which obtains one-dimensional spectral data of explosive substances, that is, spectral curve data in the spectral dimension, to form one-dimensional spectral sample data of the explosive substances, effectively avoiding the problem that spectral image data in the spatial dimension is difficult to obtain. The one-dimensional spectral data is input into a preset explosive substance image classification network model, offset sampling is performed on the one-dimensional spectral data, the offset sampling positions are more suitable for the size and shape of the object itself, so that the key feature curves are effectively sampled, the offset sampling feature values are grouped and weighted, the interference of background information is inhibited through weight learning, and then the preset explosive substance image classification network model is used to improve the accuracy of classification and identification of hyperspectral images of explosive substances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hyperspectral image classification, and more specifically to a method, apparatus, and equipment for classifying flammable and explosive substances based on hyperspectral images. Background Technology

[0002] In recent years, hyperspectral image classification and recognition based on deep learning has become a research hotspot. Convolutional neural networks, as a representative algorithm of deep learning, are currently the most widely used network models in the field of hyperspectral image classification.

[0003] In related technologies, deep learning-based hyperspectral image classification methods are mostly based on spectral images with a high spatial dimension. However, due to the inherent danger of explosive substances, it is difficult to obtain spectral image data with a significant spatial dimension in real-world scenarios. Furthermore, since the hyperspectral spectrum of explosive substances is a curve related to wavelength and reflectance, most areas in the image contain ineffective background information. The only effective key feature is the shape of the curve, but this curve occupies a very small proportion of the entire image area, and the key curve features are weak. Traditional rectangular sampling boxes cannot effectively sample the curve features. Summary of the Invention

[0004] Therefore, the technical problem to be solved by the present invention is to overcome the shortcomings of the prior art in that it cannot guarantee the accuracy of classifying and identifying hyperspectral images of flammable and explosive substances, thereby providing a method, apparatus and equipment for classifying flammable and explosive substances based on hyperspectral images.

[0005] According to a first aspect, embodiments of the present invention provide a method for classifying flammable and explosive substances based on hyperspectral images, comprising: acquiring one-dimensional spectral data of the flammable and explosive substances; inputting the one-dimensional spectral data into a preset flammable and explosive substance spectral classification network model; performing offset sampling on the one-dimensional spectral data to obtain offset sampling feature quantities; the preset flammable and explosive substance spectral classification network model is generated by training based on the one-dimensional spectral sample data of the flammable and explosive substances; grouping the offset sampling feature quantities and assigning weights to obtain hyperspectral image data; and performing classification processing based on the hyperspectral image data to determine the category of the flammable and explosive substances.

[0006] Optionally, offset sampling is performed on the one-dimensional spectral data to obtain offset sampling feature quantities, including: determining the horizontal and vertical offset of each pixel in the one-dimensional spectral data; determining the offset pixel value based on the offset, and generating offset sampling feature quantities.

[0007] Optionally, the offset sampling features are grouped and weighted to obtain hyperspectral image data, including: grouping the offset sampling features along the channel dimension based on the offset sampling features; and assigning weights to the grouped offset sampling features to obtain hyperspectral image data.

[0008] Optionally, acquiring one-dimensional spectral data of the combustible material includes: acquiring a target of the combustible material; collecting spectral data of the combustible material based on the target; extracting spectral information data of each combustible material based on the spectral data; and generating a hyperspectral spectrum corresponding to the spectral information data based on each spectral information data.

[0009] Optionally, the training process of the pre-defined flammable and explosive material spectrum classification network model includes: acquiring one-dimensional spectral sample data of flammable and explosive material samples and the corresponding classification results; inputting the one-dimensional spectral data into the pre-defined spectrum classification and recognition deep learning network model, performing offset sampling on the one-dimensional spectral sample data to obtain one-dimensional spectral sample data feature quantities; grouping and assigning weights to the one-dimensional spectral sample data feature quantities to obtain sample spectrum data; inputting the sample spectrum data into the flammable and explosive material spectrum classification network model for training to generate model prediction results; calculating the loss function based on the pre-defined model performance requirements and model prediction results; and optimizing the model according to the loss function to obtain the pre-defined flammable and explosive material spectrum classification network model.

[0010] Optionally, model tuning based on the loss function includes: selecting the cross-entropy function as the loss function and tuning the model using a stochastic gradient descent optimizer.

[0011] According to a second aspect, embodiments of the present invention provide an apparatus for classifying flammable and explosive substances based on hyperspectral images, comprising: an offset sampling feature determination unit configured to acquire one-dimensional spectral data of the flammable and explosive substance, input the one-dimensional spectral data into a preset flammable and explosive substance spectral classification network model, and perform offset sampling on the one-dimensional spectral data to obtain offset sampling feature quantities; the preset flammable and explosive substance spectral classification network model is generated by training based on the one-dimensional spectral sample data of the flammable and explosive substance; a spectral data determination unit configured to group and assign weights to the offset sampling feature quantities to obtain hyperspectral spectral data; and a category determination unit configured to perform classification processing based on the hyperspectral spectral data to determine the category of the flammable and explosive substance.

[0012] Optionally, the spectral data determination unit includes: a grouping subunit configured to group the offset sampling features along the channel dimension based on the offset sampling features; and a hyperspectral spectral data determination subunit configured to assign weights to the grouped offset sampling features to obtain hyperspectral spectral data.

[0013] According to a third aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that, when executed by a processor, implement a method for classifying flammable and explosive substances based on hyperspectral images as described in any embodiment of the first aspect.

[0014] According to a fourth aspect, embodiments of the present invention provide a computer device, including at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions that, when executed by the at least one processor, implement a method for classifying flammable and explosive substances based on hyperspectral images as described in any embodiment of the first aspect.

[0015] The technical solution of this invention has the following advantages:

[0016] This invention provides a method, apparatus, and device for classifying flammable and explosive substances based on hyperspectral images. The method includes: acquiring one-dimensional spectral data of the flammable and explosive substance; inputting the one-dimensional spectral data into a preset flammable and explosive substance spectral classification network model; performing offset sampling on the one-dimensional spectral data to obtain offset sampling feature quantities; the preset flammable and explosive substance spectral classification network model is generated by training based on the one-dimensional spectral sample data of the flammable and explosive substance; grouping and assigning weights to the offset sampling feature quantities to obtain hyperspectral image data; and performing classification processing based on the hyperspectral image data to determine the category of the flammable and explosive substance. By acquiring one-dimensional spectral data of the flammable and explosive substance, i.e., spectral curve data in the spectral dimension, one-dimensional spectral sample data of the flammable and explosive substance is formed, effectively avoiding the problem of difficulty in acquiring spatial dimension spectral image data. Furthermore, one-dimensional spectral data is input into a pre-defined spectral classification network model for combustible and explosive substances. By offset sampling of the one-dimensional spectral data, the offset sampling position is made more suitable for the size and shape of the object itself, thereby effectively sampling key feature curves. By grouping and assigning weights to the offset sampling features, the interference of background information is suppressed through weight learning. In this way, the accuracy of hyperspectral image classification and recognition of combustible and explosive substances is improved through the pre-defined spectral classification network model for combustible and explosive substances. Attached Figure Description

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a specific example of a method for classifying flammable and explosive substances based on hyperspectral images, provided in an embodiment of the present invention;

[0019] Figure 2 A flowchart illustrating a specific example of another method for classifying flammable and explosive substances based on hyperspectral images provided in this invention.

[0020] Figure 3A structural example diagram of a device for classifying flammable and explosive substances based on hyperspectral images, provided in an embodiment of the present invention;

[0021] Figure 4 This is a structural example diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0022] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0024] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can also refer to the internal connection of two components; and they can refer to a wireless connection or a wired connection. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0025] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0026] This embodiment provides a method for classifying flammable and explosive substances based on hyperspectral images, such as... Figure 1 As shown, it includes the following steps:

[0027] S101. Obtain one-dimensional spectral data of the flammable and explosive material, input the one-dimensional spectral data into the preset flammable and explosive material spectral classification network model, perform offset sampling on the one-dimensional spectral data, and obtain the offset sampling feature quantity; the preset flammable and explosive material spectral classification network model is generated by training based on the one-dimensional spectral sample data of the flammable and explosive material.

[0028] Specifically, obtaining one-dimensional spectral values ​​of explosive substances refers to acquiring spectral curve data in the spectral dimension, i.e., one-dimensional spectral data. Most areas in one-dimensional spectral data contain invalid background information; the only valid key features are the shape of the curve. The process of inputting one-dimensional spectral data into a pre-defined explosive substance spectral classification network model to determine the category of explosive substances involves sampling key feature curves and suppressing background interference, thereby achieving the classification and identification of explosive substances.

[0029] Specifically, offset sampling of one-dimensional spectral data to obtain offset sampling features refers to adding horizontal and vertical offsets to each pixel in the one-dimensional spectral data, causing the sampling points to shift and concentrate in the region of interest. This makes the offset sampling position more suitable for the size and shape of the object itself, thereby generating offset sampling features.

[0030] S102. Group the offset sampling features and assign weights to obtain hyperspectral data.

[0031] Specifically, grouping and weighting the offset sampling features to obtain hyperspectral image data means grouping the offset sampling features by channel dimension and assigning different weights to different channel dimensions, so that different pixels receive different weights. By introducing channel attention and spatial attention, and using weight learning, the interference of background information is suppressed, and hyperspectral image data is generated.

[0032] S103. Classify and process the hyperspectral data to determine the category of flammable and explosive substances.

[0033] Specifically, classifying and processing hyperspectral data to determine the category of flammable and explosive substances refers to classifying hyperspectral data using a pre-trained flammable and explosive substance spectral classification network model to determine the category of flammable and explosive substances.

[0034] By implementing this embodiment, one-dimensional spectral data of the explosive material is acquired, i.e., spectral curve data in the spectral dimension, to form one-dimensional spectral sample data of the explosive material, effectively avoiding the problem of difficulty in acquiring spatial spectral image data. Furthermore, the one-dimensional spectral data is input into a preset explosive material spectral classification network model. By offset sampling of the one-dimensional spectral data, the offset sampling position is made more suitable to the size and shape of the object itself, thereby effectively sampling key feature curves. By grouping and weighting the offset sampling features, and through weight learning, interference from background information is suppressed. Finally, through the preset explosive material spectral classification network model, the accuracy of hyperspectral image classification and recognition of explosive materials is improved.

[0035] In an optional implementation, to sample key feature curves, the process of offset sampling of one-dimensional spectral data to obtain offset sampling feature quantities in step S101 above specifically includes:

[0036] (1) Determine the horizontal and vertical offsets of each pixel in the one-dimensional spectral data.

[0037] Specifically, determining the horizontal and vertical offsets of each pixel in one-dimensional spectral data involves adding an offset variable to the position of each sampling point of the convolution kernel in the combustion and explosive material spectral classification network model, and learning the horizontal and vertical displacements of each pixel in the one-dimensional spectral data through the convolutional layer.

[0038] (2) Based on the offset, determine the pixel value after offset and generate the offset sampling feature.

[0039] Specifically, determining the offset pixel value based on the offset and generating the offset sampling feature means determining the offset pixel value through bilinear interpolation based on the determined offset, thereby generating a new feature, namely the offset sampling feature, and using the offset sampling feature as the input to the next layer in the combustion and explosion material spectrum classification network model.

[0040] In practical applications, determining the offset pixel value through bilinear interpolation is a relatively mature technology, and this invention will not elaborate on it further.

[0041] By implementing this embodiment, one-dimensional spectral data is input into a preset flammable and explosive material spectral classification network model. The horizontal and vertical offsets of each pixel in the one-dimensional spectral data are determined, thereby generating offset sampling feature quantities. By offset sampling of the one-dimensional spectral data, the offset sampling position is made more suitable to the size and shape of the object itself. This enables the sampling of key feature curves in the spectral curve data of the spectral dimension, providing a data foundation for improving the accuracy of hyperspectral image classification and recognition of flammable and explosive materials.

[0042] In an optional implementation, to suppress interference from background information in one-dimensional spectral data, the process of step S102 above specifically includes:

[0043] (1) Based on the offset sampling feature, the offset sampling feature is grouped along the channel dimension.

[0044] Specifically, grouping offset sampling features along the channel dimension based on offset sampling features means grouping the convolutionally transformed features along the channel dimension based on offset sampling features. The number of groups can be controlled by preset hyperparameters and can be set according to actual working conditions. This invention does not impose specific limitations on this.

[0045] (2) Assign weights to the offset sampling features after grouping to obtain hyperspectral data.

[0046] Specifically, assigning weights to the grouped offset sampling features to obtain hyperspectral image data means assigning different weights to each group of convolutional kernels after grouping, which is equivalent to assigning different weights to the features at different spatial locations. Furthermore, since the offset sampling features are grouped along the channel dimension, the weights obtained by each group are different, which is equivalent to assigning different weights to different channels. Thus, by performing weight learning in both spatial and channel dimensions, similar to an attention mechanism, hyperspectral image data is obtained.

[0047] In practical applications, weight learning in the channel dimension, similar to an attention mechanism, involves assigning different weights to different channels to measure their importance. This makes the channels more inclined to learn different feature representations, thereby enhancing the model's ability to distinguish different features and making it more conducive to the model learning key curve features.

[0048] In practical applications, spatial dimension-based weight learning, similar to an attention mechanism, assigns different weights to different pixels in space, measuring the importance of regions. This encourages regions to learn representative features from each other, thereby enhancing the model's ability to distinguish regional features and establishing connections between key regions. Through weight learning, the global context is merged into local feature representations, enabling the convolutional kernel to learn global features, which is more conducive to the model learning key curve features.

[0049] By implementing this embodiment, the offset sampling features are grouped and weighted, and weight learning is performed in the spatial and channel dimensions in a manner similar to an attention mechanism. This enables the spectral classification network model for explosive materials to better learn key curve features, effectively suppressing the interference of background information, and providing a data foundation for improving the accuracy of hyperspectral image classification and recognition of explosive materials.

[0050] In one optional embodiment, to address the difficulty in obtaining spatial spectral image data, the process of obtaining one-dimensional spectral data of the explosive substance in step S101 specifically includes:

[0051] (1) Obtain the target of the combustible material.

[0052] In practical applications, targets for flammable and explosive substances are created by fabricating a metal target plate, coating it with photosensitive adhesive, evenly sprinkling the flammable and explosive substance powder onto the adhesive, and then fixing it under ultraviolet light to form a target. The metal target plate can be made of steel, iron, or other metals, but steel is typically chosen. The length, width, and height of the metal target plate can be selected according to the actual working conditions; in this embodiment, a 300mm*300mm*10mm steel target plate is used. The flammable and explosive substance powder can be a mixture of various flammable and explosive substances. In this embodiment, the flammable and explosive substance powder includes: potassium permanganate, red phosphorus, sulfur, magnesium-aluminum alloy powder, potassium nitrate, carbon powder, corn starch, a mixture of potassium permanganate and magnesium-aluminum alloy powder, and a mixture of potassium nitrate, sulfur, and carbon powder, totaling nine types of flammable and explosive substances and mixtures thereof.

[0053] (2) Based on the target, collect spectral data of the combustible material.

[0054] In practical applications, the spectral data of flammable and explosive substances is acquired by placing a target of the flammable and explosive substance on the test site and performing push-broom imaging with a hyperspectral imager. Acquiring spectral data of flammable and explosive substances through push-broom imaging with a hyperspectral imager is a relatively mature technology, and will not be elaborated upon further in this invention.

[0055] (3) Based on the spectral data, extract the spectral information data of each combustible and explosive substance, and generate a hyperspectral spectrum corresponding to the spectral information data based on each spectral information data.

[0056] In practical applications, extracting the spectral information data of each combustible and explosive substance and generating the corresponding hyperspectral spectrum refers to using ENVI remote sensing image processing software to extract the spectral information data of each combustible and explosive substance from the spectral data of the combustible and explosive substances. Extracting the spectral information data of each combustible and explosive substance from the spectral data of the combustible and explosive substances using ENVI remote sensing image processing software is a relatively mature technology, and this invention will not elaborate on it further.

[0057] By implementing this embodiment, a target of the combustible and explosive material is created, and the spectral data of the combustible and explosive material is collected to obtain a hyperspectral image. That is, one-dimensional spectral data of the combustible and explosive material is obtained, forming spectral curve data in the spectral dimension. This effectively avoids the problem of difficulty in obtaining spectral image data in the spatial dimension. It provides a data foundation for subsequently inputting the one-dimensional spectral data into a preset combustible and explosive material spectral classification network model, thereby improving the accuracy of hyperspectral image classification and recognition of combustible and explosive materials.

[0058] In one optional implementation, to improve the accuracy of hyperspectral image classification and recognition of flammable and explosive substances, the training process of the preset flammable and explosive substance spectral classification network model in step S101 specifically includes:

[0059] (1) Obtain one-dimensional spectral sample data of flammable and explosive material samples and the corresponding classification results of one-dimensional spectral sample data.

[0060] Specifically, the one-dimensional spectral sample data of flammable and explosive materials refers to the spectral curve data in the spectral dimension. In practical applications, 70% of the spectral curve data in the spectral dimension is used as the training set, and 30% is used as the test set. The classification result corresponding to the one-dimensional spectral sample data refers to the classification result corresponding to the training set.

[0061] (2) Input the one-dimensional spectral data into the preset deep learning network model for spectral classification and recognition, perform offset sampling on the one-dimensional spectral sample data, and obtain the feature quantity of the one-dimensional spectral sample data.

[0062] In practical applications, the specific process of offset sampling of one-dimensional spectral sample data to obtain the feature quantity of one-dimensional spectral sample data can be found in the relevant description of step S101 in the above embodiments, and will not be repeated here.

[0063] (3) Group the features of the one-dimensional spectral sample data and assign weights to them to obtain the sample spectral data.

[0064] In practical applications, the specific process of grouping and assigning weights to the feature quantities of one-dimensional spectral sample data to obtain sample spectral data can be found in the relevant description of step S102 in the above embodiments, and will not be repeated here.

[0065] (4) Input the sample spectrum data into the combustion and explosive material spectrum classification network model for training and generate model prediction results.

[0066] In practical applications, the model prediction result refers to the generation of one-dimensional spectral sample data features by determining the horizontal and vertical offsets of each pixel in the training set, grouping the one-dimensional spectral sample data features along the channel dimension based on the one-dimensional spectral sample data features, assigning weights to the grouped one-dimensional spectral sample data features, obtaining sample spectral data, and obtaining the predicted classification of flammable and explosive substances based on the sample spectral data, which is the model prediction result.

[0067] (5) Calculate the loss function based on the preset model performance requirements and model prediction results.

[0068] In one alternative implementation, the cross-entropy function is selected as the loss function.

[0069] In practical applications, the identification of flammable and explosive material spectra is a classification problem. When calculating the probabilities of each category, the Softmax function is usually used. However, when the Softmax function and other loss functions are used, the loss curve fluctuates and there are many local extrema. The training of the model is a non-convex optimization problem. In contrast, when using the cross-entropy function, the loss curve is convex, and the training of the model is a convex optimization problem. Convex optimization problems have better convergence. Furthermore, in classification problems, the cross-entropy function can better describe the difference between the model and the target model.

[0070] (6) The model is tuned according to the loss function to obtain the preset combustion and explosive material spectrum classification network model.

[0071] In one alternative implementation, model tuning is performed using a stochastic gradient descent optimizer.

[0072] In practical applications, stochastic gradient descent optimizers can quickly and randomly update directions, helping the model escape local optima and enabling more thorough model training. Furthermore, to mitigate the negative impacts of stochastic gradient descent, momentum, weight decay, and learning rate update strategies are introduced in practical applications. Momentum updates increase the velocity of the parameter vector in directions with sustained gradients, reducing the oscillations in the loss value caused by random updates in stochastic gradient descent, thus accelerating training. The learning rate update strategy allows the network to quickly converge to a local minimum in the early stages of training, and in the later stages, it allows the network to search for the global minimum near the local minimum, thereby obtaining the optimal model. Weight decay introduces regularization to the model, mitigating the fluctuations caused by excessively large weights during overfitting.

[0073] In practical applications, the parameter tuning results of the combustion and explosive material spectrum classification network model used in this embodiment are as follows: batch size is 8, and learning rate is 2.5 × 10⁻⁶. -4 The learning rate update strategy is to reduce it to 1 / 3 of its original value every 20 epochs, the training epochs are 120 epochs, the momentum is 0.9, and the weight decay factor is 5 × 10⁻⁶. -4 .

[0074] By implementing this embodiment, offset sampling is performed to make the offset sampling position more suitable for the size and shape of the object itself, thereby effectively sampling key feature curves. Furthermore, by grouping and assigning weights to the feature quantities, the interference of background information is suppressed through weight learning, thus ensuring the accuracy of the trained combustion and explosive material spectral classification network model in classifying and recognizing hyperspectral images of combustion and explosive materials.

[0075] This embodiment provides a device for classifying flammable and explosive substances based on hyperspectral images, such as... Figure 3As shown, it includes: offset sampling feature quantity determination unit 21, map data determination unit 22, and category determination unit 23.

[0076] The offset sampling feature determination unit 21 is configured to acquire one-dimensional spectral data of the flammable and explosive material, input the one-dimensional spectral data into a preset flammable and explosive material spectral classification network model, and perform offset sampling on the one-dimensional spectral data to obtain offset sampling features. The preset flammable and explosive material spectral classification network model is generated by training based on the one-dimensional spectral sample data of the flammable and explosive material. For details, please refer to the relevant description of step S101 in the above embodiments, which will not be repeated here.

[0077] The spectral data determination unit 22 is configured to group and weight the offset sampling features to obtain hyperspectral spectral data. For details, please refer to the description of step S102 in the above embodiments, which will not be repeated here.

[0078] The category determination unit 23 is configured to perform classification processing based on hyperspectral image data to determine the category of flammable and explosive substances. For details, please refer to the relevant description of step S103 in the above embodiments, which will not be repeated here.

[0079] In one alternative implementation, the aforementioned spectral data determination unit 22 specifically includes: a grouping subunit and a hyperspectral spectral data determination subunit.

[0080] The grouping subunit is configured to group the offset sampling features along the channel dimension based on the offset sampling features. For details, please refer to the description of step S102 in the above embodiments, which will not be repeated here.

[0081] The hyperspectral image data is used to determine sub-units, which are then configured to assign weights to the offset sampling features after grouping, thus obtaining the hyperspectral image data. For details, please refer to the description of step S102 in the above embodiments, which will not be repeated here.

[0082] By implementing this embodiment, the one-dimensional spectral data of the explosive substance, i.e., the spectral curve data in the spectral dimension, is obtained through the offset sampling feature determination unit, forming one-dimensional spectral sample data of the explosive substance, effectively avoiding the problem of difficulty in obtaining spatial spectral image data. Furthermore, the one-dimensional spectral data is input into a preset explosive substance map classification network model. By offset sampling of the one-dimensional spectral data, the offset sampling position is made more suitable to the size and shape of the object itself, thereby effectively sampling key feature curves. The map data determination unit then groups and assigns weights to the offset sampling features, suppressing background interference through weight learning. Finally, the category determination unit determines the category of the explosive substance, thus improving the accuracy of hyperspectral image classification and recognition of explosive substances through the preset explosive substance map classification network model.

[0083] One embodiment of the present invention also provides a computer storage medium storing computer-executable instructions that can execute the method for classifying flammable and explosive substances based on hyperspectral images in any of the above method embodiments. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0084] One embodiment of the present invention also provides a computer device, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of a computer device according to an optional embodiment of the present invention. The computer device may include at least one processor 31, at least one communication interface 32, at least one communication bus 33, and at least one memory 34. The communication interface 32 may include a display screen and a keyboard; optionally, the communication interface 32 may also include a standard wired interface or a wireless interface. The memory 34 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 34 may also be at least one storage device located remotely from the aforementioned processor 31. The processor 31 may be combined with... Figure 3The described apparatus has an application program stored in memory 34, and the processor 31 calls the program code stored in memory 34 to perform the steps of the method for classifying flammable and explosive substances based on hyperspectral images as described in any of the above method embodiments.

[0085] The communication bus 33 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 33 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0086] The memory 34 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 34 may also include a combination of the above types of memory.

[0087] The processor 31 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.

[0088] The processor 31 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0089] Optionally, the memory 34 is also used to store program instructions. The processor 31 can invoke the program instructions to implement the method for classifying flammable and explosive substances based on hyperspectral images as described in any embodiment of the present invention.

[0090] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for classifying flammable and explosive substances based on hyperspectral images, characterized in that, include: One-dimensional spectral data of a flammable and explosive substance is acquired, and the one-dimensional spectral data is input into a preset flammable and explosive substance spectral classification network model. The one-dimensional spectral data is then offset sampled to obtain offset sampling feature quantities. The preset flammable and explosive material spectral classification network model is generated by training based on the one-dimensional spectral sample data of the flammable and explosive material; wherein, the one-dimensional spectral data is offset sampled to obtain offset sampling feature quantity, including: determining the horizontal and vertical offset of each pixel in the one-dimensional spectral data; determining the offset pixel value based on the offset, and generating the offset sampling feature quantity; The process of grouping and weighting the offset sampling features to obtain hyperspectral image data includes: grouping the offset sampling features along the channel dimension based on the offset sampling features; assigning weights to the grouped offset sampling features by assigning different weights to different channels and different weights to different pixels in space to obtain hyperspectral image data. The class of the flammable and explosive substance is determined by classifying the hyperspectral data.

2. The method for classifying flammable and explosive substances based on hyperspectral images according to claim 1, characterized in that, The acquisition of one-dimensional spectral data of the flammable and explosive material includes: Obtain the target of the flammable and explosive material; Based on the target, spectral data of the combustible material are collected; Based on the spectral data, spectral information data of each of the combustion and explosive substances are extracted, and hyperspectral maps corresponding to the spectral information data are generated based on the spectral information data.

3. The method for classifying flammable and explosive substances based on hyperspectral images according to claim 1, characterized in that, The training process of the pre-defined combustion and explosive material spectrum classification network model includes: Obtain one-dimensional spectral sample data of flammable and explosive material samples and the corresponding classification results of the one-dimensional spectral sample data; The one-dimensional spectral data is input into a preset deep learning network model for spectral classification and recognition, and the one-dimensional spectral sample data is offset sampled to obtain the feature quantity of the one-dimensional spectral sample data. The feature quantities of the one-dimensional spectral sample data are grouped and weighted to obtain sample spectral data; The sample spectral data is input into the flammable and explosive material spectral classification network model for training, and the model prediction results are generated. Based on the preset model performance requirements and the model prediction results, the loss function is calculated; The model is tuned based on the loss function to obtain the preset combustion and explosive material spectrum classification network model.

4. The method for classifying flammable and explosive substances based on hyperspectral images according to claim 3, characterized in that, The step of optimizing the model based on the loss function includes: selecting the cross-entropy function as the loss function and optimizing the model using a stochastic gradient descent optimizer.

5. A device for classifying flammable and explosive substances based on hyperspectral images, characterized in that, include: The offset sampling feature determination unit is configured to acquire one-dimensional spectral data of the flammable and explosive material, input the one-dimensional spectral data into a preset flammable and explosive material spectral classification network model, perform offset sampling on the one-dimensional spectral data, and obtain offset sampling feature quantities. The preset flammable and explosive material spectral classification network model is generated through training based on the one-dimensional spectral sample data of the flammable and explosive material; wherein, the one-dimensional spectral data is offset sampled to obtain offset sampling feature quantities, including: determining the horizontal and vertical offset of each pixel in the one-dimensional spectral data; determining the offset pixel value based on the offset, and generating the offset sampling feature quantity. The spectral data determination unit is configured to group and assign weights to the offset sampling features to obtain hyperspectral spectral data; wherein, the spectral data determination unit includes: a grouping subunit configured to group the offset sampling features along the channel dimension based on the offset sampling features; and a hyperspectral spectral data determination subunit configured to assign weights to the grouped offset sampling features, obtaining hyperspectral spectral data by assigning different weights to different channels and different weights to different pixels in space. The category determination unit is configured to perform classification processing based on the hyperspectral data to determine the category of the flammable and explosive substance.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for classifying flammable and explosive substances based on hyperspectral images as described in any one of claims 1-4.

7. A computer device, characterized in that, include: 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 perform the method for classifying flammable and explosive substances based on hyperspectral images as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Deep forest hyperspectral image classification method and system based on attention mechanism

    CN112131931A