Hyperspectral anomaly detection method and system based on global and local feature learning, and medium

Through the global and local feature learning methods, combined with convolutional layer, residual block, graph convolution module and memory matrix technology, a hyperspectral anomaly detection method is proposed, which solves the problem of limited detection accuracy in the existing technology and achieves a more efficient anomaly detection effect.

CN119919799AActive Publication Date: 2025-05-02XIDIAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411882606.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-02
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The existing hyperspectral anomaly detection methods have shortcomings in background modeling and feature extraction, resulting in limited detection accuracy, especially in complex backgrounds, it is difficult to effectively detect abnormal targets.

Method used

A hyperspectral anomaly detection method for global and local feature learning is proposed. The latent layer features are extracted through two convolutional layers, and the local and global features are extracted in combination with residual blocks and graph convolution modules. The low-rank representation features are further obtained through memory matrix and adaptive fusion technology, and the abnormality detection is finally performed by reconstructing hyperspectral data.

Benefits of technology

It improves the accuracy and generalization ability of hyperspectral anomaly detection, can more effectively mine local and global information of hyperspectral images, enhances the modeling ability of complex backgrounds, and significantly improves the detection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919799A_ABST
    Figure CN119919799A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a hyperspectral anomaly detection method and system based on global and local feature learning, and a medium. The method comprises the following steps: extracting latent layer features of hyperspectral data by using two convolutional layers; extracting local features through two residual blocks and one convolution operation after the latent layer features pass through a convolution layer; global average pooling is carried out on the hidden layer features to obtain down-sampling features, output features of a graph convolution module are obtained according to global information of the down-sampling features, and global features are obtained based on the output features of the graph convolution module; obtaining a low-rank representation feature based on a similar matrix between the latent layer feature and the memory matrix; obtaining fusion features according to the local features, the global features and the low-rank representation features; the fusion features pass through a convolution layer and then are subjected to convolution and batch normalization to obtain reconstructed hyperspectral data; a residual image is determined according to the difference value of the hyperspectral data and the reconstructed hyperspectral data, anomaly detection is carried out on the image to obtain a final two-dimensional detection graph, and the anomaly detection precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hyperspectral anomaly detection, and in particular to a hyperspectral anomaly detection method, system and medium based on global and local feature learning. Background Art

[0002] Hyperspectral images have rich spectral and spatial information. Each pixel has a continuous spectral curve. Based on this feature, hyperspectral image analysis can be widely used in mineral search, environmental monitoring, maritime search and rescue and other fields. Among them, hyperspectral abnormal target detection is a key technology, which aims to find targets that are very different from the surrounding environment by analyzing the given data. In the past few decades, researchers have proposed many anomaly detection methods, which can be divided into statistical-based methods, expression-based methods and deep learning-based methods.

[0003] The statistical modeling-based method uses a distribution hypothesis and then uses a distance metric to detect anomalies. The RX algorithm is a classic algorithm based on a statistical model. It assumes that the background follows a multivariate normal distribution and then calculates the Mahalanobis distance between each pixel and the background to detect anomalies. However, in actual scenarios, it is difficult to use a single distribution hypothesis to model complex backgrounds, so such methods usually have limited detection accuracy.

[0004] Algorithms based on representation models perform anomaly detection through a set of bases or matrix decomposition. The CRD (Collaborative Representation-based Detector) algorithm represents the pixels to be detected by surrounding pixels, and then performs anomaly detection through representation errors. The LRASR (Low-Rank and Sparse Reconstruction) algorithm assumes that the background has low rank properties, and the abnormal targets are sparsely distributed in the background, and performs anomaly detection through a low rank expression model. However, representation-based algorithms require manual setting of a large number of parameters, and the parameters often vary greatly for data in different scenes, so it is difficult to apply them to actual tasks.

[0005] The deep learning-based method uses a deep network to extract discriminative features or reconstruct the background for anomaly detection. Among them, the algorithm based on the autoencoder is the mainstream method of this type of algorithm. It is generally believed that in the process of network learning, the main thing learned is the background features, so the abnormal target will have a large reconstruction error. The AuTo-AD algorithm does not effectively utilize the prior information of hyperspectral data, such as low rank, so there is room for improvement in detection performance. Therefore, when reconstructing the background, the algorithm based on deep learning does not fully exploit the local and global information of the hyperspectral image. In addition, the prior characteristics of the hyperspectral data are not considered. Summary of the invention

[0006] Based on this, it is necessary to propose a hyperspectral anomaly detection method, system and storage medium based on global and local feature learning to address the above problems.

[0007] A hyperspectral anomaly detection method using global and local feature learning, the method comprising:

[0008] Collecting hyperspectral data, and extracting features from the hyperspectral data using two convolutional layers to obtain latent layer features;

[0009] After the latent features pass through a convolution layer, local features are extracted through two residual blocks and a convolution operation.

[0010] A global average pooling operation is performed on the latent layer features to obtain downsampled features. After obtaining the output features of the graph convolution module according to the global information of the downsampled features, a global feature is obtained through a convolution layer and a skip connection operation.

[0011] The relevant features are obtained through the similarity matrix between the latent layer features and the memory matrix, and the relevant features are linearly transformed and then element-wise multiplied with the latent layer features to obtain low-rank representation features.

[0012] The local features, global features and low-rank representation features are adaptively fused to obtain fused features.

[0013] The fused features are passed through a convolution layer to obtain the first layer output features, and then the first layer output features are subjected to a convolution and batch normalization operation to obtain reconstructed hyperspectral data.

[0014] A residual image is determined according to the difference between the hyperspectral data and the reconstructed hyperspectral data, and anomaly detection is performed on the residual image to obtain a final two-dimensional detection image.

[0015] The collecting of hyperspectral data and the use of two convolutional layers to extract features from the hyperspectral data to obtain latent features specifically include:

