Hyperspectral image anomaly detection method based on anomaly suppression encoder

By employing an anomaly suppression encoder method, combined with convolutional neural networks and graph attention networks, superpixel-level and pixel-level features of hyperspectral images are extracted. Cosine similarity is used to select deep features, which solves the problem of poor feature extraction performance in existing technologies and achieves more efficient anomaly detection in hyperspectral images.

CN118941962BActive Publication Date: 2026-11-20CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing hyperspectral anomaly detection methods fail to fully exploit the complex structural information and connections between irregular ground features in hyperspectral images, resulting in poor feature extraction performance and reduced separability between background and anomalies in reconstruction errors.

Method used

An anomaly suppression encoder-based approach is adopted, which extracts superpixel and pixel-level features through convolutional neural networks and graph attention networks, selects deep features by combining cosine similarity, reconstructs the background using an asymmetric decoder, and performs anomaly detection based on the reconstruction error.

Benefits of technology

It improves the performance of anomaly detection in hyperspectral images by suppressing the interference of anomalies on background reconstruction, thus achieving more accurate anomaly detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941962B_ABST
    Figure CN118941962B_ABST
Patent Text Reader

Abstract

The application provides a hyperspectral image anomaly detection method based on an anomaly suppression encoder, and relates to the technical field of remote sensing image processing.The method extracts pixel-level and superpixel-level features of a hyperspectral image through a convolutional neural network and a graph attention network, retains feature differences within superpixels while extracting superpixel-level features, and selects deep features by weighting according to the differences between the superpixel-level features and the pixel-level features of the background and the anomaly, so as to suppress the interference of the anomaly on the background reconstruction, finally realizes efficient background reconstruction through an asymmetric decoder, and realizes anomaly detection according to the reconstruction error.The beneficial effects of the application are that the superpixel internal features are extracted through the combination of the convolutional neural network and the graph attention network, the spectral feature extraction effect is improved, the interference of the anomaly on the background reconstruction is reduced through the design of the adaptive selection module, and the anomaly detection effect based on the reconstruction error is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing image processing technology, and in particular relates to a method for anomaly detection in hyperspectral images based on an anomaly suppression encoder. Background Technology

[0002] Hyperspectral sensors can simultaneously capture the spectral and spatial information of ground objects, forming hyperspectral images. Hyperspectral images typically contain hundreds or even thousands of spectral bands, providing very detailed spectral information. Therefore, hyperspectral images are advantageous for distinguishing different ground targets with spectral differences, offering a unique advantage for hyperspectral anomaly detection tasks. Hyperspectral anomaly detection does not rely on prior knowledge of the target or background, focusing instead on detecting anomalous targets that differ from the background. In recent years, hyperspectral anomaly detection has become a rapidly developing research area and has been successfully applied in many fields such as oil spill detection, civilian rescue, and military reconnaissance.

[0003] In recent years, deep learning methods have attracted increasing attention in the field of anomaly detection due to their powerful feature mining and utilization capabilities in complex scenes. Many autoencoder-based hyperspectral anomaly detection methods 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 neglect the feature encoding differences between anomalies and the background, leading to reduced separability between the background and anomalies in reconstruction errors. Furthermore, existing research typically only considers regular data structures, failing to fully exploit the complex structural information and relationships between irregular landforms in hyperspectral images, resulting in poor feature extraction performance. Therefore, it is necessary to design a hyperspectral image anomaly detection method that can effectively extract the spatial-spectral features of landforms while simultaneously mining the differences between background and anomaly features to improve anomaly detection performance. Summary of the Invention

