Hyperspectral anomaly detection method based on background purification and spectral difference guidance
By employing background purification and spectral difference-guided methods, the problems of high computational cost and low detection accuracy in hyperspectral data processing are solved, achieving efficient hyperspectral anomaly detection, enhancing the separation between background and anomalies, and improving detection accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIDIAN UNIV
- Filing Date
- 2023-11-06
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies suffer from problems such as high computational load, decreased detection accuracy, and insufficient background separation when processing hyperspectral data. Autoencoders are inefficient in high-dimensional data processing and cannot effectively separate background and anomalies.
A method based on background purification and spectral difference guidance is adopted. Superpixel segmentation and density clustering are performed through multiple spectral statistical properties to construct a deep autoencoder network. Combined with fractional Fourier transform and Mahalanobis distance calculation, hyperspectral anomaly detection is achieved.
It improves the accuracy and efficiency of hyperspectral anomaly detection, reduces the impact of background on detection, enhances the separation between anomalies and background, and improves detection results.
Smart Images

Figure CN117495809B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, specifically relating to a hyperspectral anomaly detection method based on background purification and spectral difference guidance. Background Technology
[0002] Autoencoders are a typical unsupervised feature extractor in deep learning, offering significant advantages when processing large amounts of data. However, handling high-dimensional data is challenging, posing a considerable difficulty for autoencoders in feature extraction. Directly training with raw hyperspectral data incurs substantial time and memory consumption. Furthermore, the presence of diverse information in raw hyperspectral images inevitably forces the learning of anomalous features, leading to anomaly reconstruction and decreased detection accuracy. In addition, most autoencoder-based anomaly detection methods focus on adjusting the network structure to improve performance, often neglecting the spectral presence of background or anomalies in the hyperspectral image, resulting in insufficient separation between anomalies and background. Summary of the Invention
[0003] To overcome the shortcomings of the existing technologies, this invention proposes a hyperspectral anomaly detection method based on background purification and spectral difference guidance. This method addresses the problems of high computational load and decreased detection accuracy caused by directly training the original hyperspectral data, and further resolves the impact of insufficient background separation on the accuracy of hyperspectral anomaly detection.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0005] A hyperspectral anomaly detection method based on background purification and spectral difference guidance includes the following steps:
[0006] Step 1: Utilize the statistical properties of multiple spectra to establish a background purification method based on superpixel segmentation and density clustering;
[0007] Step 2: Use the background purification method described above to process the hyperspectral image. Background purification was performed to obtain a nearly pure background sample. The input is fed into a deep autoencoder network for training to obtain the weights and biases of the deep autoencoder network; where d and n These represent the spectral dimension and the number of pixels, respectively. x i Represents hyperspectral images H The first in i 1 pixel.
[0008] Step 3: After the network training is complete, input the hyperspectral image. HThe reconstructed hyperspectral image is obtained by applying it to a deep autoencoder network. H 0, then calculate H 0 and H The reconstruction error between them is used to obtain the feature separation benchmark map. R pre ;
[0009] Step 4, in the spectral difference-guided method, the hyperspectral image is processed. H Perform a fractional Fourier transform to obtain the feature separation result. H (Fr) ;
[0010] Step 5: Using a feature separation method guided by spectral differences, separate the feature from the baseline image. R pre The feature separation weight vector is obtained from the process. W R , W R and H (Fr) Combined with the obtained spectral difference-guided results ;
[0011] Step 6: Calculate the spectral difference-guided result. The anomaly probability of each pixel in the dataset, and the total anomaly probabilities, constitute the detection result. Y last .
[0012] The present invention also provides a computer-readable storage medium for storing a computer program that causes a computer to perform the hyperspectral anomaly detection method based on background purification and spectral difference guidance as described above.
[0013] The present invention also provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the hyperspectral anomaly detection method based on background purification and spectral difference guidance as described above.
[0014] Existing technologies often process massive amounts of data through autoencoders. However, high-dimensional data, such as hyperspectral data, still poses a great challenge to the feature extraction work of autoencoders and causes a lot of time and memory consumption. During the training process, it is inevitable that some abnormal features will be learned, which will reduce the detection accuracy. Moreover, existing technologies focus on adjusting the network structure to improve the detection performance of the algorithm, without paying attention to the background and abnormal spectral properties.
[0015] In comparison, the beneficial effects of this invention are as follows: First, for high-dimensional data such as hyperspectral image data, this invention constructs a robust stacked autoencoder to solve the difficulties of traditional techniques in terms of memory, training time, and training accuracy; second, this invention focuses on the research of background and anomalies in hyperspectral images, which has received less attention in existing technologies. By reducing the influence of background on anomaly detection through background purification operations, it increases the algorithm's separation of anomalies and background, thereby improving the anomaly detection effect. Attached Figure Description
[0016] Figure 1 This is a flowchart of the present invention.
[0017] Figure 2 This is a structural diagram of the stacked self-encoder designed for this invention.
[0018] Figure 3 This is a result diagram of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0020] This invention provides a hyperspectral anomaly detection method based on background purification and spectral difference guidance. It utilizes multiple hyperspectral datasets for assistance, proposes a deep autoencoder network based on background purification and an innovative method guided by spectral differences, and uses the combination of these two approaches to perform anomaly detection on hyperspectral images. The method first employs a background purification method based on multiple spectral statistical properties to purify the hyperspectral image background, obtaining approximately pure samples. Second, the samples obtained in the previous step are input into a deep autoencoder network for training. After training, the hyperspectral image is input again to obtain reconstructed samples, which are then used... Norm calculation reconstructs the error (i.e., the feature separation baseline map); however, in the feature separation baseline map obtained in the previous step, there are still some anomalies that are missed. This indicates that in the original hyperspectral dataset, some anomalies and the background have little spectral difference. To address this issue, this invention introduces a spectral difference guidance method to amplify the difference proposed in the previous step; finally, the anomaly score of the spectral difference guidance result is calculated using Mahalanobis distance to obtain the anomaly detection result.
[0021] To meet the requirements of anomaly detection methods, this invention requires the construction and search of a hyperspectral image dataset for training.
[0022] The anomaly detection method of this invention requires a complete hyperspectral dataset, preferably with a large amount of data and containing a wide range of background information, in order to achieve better detection results.
[0023] In one embodiment of the present invention, eight sets of real hyperspectral remote sensing images collected under different scenarios are selected as experimental datasets to evaluate the detection performance of the proposed anomaly detection method.
[0024] like Figure 1 As shown, this method is implemented through the following steps:
[0025] Step 1: Based on the statistical properties of multiple spectra, a background purification method based on superpixel segmentation and density clustering is constructed.
[0026] A hyperspectral image is a cube composed of hundreds of consecutive, narrow bands stacked together. It has two spatial dimensions and one spectral dimension, with the spectral range extending from ultraviolet to near-infrared and even short-wave infrared. Hyperspectral images not only contain rich spectral information but also improve spectral resolution to around 10 nm. Each pixel in a hyperspectral image has a corresponding continuous spectral curve, providing unique spectral characteristics for each pixel.
[0027] Background purification refers to the process of filtering and removing anomalous pixels from hyperspectral images using a predetermined strategy to obtain clean background pixel samples. Background purification facilitates subsequent processing tasks such as feature extraction. Especially when using hyperspectral images as training samples to train autoencoder networks, the background-purified dataset helps the autoencoder learn fewer anomalous pixels. Therefore, the deep autoencoder network based on background purification designed in this invention can reduce the error between the reconstructed background and the original background, thereby improving detection performance. For example, this invention uses superpixel segmentation and density clustering methods for background purification.
[0028] Step 2: Use the background purification method described above to process the hyperspectral image. Background purification was performed to obtain a nearly pure background sample. The input is fed into a deep stacked autoencoder network for training to obtain the weights and biases of the deep autoencoder network; where d and n These represent the spectral dimension and the number of pixels, respectively. x i This represents the i-th pixel in the hyperspectral image.
[0029] Step 3: After the network training is complete, input the hyperspectral image. H The reconstructed hyperspectral image is obtained by applying it to a deep autoencoder network. H 0, then calculate H 0 and HThe reconstruction error between them is used to obtain the feature separation benchmark map. R pre .
[0030] The background purification method described above is used to obtain approximately pure background samples for hyperspectral images. P The input is fed into a deep autoencoder network for training. After training, a hyperspectral image is input. H The reconstructed hyperspectral image is obtained by reconstructing the image using a trained deep autoencoder network, and then... Norm calculation to reconstruct hyperspectral images H 0 and hyperspectral images H The reconstruction error between them yields the feature separation benchmark map. R pre .
[0031] Step 4: In the spectral difference-guided method, the hyperspectral image is processed. H Perform a fractional Fourier transform to obtain the feature separation result. H (Fr) .
[0032] For pixels in hyperspectral image H Its fractional Fourier transform is expressed as:
[0033]
[0034] Among them, kernel function K (Fr) (•) represents
[0035]
[0036]
[0037] In the formula, u (Fr) and v (Fr) It is an index. It is the rotation angle, determined by... p (Fr) Decide, p (Fr) These are fractional transformation coefficients, with a value of 0.9.
[0038] p (Fr) A higher value means the fractional Fourier transform output can describe more Fourier domain information, and vice versa. In this invention, adjusting... p (Fr)The value is set to 0.9 to balance the original spectral domain and Fourier domain information representation of the hyperspectral image, making the spectral difference between the anomaly and the background increasingly larger, thus achieving better detection results in subsequent processing. Each pixel... x i After fractional Fourier transform processing, the intrinsic feature map, i.e., the feature separation result, can be obtained. H (Fr) .
[0039] Step 5: Using a feature separation method guided by spectral differences, separate the feature reference map. R pre The feature separation weight vector is obtained from the process. W R , W R and H (Fr) Combined with the obtained spectral difference-guided results .
[0040] against R pre The feature separation method studied in this invention addresses the characteristic of high abnormal pixel values and low background pixel values by using a feature separation benchmark image. R pre Convert to feature separation weight vector W R , the elements w r Depend on R pre Pixels r pre Calculated
[0041]
[0042] In the formula, It is a coefficient that adjusts the degree of feature separation, and is a constant of 1.
[0043] Again W R Optimize intrinsic feature separation results H (Fr) Spectral difference-guided results were obtained. , can be represented as
[0044]
[0045] Step 6: Calculate the spectral difference-guided results. The anomaly probability of each pixel in the dataset, and the total anomaly probabilities, constitute the detection result. Y last。
[0046] Guiding Results The spectral differences between the anomaly and the background are more significant compared to the original image. Finally, Mahalanobis distance is used to guide the results based on these spectral differences. Calculate the anomaly score to obtain the anomaly detection result. Y last , can be represented as
[0047]
[0048]
[0049]
[0050] In the formula, express The i-th pixel to be detected d 3D spectral vector, and They are respectively The mean vector and covariance matrix, i = 1, 2, …, n , n It is a hyperspectral image H The number of pixels in the image.
[0051] under Figure 2 This is the deep autoencoder network structure of the present invention.
[0052] The following is combined with Figure 3 The anomaly detection effect of the present invention will be further explained.
[0053] 1. Simulation conditions:
[0054] To verify the effectiveness of the hyperspectral anomaly detection method proposed in this invention, four hyperspectral datasets—Beach-1, Beach-2, Airport-3, and Urban-2—were selected for experiments, and the experimental results of the method were evaluated using corresponding evaluation metrics.
[0055] 2. Simulation Results and Analysis:
[0056] Figure 3 The results of this invention are shown in Figure 2 (represented by Prooised 2), along with a comparison figure with other hyperspectral anomaly detection methods, to illustrate the anomaly detection effect of this invention.
[0057] Figure 3(a) shows the Beach-1 dataset, where the background consists of the sea and islands, and the anomaly is a ship in the upper right corner. However, the islands interfere with anomaly detection during the detection process. Comparing the detection results, it can be seen that the GRX method performs well overall, but the detected ship shape is incomplete; the KRX method detects the complete shape of the ship, but treats the islands as more anomalous targets, resulting in a significant discrepancy and failing to detect the necessary anomaly information; the CRD method also suffers from incomplete ship shape detection and fails to suppress noise; the RCRD method completely highlights the island region as an anomaly, assuming the ship's anomaly level is low, which is inconsistent with the anomaly detection benchmark; the LSDM-MoG method still treats the islands as large-area anomalies; the SAE and RGAE methods also treat the islands as more anomalous targets. This invention improves upon all of the above problems, suppressing most of the background area. Although it still detects a small number of islands, their anomaly level is significantly lower than that of the ship, and the ship's shape is complete with less other interfering information. Therefore, the method of this invention is very effective for anomaly detection in hyperspectral images.
[0058] Figure 3 (b) shows the Beach-2 dataset. The background of the Beach-2 dataset consists of the sea, beach, and arc-shaped breakwater, while the anomalies are scattered diamond-shaped fishing grounds. Comparing the detection results, it can be seen that the GRX method roughly detects the fishing grounds but also considers the beach as an anomaly; the KRX method, while detecting complete fishing grounds, treats the beach, breakwater, and other background elements as anomalies, severely interfering with the judgment of the anomalies that need to be detected; the CRD method considers the degree of beach anomaly to be similar to that of the fishing grounds and fails to suppress noise; the RCRD method considers some beaches as more anomalous targets; the LSDM-MoG method has insufficient separation between anomalies and background and considers the beach as a more anomalous target; the SAE and RSAE methods have similar detection results, detecting only a small portion of the fishing grounds and considering the beach and breakwater as more anomalous; this invention improves upon the above shortcomings, effectively separating the background from the anomalous targets and detecting fishing grounds with complete shapes.
[0059] Figure 3(c) represents the Airport-3 dataset. The background of the Airport-3 dataset is a complex airport with ground buildings. Anomalies include two groups of parked aircraft and a few scattered aircraft, posing a significant challenge to anomaly detection. Comparing the detection results, the GRX method only detected some aircraft; the KRX method, while detecting most aircraft, also treated many background details as anomalies, severely interfering with anomaly judgment; the CRD method only detected some aircraft with incomplete shapes; the RCRD method considered the anomalies of the runway, ground, and some buildings to be similar to those of aircraft, leading to false positives; the LSDM-MoG method considered the anomalies of the parking stands and some terminal buildings to be higher than those of aircraft, while also exhibiting poor noise suppression; the SAE and RGAE methods both only detected some anomalies, failing to fully reflect the presence of anomalies in the image; this invention improves upon all of the above problems, detecting aircraft with complete shapes while also suppressing background noise to a certain extent.
[0060] Figure 3 In the middle (d), the Urban-2 dataset shows anomalies in two groups of vehicles in a parking lot. The rightmost group of vehicles has a larger area and is densely distributed, making it easily mistaken for background. Comparing the detection results, the GRX method has a mediocre background suppression effect, and some vehicles show low anomaly severity. The KRX method detects all vehicles but does almost no background or noise suppression. The CRD method has insufficient background suppression and only detects some vehicles. The RCRD method improves background suppression compared to the CRD method, but still fails to detect complete vehicles. The LSDM-MoG method is insufficient in distinguishing between background and anomalies and also introduces strip noise. The SAE and RGAE methods detect relatively complete anomalies, but still contain some noise. This invention improves upon all the above shortcomings, achieving better background and noise suppression and detecting anomalies with complete shapes.
[0061] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.
Claims
1. A hyperspectral anomaly detection method based on background purification and spectral difference guidance, characterized in that, Includes the following steps: Step 1: Utilize the statistical properties of multiple spectra to establish a background purification method based on superpixel segmentation and density clustering; Step 2: Use the background purification method described above to process the hyperspectral image. Background purification was performed to obtain a nearly pure background sample. The input is fed into a deep autoencoder network for training to obtain the weights and biases of the deep autoencoder network; in d and n These represent the spectral dimension and the number of pixels, respectively. x i Represents the first in the hyperspectral image i 1 pixel; Step 3: After the network training is complete, input the hyperspectral image. H The reconstructed hyperspectral image is obtained by applying it to a deep autoencoder network. H 0, then calculate H 0 and H The reconstruction error between them is used to obtain the feature separation benchmark map. R pre ; Step 4, in the spectral difference-guided method, the hyperspectral image is processed. H Perform a fractional Fourier transform to obtain the feature separation result. H (Fr) ; Step 5: Using a feature separation method guided by spectral differences, separate the feature from the baseline image. R pre The feature separation weight vector is obtained from the process. W R , W R and H (Fr) Combined with the obtained spectral difference-guided results The method is as follows: Feature separation benchmark map R pre Convert to feature separation weight vector W R , the elements w r Depend on R pre Pixels r pre Calculated In the formula, It is a coefficient that adjusts the degree of feature separation; Again W R Optimize intrinsic feature separation results H (Fr) Spectral difference-guided results were obtained. , represented as Step 6: Calculate the spectral difference-guided result. The anomaly probability of each pixel in the dataset, and the total anomaly probabilities constitute the detection result. Y last .
2. The hyperspectral anomaly detection method based on background purification and spectral difference-guided method according to claim 1, characterized in that, In step 1, background purification refers to using a set strategy to filter and remove abnormal pixels in the hyperspectral image to obtain a pure background pixel sample P.
3. The hyperspectral anomaly detection method based on background purification and spectral difference-guided method according to claim 1, characterized in that, Step 3 involves obtaining the feature separation benchmark map through the following steps. R pre : The background purification method described above is used to obtain approximately pure background samples for hyperspectral images. P The input is fed into a deep autoencoder network for training. After training, a hyperspectral image is input. H The reconstructed hyperspectral image is obtained by reconstructing H using a trained deep autoencoder network, and then... Norm calculation to reconstruct hyperspectral images H 0 and hyperspectral images H The reconstruction error between them yields the feature separation benchmark map. R pre .
4. The hyperspectral anomaly detection method based on background purification and spectral difference-guided method according to claim 1, characterized in that, Step 4 obtains the feature separation result through the following steps. H (Fr) : For pixels in hyperspectral image H Its fractional Fourier transform is expressed as In the formula, the kernel function K (Fr) (•) represents In the formula, u (Fr) and v (Fr) It is an index. It is the rotation angle, determined by... p (Fr) Decide, p (Fr) These are fractional-order transform coefficients; Each pixel x i After fractional Fourier transform processing, the intrinsic feature map is obtained, which is the feature separation result. H (Fr) .
5. The hyperspectral anomaly detection method based on background purification and spectral difference-guided method according to claim 4, characterized in that, The fractional-order transformation coefficients p (Fr) The value is 0.
9.
6. The hyperspectral anomaly detection method based on background purification and spectral difference-guided method according to claim 1, characterized in that, The coefficient for adjusting the degree of feature separation =1.
7. The hyperspectral anomaly detection method based on background purification and spectral difference-guided method according to claim 1, characterized in that, Step 6 involves calculating the spectral difference guidance result using Mahalanobis distance. The anomaly probability of each pixel in the dataset, and the total anomaly probabilities constitute the anomaly detection result. Y last The steps are as follows: In the formula, express The i-th pixel to be detected d 3D spectral vector, and They are respectively The mean vector and covariance matrix, i = 1, 2, …, n , n It is a hyperspectral image H The number of pixels in the image.
8. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1-7.
9. A computer program product containing instructions, characterized in that, When the instructions are executed on a computer, the computer performs the method according to any one of claims 1-7.