[0016] Collect hyperspectral data, according to X1 = LeakyReLu (BN (Conv 3×3 (x))) obtains the first feature extracted by the first convolutional layer, where X1 is the first feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, and Conv 3×3 (·) is a 3×3 convolution operation, and X is the hyperspectral data.

[0017] According to X e =Sigmoid(BN(Conv3×3 (X1))) Obtain the latent features of the first feature, where X e is the latent feature, Sigmoid(·) is the Sigmoid activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution, and X1 is the first feature.

[0018] Among them, after the latent layer features pass through a convolution layer, two residual blocks and a convolution operation are used to extract local features, specifically including:

[0019] The latent features are represented by X 1_1 =LeakyLeLu(BN((Conv 3×3 (X e )))) Get the second feature extracted by the convolution layer, where X 1_1 is the second feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X e is the latent feature;

[0020] By X l =Conv 3×3 (Res(Res(x l_1 )) Extract the local features of the second feature, where X l is a local feature, Conv 3×3 (·) is a 3×3 convolution operation, Res(·) is a residual block, X 1_1 The second feature.

[0021] Among them, the global average pooling operation is performed on the latent layer features to obtain down-sampled features, and after obtaining the output features of the graph convolution module according to the global information of the down-sampled features, a convolution layer and a skip connection operation are performed to obtain the global features, which specifically includes:

[0022] A global average pooling operation is performed on the latent layer features to obtain downsampled features.

[0023] After the down-sampled features are subjected to tensor transformation operations, the adjacency matrix is ​​obtained by matrix multiplication with itself.

[0024] The activation function is used to obtain the adaptive weight of the adjacency matrix. After the adaptive weight is matrix multiplied with the down-sampled feature, it is added to the down-sampled feature, and then the output feature of the graph convolution module is obtained through two linear layers.

[0025] An upsampling operation is performed on the output features of the graph convolution module to obtain upsampled features. After the upsampled features pass through a convolution layer, the latent layer features are added to the output features of the graph convolution module through a skip connection operation to obtain global features.

[0026] Among them, the upsampling operation is performed on the output features of the graph convolution module to obtain the upsampled features, and after the upsampled features pass through a convolution layer, the latent layer features are added to the output features of the graph convolution module through a skip connection operation to obtain the global features, which specifically includes:

[0027] The graph convolution module outputs features through X g =LeakyReLu(BN(Conv 1×1 (Up(X gcn ))))+X e Get global features, where X g is the global feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 1×1 is a 1×1 convolution operation, Up(·) is an upsampling operation, X gcn Output features of the graph convolution module, X e It is a latent feature.

[0028] The method of obtaining relevant features through a similarity matrix between the latent features and the memory matrix, performing linear transformation on the relevant features, and then performing element-wise multiplication with the latent features to obtain low-rank representation features specifically includes:

[0029] The latent layer features are mapped into vectors through a global average pooling operation.

[0030] The vector is compressed by passing it through a linear layer.

[0031] Relevant features are obtained according to a similarity matrix between the compressed vector and the memory matrix.

[0032] After the related features are linearly transformed through a linear layer, they are element-wise multiplied with the latent layer features to obtain low-rank representation features.

[0033] The adaptively fusing the local features, the global features and the low-rank representation features to obtain the fused features specifically includes:

[0034] According to M'=Sigmoid(Spc(Spa(Conv 3×3 (X s )+X l +X g))) Get the adaptive weight of the fusion feature, where M' is the adaptive weight of the fusion feature, Sigmoid(·) is the Sigmoid activation function, Spa(·) is the spatial attention module, Spc(·) is the spectral attention module, Conv 3×3 (·) is a 3×3 convolution operation, X s is the spectral low-rank feature, X l is a local feature, X g It is a global feature.

[0035] Based on the adaptive weight of the fusion feature, according to X f =Conv 1×1 (X l ⊙M'+X g ⊙(1-M')) Adaptively fuse the local features, global features and low-rank representation features to obtain fused features, where X f To fuse features, Conv 1×1 is a 1×1 convolution operation, X l is the local feature, M' is the adaptive weight of the fusion feature, X g It is a global feature.

[0036] The step of passing the fused features through a convolution layer to obtain the first layer output features, and then performing a convolution and batch normalization operation on the first layer output features to obtain the reconstructed hyperspectral data specifically includes:

[0037] The fusion features are based on Get the first layer output features, where is the first layer output feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X f For fusion features.

[0038] according to Obtain the reconstructed hyperspectral data of the first layer output features, where: To reconstruct the hyperspectral data, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, Output features for the first layer.

[0039] A hyperspectral anomaly detection system with global and local feature learning, the system comprising:

[0040] The latent layer feature acquisition module is used to collect hyperspectral data, and use two convolutional layers to perform feature extraction on the hyperspectral data to obtain latent layer features.

[0041] The local feature extraction module is used to extract local features through two residual blocks and one convolution operation after the latent features pass through one convolution layer.

[0042] The global feature acquisition module is used to perform a global average pooling operation on the latent layer features to obtain down-sampled features, obtain the output features of the graph convolution module according to the global information of the down-sampled features, and then obtain the global features through a convolution layer and a skip connection operation.

[0043] The low-rank representation feature acquisition module is used to obtain relevant features through the similarity matrix between the latent layer features and the memory matrix, linearly transform the relevant features, and then multiply the elements with the latent layer features to obtain low-rank representation features.

[0044] The fusion module is used to adaptively fuse the local features, global features and low-rank representation features to obtain fused features.

[0045] The reconstructed hyperspectral data acquisition module is used to obtain the first layer output features by passing the fusion features through a convolution layer, and then perform a convolution and batch normalization operation on the first layer output features to obtain the reconstructed hyperspectral data.

[0046] The anomaly detection module is used to determine a residual image according to the difference between the hyperspectral data and the reconstructed hyperspectral data, perform anomaly detection on the residual image, and obtain a final two-dimensional detection image.

[0047] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the steps of the method described above.