[0004] To address the problem of insufficient feature extraction in existing technologies due to the lack of exploration of the complex structural information and relationships between irregular landforms in hyperspectral images, this invention provides an efficient hyperspectral image anomaly detection method based on an anomaly suppression encoder. This method comprehensively considers landform features from both superpixel and pixel-level perspectives. It extracts spatial-spectral features from irregular regions using convolutional neural networks and graph attention networks. Based on the differences between background and anomalies in superpixel-level and pixel-level features, it selects deep features using cosine similarity, thereby suppressing the interference of anomalies on background reconstruction. An asymmetric decoder achieves efficient background reconstruction, and anomaly detection is performed based on the reconstruction error. This method can preserve feature differences within superpixels while extracting superpixel-level features, improving spatial-spectral feature extraction performance. Furthermore, adaptive feature selection reduces the interference of anomalies on background reconstruction, thus better accomplishing the task of hyperspectral image anomaly detection.

[0005] An anomaly detection method for hyperspectral images based on an anomaly suppression encoder is proposed. This method includes a channel interaction module, a superpixel-level image 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 at each point in the tensor represents the pixel radiance value corresponding to each band. The method is applied to the hyperspectral remote sensing image to be detected. Perform the following operations: S1: Acquire the hyperspectral remote sensing image to be detected ,in These 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... The input channel interaction module performs spectral dimensionality reduction processing. S3: The hyperspectral image obtained after dimensionality reduction processing Superpixel segmentation is performed, followed by superpixel-level feature extraction using a superpixel-level graph attention module. This represents the number of channels in the hyperspectral remote sensing image after dimensionality reduction. S4: The hyperspectral image obtained after dimensionality reduction. Input a pixel-level convolutional module to achieve pixel-level feature extraction; S5: For the superpixel-level features and pixel-level features obtained in steps S3 and S4, use the adaptive feature selection module to perform feature selection, and concatenate the selected features to achieve feature encoding based on anomaly suppression. S6: Input the feature code obtained in step S5 into the asymmetric decoder to reconstruct the background and obtain the reconstruction result of the image to be detected; S7: Based on the hyperspectral image to be detected The reconstruction results are used to train the channel interaction module, anomaly suppression encoder, and asymmetric decoder using the root mean square error to obtain the background reconstruction network. The reconstruction error is then used to perform anomaly detection on the hyperspectral remote sensing image to be detected. The anomaly suppression encoder includes a superpixel-level image attention module, a pixel-level convolution module, and an adaptive feature selection module.

[0006] Furthermore, in step S2, the channel interaction module consists of a batch processing normalization layer and 1 Composed of 1 convolutional layer and LeakyReLU activation layer; the hyperspectral remote sensing image to be detected. After entering the channel interaction module:

[0007] In the formula, The output feature map is the dimensionality-reduced hyperspectral image. These represent the length, width, and number of channels of the output feature map, respectively. For the first line, number Columns, channels The convolution kernels for the input feature maps are such that the number of convolution kernels is the same as the number of channels in the output feature maps. ; This represents the bias of the convolution. This represents the activation function.

[0008] Furthermore, in step S3, a simple linear iterative clustering algorithm is used for superpixel segmentation, treating each superpixel as a node in the graph to construct a superpixel-level graph. All node feature columns are stacked to form a feature matrix. :

[0009]

[0010]

[0011] In the formula, This indicates the dimensionality-reduced hyperspectral image. Flattening the data according to its spatial dimensions yields a two-dimensional data matrix. ; express The Middle 1 pixel, Indicates the first One superpixel; It is an incidence matrix No. Line 1 The element value of the column represents the first element. Does the pixel belong to the ? One superpixel, M Indicates the number of superpixels; For column-by-column normalization superscript T This indicates transpose.

[0012] Furthermore, in step S3, the specific implementation process of superpixel-level feature extraction using the superpixel-level graph attention module is as follows: First, a shared linear transformation is applied to the features of the input superpixel-level image. Then, a graph attention mechanism is applied to aggregate neighbor node information to obtain the current node embedding, thereby better learning spatial features. A parameter-sharing attention mechanism between nodes is used to compute neighbor node information. With nodes Attention coefficient between:

