Hyperspectral image anomaly detection method, device, equipment and medium

By constructing a convolutional autoencoder and an alternating direction multiplier method, the problem of insufficient learning of background features in existing technologies is solved, thereby improving the accuracy and performance of hyperspectral anomaly detection.

CN117115653BActive Publication Date: 2025-11-18SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311148017.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2025-11-18
Estimated Expiration
2043-09-06

AI Technical Summary

Technical Problem

Existing hyperspectral anomaly detection methods cannot fully learn the low-rank and local smoothness of the background, resulting in inaccurate detection.

Method used

By employing the convolutional autoencoder method, features are extracted from hyperspectral preprocessed data. The powerful feature learning capability of the convolutional autoencoder is utilized to construct an objective function that includes constraints on latent background characteristics. The alternating direction multiplier method is then combined to adjust the network parameters and reduce background reconstruction errors.

Benefits of technology

It improves the accuracy and performance of anomaly detection and reduces errors in background reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117115653B_ABST
    Figure CN117115653B_ABST
Patent Text Reader

Abstract

The application discloses a hyperspectral image anomaly detection method, device and equipment and a medium, relates to the field of hyperspectral anomaly detection, and comprises the following steps: inputting hyperspectral pretreatment data into a pre-constructed convolutional autoencoder with cross-connection layers, and outputting a background reconstruction tensor of the hyperspectral pretreatment data; stretching the background reconstruction tensor into a matrix along a spectral dimension, and constructing a target function for the matrix to optimize the network output of the convolutional autoencoder; iteratively updating the low-rank constraint and the sparse constraint of the target function by using an alternating direction multiplier method, so as to adjust the network parameters of the convolutional autoencoder; when the number of iterations reaches a convergence threshold, determining a feature tensor output by the current convolutional autoencoder; subtracting the feature tensor from an original feature tensor to obtain an error tensor after background reconstruction; square-summing and then taking the square root of the error tensor of each spectral dimension slice to obtain a detection map; and performing anomaly detection on the detection map to obtain an anomaly detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hyperspectral anomaly detection, and more specifically, to methods, apparatus, equipment, and media for hyperspectral image anomaly detection. Background Technology

[0002] Hyperspectral imaging (HSI) achieves excellent spectral resolution by utilizing hundreds of narrowband spectra that continuously vary from infrared to ultraviolet, accurately describing the reflectance spectrum of objects and thus significantly improving object detection and classification capabilities. The unique advantages of HSI have led to various applications, such as target detection and classification. Specifically, based on precise prior information containing the target, hyperspectral target detection can be broadly divided into two categories: target matching and anomaly detection. Anomaly detection can be used in various fields, such as precision agriculture, mineral identification, and military surveillance.

[0003] Currently, autoencoder (AE)-based detectors have been proposed for hyperspectral anomaly detection. These methods all assume that the background reconstruction error obtained by the network is small. In contrast, the anomaly reconstruction error obtained by the network is large. Therefore, the reconstruction error is considered anomaly. To achieve end-to-end detection, an automatic hyperspectral anomaly detection network based on fully convolutional AEs, called Auto-AD, has been proposed. This network uses adaptive weights to reduce background reconstruction errors. However, this autoencoder cannot fully learn some latent properties of the background, such as low rank and local smoothness. Furthermore, unlike model-based detection methods, Auto-AD is a black-box model, and the features it learns are uninterpretable. To combine the advantages of model-driven priors and AE-based networks, a combined model-driven and data-driven approach for hyperspectral anomaly detection, called DeepLR, has been proposed. It uses an AE network with adaptive weights to reconstruct the background and designs the output of a low-rank constraint network to utilize the low-rank properties of the background. However, DeepLR only utilizes the low-rank properties of the background, ignoring its local smoothness. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, device, and medium for anomaly detection in hyperspectral images. This invention first constructs a convolutional autoencoder (CAE) and utilizes its powerful feature learning capability to extract features from the hyperspectral preprocessed data. An objective function containing latent background characteristics constraints, namely low-rank and sparse constraints, is constructed on the output of the CAE to leverage the low-rank and sparse characteristics of the background. Furthermore, this invention employs an efficient alternating direction multiplier method to solve the objective function, thereby adjusting the network parameters of the CAE. This allows the CAE to more fully learn the background characteristics of the hyperspectral preprocessed data, reducing errors during background reconstruction and improving anomaly detection performance.