[0048] The embodiments of the present invention have the following beneficial effects:

[0049] The present invention first gradually extracts the latent features of hyperspectral data through two convolutional layers. Furthermore, after the latent features pass through one convolutional layer, local features are extracted through two residual blocks and one convolution operation, wherein the residual block can retain the information of the latent features and further extract local features through the convolution operation, which helps to enhance the representation and generalization capabilities of the model.

[0050] At the same time, the latent layer features are globally averaged pooled to obtain downsampled features. The graph convolution module is used to obtain the output features of the graph convolution module based on the global information of the downsampled features, thereby improving the accuracy of anomaly detection. The output features of the graph convolution module are passed through a convolution layer and a jump connection operation to obtain global features. Among them, the jump connection operation can retain the information of the input features, and the combination of the graph convolution module and the jump connection operation can more effectively extract global features.

[0051] At the same time, the similarity matrix between the latent features and the memory matrix can reflect the similarity between the latent features and the memory matrix, thereby extracting relevant features and enhancing the sensitivity of the model to specific features. After the relevant features are linearly transformed to adjust the dimension and distribution of the features, they are element-wise multiplied with the latent features to fuse the information of the relevant features and the latent features, thereby obtaining low-rank representation features and effectively mining the low-rank properties of hyperspectral images, thereby improving the accuracy of background modeling.

[0052] Furthermore, local features, global features, and low-rank representation features are adaptively fused to obtain more comprehensive and accurate fusion features. The fused features are passed through a convolution layer to obtain the first-layer output features, and then the first-layer output features are convolved and batch normalized to obtain reconstructed hyperspectral data. Finally, the residual image is determined based on the difference between the hyperspectral data and the reconstructed hyperspectral data. The residual image can reflect the difference between the hyperspectral data and the reconstructed hyperspectral data, thereby highlighting the abnormal area. Anomaly detection on the residual image can accurately locate the abnormal area, obtain the final two-dimensional detection map, and improve the accuracy of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] in:

[0055] Figure 1 A schematic flow chart of an embodiment of a hyperspectral anomaly detection method for global and local feature learning provided by the present invention;

[0056] Figure 2 A schematic flow chart of another embodiment of a hyperspectral anomaly detection method for global and local feature learning provided by the present invention;

[0057] Figure 3 A structural schematic diagram of an embodiment of a hyperspectral anomaly detection system for global and local feature learning provided by the present invention;

[0058] Figure 4 A schematic diagram of the structure of an embodiment of a feature fusion module provided by the present invention;

[0059] Figure 5 A schematic diagram of the structure of an embodiment of a spatial attention module provided by the present invention;

[0060] Figure 6A schematic diagram of the structure of an embodiment of a spectral attention module provided by the present invention;

[0061] Figure 7 A structural schematic diagram of another embodiment of a hyperspectral anomaly detection system for global and local feature learning provided by the present invention;

[0062] Figure 8 A schematic structural diagram of an embodiment of the medium provided by the present invention. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] like Figure 1 As shown, Figure 1 A flow chart of an embodiment of a hyperspectral anomaly detection method for global and local feature learning provided by the present invention. A hyperspectral anomaly detection method for global and local feature learning, the method comprising:

[0065] S101: Collect hyperspectral data, use two convolutional layers to extract features from the hyperspectral data, and obtain latent layer features.

[0066] Exemplarily, hyperspectral data is collected, and two convolutional layers are used to extract features from the hyperspectral data to obtain latent features. Specifically, the first feature extracted by the first convolutional layer is obtained according to the following formula:

[0067] X1=·LeakyReLu(BN(Conv 3×3 (x)));

[0068] Among them, X1 is the first feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, and X is the hyperspectral data.

[0069] Furthermore, the latent feature of the first feature is obtained according to the following formula:

[0070] X e =Sigmoid(BN(Conv 3×3 ((X1)));

[0071] Among them, X eis the latent feature, Sigmoid(·) is the Sigmoid activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution, and X1 is the first feature.

[0072] S102: After the latent features pass through one convolutional layer, local features are extracted through two residual blocks and one convolution operation.

[0073] Exemplarily, the second feature extracted by the convolutional layer is obtained by the following formula:

[0074] X 1_1 =LeakyLeLu(BN((Conv 3×3 (x e ))));

[0075] Among them, X 1_1 is the second feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X e It is a latent feature.

[0076] Furthermore, the local feature of the second feature is extracted by the following formula:

[0077] X l =Conv 3×3 (Res(Res(X l_1 )))

[0078] Among them, X l is a local feature, Conv 3×3 (·) is a 3×3 convolution operation, Res(·) is a residual block, X 1_1 The second feature.

[0079] S103: Perform a global average pooling operation on the latent layer features to obtain downsampled features, obtain the output features of the graph convolution module according to the global information of the downsampled features, and then obtain the global features through a convolution layer and a skip connection operation.

[0080] Exemplarily, a global average pooling operation is performed on the latent layer features to obtain downsampled features; after the downsampled features are subjected to a tensor transformation operation, the adjacency matrix is ​​obtained by matrix multiplication with itself; the adaptive weights of the adjacency matrix are obtained using an activation function, and the adaptive weights are matrix multiplied with the downsampled features and then added to the downsampled features, and then the output features of the graph convolution module are obtained through two linear layers.

[0081] Furthermore, the output features of the graph convolution module are upsampled to obtain the upsampled features. After the upsampled features pass through a convolution layer, the latent features are added to the output features of the graph convolution module through a skip connection operation to obtain the global features. Specifically, the output features of the graph convolution module are used to obtain the global features through the following formula:

[0082] X g =LeakyReLu(BN(Conv 1×1 (Up(X gcn ))))+X e ;

[0083] Among them, X g is the global feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 1×1 is a 1×1 convolution operation, Up(·) is an upsampling operation, X gcn Output features of the graph convolution module, X e It is a latent feature.

[0084] S104: Obtain relevant features through the similarity matrix between the latent features and the memory matrix, perform linear transformation on the relevant features, and then perform element-wise multiplication with the latent features to obtain low-rank representation features.

[0085] Exemplarily, the latent layer features are mapped into vectors through a global average pooling operation; the vectors are compressed through a linear layer; relevant features are obtained based on the similarity matrix between the compressed vectors and the memory matrix; the relevant features are linearly transformed through a linear layer, and then element-wise multiplied with the latent layer features to obtain low-rank representation features.

[0086] S105: Adaptively fuse local features, global features, and low-rank representation features to obtain fused features.

[0087] Exemplarily, the adaptive weight of the fusion feature is obtained according to the following formula:

[0088] M'=Sigmoid(Spc(Spa(Conv 3×3 (X s )+X l +X g )));

[0089] Among them, M' is the adaptive weight of the fusion feature, which is used to adjust the proportion of local branches and global branches, Sigmoid(·) is the Sigmoid activation function, Spa(·) is the spatial attention module, Spc(·) is the spectral attention module, Conv 3×3 (·) is a 3×3 convolution operation, X sis the spectral low-rank feature, X l is a local feature, X g It is a global feature;

[0090] Furthermore, based on the adaptive weight of the fused feature, the local feature, the global feature and the low-rank representation feature are adaptively fused according to the following formula to obtain the fused feature:

[0091] X f =Conv 1×1 (X l ⊙M'+X g ⊙(1-M'));