[0013] In the formula, Represents a node With nodes Attention coefficient between them Represents the weight matrix. , The number of features in each input node, To output the number of features in each new node, Represents a computing node and nodes The shared attention mechanism among attention coefficients; Representing nodes respectively and nodes Its characteristics.

[0014] Attention coefficients are only effective between a node and its neighboring nodes; shared attention mechanism. It can be derived from the weight vector This is combined with the specific implementation of the nonlinear function LeakyReLU, namely the attention coefficient. It can be represented as The attention coefficients are normalized using the softmax function.

[0015] In the formula, This represents the attention coefficient after normalization. Represents a node The neighborhood, k Represents the nodes in the neighborhood. Represents the characteristics of nodes in the neighborhood. This is a series operation.

[0016] To stabilize the node embedding learning process, multi-head attention is used to extend the mechanism, resulting in the final output node features.

[0017] In the formula, D This indicates the number of times the multi-head attention mechanism is executed. Indicates the first d The normalized attention coefficients obtained from the first execution. Indicates the first d The weight matrix obtained from the next execution.

[0018] Subsequently, vectors are stacked based on the final output features of each node to obtain superpixel-level features. Due to the number of superpixels M The number of pixels in the hyperspectral remote sensing image to be detected The superpixel-level features and the pixel-level features output by the pixel-level convolutional module are inconsistent in dimension; to enable comparison and computation between the two, the superpixel-level features need to be transformed:

[0019] In the formula, This represents the superpixel-level features that are ultimately output by the superpixel-level graph attention module. Indicates the spatial dimension of the recovered data.

[0020] Further, in step S4, the pixel-level convolutional module consists of two convolutional residual blocks. Each convolutional residual block includes upper and lower branches. The lower branch performs a residual connection between the data input to the convolutional residual block and the features obtained from the upper branch to supplement detailed features. Batch normalization is used after each convolutional operation to accelerate training, and the ReLU activation function is used to extract non-linear features. Pixel-level features are obtained through the output of the convolutional residual block.

[0021]

[0022] In the formula, This represents the pixel-level features output by the pixel-level convolution module. This represents the output of the first residual block; For residual mapping, , and , These are the additional weights for the first and second residual blocks, respectively.

[0023] Furthermore, in step S5, the feature encoding process based on anomaly suppression is implemented using the adaptive feature selection module as follows: First, 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:

[0024] In the formula, and These are the features output by the superpixel-level graph attention module and the pixel-level convolution module, respectively. and The first feature output by each of the two modules is the first. q Each feature channel For the first q Cosine similarity between the output features corresponding to each feature channel.

[0025] Then, the weight coefficients are obtained through the Sigmoid function and multiplied by the output features of the superpixel-level image attention module and the pixel-level convolution module, respectively, to update the output feature matrix:

[0026]

[0027]

[0028] In the formula, For the first q The weight coefficients assigned to each feature channel and These represent the output features of the updated superpixel map attention module and the pixel-level convolution module, respectively.

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

[0030] In the formula, This represents the final fused feature map. The weights assigned to the pixel-level convolutional modules.

[0031] Furthermore, in step S6, the asymmetric decoder consists of two convolutional layers. Batch normalization and ReLU activation function are used after the first convolutional operation to improve the stability of the training process. Using consecutive convolutional layers can gradually refine the feature representation and better reconstruct the background. The decoder adopts a lightweight structure that is asymmetric to the encoder, which can improve the efficiency of background reconstruction.

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

[0033]

[0034] In the formula, L MSE Root mean square error is used to measure... and The differences between them; This represents the total number of pixels. and Representing the original hyperspectral image to be detected and the reconstructed hyperspectral image respectively, the first... Feature vector of 1 pixel; Represents the reconstruction error, used to measure the first... The probability that a pixel is an anomaly.

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

[0036] A hyperspectral image anomaly detection device based on an anomaly suppression encoder includes: 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.