[0005] The above-mentioned technical objective of this application is achieved through the following technical solution:

[0006] A first aspect of this application provides a method for detecting anomalies in hyperspectral images, the method comprising:

[0007] Normalize each slice of the hyperspectral image along its spectral dimension to obtain hyperspectral preprocessed data;

[0008] The hyperspectral preprocessed spectral data is input into a pre-constructed convolutional autoencoder with cross-connection layers to reconstruct the hyperspectral background and output the background reconstruction tensor of the hyperspectral preprocessed data.

[0009] The background reconstruction tensor is stretched into a matrix along the spectral dimension, and an objective function is applied to the matrix to optimize the network output of the convolutional autoencoder, wherein the objective function consists of autoencoder residual constraints and low-rank and sparse constraints of latent background features.

[0010] The low-rank constraint term, sparse constraint term, and residual constraint term of the objective function are iteratively updated using the alternating direction multiplier method to adjust the network parameters of the convolutional autoencoder. When the number of iterations reaches the convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined.

[0011] Subtract the background reconstruction tensor output by the current convolutional autoencoder from the hyperspectral preprocessed data to obtain the background reconstruction error tensor.

[0012] The detection map is obtained by squaring each slice of the error tensor along each spectral dimension, summing the slices, and then taking the square root.

[0013] Anomaly detection is performed on the detection image to obtain anomaly detection results.

[0014] In one implementation, the pre-built convolutional autoencoder with cross-connection layers includes an encoder and a decoder, both of which are composed of convolutional layers. The output of the encoder's convolutional layer is concatenated with the output of the corresponding decoder's convolutional layer through the cross-connection layer.

[0015] In one implementation, the expression for the objective function is: in, Let w represent the width of the hyperspectral preprocessed data tensor, h represent the height of the cube data, and b represent the spectral bandwidth dimension of the cube data. F Denotes the F-norm, ||·|| * The nuclear norm of a matrix is ​​denoted as . Let denote the difference operator, ||·||1 denote the l1 norm, λ denote the non-negative weighting parameter used to balance low-rank constraints, and β denote the non-negative weighting parameter used to balance sparse constraints. θ represents the output of the autoencoder, and θ represents the network parameters of the autoencoder. This means stretching the background reconstruction tensor output by the autoencoder into a matrix along the spectral dimension. Indicates to Perform first-order difference operations.

[0016] In one implementation, the objective function, including network parameter terms, low-rank constraint terms, and sparse constraint terms, is iteratively updated using the alternating direction multiplier method, including:

[0017] By introducing a first relaxation variable and a second relaxation variable to replace the low-rank constraint term and the sparse constraint term of the objective function, a replaced objective function is obtained. The expression of the replaced objective function is: Where C1 represents the first slack variable and C2 represents the second slack variable;

[0018] The objective function after variable substitution is constructed using the Lagrange multiplier method. The expression of the constructed objective function is as follows: Where P1 and P2 are both Lagrange multipliers, and μ is the Lagrange weight coefficient;

[0019] The first and second slack variables are updated according to the reconstructed objective function, and the solutions of the updated first and second slack variables are calculated respectively.

[0020] The Adam algorithm is used to solve the cost function term containing network parameter terms in the solution after substituting the updated first and second slack variables, so as to obtain the network parameters that minimize the cost function of the convolutional autoencoder.

[0021] In one implementation, when the number of iterations reaches a convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined, specifically as follows:

[0022] Set a convergence threshold and calculate the cost function value containing network parameter terms for that number of iterations;

[0023] When the cost function value is less than the convergence threshold, the iteration stops, and the background reconstruction tensor output by the current convolutional autoencoder is determined.

[0024] In one implementation, the expression for the cost function value being less than the convergence threshold is: k represents the number of iterations, θ k+1 θ represents the network parameters updated in the (k+1)th iteration. k This represents the new network parameters in the k-th iteration. This represents the value of the autoencoder cost function at the (k+1)th iteration. This represents the value of the autoencoder cost function at the k-th iteration.