[0092] Among them, X f To fuse features, Conv 1×1 is a 1×1 convolution operation, X l is the local feature, M' is the adaptive weight of the fusion feature, X g It is a global feature.

[0093] S106: The fused features are passed through a convolution layer to obtain the first layer output features, and then the first layer output features are convolved and batch normalized to obtain reconstructed hyperspectral data.

[0094] Exemplarily, the first layer output features are obtained according to the following formula:

[0095]

[0096] in, is the first layer output feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X f For fusion features;

[0097] Furthermore, the reconstructed hyperspectral data of the first layer output features are obtained according to the following formula:

[0098]

[0099] in, To reconstruct the hyperspectral data, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, Output features for the first layer.

[0100] S107: determining a residual image according to the difference between the hyperspectral data and the reconstructed hyperspectral data, performing anomaly detection on the residual image, and obtaining a final two-dimensional detection image.

[0101] For example, the Mahalanobis distance is used to perform anomaly detection on the residual image, as shown in the following formula:

[0102]

[0103] p i =(x i -μ)Γ -1 (x i -μ)

[0104] Among them, X r is the residual image, μ is X r The mean of X r The covariance matrix of is the final two-dimensional detection map, x i For x r The i-th pixel in .

[0105] From the above description, it can be seen that the present invention first gradually extracts the latent features of hyperspectral data through two convolutional layers. Furthermore, after the latent features pass through one convolutional layer, local features are extracted through two residual blocks and one convolution operation, wherein the residual block can retain the information of the latent features, and further extract local features through the convolution operation, which helps to enhance the representation and generalization capabilities of the model.

[0106] At the same time, the latent layer features are globally averaged pooled to obtain downsampled features. The graph convolution module is used to obtain the output features of the graph convolution module based on the global information of the downsampled features, thereby improving the accuracy of anomaly detection. The output features of the graph convolution module are passed through a convolution layer and a jump connection operation to obtain global features. Among them, the jump connection operation can retain the information of the input features, and the combination of the graph convolution module and the jump connection operation can more effectively extract global features.

[0107] At the same time, the similarity matrix between the latent features and the memory matrix can reflect the similarity between the latent features and the memory matrix, thereby extracting relevant features and enhancing the sensitivity of the model to specific features. After the relevant features are linearly transformed to adjust the dimension and distribution of the features, they are element-wise multiplied with the latent features to fuse the information of the relevant features and the latent features, thereby obtaining low-rank representation features and effectively mining the low-rank properties of hyperspectral images, thereby improving the accuracy of background modeling.

[0108] Furthermore, local features, global features, and low-rank representation features are adaptively fused to obtain more comprehensive and accurate fusion features. The fused features are passed through a convolution layer to obtain the first-layer output features, and then the first-layer output features are convolved and batch normalized to obtain reconstructed hyperspectral data. Finally, the residual image is determined based on the difference between the hyperspectral data and the reconstructed hyperspectral data. The residual image can reflect the difference between the hyperspectral data and the reconstructed hyperspectral data, thereby highlighting the abnormal area. Anomaly detection on the residual image can accurately locate the abnormal area, obtain the final two-dimensional detection map, and improve the accuracy of anomaly detection.

[0109] like Figure 2 As shown, Figure 2 A flow chart of another embodiment of a hyperspectral anomaly detection method for global and local feature learning provided by the present invention. A hyperspectral anomaly detection method for global and local feature learning, the method comprising:

[0110] S201: Collect hyperspectral data, use two convolutional layers to extract features from the hyperspectral data, and obtain latent layer features.

[0111] For example, referring to Figure 3 , Figure 3 A schematic diagram of the structure of an embodiment of a hyperspectral anomaly detection system for global and local feature learning provided by the present invention. The first feature extracted by the first convolutional layer is obtained according to the following formula:

[0112] X1=LeakyReLu(BN(Conv 3×3 (X)));

[0113] in, is the first feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, It is hyperspectral data.

[0114] Furthermore, the latent feature of the first feature is obtained according to the following formula:

[0115] X e =Sigmoid(BN(Conv 3×3 (X1)));

[0116] in, is the latent feature, Sigmoid(·) is the Sigmoid activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution, and X1 is the first feature.

[0117] S202: After the latent features pass through one convolutional layer, local features are extracted through two residual blocks and one convolution operation.

[0118] For example, referring to Figure 3 , First, after passing through a convolutional layer (the convolutional layer includes 3×3 convolution, BN layer and LeakyReLu), the second feature extracted by the convolutional layer is obtained by the following formula:

[0119] X 1_1 =LeakyLeLu(BN((Conv 3×3 (X e ))));

[0120] Among them, X 1_1 is the second feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X e It is a latent feature.

[0121] Furthermore, the second feature is passed through two residual blocks, and then a 3×3 convolution operation is performed to obtain the local feature. The residual block consists of a 1×1 convolution operation, a BN layer, a LeakyReLu, and a 1×1 convolution operation. In addition, the features are mapped through a jump connection. The local feature of the second feature is extracted by the following formula:

[0122] X l =Conv 3×3 (Res(Res(X l_1 )));

[0123] in, is a local feature, Conv 3×3 (·) is a 3×3 convolution operation, Res(·) is a residual block, The second feature.

[0124] S203: Perform a global average pooling operation on the latent layer features to obtain down-sampled features.

[0125] For example, referring to Figure 3 , for latent features First perform global average pooling to obtain the downsampled feature X avg ∈ (H / 2)×(W / 2)×48 , as shown in the following formula:

[0126] X avg =GAP(X e );

[0127] Among them, GAP(·) is the global average pooling, X avg is the down-sampled feature, X e It is a latent feature.

[0128] S204: After the down-sampled features are subjected to tensor transformation, the adjacency matrix is ​​obtained by matrix multiplication with itself.

[0129] Exemplarily, a graph convolution module is used for downsampled features to capture global information. The downsampled features are first reshaped (tensor transformation) and then matrix multiplied by themselves to obtain an adjacency matrix, as shown below:

[0130]

[0131] in, is the downsampled feature X avg Features after Reshape operation, is the adjacency matrix, is the downsampled feature X avg The transposed amount of the feature after the Reshape operation.

[0132] S205: The activation function is used to obtain the adaptive weight of the adjacency matrix. The adaptive weight is matrix multiplied with the down-sampled feature, and then added to the down-sampled feature. Then, the output feature of the graph convolution module is obtained through two linear layers.

[0133] For example, the Softmax activation function is used to obtain the adaptive weights and multiply them with the downsampled features before adding them together. Finally, the output features of the graph convolution module are obtained through two linear layers, as shown in the following formula:

[0134]

[0135] Among them, X gcn Output features for the graph convolution module, and Softmax(·) are matrix multiplication and Softmax activation function respectively, and φ(·) is the linear layer, normalization layer and ReLu activation layer.

[0136] S206: Perform an upsampling operation on the output features of the graph convolution module to obtain upsampled features. After the upsampled features pass through a convolution layer, the latent layer features are added to the output features of the graph convolution module through a skip connection operation to obtain global features.

[0137] For example, the output features of the graph convolution module are upsampled, and then passed through a convolution layer (the convolution layer includes a 1×1 convolution operation, a BN layer, and a LeakyReLu activation function). Finally, the latent features are added to the output features of the graph convolution module through a skip connection operation to obtain the global features. The above process is expressed as:

[0138] X g =LeakyReLu(BN(Conv 1×1 (Up(X gcn ))))+X e ;

[0139] Among them, X g is the global feature, X gcn Output features for graph convolution module, Conv 1×1 is a 1×1 convolution operation, LeakyReLu(·) is a LeakyReLu activation function, BN(·) is a batch normalization operation, Conv 1×1 is a 1×1 convolution operation, Up(·) is an upsampling operation, and the present invention uses the nearest neighbor difference to perform upsampling.

[0140] S207: Map the latent layer features into vectors through a global average pooling operation.

[0141] For example, the latent features are first mapped into a vector by global average pooling As shown below:

[0142] Z = GAP(X e );

[0143] Among them, Z is a vector, GAP(·) is the global average pooling, X e It is a latent feature.

[0144] S208: compress the vector through a linear layer.

[0145] Exemplarily, the vector Z is compressed by a linear layer to obtain a compressed vector Z′, as shown in the following formula:

[0146] Z′=φ(z);

[0147] Among them, Z′ is the compressed vector, φ(·) is the linear layer, normalization layer and ReLu activation layer, and Z is a vector.

[0148] S209: Obtain relevant features according to the similarity matrix between the compressed vector and the memory matrix.

[0149] Exemplarily, the compressed vector Z′ and the memory matrix are calculated The similarity between them is calculated by using the similarity matrix to obtain the relevant features Z″, as shown in the following formula:

[0150]

[0151] Among them, Z″ is the relevant feature, M is the memory matrix, which represents the recorded spectral low-rank vector, Z′ is the compressed vector, Softmax(·) is the Softmax activation function, is matrix multiplication.

[0152] S210: After performing linear transformation on the relevant features through a linear layer, element-wise multiplication is performed with the latent layer features to obtain low-rank representation features.

[0153] For example, the output vector is obtained by a linear layer. Finally, the low-rank representation feature X is obtained by element-wise multiplication. s As shown below:

[0154] X s =φ(Z″)⊙X e ;

[0155] Among them, X s is the low-rank representation feature, φ(·) is the linear layer, normalization layer and ReLu activation layer, Z″ is the relevant feature, X e is the latent feature, and ⊙ is the element-wise multiplication.

[0156] S211: Adaptively fuse local features, global features, and low-rank representation features to obtain fused features.

[0157] For example, the local features are fused by a spectrally guided feature fusion module. Global Features And low-rank representation features Perform adaptive fusion and obtain fusion features

[0158] Specifically, refer to Figure 3 , Figure 4 , Figure 4 This is a schematic diagram of the structure of an embodiment of the feature fusion module provided by the present invention. First, use 3×3 convolution to s Processed and then with X l and X g Then, the above results are sent to the spatial attention module and the spectral attention module in turn to obtain the adaptive weights of the fusion features. The above process is expressed as:

[0159] M'=Sigmoid(Spc(Spa(Conv 3×3 (X s )+X l +X g )));