[0037] The beneficial effects of the technical solution provided by this invention are as follows: This invention extracts pixel-level and superpixel-level features from hyperspectral images using convolutional neural networks and graph attention networks, respectively. While extracting superpixel-level features, it retains the feature differences within superpixels. Based on the differences between background and anomalies in superpixel-level and pixel-level features, it uses cosine similarity to perform weighted selection of deep 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, an efficient background reconstruction is achieved through an asymmetric decoder, and efficient hyperspectral image anomaly detection is achieved based on accurate reconstruction errors. Attached Figure Description

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

[0039] Figure 2 This is a schematic diagram of the hardware device working in an embodiment of the present invention. Detailed Implementation

[0040] The following is combined Figure 1 The specific embodiments of the present invention will be further described in detail below.

[0041] The key invention is a proposed method for anomaly detection in hyperspectral images based on an anomaly suppression encoder. This method first uses a designed channel interaction module to perform spectral dimensionality reduction on the hyperspectral image to be detected. Then, it uses a designed anomaly suppression encoder to encode features of the hyperspectral image and employs an asymmetric decoder for background reconstruction. Based on the reconstruction error, the anomaly detection task in hyperspectral images can be effectively achieved.

[0042] This invention is specifically implemented using the Python language and the classic deep learning framework PyTORCH, with Python remote sensing image read / write functions as the foundation. It calls the data processing libraries NUMPY, SCIPY, and SPECTRAL, inputs the filename of the remote sensing image to be read, and the image is read into a tensor. Each element in the tensor represents the pixel radiance value corresponding to each band. The Python remote sensing image read / write functions are well-known technologies in this field.

[0043] like Figure 1 As shown, a hyperspectral image anomaly detection method based on an anomaly suppression encoder includes the following steps: S1: Acquire the hyperspectral remote sensing image to be detected ,in These represent the image's length, width, and number of channels, respectively. S2: The hyperspectral remote sensing image to be detected... The input channel interaction module performs spectral dimensionality reduction processing. S3: The hyperspectral image obtained after dimensionality reduction processing Superpixel segmentation is performed, and then superpixel-level feature extraction is performed using a superpixel-level graph attention module. S4: The hyperspectral image obtained after dimensionality reduction. Input a pixel-level convolutional module to achieve pixel-level feature extraction; S5: For the superpixel-level features and pixel-level features obtained in steps S3 and S4, use the adaptive feature selection module to perform feature selection, and concatenate the selected features to achieve feature encoding based on anomaly suppression. S6: Input the feature code obtained in step S5 into the asymmetric decoder to reconstruct the background and obtain the reconstruction result of the image to be detected; S7: Based on the hyperspectral image to be detected The reconstruction results are used to train the channel interaction module, the anomaly suppression encoder, and the asymmetric decoder using the root mean square error to obtain the background reconstruction network. The reconstruction error of the background reconstruction network is then used to detect anomalies in the hyperspectral remote sensing image to be detected.

[0044] The specific steps are as follows: (1) In order to reduce spectral redundancy in hyperspectral images, enhance the robustness of spectral features, and reduce computational costs, a channel interaction module was designed for spectral dimensionality reduction. The channel interaction module consists of a batch processing normalization layer, 1 It consists of one convolutional layer and one LeakyReLU activation layer. The hyperspectral remote sensing image to be detected. After entering the channel interaction module:

[0045] In the formula, The output feature map is the dimensionality-reduced hyperspectral image. These represent the length, width, and number of channels of the output feature map, respectively. For the first line, number Columns, channels The convolution kernels for the input feature maps are the same as the number of channels in the output feature maps. . This represents the bias of the convolution. This represents the activation function.

[0046] (2) A simple linear iterative clustering algorithm is used to perform superpixel segmentation on the hyperspectral image, with each superpixel serving as a node in the graph to construct a superpixel-level graph. All node feature columns are stacked to form a feature matrix. :

[0047]

[0048]