[0025] In one implementation, the expression for the detection map is calculated. in, Represents the error tensor. Represents the error tensor In the i-th slice of the third dimension, b represents the number of spectra in the hyperspectral preprocessed data.

[0026] A second aspect of this application provides a hyperspectral image anomaly detection device, the device comprising:

[0027] The preprocessing module is used to normalize the slices of each spectral dimension of the hyperspectral image to obtain hyperspectral preprocessed data.

[0028] The background reconstruction module is used to input the hyperspectral preprocessed data into a pre-constructed convolutional autoencoder with cross-connection layers to reconstruct the hyperspectral background and output the background reconstruction tensor of the hyperspectral preprocessed data.

[0029] The objective function application module is used to stretch the background reconstruction tensor into a matrix along the spectral dimension and apply constraints to the matrix to construct an objective function that optimizes the network output of the convolutional autoencoder. The objective function consists of residual constraints at the autoencoder end and low-rank and sparse constraints on the latent properties of the background.

[0030] The iterative update module is used to iteratively update the low-rank constraint term, sparse constraint term, and autoencoder network parameter term of the objective function using the alternating direction multiplier method to adjust the network parameters of the convolutional autoencoder. When the number of iterations reaches the convergence threshold, the reconstructed background tensor output by the current convolutional autoencoder is determined.

[0031] The reconstruction error calculation module is used to subtract the background reconstruction tensor output by the current convolutional autoencoder from the hyperspectral preprocessed data to obtain the error tensor after background reconstruction.

[0032] The detection map calculation module is used to square the slices of each spectral dimension of the error tensor, sum them up, and then take the square root to obtain the detection map;

[0033] An anomaly detection module is used to perform anomaly detection on the detection image and obtain anomaly detection results.

[0034] A third aspect of this application provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of a hyperspectral image anomaly detection method as described in the first aspect of this application.

[0035] A fourth aspect of this application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the steps of a hyperspectral image anomaly detection method as described in the first aspect of this application.

[0036] Compared with the prior art, this application has the following beneficial effects:

[0037] This invention provides a hyperspectral image anomaly detection method. The method first constructs a convolutional autoencoder (CAE) and utilizes its powerful feature learning capability to extract features from the hyperspectral preprocessed data. An additional objective function, incorporating latent background characteristics constraints (i.e., low-rank and sparsity constraints), is constructed on the CAE output to leverage these characteristics. Furthermore, this invention employs an efficient alternating direction multiplier method to solve the objective function, adjusting the CAE network parameters. This allows the CAE to more fully learn the background of the hyperspectral preprocessed data, thereby reducing errors during background reconstruction and improving anomaly detection performance.

[0038] In addition, the second to fourth aspects of this application also provide a hyperspectral image anomaly detection device, equipment and medium, which have the same beneficial effects as the hyperspectral image anomaly detection method provided in this application, and will not be repeated here. Attached Figure Description

[0039] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0040] Figure 1 A flowchart illustrating a hyperspectral image anomaly detection method provided by an embodiment of the present invention is shown;

[0041] Figure 2 A structural block diagram of a convolutional autoencoder provided in an embodiment of the present invention is shown;

[0042] Figure 3 An anomaly detection diagram provided in an embodiment of the present invention is shown;

[0043] Figure 4 The ROC curve provided in the embodiment of the present invention is shown;

[0044] Figure 5 This illustrates a background anomaly separation diagram provided in an embodiment of the present invention;

[0045] Figure 6A block diagram illustrating the principle of a hyperspectral image anomaly detection device provided in an embodiment of the present invention is shown. Detailed Implementation

[0046] In the following, the terms “comprising” or “may include” as used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms “comprising,” “having,” and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or the possibility of adding one or more combinations of the foregoing.

[0047] The terms used in the various embodiments of this application (such as "first," "second," etc.) may modify various constituent elements in the various embodiments, but do not limit the corresponding constituent elements. For example, the above terms do not limit the order and / or importance of the elements. The above terms are only used for the purpose of distinguishing one element from other elements. For example, a first user device and a second user device refer to different user devices, although both are user devices. For example, without departing from the scope of the various embodiments of this application, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element.

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this application are only for explaining this application and are not intended to limit this application.