[0160] Among them, M' is the adaptive weight of the fusion feature, which is used to adjust the proportion of local branches and global branches, Sigmoid(·) is the Sigmoid activation function, Spa(·) is the spatial attention module, Spc(·) is the spectral attention module, Conv 3×3 (·) is a 3×3 convolution operation, X s is the spectral low-rank feature, X l is a local feature, X g It is a global feature.

[0161] Furthermore, through adaptive weights, l and X g Multiply. Finally, use 1×1 convolution operation to output fusion features. The above process is expressed as:

[0162] X f =Conv 1×1 (X l ⊙M'+X g ⊙(1-M'));

[0163] Among them, X f To fuse features, Conv 1×1 is a 1×1 convolution operation, X l is the local feature, is the adaptive weight of M' fusion feature, X g It is a global feature.

[0164] It should be noted that the spatial attention module Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an embodiment of the spatial attention module provided by the present invention. The input features are average pooled and max pooled along the spectral direction respectively, and then the two features are concatenated and element-wise multiplied with the input after a layer of 3×3 convolution operation.

[0165] The spectral attention module is as follows Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an embodiment of the spectral attention module provided by the present invention. The input features are average pooled and max pooled along the spatial direction, and then go through a layer of 1×1 convolution, a ReLu activation function, and a 1×1 convolution. Next, the two features are added and go through a layer of 1×1 convolution, and finally multiplied by the input element-wise to obtain the output features.

[0166] S212: The fused features are passed through a convolution layer to obtain the first-layer output features, and then the first-layer output features are convolved and batch normalized to obtain reconstructed hyperspectral data.

[0167] For example, the fusion feature After two convolutional layers, the reconstructed hyperspectral data is obtained The convolution kernel size of the first and second layers is 3×3. The first convolution layer uses LeakyReLu as the activation function. The second convolution layer directly outputs the reconstructed hyperspectral data after the batch normalization layer. The above process is expressed as:

[0168] in, is the reconstructed hyperspectral data, is the first layer output feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X f To fusion features, To reconstruct hyperspectral data.

[0169] S213: determining a residual image according to the difference between the hyperspectral data and the reconstructed hyperspectral data, performing anomaly detection on the residual image, and obtaining a final two-dimensional detection image.

[0170] For example, the Mahalanobis distance is used to perform anomaly detection on the residual image, as shown in the following formula:

[0171] p i =(x i -μ)Γ -1 (x i -μ)

[0172] Among them, X r is the residual image, μ is X r The mean of X r The covariance matrix of is the final two-dimensional detection map, x i For x r The i-th pixel in .

[0173] The effects of the present invention are further described below in conjunction with simulation experiments:

[0174] 1. Simulation conditions:

[0175] The hardware environment of the simulation experiment of the present invention is Intel Core i5-12400 CPU, 16-GB random access memory (RAM), NVIDIA 3090 GPU and Microsoft Windows 10 operating system; the simulation software is: MATLAB R2022a and Python 3.7.

[0176] 2. Experimental content: In order to demonstrate the effectiveness of the hyperspectral anomaly detection method based on global and local feature learning, the present invention uses three public data sets to verify the effectiveness of the algorithm and uses them in simulation experiments. Table 1 shows the AUC values ​​of different algorithms on the three data sets.

[0177] Table 1 AUC values ​​of different algorithms on three data sets

[0178] algorithm First Dataset Second dataset The third dataset RX 0.8404 0.9526 0.9538 LRX 0.9722 0.9903 0.9597 CRD 0.9681 0.9445 0.9407 2S-GLRT 0.9873 0.9183 0.9868 AuTo-AD 0.8866 0.9820 0.9778 LREN 0.9548 0.8362 0.8868 GAED 0.9623 0.9691 0.9354 RGAE 0.7487 0.7502 0.9041 Algorithm of the present invention 0.9891 0.9933 0.9977

[0179] Through simulation experiments, it can be obtained that the present invention can achieve better detection effect.

[0180] like Figure 7 As shown, Figure 7 A structural schematic diagram of another embodiment of a hyperspectral anomaly detection system for global and local feature learning provided by the present invention. A hyperspectral anomaly detection system 10 for global and local feature learning, the system comprising:

[0181] The latent layer feature acquisition module 11 is used to collect hyperspectral data, extract features from the hyperspectral data using two convolutional layers, and obtain latent layer features.

[0182] The local feature extraction module 12 is used to extract local features through two residual blocks and one convolution operation after the latent features pass through one convolution layer.

[0183] The global feature acquisition module 13 is used to perform a global average pooling operation on the latent layer features to obtain down-sampled features, obtain the output features of the graph convolution module according to the global information of the down-sampled features, and then obtain the global features through a convolution layer and a jump connection operation.

[0184] The low-rank representation feature acquisition module 14 is used to obtain relevant features through the similarity matrix between the latent layer features and the memory matrix, and after linearly transforming the relevant features, perform element-wise multiplication with the latent layer features to obtain low-rank representation features.

[0185] The fusion module 15 is used to adaptively fuse local features, global features and low-rank representation features to obtain fused features.

[0186] The reconstructed hyperspectral data acquisition module 16 is used to obtain the first layer output features by passing the fused features through a convolution layer, and then perform a convolution and batch normalization operation on the first layer output features to obtain the reconstructed hyperspectral data.

[0187] The anomaly detection module 17 is used to determine a residual image according to the difference between the hyperspectral data and the reconstructed hyperspectral data, perform anomaly detection on the residual image, and obtain a final two-dimensional detection image.