[0049] In the formula, This indicates the hyperspectral image after dimensionality reduction. Flattening the data according to the spatial dimension yields a two-dimensional data matrix. ; express The Middle 1 pixel, Indicates the first One superpixel; It is an incidence matrix No. Line 1 The element value of the column represents the first element. Does the pixel belong to the ? One superpixel, M Indicates the number of superpixels; For column-by-column normalization superscript T This indicates transpose.

[0050] (3) Superpixel-level feature extraction using a superpixel-level graph attention module: First, a shared linear transformation is applied to the features of the input superpixel-level image. Then, a graph attention mechanism is applied to aggregate neighbor node information to obtain the current node embedding, thereby better learning spatial features. The attention mechanism, which shares parameters among nodes, is used to compute neighbor node information. With nodes Attention coefficient between

[0051] In the formula, Represents a node With nodes Attention coefficient between them Represents the weight matrix. , The number of features in each input node, To output the number of features in each new node, Represents a computing node and nodes The shared attention mechanism among attention coefficients; Representing nodes respectively and nodes Its characteristics.

[0052] Attention coefficients are only effective between a node and its neighboring nodes; shared attention mechanism. It can be derived from the weight vector Combined with the specific implementation of the nonlinear function LeakyReLU, namely the attention coefficient It can be represented as The attention coefficients are normalized using the softmax function.

[0053] In the formula, This represents the attention coefficient after normalization. Represents a node The neighborhood, k Represents the nodes in the neighborhood. Represents the characteristics of nodes in the neighborhood. This is a series operation.

[0054] To stabilize the node embedding learning process, multi-head attention is used to extend the mechanism, resulting in the final output node features:

[0055] in, D This indicates the number of times the multi-head attention mechanism is executed. Indicates the first d The normalized attention coefficients obtained from the first execution. Indicates the first d The weight matrix obtained from the next execution.

[0056] Subsequently, vectors are stacked based on the final output features of each node to obtain superpixel-level features. Due to the number of superpixels M The number of pixels in the hyperspectral image to be detected The superpixel-level features and the pixel-level features output by the pixel-level convolutional module are inconsistent in dimension. To enable comparison and computation between the two, the superpixel-level features need to be transformed.

[0057] In the formula, This represents the superpixel-level features that are ultimately output by the superpixel-level graph attention module. This indicates the spatial dimension of the recovered data.

[0058] (4) In order to fully extract pixel-level features from hyperspectral images, a pixel-level convolution module is designed. The pixel-level convolution module consists of two convolutional residual blocks. Each convolutional residual block includes two branches, an upper branch and an lower branch. The upper branch uses two kernels with a size of 1. 7. 1D convolution operation with stride of 1, the next branch uses a kernel with a kernel size of 1. 1. 1D convolution operation with a stride of 1. The lower branch performs a residual concatenation between the input convolutional residual block and the features obtained from the upper branch to supplement detailed features. Batch normalization is used after each convolution operation to accelerate training, and the ReLU activation function is used to extract non-linear features. Pixel-level features are obtained through the output of the convolutional residual block.

[0059]

[0060] In the formula, This represents the pixel-level features output by the pixel-level convolution module. This represents the output of the first residual block; For residual mapping, , and , These are the additional weights for the first and second residual blocks, respectively.

[0061] (5) To reduce the interference of anomalies on background reconstruction, an adaptive feature selection module is designed to implement feature encoding based on anomaly suppression: First, 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:

[0062] In the formula, and These are the features output by the superpixel-level graph attention module and the pixel-level convolution module, respectively. and The first feature output by each of the two modules is the first. q Each feature channel For the first q Cosine similarity between the output features corresponding to each feature channel.

[0063] Then, the weight coefficients are obtained through the Sigmoid function and multiplied by the output features of the superpixel-level image attention module and the pixel-level convolution module, respectively, to update the output feature matrix:

[0064]

[0065]

[0066] In the formula, For the first q The weight coefficients assigned to each feature channel and These represent the output features of the updated superpixel map attention module and the pixel-level convolution module, respectively.

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