[0049] Currently, autoencoder (AE)-based detectors have been proposed for hyperspectral anomaly detection. These methods all assume that the background reconstruction error obtained by the autoencoder is small. In contrast, the anomaly reconstruction error obtained by the autoencoder is relatively large. Therefore, the reconstruction error is considered anomaly. To achieve end-to-end detection, an automatic hyperspectral anomaly detection network based on fully convolutional AEs, called Auto-AD, has been proposed. This network uses adaptive weights to reduce background reconstruction errors. However, this autoencoder cannot fully learn some latent properties of the background, such as low rank and local smoothness. Furthermore, unlike model-based detection methods, Auto-AD is a black-box model, and the features it learns are uninterpretable. To combine the advantages of model-driven priors and AE-based networks, a combined model-driven and data-driven approach for hyperspectral anomaly detection, called DeepLR, has been proposed. It uses an AE network with adaptive weights to reconstruct the background and designs low-rank constraints on the network output to utilize the low-rank properties of the background. However, DeepLR only utilizes the low-rank properties of the background, ignoring its local smoothness.

[0050] In the prior art described in the above example, the prior art cannot fully learn some potential characteristics of the background, such as low rank and local smoothness. At the same time, unlike model-based detection methods, the features it learns are uninterpretable. Furthermore, DeepLR is provided to address the problem of uninterpretable learned features, but DeepLR only utilizes the low rank of the background and ignores the local smoothness of the background. It can be seen that the prior art does not simultaneously consider the powerful learning ability of autoencoder network background reconstruction and the impact of the low rank and sparse characteristics of the background on anomaly detection, resulting in inaccurate anomaly detection for hyperspectral images.

[0051] Therefore, this embodiment provides a hyperspectral image anomaly detection method. First, a convolutional autoencoder is constructed, and its powerful feature learning capability is used to extract features from the hyperspectral preprocessed data. An objective function containing latent background characteristics constraints, namely low-rank and sparse constraints, is constructed on the output of the convolutional autoencoder to utilize the low-rank and sparse characteristics in the background. Furthermore, this invention employs an efficient alternating direction multiplier method to solve the objective function, thereby adjusting the network parameters of the convolutional autoencoder. This allows the convolutional autoencoder to learn the background characteristics of the hyperspectral preprocessed data more fully, thereby reducing errors in background reconstruction and improving anomaly detection performance.

[0052] The hyperspectral image anomaly detection method provided in this application will be described in detail below with reference to specific implementation methods, such as... Figure 1 As shown, Figure 1 This diagram illustrates a flowchart of a hyperspectral image anomaly detection method provided by an embodiment of the present invention. The method includes:

[0053] S101, normalizes the slices of each spectral dimension of the original hyperspectral data to obtain hyperspectral preprocessed data.

[0054] In this embodiment, the normalization process of each spectral dimension slice of the original hyperspectral data is a well-known technique to those skilled in the art, and will not be elaborated further here.

[0055] S102, the hyperspectral preprocessed data is input into a pre-constructed convolutional autoencoder with cross-connection layers to reconstruct the hyperspectral background and output the background reconstruction tensor of the hyperspectral preprocessed data.

[0056] In one implementation, the pre-built convolutional autoencoder with cross-connection layers includes an encoder and a decoder, both of which are composed of convolutional layers. The output of the encoder's convolutional layer is concatenated with the output of the corresponding decoder's convolutional layer through the cross-connection layer.

[0057] S103, stretch the background reconstruction tensor into a matrix along the spectral dimension, and apply an objective function to the matrix to optimize the network output of the convolutional autoencoder, wherein the objective function consists of residual constraints at the autoencoder end and low-rank and sparse constraints of the background latent characteristics.

[0058] In this embodiment, as Figure 2 As shown, an objective function for background latent characteristic constraints and autoencoder residual constraints is designed on the output of the convolutional autoencoder. The expression of the objective function is: in, Let w represent the width of the cube data, h represent the height of the cube data, and b represent the bandwidth dimension of the cube data. F Denotes the F-norm, ||·|| * The nuclear norm of a matrix is ​​denoted as . Let denote the difference operator, ||·||1 denote the l1 norm, λ denote the non-negative weighting parameter used to balance low-rank constraints, and β denote the non-negative weighting parameter used to balance sparse constraints. This represents the output of the autoencoder, and θ represents the network parameters of the autoencoder. This means stretching the background reconstruction tensor output by the autoencoder into a matrix along the spectral dimension. Indicates to Perform first-order difference operations.