[0188] For example, in the latent feature acquisition module 11, the hyperspectral data is collected, and according to X1=LeakyReLu(BN(Conv 3×3 ((X))) obtains the first feature extracted by the first convolutional layer, where X1 is the first feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, and Conv 3×3 (·) is a 3×3 convolution operation, and X is the hyperspectral data.

[0189] According to X e =Sigmoid(BN(Conv 3×3 (X1))) Obtain the latent features of the first feature, where X e is the latent feature, Sigmoid(·) is the Sigmoid activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution, and X1 is the first feature.

[0190] In the local feature extraction module 12, the latent features are extracted by X 1_1 =LeakyLeLu(BN((Conv 3×3 (X e )))Get the second feature extracted by the convolution layer, where X 1_1 is the second feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X e is the latent feature; through X l =Conv 3×3 (Res(Res(x l_1 ))) Extract the local features of the second feature, where X l is a local feature, Conv 3×3 (·) is a 3×3 convolution operation, Res(·) is a residual block, X 1_1 The second feature.

[0191] In the global feature acquisition module 13, a global average pooling operation is performed on the latent layer features to obtain downsampled features; after the downsampled features are subjected to a tensor transformation operation, an adjacency matrix is ​​obtained by matrix multiplication of the downsampled features themselves; an activation function is used to obtain the adaptive weights of the adjacency matrix, and the adaptive weights are matrix multiplied with the downsampled features, and then added to the downsampled features, and then the output features of the graph convolution module are obtained through two linear layers; an upsampling operation is performed on the output features of the graph convolution module to obtain upsampled features, and after the upsampled features pass through a convolution layer, the latent layer features are added to the output features of the graph convolution module through a skip connection operation to obtain global features.

[0192] In the low-rank representation feature acquisition module 14, the latent layer features are mapped into vectors through a global average pooling operation; the vectors are compressed through a linear layer; relevant features are acquired based on a similarity matrix between the compressed vectors and a memory matrix; the relevant features are linearly transformed through a linear layer, and then element-wise multiplied with the latent layer features to acquire low-rank representation features.

[0193] In the fusion module 15, according to M'=Sigmoid(Spc(Spa(Conv 3×3 (X s )+X1+X g ))) Get the adaptive weight of the fusion feature, where M' is the adaptive weight of the fusion feature, Sigmoid(·) is the Sigmoid activation function, Spa(·) is the spatial attention module, Spc(·) is the spectral attention module, Conv 3×3 (·) is a 3×3 convolution operation, X s is the spectral low-rank feature, X l is a local feature, X g is a global feature; based on the adaptive weight of the fusion feature, according to X f =Conv 1×1 (X l ⊙M'+X g ⊙(1-M')) Adaptively fuse the local features, global features and low-rank representation features to obtain fused features, where X f To fuse features, Conv 1×1 is a 1×1 convolution operation, X l is the local feature, M' is the adaptive weight of the fusion feature, X g It is a global feature.

[0194] In the hyperspectral data acquisition module 16, the fusion feature is based on Get the first layer output features, where is the first layer output feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X f is the fusion feature; Obtain the reconstructed hyperspectral data of the first layer output features, where: To reconstruct the hyperspectral data, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, Output features for the first layer.

[0195] In the anomaly detection module 17, a residual image is determined according to the difference between the hyperspectral data and the reconstructed hyperspectral data, and anomaly detection is performed on the residual image to obtain a final two-dimensional detection image.

[0196] like Figure 8 As shown, Figure 8 The storage medium 20 stores at least one computer program 21, which is executed by a processor to implement the following. Figure 1 , Figure 2 In one embodiment, the storage medium 20 may be a storage chip, a hard disk, a mobile hard disk, a USB flash drive, an optical disk, or other readable and writable storage tools, or a server, etc.

[0197] Additionally, the processes depicted in the figures do not necessarily have to be performed in the particular order shown or in sequential order to achieve desired results. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.

[0198] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0199] The apparatus, device, non-volatile computer-readable storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, device, and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device, and non-volatile computer storage medium will not be repeated here.

[0200] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0201] For the convenience of description, the above device is described by being divided into various units according to their functions and described separately. Of course, when implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware. It should be understood by those skilled in the art that this specification embodiment can be provided as a method, system, or computer program product. Therefore, this specification embodiment can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification embodiment can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0202] This specification is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0203] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0204] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0205] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0206] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0207] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0208] 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.

[0209] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0210] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0211] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A hyperspectral anomaly detection method based on global and local feature learning, characterized in that: The method comprises: Collecting hyperspectral data, and extracting features from the hyperspectral data using two convolutional layers to obtain latent layer features; After the latent features pass through a convolution layer, local features are extracted through two residual blocks and a convolution operation; Performing a global average pooling operation on the latent layer features to obtain downsampled features, obtaining the output features of the graph convolution module according to the global information of the downsampled features, and then obtaining the global features through a convolution layer and a skip connection operation; Obtain relevant features through a similarity matrix between the latent layer features and the memory matrix, perform linear transformation on the relevant features, and then perform element-wise multiplication with the latent layer features to obtain low-rank representation features; Adaptively fusing the local features, global features, and low-rank representation features to obtain fused features; The fused features are passed through a convolution layer to obtain the first layer output features, and then the first layer output features are subjected to a convolution and batch normalization operation to obtain reconstructed hyperspectral data; A residual image is determined according to the difference between the hyperspectral data and the reconstructed hyperspectral data, and anomaly detection is performed on the residual image to obtain a final two-dimensional detection image.

2. The hyperspectral anomaly detection method based on global and local feature learning according to claim 1, characterized in that: The collecting of hyperspectral data and extracting features from the hyperspectral data using two convolutional layers to obtain latent layer features specifically include: Collect hyperspectral data, according to X1 = LeakvReLu (BN (Conv 3×3 (x))) obtains the first feature extracted by the first convolutional layer, where X1 is the first feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, and Conv 3×3 (·) is a 3×3 convolution operation, and x is the hyperspectral data; According to X e =Sigmoid(BN(Com 3×3 (X1))) Obtain the latent features of the first feature, where X e is the latent feature, Sigmoid(·) is the Sigmoid activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution, and X1 is the first feature.