[0068] In the formula, This represents the final fused feature map. The weights assigned to the pixel-level convolutional modules.

[0069] (6) To achieve efficient background reconstruction, a lightweight decoder with asymmetric structure to the encoder is adopted. The asymmetric decoder consists of two convolutional layers with a kernel size of 3. 3. 2D convolution operations with a stride of 1, where batch normalization and ReLU activation are used after the first convolution operation to improve the stability of the training process. Using successive convolutional layers allows for progressively refined feature representation and better reconstruction of the background.

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

[0071]

[0072] In the formula, L MSE Root mean square error is used to measure... and The differences between them. This represents the total number of pixels. and Representing the original hyperspectral image to be detected and the reconstructed hyperspectral image respectively, the first... The feature vector of each pixel. Represents the reconstruction error, used to measure the first... The probability that a pixel is an anomaly.

[0073] The following comparative experiments will verify the beneficial effects of the present invention. This embodiment uses four hyperspectral datasets—Pavia, Coast, Cri, and Reno—as anomaly detection datasets to validate the model's effectiveness. The Pavia dataset was acquired by the Reflection Optical System Imaging Spectroradiometer (ROSIS) sensor over the city of Pavia in northern Italy, and its size is 108. The dataset contains 120 pixels with a spatial resolution of 1.3 meters and a spectral range of 430-860 nm. After removing low signal-to-noise ratio bands and water vapor absorption bands, 102 bands remain. Anomalous targets are vehicles and piers on the bridge, comprising 43 anomalous pixels. The Coast dataset was acquired by the Airborne Visible Infrared Imaging Spectroradiometer (AVIRIS) sensor off the coast of Texas, USA, and is 100 pixels in size. The dataset contains 100 pixels, with a spatial resolution of 17.2 meters and a spectral range of 450-1350 nm, encompassing 207 bands. The anomalous target is a building, containing 155 anomalous pixels. The Cri dataset was acquired by the Nuance Cri hyperspectral imager and is 400 MB in size. The dataset contains 400 pixels, with a spectral range of 650-1100 nm, and includes 46 bands. The anomalous target is a pebble, containing 1254 anomalous pixels. The Reno dataset was acquired by the ProSpecTIR DUAL sensor in a suburb of Reno, Nevada, USA, and the data size is 250. 100 pixels, spatial resolution less than 2 meters, containing 356 bands. The anomalous target is a vehicle, containing 214 anomalous pixels.

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