[0059] S104, the low-rank constraint term, sparse constraint term, and cost function term containing autoencoder parameters of the objective function are iteratively updated using the alternating direction multiplier method to adjust the network parameters of the convolutional autoencoder. When the number of iterations reaches the convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined.

[0060] In this embodiment, the process of iteratively updating the low-rank constraint term, sparse constraint term, and autoencoder parameter term of the objective function is as follows:

[0061] By introducing a first relaxation variable and a second relaxation variable to replace the low-rank constraint term and the sparse constraint term of the objective function, a replaced objective function is obtained. The expression of the replaced objective function is: Where C1 represents the first slack variable and C2 represents the second slack variable;

[0062] The objective function after variable substitution is reconstructed using the Lagrange multiplier method. The expression of the reconstructed objective function is:

[0063] Where P1 and P2 are both Lagrange multipliers, and μ is the Lagrange weight coefficient;

[0064] The first and second slack variables are updated according to the reconstructed objective function, and the solutions of the updated first and second slack variables are calculated respectively.

[0065] The Adam algorithm is used to update the cost function term containing the autoencoder parameters of the solution after substituting the updated first and second slack variables, so as to obtain the network parameters that minimize the cost function of the convolutional autoencoder.

[0066] Specifically, the update steps are as follows:

[0067] (C1) Introducing the first slack variable C1 and the second slack variable C2, the objective function can be constructed as follows:

[0068]

[0069]

[0070] Furthermore, by introducing the Lagrange multiplier method, the objective function can be constructed as follows:

[0071]

[0072] Where P1 and P2 are Lagrange multipliers, and μ is the Lagrange weight coefficient.

[0073] (C2) Update variable C1: The cost function for C1 is:

[0074]

[0075] remember right Perform SVD decomposition, denoted as The solution to C1 is in

[0076] (C3) Update variable C2: The cost function for C2 is:

[0077]

[0078] remember The solution to C2 is: Where soft1(x, a) = sign(x)max(|x|-a, 0), and sign(·) is the sign function.

[0079] (C4) Update network parameters: The cost function with respect to θ is:

[0080]

[0081] Since the cost function for the network parameters of the convolutional autoencoder is the F-norm, the network parameters can be updated using the gradient calculation method in the prior art. Therefore, this embodiment uses the Adam algorithm to update the network parameters of the convolutional autoencoder.

[0082] S105, subtract the background reconstruction tensor output by the current convolutional autoencoder from the hyperspectral preprocessed data to obtain the background reconstruction error tensor.

[0083] In this embodiment, the error tensor is calculated as follows: in, It is a hyperspectral preprocessing data tensor. This represents the background reconstruction tensor output by the convolutional autoencoder after the network parameters have been updated; that is, the background reconstruction tensor output by the current convolutional autoencoder.

[0084] S106: Squaring each spectral dimension slice of the background reconstruction tensor and then summing and taking the square root to obtain the detection map;

[0085] Specifically, the expression for the detection map is calculated. in, Represents the error tensor. Represents the error tensor In the i-th slice of the third dimension, b represents the number of spectra.

[0086] S107, perform anomaly detection on the detection map to obtain anomaly detection results.

[0087] In this embodiment, anomaly detection is performed on the detection map to obtain the anomaly detection results of the hyperspectral image data.

[0088] In summary, the hyperspectral image anomaly detection method provided in this embodiment utilizes the powerful feature learning capability of convolutional autoencoders to extract features from hyperspectral preprocessed data. An objective function containing latent background characteristics constraints, namely low-rank and sparse constraints, is constructed on the output of the convolutional autoencoder to leverage the low-rank and sparse characteristics of the background. Furthermore, this invention employs an efficient alternating direction multiplier method to solve the objective function, thereby adjusting the network parameters of the convolutional autoencoder. This allows the convolutional autoencoder to learn the background of the hyperspectral preprocessed data more fully, reducing errors during background reconstruction and ultimately improving anomaly detection performance.

