Hyperspectral image anomaly detection method based on anomaly suppression encoder

Through the abnormal suppression encoder combined with convolutional neural network and graph attention network, superpixel-level and pixel-level features of high-spectral images are extracted, features are selected using cosine similarity and asymmetric decoder reconstruction, solving the existing technology The problem of poor feature extraction effect improves the accuracy and efficiency of abnormal detection of hyperspectral images.

CN118941962AActive Publication Date: 2024-11-12CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411170182.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-12
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The existing hyperspectral image abnormality detection methods fail to fully explore the relationship between complex image structure information and irregular land blocks, resulting in poor feature extraction effect and reduced separability of the reconstruction error between background and abnormality.

Method used

Using an abnormal suppression encoder method, the geographic features are comprehensively considered from the superpixel level and pixel level angles, and the null spectral features are extracted through convolutional neural networks and graph attention networks, and deep features are selected in combination with cosine similarity to suppress anomalies. Interference to background reconstruction and efficient background reconstruction is achieved through asymmetric decoder.

Benefits of technology

The effect of abnormal detection of hyperspectral images is improved, and by retaining the internal feature differences of superpixels and adaptive feature selection, the interference of abnormalities on background reconstruction is reduced, and more accurate abnormal detection is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941962A_ABST
    Figure CN118941962A_ABST
Patent Text Reader

Abstract

The invention provides a hyperspectral image anomaly detection method based on an anomaly suppression encoder, and relates to the technical field of remote sensing image processing, and the method comprises the steps: carrying out the pixel-level and super-pixel-level feature extraction of a hyperspectral image through a convolutional neural network and a graph attention network; according to the method, super-pixel-level features are extracted, feature differences in super-pixels are reserved at the same time, and weighted selection is performed on deep features by using cosine similarity according to the differences between the super-pixel-level features and the pixel-level features of the background and the exception, so that interference of the exception on background reconstruction is suppressed, and the background reconstruction accuracy is improved. And finally, efficient background reconstruction is realized through an asymmetric decoder, and anomaly detection is realized according to a reconstruction error. The method has the advantages that the internal features of the superpixels are extracted in a mode of combining the convolutional neural network and the graph attention network, the spatial spectrum feature extraction effect is improved, interference of anomaly on background reconstruction is reduced by designing the self-adaptive selection module, and the anomaly detection effect based on reconstruction errors is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of remote sensing image processing, and in particular relates to a hyperspectral image anomaly detection method based on an anomaly suppression encoder. Background Art

[0002] Hyperspectral sensors can capture the spectral information and spatial information of ground objects at the same time to form hyperspectral images. Hyperspectral images usually contain hundreds or even thousands of spectral bands and can provide very detailed spectral information. Therefore, hyperspectral images are conducive to distinguishing different ground targets with spectral differences, providing unique advantages for hyperspectral anomaly detection tasks. Hyperspectral anomaly detection does not rely on prior knowledge of the target or background, and focuses on detecting abnormal targets that are different from the background. In recent years, hyperspectral anomaly detection has become a booming research direction and has been successfully applied to many fields such as oil spill detection, civil rescue, and military reconnaissance.

[0003] In recent years, deep learning methods have attracted more and more attention in the field of anomaly detection due to their powerful feature mining and utilization capabilities in complex scenes. Many hyperspectral anomaly detection methods based on autoencoders have been proposed, including stacked denoising autoencoders, adversarial autoencoders, fully convolutional autoencoders, and fully convolutional blind spot autoencoders. Existing methods focus on designing encoders and decoders to reconstruct the background, but often ignore the feature encoding differences between anomalies and backgrounds, resulting in reduced separability between background and anomalies in reconstruction errors. In addition, existing studies usually only consider regular data structures, and do not fully explore the complex structural information of hyperspectral images and the connection between irregular ground objects, resulting in poor feature extraction. Therefore, it is necessary to design a hyperspectral image anomaly detection method that can effectively extract the spatial spectral features of ground objects while mining the differences between background and anomaly features to improve the anomaly detection effect. Summary of the invention

[0004] In view of the problem that the existing technology does not fully explore the complex structural information of hyperspectral images and the connection between irregular ground objects, resulting in poor feature extraction, the method of the present invention provides an efficient hyperspectral image anomaly detection method based on anomaly suppression encoder, which comprehensively considers the features of ground objects from the perspectives of superpixel level and pixel level, extracts spatial spectrum features of irregular areas through convolutional neural networks and graph attention networks, selects deep features based on the difference between background and anomaly at superpixel level features and pixel level features, thereby suppressing the interference of anomalies on background reconstruction, realizing efficient background reconstruction through an asymmetric decoder, and realizing anomaly detection based on reconstruction error. This method can retain the feature differences within superpixels while extracting superpixel-level features, improve the effect of spatial spectrum feature extraction, and reduce the interference of anomalies on background reconstruction through adaptive feature selection, so as to better complete the task of hyperspectral image anomaly detection.