3. The hyperspectral anomaly detection method based on global and local feature learning according to claim 2, characterized in that: After the latent features pass through a convolution layer, local features are extracted through two residual blocks and a convolution operation, specifically including: The latent features are expressed by X 1_1 =LeakvLeLu(BN((Conv 3×3 (x e )))) Get the second feature extracted by the convolution layer, where X 1_1 is the second feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X e is the latent feature; By x l =Com 3×3 (Res(Res(X l_1 ))) Extract the local features of the second feature, where x l is a local feature, Conv 3×3 (·) is a 3×3 convolution operation, Res(·) is a residual block, X 1_1 The second feature.

4. The hyperspectral anomaly detection method based on global and local feature learning according to claim 1, characterized in that: The step of performing a global average pooling operation on the latent layer features to obtain downsampled features, obtaining the output features of the graph convolution module according to the global information of the downsampled features, and then obtaining the global features through a convolution layer and a skip connection operation specifically includes: Performing a global average pooling operation on the latent layer features to obtain downsampled features; After the down-sampled features are subjected to tensor transformation, an adjacency matrix is ​​obtained by matrix multiplication thereof; The activation function is used to obtain the adaptive weight of the adjacency matrix, the adaptive weight is matrix multiplied with the down-sampled feature, and then added to the down-sampled feature, and then the output feature of the graph convolution module is obtained through two linear layers; An upsampling operation is performed on the output features of the graph convolution module to obtain upsampled features. After the upsampled features pass through a convolution layer, the latent layer features are added to the output features of the graph convolution module through a skip connection operation to obtain global features.

5. The hyperspectral anomaly detection method based on global and local feature learning according to claim 4, characterized in that: The upsampling operation is performed on the output features of the graph convolution module to obtain the upsampled features. After the upsampled features pass through a convolution layer, the latent layer features are added to the output features of the graph convolution module through a skip connection operation to obtain the global features, which specifically includes: The graph convolution module outputs features through X g =LeakyReLu(BN(Conv 1×1 (Up(X gcn ))))+X e Get global features, where X g is the global feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 1×1 is a 1×1 convolution operation, Up(·) is an upsampling operation, X gcn Output features of the graph convolution module, X e It is a latent feature.

6. The hyperspectral anomaly detection method based on global and local feature learning according to claim 1, characterized in that: The method of obtaining relevant features through a similarity matrix between the latent features and the memory matrix, performing linear transformation on the relevant features, and then performing element-wise multiplication with the latent features to obtain low-rank representation features specifically includes: Mapping the latent layer features into vectors through a global average pooling operation; Compressing the vector through a linear layer; Acquire relevant features according to a similarity matrix between the compressed vector and the memory matrix; After the related features are linearly transformed through a linear layer, they are element-wise multiplied with the latent layer features to obtain low-rank representation features.

7. The hyperspectral anomaly detection method based on global and local feature learning according to claim 1, characterized in that: The adaptively fusing the local features, the global features and the low-rank representation features to obtain the fused features specifically includes: According to M'=Sigmoid(Spc(Spa(Conv 3×3 (X s )+X l +X g ))) Get the adaptive weight of the fusion feature, where M' is the adaptive weight of the fusion feature, Sigmoid(·) is the Sigmoid activation function, Spa(·) is the spatial attention module, Spc(·) is the spectral attention module, Conv 3×3 (·) is a 3×3 convolution operation, X s is the spectral low-rank feature, X l is a local feature, X g It is a global feature; Based on the adaptive weight of the fusion feature, according to X f =Conv 1×1 (X l ⊙M'+X g ⊙(1-M')) Adaptively fuse the local features, global features and low-rank representation features to obtain fused features, where X f To fuse features, Conv 1×1 is a 1×1 convolution operation, X l is the local feature, M' is the adaptive weight of the fusion feature, X g It is a global feature.

8. The hyperspectral anomaly detection method based on global and local feature learning according to claim 7, characterized in that: The step of subjecting the fused features to a convolution layer to obtain a first-layer output feature, and then performing a convolution and batch normalization operation on the first-layer output feature to obtain reconstructed hyperspectral data specifically includes: The fusion features are based on Get the first layer output features, where is the first layer output feature, LeakyReLu(·) is the LeakyReLu activation function, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, X f For fusion features; according to Obtain the reconstructed hyperspectral data of the first layer output features, where: To reconstruct the hyperspectral data, BN(·) is the batch normalization operation, Conv 3×3 (·) is a 3×3 convolution operation, Output features for the first layer.

9. A hyperspectral anomaly detection system with global and local feature learning, the system comprising: A latent feature acquisition module is used to collect hyperspectral data, extract features from the hyperspectral data using two convolutional layers, and obtain latent features; A local feature extraction module, which is used to extract local features through two residual blocks and one convolution operation after the latent features pass through one convolution layer; A global feature acquisition module, used to perform a global average pooling operation on the latent layer features to obtain down-sampled features, obtain the output features of the graph convolution module according to the global information of the down-sampled features, and then obtain the global features through a convolution layer and a skip connection operation; A low-rank representation feature acquisition module, used to obtain relevant features through a similarity matrix between the latent layer features and the memory matrix, perform linear transformation on the relevant features, and then perform element-wise multiplication with the latent layer features to obtain low-rank representation features; A fusion module, used to adaptively fuse the local features, global features and low-rank representation features to obtain fused features; A reconstructed hyperspectral data acquisition module is used to obtain the first layer output features by passing the fusion features through a convolution layer, and then perform a convolution and batch normalization operation on the first layer output features to obtain reconstructed hyperspectral data; The anomaly detection module is used to determine a residual image according to the difference between the hyperspectral data and the reconstructed hyperspectral data, perform anomaly detection on the residual image, and obtain a final two-dimensional detection image.

10. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Adaptive image steganalysis method and system based on deep convolutional neural network

    CN111507884A

  • Hyperspectral remote sensing image anomaly detection method based on deep learning

    CN117274800A

  • Unsupervised hyperspectral image fusion method and system, storage medium and product

    CN118411290A