[0089] In one embodiment, when the number of iterations reaches a convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined, specifically as follows:

[0090] Preset the convergence threshold and the loss value for iterative convergence;

[0091] When the loss value is less than the convergence threshold, i.e. k represents the number of iterations, θ k+1 Let θ represent the network parameters in the (k+1)th iteration. k This represents the network parameters in the k-th iteration. This represents the value of the autoencoder cost function at the (k+1)th iteration. Let represent the value of the autoencoder cost function at the k-th iteration. Stop the iteration, determine the background reconstruction tensor output by the current convolutional autoencoder, and denote it as .

[0092] Based on the above example, this embodiment also provides a comparison result between the detection map after applying this method and the detection map of the prior art, as follows:

[0093] Figure 3 The images show detection maps obtained by different algorithms on the HYDICE dataset. In the images, the larger the pixel value, the brighter the image, and the smaller the pixel value, the darker the image. Figure 3 In the diagram, (a) represents a pseudo-color image of the hyperspectral preprocessed data, (b) represents the ground truth image of the anomalies, (c) represents the detection image obtained by RX, (d) represents the detection image obtained by LRX, (e) represents the detection image obtained by GTVLRR, (f) represents the detection image obtained by Auto-AD, (g) represents the detection image obtained by DeepLR, and (h) represents the detection image obtained by the method of this invention. Figure 3As can be seen, LRX appears to have the best background suppression performance. The method proposed in this invention appears to have the same background suppression performance as DeepLR and Auto-AD, and is superior to other comparative methods except LRX. The LRX-obtained detection map shows better differentiation between background pixels and anomalous pixels than other comparative methods. The anomaly detection performance of this method appears to be the same as DeepLR and Auto-AD.

[0094] Figure 4 The diagram shows the ROC curves of different algorithms' detection results on the test dataset. From... Figure 4 It can be seen that, compared with RX, LRX, GTVLRR, Auto-AD and DeepLR, the method proposed in this invention has the highest detection probability at the corresponding false alarm rate, which fully demonstrates the effectiveness of the algorithm proposed in this invention.

[0095] Figure 5 This diagram shows the separation plots of different algorithms' detection results on the test dataset. The bins represent the pixel value range of 10%–90%, the lines above the bins represent the pixel value range of 90%–100%, and the lines below the bins represent the pixel value range of 0%–10%. For methods of the same type, the distribution plot consists of two bins: the left bin represents the anomaly, and the right bin represents the background. A larger gap between the anomaly and background bins indicates better separation between the anomaly and background in the detection map obtained by that method. Figure 5 As can be seen, the GTVLRR algorithm has the best performance in separating anomalies from the background, and the method proposed in this invention has better separation performance between anomalies and the background than Auto-AD and DeepLR.

[0096] The present invention also provides a hyperspectral image anomaly detection device, which can be used to perform the hyperspectral image anomaly detection method described in any of the above embodiments of the present invention.

[0097] Please see Figure 6 , Figure 6 This diagram illustrates a principle block diagram of a hyperspectral image anomaly detection device according to an embodiment of the present invention. The device includes:

[0098] The preprocessing module 610 is used to normalize the slices of each spectral dimension of the hyperspectral image to obtain hyperspectral preprocessed data.

[0099] Background reconstruction module 620 is used to input the hyperspectral preprocessed data into a pre-constructed convolutional autoencoder with cross-connection layers to reconstruct the hyperspectral background and output the background reconstruction tensor of the hyperspectral preprocessed data.

[0100] The objective function application module 630 is used to stretch the background reconstruction tensor into a matrix along the spectral dimension and apply an objective function to the matrix that minimizes the network parameters of the convolutional autoencoder. The objective function is composed of low-rank constraints and sparse constraints of the latent background characteristics and residual terms at the autoencoder end.

[0101] The iterative update module 640 is used to iteratively update the low-rank constraint term, sparse constraint term, and autoencoder end residual term of the objective function using the alternating direction multiplier method, so as to adjust the network parameters of the convolutional autoencoder. When the number of iterations reaches the convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined.

[0102] The reconstruction error calculation module 650 is used to subtract the background reconstruction tensor output by the current convolutional autoencoder from the hyperspectral preprocessed data to obtain the background reconstruction error tensor.