[0005] A hyperspectral image anomaly detection method based on anomaly suppression encoder, the method includes a channel interaction module, a super-pixel level graph attention module, a pixel level convolution module, and an adaptive feature selection module. The hyperspectral image is a data cube, which can be represented by a tensor. The vector of each point in the tensor is the pixel radiation value corresponding to each band. The hyperspectral remote sensing image X to be detected h,w,b Do the following:

[0006] S1: Get the hyperspectral remote sensing image X to be detected h,w,b , where h, w, and b represent the length, width, and number of channels of the hyperspectral remote sensing image to be detected, respectively;

[0007] S2: The hyperspectral remote sensing image to be detected X h,w,b Input channel interaction module to perform spectral dimension reduction processing;

[0008] S3: Hyperspectral image obtained after dimensionality reduction Perform superpixel segmentation processing, and then use the superpixel level graph attention module to extract superpixel level features. m represents the number of channels of the hyperspectral remote sensing image after dimensionality reduction processing;

[0009] S4: The hyperspectral image obtained after dimensionality reduction Input pixel-level convolution module to achieve pixel-level feature extraction;

[0010] S5: using an adaptive feature selection module to select features from the superpixel-level features and pixel-level features obtained in step S3 and step S4, and concatenating the selected features to achieve feature encoding based on abnormality suppression;

[0011] S6: input the feature code obtained in step S5 into the asymmetric decoder to realize background reconstruction, and obtain the reconstruction result of the image to be detected;

[0012] S7: Based on the hyperspectral image X to be detected h,w,b The channel interaction module, anomaly suppression encoder and asymmetric decoder are trained using the root mean square error and the reconstruction result to obtain the background reconstruction network. The reconstruction error is used to detect anomalies in the hyperspectral remote sensing image to be detected. Among them, the anomaly suppression encoder includes a superpixel-level graph attention module, a pixel-level convolution module, and an adaptive feature selection module.

[0013] Furthermore, in step S2, the channel interaction module is composed of a batch normalization layer, a 1×1 convolution layer, and a LeakyReLU activation layer; the hyperspectral remote sensing image X to be detected h,w,b After entering the channel interaction module:

[0014]

[0015] In the formula, is the output feature map, i.e., the hyperspectral image after dimensionality reduction. h, w, and m represent the length, width, and number of channels of the output feature map, respectively. i,j,b,m is the convolution kernel of the input feature map of row i, column j, channel b. The number of convolution kernels is the same as the number of channels of the output feature map, that is, m; B i,j,b,m represents the bias of the convolution, and s(·) represents the activation function.

[0016] Furthermore, in step S3, a simple linear iterative clustering algorithm is used to perform superpixel segmentation processing, and each superpixel is used as a node of the graph to construct a superpixel-level graph. All node features are stacked in the column direction to form a feature matrix V:

[0017]

[0018] In the formula, Flatten(·) represents the hyperspectral image after dimensionality reduction Flatten according to the spatial dimension to obtain a two-dimensional data matrix express The i-th pixel in S j represents the jth superpixel; Q i,j is the incidence matrix Q h×w,M The element value of the i-th row and j-th column indicates whether the i-th pixel belongs to the j-th superpixel, and M represents the number of superpixels; is the column-by-column normalized Q h×w,M , the superscript T indicates transpose.

[0019] Furthermore, in step S3, the specific implementation process of using the superpixel-level graph attention module to extract superpixel-level features is as follows:

[0020] First, the features of the input superpixel graph are shared linearly transformed, and then the graph attention mechanism is applied to aggregate the neighbor node information to obtain the current node embedding to better learn the spatial features; the attention mechanism with shared parameters between nodes is used to calculate the attention coefficient between adjacent nodes j and node i:

[0021] e ij =sam(Wh i ,Wh j )

[0022] In the formula, e ij represents the attention coefficient between node j and node i, W represents the weight matrix, F is the number of features in each input node, F' is the number of features in each new output node, sam(·) represents the shared attention mechanism for calculating the attention coefficient between node i and node j; h i ,h j Represent the characteristics of node i and node j respectively.

[0023] The attention coefficient is only valid between a node and its neighbor nodes. The shared attention mechanism sam(·) can be represented by the weight vector Combined with the nonlinear function LeakyReLU, the attention coefficient e ij It can be expressed as LeakyReLU(β T W i ||Wh j ), use the softmax function to normalize the attention coefficient

[0024]