[0075] Anomaly detection evaluation metrics: Two quantitative evaluation metrics were used: the area under the receiver operating characteristic (AUC) and runtime. The evaluation metrics used are as follows: (1) AUC value: AUC is an authoritative metric for evaluating anomaly detection problems, derived through calculus. A typical example is the use of different thresholds to achieve different detection rates. Pd ) and false alarm rate ( Pf The area under the curve is plotted with the false alarm rate on the x-axis and the detection rate on the y-axis. This value is used to measure the overall performance of the test; a higher value indicates a better overall test result. The calculation method for this indicator is as follows:

[0076]

[0077]

[0078] in, This is the number of correctly detected abnormal pixels. This is the actual number of abnormal pixels. It is the number of pixels detected for errors. It represents the total number of pixels.

[0079] (2) Running time: Model runtime is a key metric for evaluating computational efficiency and speed. In real-time applications, an efficient runtime is especially important. The shorter the runtime, the more efficient the model.

[0080] In this experiment, the following methods were used: The detection capabilities of methods 1-6 and the method of the present invention are evaluated using numerical values, while the computational efficiency of methods 1-6 and the method of the present invention is evaluated using runtime. The values ​​are shown in Table 1, and the running time is shown in Table 2.

[0081] Table 1 Comparative Experiment Results 1

[0082] As can be seen from Table 1, the method of the present invention can achieve higher yields. The value indicates that the method of the present invention has a better overall detection effect.

[0083] Table 2 Comparison of experimental results 2

[0084] Table 2 shows the runtime of machine learning-based methods (methods 1-4), deep learning-based methods (methods 5-6), and the method of this invention on four datasets. The method of this invention is competitive in terms of runtime efficiency.

[0085] Please see Figure 2 , Figure 2 This is a schematic diagram of the hardware device in operation according to an embodiment of the present invention. The hardware device specifically includes: a hyperspectral image anomaly detection device 401 based on an anomaly suppression encoder, a processor 402, and a storage device 403.

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

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

[0088] 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 an anomaly suppression encoder.

[0089] 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 principles of the present invention should be included within the protection scope of the present invention.

[0090] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

Claims

1. A hyperspectral image anomaly detection method based on an anomaly suppression encoder, comprising a channel interaction module, a superpixel-level image attention module, a pixel-level convolution module, and an adaptive feature selection module, specifically including the following steps: S1: Acquire the hyperspectral remote sensing image to be detected ,in These 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... The input channel interaction module performs spectral dimensionality reduction processing. S3: The hyperspectral image obtained after dimensionality reduction processing Superpixel segmentation is performed, followed by superpixel-level feature extraction using a superpixel-level graph attention module. This represents the number of channels in the hyperspectral remote sensing image after dimensionality reduction. In step S3, the specific implementation process of superpixel-level feature extraction using the superpixel-level graph attention module is as follows: First, a shared linear transformation is performed on the features of the input superpixel-level image. Then, a graph attention mechanism is applied to aggregate the information of neighboring nodes to obtain the current node embedding, so as to better learn the spatial features. The attention mechanism, which uses shared parameters between nodes, is used to compute neighboring nodes. With nodes Attention coefficient between: In the formula, Represents a node With nodes Attention coefficient between them Represents the weight matrix. , The number of features in each input node, To output the number of features in each new node, Represents a computing node and nodes The shared attention mechanism among attention coefficients; Representing nodes respectively and nodes Features; Attention coefficients are only effective between a node and its neighboring nodes; shared attention mechanism. It can be derived from the weight vector This is combined with the specific implementation of the nonlinear function LeakyReLU, namely the attention coefficient. Represented as The attention coefficients are normalized using the softmax function. In the formula, This represents the attention coefficient after normalization. Represents a node The neighborhood, k Represents the nodes in the neighborhood. Represents the characteristics of nodes in the neighborhood. This is a cascade operation; To stabilize the node embedding learning process, multi-head attention is used to extend the shared attention mechanism, resulting in the final output node features: In the formula, D This indicates the number of times the multi-head attention mechanism is executed. Indicates the first d The normalized attention coefficients obtained from the first execution. Indicates the first d The weight matrix obtained from the next execution; Subsequently, vectors are stacked based on the final output features of each node to obtain superpixel-level features. Due to the number of superpixels M The number of pixels in the hyperspectral remote sensing image to be detected The superpixel-level features and the pixel-level features output by the pixel-level convolutional module are inconsistent in dimension. To enable comparison and computation between the two, the superpixel-level features are transformed: In the formula, This represents the superpixel-level features that are ultimately output by the superpixel-level graph attention module. Indicates the spatial dimension of the recovered data; Represents the incidence matrix; S4: The hyperspectral image obtained after dimensionality reduction. Input a pixel-level convolutional module to achieve pixel-level feature extraction; S5: For the superpixel-level features and pixel-level features obtained in steps S3 and S4, use the adaptive feature selection module to perform feature selection, and concatenate the selected features to achieve feature encoding based on anomaly suppression. S6: Input the feature code obtained in step S5 into the asymmetric decoder to reconstruct the background and obtain the reconstruction result of the image to be detected; S7: Based on the hyperspectral image to be detected The reconstruction results are used to train the channel interaction module, the anomaly suppression encoder, and the asymmetric decoder using the root mean square error to obtain the background reconstruction network. The reconstruction error of the background reconstruction network is used to detect anomalies in the hyperspectral remote sensing image to be detected. The anomaly suppression encoder includes a superpixel-level graph attention module, a pixel-level convolution module, and an adaptive feature selection module.

2. In the hyperspectral image anomaly detection method based on an anomaly suppression encoder as described in claim 1, in step S2, the channel interaction module consists of a batch processing normalization layer, 1 Composed of 1 convolutional layer and LeakyReLU activation layer; the hyperspectral remote sensing image to be detected. After entering the channel interaction module: In the formula, The output feature map is the dimensionality-reduced hyperspectral image; These represent the length, width, and number of channels of the output feature map, respectively. For the first line, number Columns, channels The convolution kernels for the input feature maps are such that the number of convolution kernels is the same as the number of channels in the output feature maps. ; This represents the bias of the convolution. This represents the activation function.

3. In the hyperspectral image anomaly detection method based on an anomaly suppression encoder as described in claim 1, in step S3, a simple linear iterative clustering algorithm is used for superpixel segmentation, with each superpixel treated as a node in the graph to construct a superpixel-level graph; all node feature columns are stacked in the direction of the feature matrix to form a feature matrix. : In the formula, This indicates the hyperspectral image after dimensionality reduction. Flattening the data according to the spatial dimension yields a two-dimensional data matrix. ; express The Middle 1 pixel, Indicates the first One superpixel; It is an incidence matrix No. Line number The element value of the column represents the first element. Does the pixel belong to the ? One superpixel, M Indicates the number of superpixels; For column-by-column normalization superscript T This indicates transpose.

4. In the hyperspectral image anomaly detection method based on an anomaly suppression encoder as described in claim 2, in step S4, the pixel-level convolutional module consists of two convolutional residual blocks. Each convolutional residual block includes upper and lower branches. The lower branch performs a residual connection between the data input to the convolutional residual block and the features obtained from the upper branch to supplement detailed 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 convolutional residual block. In the formula, This represents the pixel-level features output by the pixel-level convolution module. This represents the output of the first residual block; For residual mapping, , and , These are the additional weights for the first and second residual blocks, respectively.

5. In the hyperspectral image anomaly detection method based on anomaly suppression encoder as described in claim 4, step S5, the feature encoding process based on anomaly suppression using the adaptive feature selection module, is as follows: First, 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, and These are the superpixel-level features output by the superpixel-level graph attention module and the pixel-level features output by the pixel-level convolution module, respectively. and The first feature output by each of the two modules is the first. q Each feature channel For the first q Cosine similarity between the output features corresponding to each feature channel; Then, the weight coefficients are obtained through the Sigmoid function and multiplied by the output features of the superpixel-level image attention module and the pixel-level convolution module, respectively, to update the output feature matrix: In the formula, For the first q The weight coefficients assigned to each feature channel and These represent the output features of the updated superpixel map attention module and the pixel-level convolutional module, respectively. Finally, different weights are assigned to the updated output features of the superpixel-level map attention module and the pixel-level convolution module to obtain the final fused feature map: In the formula, This represents the final fused feature map. The weights assigned to the pixel-level convolutional modules.

6. In the hyperspectral image anomaly detection method based on an anomaly suppression encoder as described in claim 1, in step S6, the asymmetric decoder consists of two convolutional layers. Batch normalization and ReLU activation function are used after the first convolution operation to improve the stability of the training process. Using consecutive convolutional layers can gradually refine the feature representation 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.

7. In the hyperspectral image anomaly detection method based on an anomaly suppression encoder as described in claim 1, in step S7, the root mean square error and reconstruction error are respectively: In the formula, L MSE Root mean square error is used to measure... and The differences between them; This represents the total number of pixels. and Representing the original hyperspectral image to be detected and the reconstructed hyperspectral image respectively, the first... Feature vector of 1 pixel; Represents the reconstruction error, used to measure the first... The probability that a pixel is an anomaly.

8. 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 7.

9. 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 7.