[0103] The detection map calculation module 660 is used to square the slices of each spectral dimension of the error tensor and then sum and take the square root to obtain the detection map;

[0104] Anomaly detection module 670 is used to perform anomaly detection on the detection image and obtain anomaly detection results.

[0105] The hyperspectral image anomaly detection device in this embodiment of the application is similar to the one described above. Figure 1 The hyperspectral image anomaly detection method shown is an invention based on the same concept. Through the above detailed description of the hyperspectral image anomaly detection method, those skilled in the art can clearly understand the implementation process of the hyperspectral image anomaly detection device in this embodiment. Therefore, for the sake of brevity, it will not be described again here.

[0106] Accordingly, the hyperspectral image anomaly detection provided in this embodiment first constructs a convolutional autoencoder (CAE). Utilizing the powerful feature learning capability of the CAE, features of the hyperspectral preprocessed data are extracted. An objective function containing latent background characteristics constraints, namely low-rank and sparse constraints, is constructed on the output of the CAE to leverage the low-rank and sparse characteristics of the background. Furthermore, this invention employs an efficient alternating direction multiplier method to solve the objective function, thereby adjusting the network parameters of the CAE. This allows the CAE to more fully learn the background of the hyperspectral preprocessed data, reducing errors during background reconstruction and ultimately improving anomaly detection performance.

[0107] Based on the same inventive concept as the hyperspectral image anomaly detection method in the foregoing embodiments, this embodiment of the invention also provides an electronic device, which includes a memory and at least one processor. The memory stores instructions; the at least one processor invokes the instructions in the memory to cause the electronic device to execute the various steps of the hyperspectral image anomaly detection method as described in the foregoing embodiments. The processor may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a computer storage medium to realize the corresponding method flow or corresponding function; the processor described in this embodiment of the invention can be used to execute the operation of the hyperspectral image anomaly detection method.

[0108] Based on the same inventive concept as the hyperspectral image anomaly detection method in the foregoing embodiments, another embodiment of the present invention provides a computer-readable storage medium, which is a memory device in a computer device for storing programs and data. It is understood that the computer-readable storage medium here may include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of the terminal. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the hyperspectral image anomaly detection method in the foregoing embodiments. Those skilled in the art should understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take 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.

[0109] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting anomalies in hyperspectral images, characterized in that, The methods include: Normalize the slices of each spectral dimension of the hyperspectral image to obtain hyperspectral preprocessed data; The hyperspectral preprocessed data is input into a pre-constructed convolutional autoencoder with cross-connection layers to reconstruct the hyperspectral background and output the background reconstruction tensor of the hyperspectral preprocessed data. The background reconstruction tensor is stretched into a matrix along the spectral dimension. An objective function is then applied to this matrix to optimize the network output of the convolutional autoencoder. This objective function consists of low-rank and sparse constraints on the latent background features and residual terms from the autoencoder. The expression for the objective function is: ,in, This represents the hyperspectral preprocessing data tensor. Represents the width of the cube data. Indicates the height of the cube data. Represents the spectral dimension of the cube data. express Norm, The nuclear norm of a matrix is ​​denoted as . Represents the difference operator. express Norm, This represents the non-negative weight parameters used to balance low-rank constraints. This represents the non-negative weighting parameters used to balance sparse constraints. θ represents the output of the autoencoder, and θ represents the network parameters of the autoencoder. This means stretching the background reconstruction tensor output by the autoencoder into a matrix along the spectral dimension. Indicates to Perform first-order difference operations; The low-rank constraint term and sparse constraint term of the objective function are iteratively updated using the alternating direction multiplier method to adjust the network parameters of the convolutional autoencoder. When the number of iterations reaches the convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined. Subtract the background reconstruction tensor output by the current convolutional autoencoder from the hyperspectral preprocessed data to obtain the background reconstruction error tensor. The square root of the squared slices of each spectral dimension of the error tensor is obtained by summing the squares. Anomaly detection is performed on the detection image to obtain anomaly detection results.