[0025] In the formula, α ij Represents the normalized attention coefficient, N i represents the neighborhood of node i, k represents the nodes in the neighborhood, and h k Represents the node features in the neighborhood, and || is a concatenation operation.

[0026] In order to stabilize the learning process of node embedding, multi-head attention is used to expand the mechanism to obtain the final output node features

[0027]

[0028] Where D represents the number of executions of the multi-head attention mechanism. represents the normalized attention coefficient obtained from the dth execution, W k Represents the weight matrix obtained by the d-th execution.

[0029] Then, the final output features of each node are vector stacked to obtain super-pixel level features. Since the number of superpixels M is inconsistent with the number of pixels h×w of the hyperspectral remote sensing image to be detected, the dimensions of the superpixel-level features and the pixel-level features output by the pixel-level convolution module are inconsistent; in order to achieve comparison and operation between the two, the superpixel-level features need to be transformed:

[0030]

[0031] In the formula, H superpixel represents the superpixel-level features finally output by the superpixel-level graph attention module, and Reshape(·) represents the spatial dimension of the restored data.

[0032] Furthermore, in step S4, the pixel-level convolution module is composed of two convolution residual blocks, each of which includes two upper and lower branches. The lower branch performs a residual connection between the data of the input convolution residual block and the features obtained by the upper branch to supplement the detail features; batch normalization is used after each convolution operation to accelerate training, and the ReLU activation function is used to extract nonlinear features; pixel-level features are obtained through the output of the convolution residual block:

[0033]

[0034] In the formula, H pixel represents the pixel-level features output by the pixel-level convolution module, Y represents the output of the first residual block; F(·) is the residual map, W 1

[0035] s and are the additional weights for the first residual block and the second residual block, respectively.

[0036] Furthermore, in step S5, the feature encoding process based on abnormality suppression is implemented using the adaptive feature selection module as follows:

[0037] First, the cosine similarity is used to measure the similarity between the output features of the superpixel-level graph attention module and the pixel-level convolution module:

[0038]

[0039] In the formula, H superpixel and H pixel are the features output by the super-pixel-level graph attention module and the pixel-level convolution module, respectively. superpixel ) q and (H pixel ) q are the qth feature channels of the output features of the two modules respectively, CS q is the cosine similarity between the output features corresponding to the qth feature channel.

[0040] Then, the weight coefficient is obtained through the Sigmoid function and multiplied with the output features of the superpixel-level graph attention module and the pixel-level convolution module respectively to update the output feature matrix:

[0041] WCoE q =Sigmoid(CS q (H superpixel ,H pixel ))

[0042] (H′ superpixel ) q =(H superpixel )q WCoE q

[0043] (H' pixel ) q =(H pixel ) q WCoE q

[0044] In the formula, WCoe q The weight coefficient assigned to the qth feature channel, H′ superpixel and H' pixel They represent the output features of the updated superpixel graph attention module and pixel-level convolution module respectively.

[0045] Finally, different weights are assigned to the updated output features of the two modules to obtain the final fused feature map:

[0046] H fusion = l·H' pixel +(1-l)·H′ superpixel

[0047] In the formula, H fusion represents the final fused feature map, and λ is the weight assigned to the pixel-level convolution module.

[0048] Furthermore, in step S6, the asymmetric decoder consists of two convolutional layers, and batch normalization and ReLU activation function are used after the first convolution operation to improve the stability of the training process; the use of continuous convolutional layers can gradually refine the feature expression and better reconstruct the background; the decoder adopts a lightweight structure that is asymmetric with the encoder, which can improve the efficiency of background reconstruction.

[0049] Further, in step S7, the root mean square error and the reconstruction error are respectively:

[0050]

[0051] Where, L MSE is the root mean square error, which is used to measure x c and The difference between; N is the total number of pixels, x c and Denote the feature vector of the cth pixel in the original hyperspectral image to be detected and the reconstructed hyperspectral image respectively; D c Represents the reconstruction error, which is used to measure the probability that the cth pixel is an abnormality.

[0052] A storage device stores instructions and data for implementing the hyperspectral image anomaly detection method based on anomaly suppression encoder.

[0053] A hyperspectral image anomaly detection device based on an anomaly suppression encoder comprises: a processor and a storage device; the processor loads and executes instructions and data in the storage device to implement the hyperspectral image anomaly detection method based on an anomaly suppression encoder.

[0054] The beneficial effects of the technical solution provided by the present invention are as follows: the present invention performs pixel-level and super-pixel-level feature extraction on hyperspectral images through convolutional neural networks and graph attention networks, retains the feature differences within super-pixels while extracting super-pixel-level features, and uses cosine similarity to perform weighted selection of deep features based on the differences between background and anomalies at the super-pixel level and pixel-level features. An encoder based on anomaly suppression is constructed through convolutional neural networks, graph attention networks, and adaptive feature selection to suppress the interference of anomalies on background reconstruction. Finally, efficient background reconstruction is achieved through an asymmetric decoder, and efficient hyperspectral image anomaly detection is achieved based on precise reconstruction errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a flowchart of a method for anomaly detection of a hyperspectral image based on anomaly suppression encoder according to an embodiment of the present invention.

[0056] Figure 2 It is a schematic diagram of the operation of the hardware device in the embodiment of the present invention. DETAILED DESCRIPTION

[0057] Combine the following Figure 1 , the specific implementation methods of the present invention are further described in detail.

[0058] The key invention of this invention is to propose a method for anomaly detection of hyperspectral images based on anomaly suppression encoder. The method first uses the designed channel interaction module to perform spectral dimension reduction on the hyperspectral image to be detected, then uses the designed encoder based on anomaly suppression to encode the features of the hyperspectral image, and uses an asymmetric decoder to reconstruct the background. According to the reconstruction error, the hyperspectral image anomaly detection task can be effectively achieved.

[0059] The specific implementation of the present invention is written in PYTHON language and implemented using the classic deep learning framework PYTORCH. The PYTHON remote sensing image reading and writing function is the implementation basis. Call the data processing library NUMPY, SCIPY and SPECTRAL library, input the remote sensing image file name to be read, and the remote sensing image is read into the tensor. Each element in the tensor is the pixel radiation value corresponding to each band. The PYTHON remote sensing image reading and writing function is a well-known technology in the technical field.

[0060] like Figure 1 As shown, a method for detecting anomalies in a hyperspectral image based on anomaly suppression encoder comprises the following steps:

[0061] S1: Get the hyperspectral remote sensing image X to be detected h,w,b , where h, w, b represent the length, width and number of channels of the image respectively;

[0062] S2: The hyperspectral remote sensing image to be detected X h,w,b Input channel interaction module to perform spectral dimension reduction processing;

[0063] S3: Hyperspectral image obtained after dimensionality reduction Perform superpixel segmentation and then use the superpixel level graph attention module to extract superpixel level features;

[0064] S4: The hyperspectral image obtained after dimensionality reduction Input pixel-level convolution module to achieve pixel-level feature extraction;

[0065] S5: using an adaptive feature selection module to select features from the superpixel-level features and pixel-level features obtained in step S3 and step S4, and concatenating the selected features to achieve feature encoding based on abnormality suppression;

[0066] S6: input the feature code obtained in step S5 into the asymmetric decoder to realize background reconstruction, and obtain the reconstruction result of the image to be detected;

[0067] S7: Based on the hyperspectral image X to be detected h,w,b And its reconstruction results, the channel interaction module, anomaly suppression encoder and asymmetric decoder are trained using the root mean square error to obtain the background reconstruction network, and the reconstruction error of the background reconstruction network is used to detect anomalies in the hyperspectral remote sensing image to be detected.

[0068] The specific operations are as follows:

[0069] (1) In order to reduce the spectral redundant information in the hyperspectral image, enhance the robustness of the spectral features and reduce the computational cost, a channel interaction module is designed to perform spectral dimension reduction. The channel interaction module consists of a batch normalization layer, a 1·1 convolution layer and a LeakyReLU activation layer. h,w,b After entering the channel interaction module:

[0070]

[0071] In the formula, is the output feature map, i.e., the hyperspectral image after dimensionality reduction. h, w, and m represent the length, width, and number of channels of the output feature map, respectively. i,j,b,m is the convolution kernel of the input feature map of row i, column j, channel b. The number of convolution kernels is the same as the number of channels of the output feature map, which is m.i,j,b,m represents the bias of the convolution, and s(·) represents the activation function.

[0072] (2) A simple linear iterative clustering algorithm is used to perform superpixel segmentation on the hyperspectral image, and each superpixel is used as a node in the graph to construct a superpixel-level graph. All node features are stacked in the column direction to form a feature matrix V:

[0073]

[0074]

[0075] In the formula, Flatten(·) represents the hyperspectral image after dimensionality reduction Flatten according to the spatial dimension to obtain a two-dimensional data matrix express The i-th pixel in S j represents the jth superpixel; Q i,j is the incidence matrix Q h×w,M The element value of the i-th row and j-th column indicates whether the i-th pixel belongs to the j-th superpixel, and M represents the number of superpixels; is the column-by-column normalized Q h×w,M , the superscript T indicates transpose.

[0076] (3) Use the superpixel-level graph attention module to extract superpixel features:

[0077] First, the features of the input superpixel graph are transformed linearly, and then the graph attention mechanism is applied to aggregate the neighbor node information to obtain the current node embedding to better learn the spatial features. The attention mechanism using the shared parameters between nodes calculates the attention coefficient between the adjacent node j and the node i.

[0078] e ij =sam(Wh i ,Wh j )

[0079] In the formula, e ij represents the attention coefficient between node j and node i, W represents the weight matrix, F is the number of features in each input node, F' is the number of features in each new output node, sam(·) represents the shared attention mechanism for calculating the attention coefficient between node i and node j; h i ,h j Represent the characteristics of node i and node j respectively.

[0080] The attention coefficient is only valid between a node and its neighbor nodes. The shared attention mechanism sam(·) can be represented by the weight vector Combined with the nonlinear function LeakyReLU, the attention coefficient e ij It can be expressed as LeakyReLU(β T W i ||Wh j ), use the softmax function to normalize the attention coefficient

[0081]

[0082] In the formula, α ij Represents the normalized attention coefficient, N i represents the neighborhood of node i, k represents the nodes in the neighborhood, and h k Represents the node features in the neighborhood, and || is a concatenation operation.

[0083] In order to stabilize the learning process of node embedding, multi-head attention is used to expand the mechanism and obtain the final output node features:

[0084]

[0085] Where D represents the number of executions of the multi-head attention mechanism. represents the normalized attention coefficient obtained from the dth execution, W k Represents the weight matrix obtained by the d-th execution.

[0086] Then, the final output features of each node are vector stacked to obtain super-pixel level features. Since the number of superpixels M is inconsistent with the number of pixels h×w of the hyperspectral image to be detected, the dimensions of the superpixel-level features and the pixel-level features output by the pixel-level convolution module are inconsistent. In order to achieve comparison and operation between the two, the superpixel-level features need to be transformed

[0087]

[0088] In the formula, H superpixel represents the superpixel-level features finally output by the superpixel-level graph attention module, and Reshape(·) represents the spatial dimension of the restored data.

[0089] (4) In order to fully extract the pixel-level features of the hyperspectral image, a pixel-level convolution module is designed. The pixel-level convolution module consists of two convolution residual blocks. Each convolution residual block includes two upper and lower branches. The upper branch uses two 1D convolution operations with a kernel size of 1×7 and a step size of 1, and the lower branch uses a 1D convolution operation with a kernel size of 1×1 and a step size of 1. The lower branch performs a residual connection between the data input to the convolution residual block and the features obtained from the upper branch to supplement the detailed features. Batch normalization is used after each convolution operation to accelerate training, and the ReLU activation function is used to extract nonlinear features. The pixel-level features are obtained through the output of the convolution residual block:

[0090]

[0091] In the formula, H pixel represents the pixel-level features output by the pixel-level convolution module, Y represents the output of the first residual block; F(·) is the residual map, W s 1 and are the additional weights for the first residual block and the second residual block, respectively.

[0092] (5) In order to reduce the interference of anomalies on background reconstruction, an adaptive feature selection module is designed to achieve feature encoding based on anomaly suppression:

[0093] First, the cosine similarity is used to measure the similarity between the output features of the superpixel-level graph attention module and the pixel-level convolution module:

[0094]

[0095] In the formula, H superpixel and H pixel are the features output by the super-pixel-level graph attention module and the pixel-level convolution module, respectively. superpixel ) q and (H pixel ) q are the qth feature channels of the output features of the two modules respectively, CS q is the cosine similarity between the output features corresponding to the qth feature channel.