2. The hyperspectral image anomaly detection method according to claim 1, characterized in that, The pre-built convolutional autoencoder with cross-connection layers includes an encoder and a decoder, both of which are composed of convolutional layers. The output of the encoder's convolutional layer is concatenated with the output of the corresponding decoder's convolutional layer through the cross-connection layer.

3. The hyperspectral image anomaly detection method according to claim 1, characterized in that, The network parameters and the low-rank and sparse constraint terms of the objective function are iteratively updated using the alternating direction multiplier method, including: By introducing a first relaxation variable and a second relaxation variable to replace the low-rank constraint term and the sparse constraint term of the objective function, a replaced objective function is obtained. The expression of the replaced objective function is: ,in, Represents the first slack variable. Indicates the second slack variable; The objective function after substitution is reconstructed using the Lagrange multiplier method, resulting in the reconstructed objective function, the expression of which is: ,in, and All are Lagrange multipliers. These are the Lagrange weighting coefficients; The first and second slack variables are updated according to the reconstructed objective function, and the solutions of the updated first and second slack variables are calculated respectively. The Adam algorithm is used to update the optimized cost function with autoencoder parameters by substituting the solution with the updated first and second relaxation variables, thus obtaining the network parameters that minimize the convolutional autoencoder cost function.

4. The hyperspectral image anomaly detection method according to claim 1, characterized in that, When the number of iterations reaches the convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined, specifically as follows: Preset the convergence threshold and the loss value for iterative convergence; When the loss value is less than the convergence threshold, the iteration stops, and the background reconstruction tensor output by the current convolutional autoencoder is determined.

5. The hyperspectral image anomaly detection method according to claim 4, characterized in that, The expression for the loss value being less than the convergence threshold is: k represents the number of iterations. This represents the network parameters in the (k+1)th iteration. This represents the network parameters in the k-th iteration. The autoencoder loss function represents the first... The value of the second time. The autoencoder loss function represents the first... The value of the second time.

6. The hyperspectral image anomaly detection method according to claim 1, characterized in that, Calculate the expression for the detection map ,in, Represents the error tensor. Represents the error tensor The third dimension There are 1 slice, where b represents the number of spectral bands.

7. A hyperspectral image anomaly detection device, characterized in that, The device includes: The preprocessing module is used to normalize the slices of each spectral dimension of the hyperspectral image to obtain hyperspectral preprocessed data. The background reconstruction module is used to input the hyperspectral preprocessed data into a pre-constructed convolutional autoencoder with cross-connection layers to reconstruct the hyperspectral background and output the background reconstruction tensor of the hyperspectral preprocessed data. The objective function application module is used to stretch the background reconstruction tensor into a matrix along the spectral dimension, and apply an objective function to the matrix that optimizes the network output of the convolutional autoencoder. The objective function consists of low-rank and sparse constraint terms of the background latent characteristics, as well as autoencoder residual terms. The expression for the objective function is: ,in, This represents the hyperspectral preprocessing data tensor. Represents the width of the cube data. Indicates the height of the cube data. Represents the spectral dimension of the cube data. express Norm, The nuclear norm of a matrix is ​​denoted as . Represents the difference operator. express Norm, This represents the non-negative weight parameters used to balance low-rank constraints. This represents the non-negative weighting parameters used to balance sparse constraints. θ represents the output of the autoencoder, and θ represents the network parameters of the autoencoder. This means stretching the background reconstruction tensor output by the autoencoder into a matrix along the spectral dimension. Indicates to Perform first-order difference operations; The iterative update module is used to iteratively update the low-rank constraint term and sparse constraint term of the objective function using the alternating direction multiplier method to adjust the network parameters of the convolutional autoencoder. When the number of iterations reaches the convergence threshold, the background reconstruction tensor output by the current convolutional autoencoder is determined. The reconstruction error calculation module is used to subtract the background reconstruction tensor output by the current convolutional autoencoder from the hyperspectral preprocessed data to obtain the error tensor after background reconstruction. The detection map calculation module is used to square the slices of each spectral dimension of the error tensor, sum them up, and take the square root to obtain the detection map; An anomaly detection module is used to perform anomaly detection on the detection image and obtain anomaly detection results.

8. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the steps of a hyperspectral image anomaly detection method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of a hyperspectral image anomaly detection method as described in any one of claims 1 to 6.