[0096] Then, the weight coefficient is obtained through the Sigmoid function and multiplied with the output features of the superpixel-level graph attention module and the pixel-level convolution module respectively to update the output feature matrix:

[0097] WCoE q =Sigmoid(CS q (H superpixel ,H pixel ))

[0098] (H' superpixel ) q =(H superpixel ) q WCoE q

[0099] (H' pixel ) q =(H pixel ) q WCoE q

[0100] In the formula, WCoe q The weight coefficient assigned to the qth feature channel, H′ superpixel and H' pixel They represent the output features of the updated superpixel graph attention module and pixel-level convolution module respectively.

[0101] Finally, different weights are assigned to the updated output features of the two modules to obtain the final fused feature map:

[0102] H fusion = l·H' pixel +(1-l)·H′ superpixel

[0103] In the formula, H fusion represents the final fused feature map, and λ is the weight assigned to the pixel-level convolution module.

[0104] (6) In order to achieve efficient background reconstruction, a lightweight decoder that is asymmetric to the encoder is used. The asymmetric decoder consists of two convolutional layers, using 2D convolution operations with a kernel size of 3×3 and a stride of 1. Batch normalization and ReLU activation functions are used after the first convolution operation to improve the stability of the training process. The use of consecutive convolutional layers can gradually refine the feature expression and better reconstruct the background.

[0105] (7) Use the root mean square error to constrain the background reconstruction network and use the reconstruction error for anomaly detection:

[0106]

[0107] Where, L MSE is the root mean square error, which is used to measure x c and The difference between. N is the total number of pixels, x c and Denote the feature vector of the cth pixel in the original hyperspectral image to be detected and the reconstructed hyperspectral image respectively. c Represents the reconstruction error, which is used to measure the probability that the cth pixel is an abnormality.

[0108] The following comparative tests are performed to verify the beneficial effects of the present invention.

[0109] This embodiment uses four hyperspectral data sets, Pavia, Coast, Cri and Reno, as anomaly detection data sets to verify the effectiveness of the model. The Pavia data set was acquired by the Reflection Optical System Imaging Spectrometer (ROSIS) sensor over the city of Pavia in northern Italy. The data size is 108×120 pixels, the spatial resolution is 1.3 meters, and the spectral range is 430-860nm. After removing the low signal-to-noise ratio bands and water vapor absorption bands, 102 bands remain. The abnormal targets are vehicles and piers on the bridge, containing 43 abnormal pixels. The Coast data set was acquired by the Airborne Visible Infrared Imaging Spectrometer (AVIRIS) sensor on the coast of Texas, USA. The data size is 100×100 pixels, the spatial resolution is 17.2 meters, the spectral range is 450-1350nm, and it contains 207 bands. The abnormal target is a building, containing 155 abnormal pixels. The Cri dataset was acquired by Nuance's Cri hyperspectral imager. The data size is 400×400 pixels, the spectral range is 650-1100nm, and it contains 46 bands. The abnormal target is a stone, and it contains 1254 abnormal pixels. The Reno dataset was acquired by the ProSpecTIR DUAL sensor in an urban area of ​​Reno, Nevada, USA. The data size is 250×100 pixels, the spatial resolution is less than 2 meters, and it contains 356 bands. The abnormal target is a vehicle, and it contains 214 abnormal pixels.

[0110] The present invention uses classic RX (method 1), collaborative representation detector CRD (method 2), integrated feature extraction and background purification detector FEBPAD (method 3), two-step generalized likelihood ratio test 2S-GLRT (method 4), automatic hyperspectral anomaly detection method Auto-AD based on fully convolutional autoencoder (method 5), pixel shuffling downsampling blind spot reconstruction network PDBSNet (method 6) and the present invention method for comparison to prove the effectiveness of the present invention.

[0111] Anomaly detection evaluation indicators: Two quantitative evaluation indicators are used, namely the area under the receiver operating curve (AUC) and running time. The evaluation indicators used are as follows:

[0112] (1) AUC value:

[0113] AUC is an authoritative evaluation index for anomaly detection problems, obtained through calculus operations. The most typical one is that different thresholds obtain different detection rates (Pd) and false alarm rates (Pf). The area under the curve AUC, with the false alarm rate as the horizontal axis and the detection rate as the vertical axis, is used to measure the overall performance of the detection. The higher the value, the better the overall detection result. The indicator calculation method is as follows:

[0114]

[0115] Among them, N d is the number of abnormal pixels detected correctly, N t is the number of true abnormal pixels, N f is the number of falsely detected pixels, N all is the number of all pixels.

[0116] (2) Running time:

[0117] The runtime of a model is a key evaluation metric to measure its computational efficiency and speed. Having an efficient runtime is particularly important in real-time applications. The lower the runtime, the more efficient the model.

[0118] In this experiment, the AUC value is used to evaluate the detection ability of methods 1 to 6 and the method of the present invention, and the running time is used to evaluate the computational efficiency of methods 1 to 6 and the method of the present invention. The AUC values ​​are shown in Table 1, and the running time is shown in Table 2.

[0119] Table 1 Comparative experimental results 1

[0120]

[0121] As can be seen from Table 1, the method of the present invention can obtain a higher AUC value, indicating that the method of the present invention has a better overall detection effect.

[0122] Table 2 Comparative experimental results 2

[0123]

[0124] Table 2 shows the running time of the machine learning-based methods (methods 1-4), deep learning-based methods (methods 5-6) and the method of the present invention on four data sets. The method of the present invention is competitive in terms of running efficiency.

[0125] See also Figure 2 , Figure 2 4 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: a hyperspectral image anomaly detection device 401 based on anomaly suppression encoder, a processor 402 and a storage device 403.

[0126] A hyperspectral image anomaly detection device 401 based on anomaly suppression encoder: The hyperspectral image anomaly detection device 401 based on anomaly suppression encoder implements the hyperspectral image anomaly detection method based on anomaly suppression encoder.

[0127] Processor 402: The processor 402 loads and executes instructions and data in the storage device 403 to implement the hyperspectral image anomaly detection method based on anomaly suppression encoder.

[0128] Storage device 403: The storage device 403 stores instructions and data; the storage device 403 is used to implement the hyperspectral image anomaly detection method based on anomaly suppression encoder.

[0129] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

[0130] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

Claims

1. A hyperspectral image anomaly detection method based on anomaly suppression encoder, the method includes a channel interaction module, a superpixel level graph attention module, a pixel level convolution module, and an adaptive feature selection module, specifically including the following steps: S1: Get the hyperspectral remote sensing image X to be detected h,w,b , where h, w, and b represent the length, width, and number of channels of the hyperspectral remote sensing image to be detected, respectively; S2: The hyperspectral remote sensing image to be detected X h,w,b Input channel interaction module to perform spectral dimension reduction processing; S3: Hyperspectral image obtained after dimensionality reduction Perform superpixel segmentation processing, and then use the superpixel level graph attention module to extract superpixel level features. m represents the number of channels of the hyperspectral remote sensing image after dimensionality reduction processing; S4: The hyperspectral image obtained after dimensionality reduction Input pixel-level convolution module to achieve pixel-level feature extraction; S5: using an adaptive feature selection module to select features from the superpixel-level features and pixel-level features obtained in step S3 and step S4, and concatenating the selected features to achieve feature encoding based on abnormality suppression; S6: input the feature code obtained in step S5 into the asymmetric decoder to realize background reconstruction, and obtain the reconstruction result of the image to be detected; S7: Based on the hyperspectral image X to be detected h,w,b And its reconstruction results, the channel interaction module, anomaly suppression encoder and asymmetric decoder are trained using the root mean square error to obtain the background reconstruction network, and the reconstruction error of the background reconstruction network is used to perform anomaly detection on the hyperspectral remote sensing image to be detected. Among them, the anomaly suppression encoder includes a superpixel-level graph attention module, a pixel-level convolution module, and an adaptive feature selection module.

2. The method for anomaly detection of hyperspectral images based on anomaly suppression encoder according to claim 1, wherein in step S2, the channel interaction module is composed of a batch normalization layer, a 1×1 convolution layer, and a LeakyReLU activation layer; the hyperspectral remote sensing image to be detected X h,w,b After entering the channel interaction module: In the formula, is the output feature map, i.e., the hyperspectral image after dimensionality reduction; h, w, m represent the length, width, and number of channels of the output feature map, respectively; K i,j,b,m is the convolution kernel of the input feature map of row i, column j, channel b. The number of convolution kernels is the same as the number of channels of the output feature map, that is, m; B i,j,b,m represents the bias of the convolution, and s(×) represents the activation function.

3. According to the method for anomaly detection of hyperspectral images based on anomaly suppression encoder as claimed in claim 1, in step S3, a simple linear iterative clustering algorithm is used to perform superpixel segmentation processing, each superpixel is used as a node of the graph, and a superpixel-level graph is constructed; all node features are stacked in the column direction to form a feature matrix V: In the formula, Flatten(×) represents the hyperspectral image after dimensionality reduction Flatten according to the spatial dimension to obtain a two-dimensional data matrix express The i-th pixel in S j represents the jth superpixel; Q i,j is the incidence matrix Q h′w,M The element value of the i-th row and j-th column indicates whether the i-th pixel belongs to the j-th superpixel, and M represents the number of superpixels; is the column-by-column normalized Q h′w,M , the superscript T indicates transpose.

4. In the method for anomaly detection of hyperspectral images based on anomaly suppression encoder according to claim 1, in step S3, the specific implementation process of extracting superpixel features using the superpixel-level graph attention module is as follows: First, the features of the input superpixel graph are shared linearly transformed, and the graph attention mechanism is used to aggregate the neighbor node information to obtain the current node embedding to better learn the spatial features. The attention mechanism using shared parameters between nodes is used to calculate the attention coefficient between adjacent nodes j and node i: e ij =sam(Wh i ,Wh j ) In the formula, e ij represents the attention coefficient between node j and node i, W represents the weight matrix, F is the number of features in each input node, F' is the number of features in each new output node, sam(×) represents the shared attention mechanism for calculating the attention coefficient between node i and node j; h i ,h j Represent the characteristics of node i and node j respectively; The attention coefficient is only valid between a node and its neighbor nodes. The shared attention mechanism sam(×) can be obtained by the weight vector Combined with the nonlinear function LeakyReLU, the attention coefficient e ij It can be expressed as LeakyReLU(b T W i W j ), use the softmax function to normalize the attention coefficient: In the formula, a ij Represents the normalized attention coefficient, N i represents the neighborhood of node i, k represents the nodes in the neighborhood, and h k Represents the node features in the neighborhood, || is a concatenation operation; In order to stabilize the learning process of node embedding, multi-head attention is used to expand the shared attention mechanism to obtain the final output node features: Where D represents the number of executions of the multi-head attention mechanism. represents the normalized attention coefficient obtained from the dth execution, W k represents the weight matrix obtained by the d-th execution; Then, the final output features of each node are vector stacked to obtain super-pixel level features. Since the number of superpixels M is inconsistent with the number of pixels h′w of the hyperspectral remote sensing image to be detected, the dimensions of the superpixel-level features and the pixel-level features output by the pixel-level convolution module are inconsistent. In order to achieve comparison and operation between the two, the superpixel-level features are transformed: In the formula, H superpixel represents the superpixel-level features finally output by the superpixel-level graph attention module, and Reshape(×) represents the spatial dimension of the restored data.

5. A method for anomaly detection of hyperspectral images based on anomaly suppression encoder as claimed in claim 1, wherein in step S4, the pixel-level convolution module is composed of two convolution residual blocks, each convolution residual block includes two upper and lower branches, the lower branch performs a residual connection between the data of the input convolution residual block and the features obtained by the upper branch to supplement the detail features; batch normalization is used after each convolution operation to accelerate training, and a ReLU activation function is used to extract nonlinear features; pixel-level features are obtained through the output of the convolution residual block: In the formula, H pixel represents the pixel-level features output by the pixel-level convolution module, Y represents the output of the first residual block; F(·) is the residual map, and are the additional weights for the first residual block and the second residual block, respectively.

6. According to the method for anomaly detection of hyperspectral images based on anomaly suppression encoder as claimed in claim 5, in step S5, the feature encoding process based on anomaly suppression is realized by using an adaptive feature selection module: First, the cosine similarity is used to measure the similarity between the output features of the superpixel-level graph attention module and the pixel-level convolution module: In the formula, H superpixel and H pixel They are the super-pixel-level features finally output by the super-pixel-level graph attention module and the pixel-level features output by the pixel-level convolution module, respectively. superpixel ) q and (H pixel ) q are the qth feature channels of the output features of the two modules respectively, CS q is the cosine similarity between the output features corresponding to the qth feature channel; Then, the weight coefficient is obtained through the Sigmoid function and multiplied with the output features of the superpixel-level graph attention module and the pixel-level convolution module respectively to update the output feature matrix: WCoe q =Sigmoid(CS q (H superpixel ,H pixel )) (H s ' uperpixel ) q =(H superpixel ) q WCoe q (H' pixel ) q =(H pixel ) q WCoe q In the formula, WCoe q The weight coefficient assigned to the qth feature channel, H' superpixel and H' pixel Respectively represent the output features of the updated superpixel graph attention module and pixel-level convolution module; Finally, different weights are assigned to the updated output features of the superpixel-level attention module and the pixel-level convolution module to obtain the final fused feature map: H fusion =l×H' pixel +(1-l)×H' superpixel In the formula, H fusion represents the final fused feature map, and λ is the weight assigned to the pixel-level convolution module.

7. In the method for anomaly detection of hyperspectral images based on anomaly suppression encoder as described in claim 1, in step S6, the asymmetric decoder consists of two convolutional layers, and batch normalization and ReLU activation function are used after the first convolution operation to improve the stability of the training process; the use of continuous convolutional layers can gradually refine the feature expression and better reconstruct the background; the asymmetric decoder adopts a lightweight structure that is asymmetric to the anomaly suppression encoder, which can improve the efficiency of background reconstruction.

8. In the method for anomaly detection of hyperspectral images based on anomaly suppression encoder according to claim 1, in step S7, the root mean square error and the reconstruction error are respectively: Where, L MSE is the root mean square error, which is used to measure x c and The difference between; N is the total number of pixels, x c and Denote the feature vector of the cth pixel in the original hyperspectral image to be detected and the reconstructed hyperspectral image respectively; D c Represents the reconstruction error, which is used to measure the probability that the c-th pixel is an abnormality.

9. A storage device, characterized in that: The storage device stores instructions and data for implementing the hyperspectral image anomaly detection method based on anomaly suppression encoder as described in any one of claims 1 to 8.

10. A hyperspectral image anomaly detection device based on an anomaly suppression encoder, characterized in that: include: A processor and a storage device; the processor loads and executes instructions and data in the storage device to implement the hyperspectral image anomaly detection method based on anomaly suppression encoder as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Hyperspectral image anomaly detection method and device, electronic terminal and storage medium

    CN119206507A

  • Hyperspectral remote sensing image abnormal target detection method based on double-decoder double-Transform background enhancement reconstruction network

    CN119810666A

  • Photoelectric chip anomaly detection method and device based on reconstruction and computing equipment

    CN121527431A