Hyperspectral anomaly detection method based on band screening joint feature encoder
By using band screening and combined feature encoder methods in hyperspectral anomaly detection technology, the problems of data redundancy and insufficient feature extraction are solved, and efficient hyperspectral anomaly detection is achieved, and the detection rate and real-time performance are significantly improved.
Patent Information
- Application Number
- CN202510043017.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-23
AI Technical Summary
The existing hyperspectral anomaly detection technology has problems such as data redundancy, insufficient feature extraction and insufficient detection performance. Especially when processing high-dimensional and complex hyperspectral data, the calculation efficiency is low and the real-time performance is poor, the detection rate fails to exceed 95%, and the false alarm rate is high.
The hyperspectral anomaly detection method based on the band screening joint feature encoder is adopted. By treating the bands of the hyperspectral image as a sequence, the spectral domain difference weight and spatial domain distance weight of the pixel points are determined, the joint feature weight is obtained, the target pixel reconstruction is carried out, and the spectral cosine similarity algorithm is used to filter the redundant bands to reduce data redundancy.
It effectively reduces data redundancy, enhances feature expression capabilities, improves detection accuracy and real-time performance, with the detection rate exceeding 98%, and the false alarm rate is less than 10^-4, meeting the needs of practical applications.
Smart Images

Figure CN120032244A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of hyperspectral image processing, and in particular relates to a hyperspectral anomaly detection method based on band screening and joint feature encoder. Background Art
[0002] Hyperspectral image data has high dimensionality and complex features, and its anomaly detection task faces huge challenges. Existing deep learning technologies, especially the Transformer model, have made significant progress in hyperspectral data processing, but the application of the ViT (Vision Transformer) model in hyperspectral anomaly detection is still shallow, and there are problems such as insufficient utilization of spatial spectral features.
[0003] At present, hyperspectral anomaly detection methods can be mainly divided into three categories: traditional methods based on statistical characteristics, methods based on machine learning, and methods based on deep learning. Among them, the RX algorithm, as a classic statistical method, calculates the difference between pixels and background based on Mahalanobis distance. It has the advantages of simple calculation and no need for prior knowledge, but it has strict assumptions on background distribution, the detection rate is usually less than 85%, and the false alarm rate is high (>10 -2 ). Methods based on subspace transformation (such as PCA, ICA, etc.) can effectively reduce the data dimension, but due to the use of linear transformation, it is difficult to handle complex nonlinear features. Among machine learning methods, support vector machine (SVM) methods have good generalization ability. Representative works such as SVDD (Support Vector Data Description) have achieved a detection rate of about 92% in hyperspectral anomaly detection, but its computational complexity is high and parameter adjustment is difficult. Methods based on sparse representation use the low-rank characteristics of background pixels for anomaly detection, which can better handle nonlinear features and achieve a detection rate of 93%, but have high requirements for dictionary construction, and have problems such as large computational workload and high memory usage. Encoder methods perform anomaly detection through reconstruction errors, have strong feature learning capabilities, and can achieve a detection rate of 95%, but require a large number of training samples and are prone to overfitting. CNN-based methods can automatically extract spatial features, but are still insufficient in the fusion of spatial and spectral information, and have a large number of parameters. In particular, current deep learning methods generally have the problems of low computational efficiency and poor real-time performance. It usually takes more than 10 seconds to process 1024×1024×200 data.
[0004] The main challenges faced by existing technologies can be summarized into three aspects: first, data processing problems. Hyperspectral data has serious band redundancy (correlation between adjacent bands is as high as 0.95 or above) and noise interference (signal-to-noise ratio is usually <30dB); second, algorithm design problems. Existing methods are still insufficient in spatial-spectral information fusion and have low computational efficiency; finally, application effect problems. The detection rate of the optimal method has not exceeded 95%, and the false alarm rate is generally higher than 10. -3 , it is difficult to meet the needs of actual applications. Hyperspectral anomaly detection technology is developing towards the integration of deep learning and traditional methods, the introduction of attention mechanism, and lightweight network design. Practical applications have put forward higher requirements on detection performance: the detection rate must exceed 98%, the false alarm rate must be lower than 10^-4, and the processing delay must be less than 100ms and the video memory occupancy must be less than 8GB. Therefore, how to effectively reduce data redundancy, realize deep fusion of spatial and spectral information, and improve detection accuracy and real-time performance are key scientific issues that need to be solved urgently. Summary of the invention
[0005] In view of this, the main purpose of the present invention is to provide a hyperspectral anomaly detection method based on band screening and joint feature encoder.
[0006] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0007] An embodiment of the present invention provides a hyperspectral anomaly detection method based on band screening and joint feature encoder, the method comprising:
[0008] The bands of the hyperspectral image are regarded as a sequence, and each pixel point sequence is regarded as a single longitudinal spectrum;
[0009] Determining the spectral domain difference weight of the target pixel point in the pixel point sequence within the local range of the k-band;
[0010] Determine the reconstructed grayscale value of the target pixel according to the spectral domain difference weight of the target pixel point in the local range of the k-band;
[0011] Determine the spatial domain distance weight of the target pixel point in the pixel point sequence within the local range of the k-band;
[0012] Obtaining a joint feature weight in a target pixel reconstruction process according to the spectral domain difference weight and the spatial domain distance weight;
[0013] Obtaining the grayscale size of the target pixel reconstruction according to the joint feature weight and the target pixel reconstruction grayscale value;
[0014] The cosine similarity of each band is determined according to the spectral cosine similarity algorithm and the grayscale size of the target pixel reconstruction;
[0015] It is determined whether the image of each band is redundant or valid according to the cosine similarity of each band.
[0016] In the above scheme, the determination of the spectral domain difference weight of the target pixel point in the pixel point sequence in the local range of the k-band specifically includes: assuming that the value of the pixel point located at the position (i, j) on the two-dimensional image plane on the spectral sequence is Where n is the number of bands, then the characteristic grayscale of the target pixel at (i, j) in the local range of band k is Where g k represents the characteristic grayscale in the local range of the k-band, N represents the number of pixels in the current local area, then the characteristic vector v a = {g 1 ,g 2 ,…,g n};
[0017] Quantify the similarity between the target pixel spectral vector and the feature vector. In the formula, w i,j (k) refers to the spectral difference weight at position (i, j) in the two-dimensional image plane under the k-band, v i,j is the spectral vector of the pixel at point (i, j).
[0018] In the above scheme, the target pixel reconstructed gray value is determined according to the spectral domain difference weight of the target pixel in the local range of the k-band, specifically including: calculating the spectral difference weight sum of all pixels in the area as a basis, and then dividing the spectral domain difference weight of each pixel by the sum, and the specific expression is: Where w i,j '(k) represents the spectral domain difference weight at position (i, j) in the two-dimensional image plane in band k after normalization;
[0019] The reconstructed gray value of the target pixel can be obtained by summing the gray values of all pixels in the area under the k band through weighted calculation. In the formula It represents the gray value of the target pixel at the position (a, b) in the two-dimensional image plane under the k-band, which is finally reconstructed by combining the spectral domain difference weights with the pixel values in the local area.
[0020] In the above scheme, the spatial domain distance weight of the target pixel point in the pixel point sequence within the local range of band k is specifically determined by: defining the gray value of the pixel point located at position (i, j) on the two-dimensional image plane on band k as According to the Euclidean distance calculation formula, the Euclidean distance d between the target pixel and the related pixel is: Where (a, b) is the coordinate point of the target pixel, (i1 ,j 1 ) are the coordinate points of the relevant pixels;
[0021] Combined with the Gaussian function, the spatial domain distance weight is Where w(d) is the weight calculated based on the distance d, and σ is the standard deviation of the Gaussian function.
[0022] In the above scheme, the spatial domain distance weights are integrated and normalized, and the final spatial domain distance weights of the relevant pixels should be In the formula, m and n refer to the horizontal and vertical coordinate ranges within the inner and outer intervals.
[0023] In the above scheme, the joint feature weight in the target pixel reconstruction process is obtained according to the spectral domain difference weight and the spatial domain distance weight, which specifically includes: determining the joint feature weight in the target pixel reconstruction process according to w(d,k)=th·w(d)+(1-th)·w(k), where th represents the correlation coefficient of the spectral domain difference weight and the spatial domain distance weight in the joint feature weight.
[0024] In the above scheme, the grayscale size of the target pixel reconstruction is obtained according to the joint feature weight and the target pixel reconstruction grayscale value, specifically including: according to Determine the grayscale size of the target pixel reconstructed at the k-band (a, b) point.
[0025] In the above scheme, the cosine similarity of each band is determined according to the spectral cosine similarity algorithm and the grayscale size of the target pixel reconstruction, specifically including: Determine the cosine similarity of each band, where m and n represent the length and width of the two-dimensional image matrix image. It means that the two-dimensional image matrix under the k-th band is compared and calculated. represents the two-dimensional image matrix of the reference band, i and j represent the rows and columns in the current two-dimensional image matrix, and th represents the correlation coefficient of the spectral domain difference weight and the spatial domain distance weight in the joint feature weight.
[0026] In the above scheme, the method of determining whether the image of each band is redundant or valid according to the cosine similarity of each band specifically includes: Determine whether the image in each band is redundant or valid.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] The present invention effectively solves the problems of data redundancy, insufficient feature extraction and insufficient detection performance existing in the prior art by innovatively combining band screening, joint feature coding and improved ViT network architecture. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings described herein are used to disclose a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0030] Figure 1 It is a flow chart of a hyperspectral anomaly detection method based on band screening and joint feature encoder provided by an embodiment of the present invention;
[0031] Figure 2 is a schematic diagram of a joint feature filtering template in an embodiment of the present invention;
[0032] Figure 3 is a band cosine similarity heat map in an embodiment of the present invention;
[0033] Figure 4 Schematic diagram of the pseudo color of the scene of the experimental data set (top) and the target true value (bottom) in an embodiment of the present invention;
[0034] Figure 5 is a logarithmic ROC curve diagram of the San Diego data set detection results in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0036] The embodiment of the present invention provides a hyperspectral anomaly detection method based on band screening and joint feature encoder, such as Figure 1 As shown, the method includes:
[0037] Step 101: The bands of the hyperspectral image are regarded as a sequence, and each pixel point sequence is regarded as a single longitudinal spectrum;
[0038] Specifically, the fundamental idea of assigning spectral domain difference weights is to compare the difference scores of the similarity between the spectra of each point in the local area and the target spectrum. If the bands of the hyperspectral image are regarded as sequences, each pixel point sequence can be regarded as a single longitudinal spectrum. Since background pixels occupy the vast majority in the hyperspectral image, for the local area around the reconstructed target pixel, the local pixel mean under each band is selected as the characteristic grayscale under the current band, and the characteristic vector v composed of the characteristic grayscale is a The background spectrum in the current local area can be similarly characterized. Therefore, the local area is similar to the feature vector v aThe more similar the spectral vectors are, the greater the probability that the pixel is represented as a background pixel, and a larger spectral weight value is assigned.
[0039] Step 102: determining a spectral domain difference weight of a target pixel point in the pixel point sequence within a local range of the k-band;
[0040] Specifically, the local grayscale mean is calculated for each band in the two-dimensional local area of the space to characterize the characteristic grayscale in the area under the current band. Assume that the value of the pixel point at position (i, j) on the two-dimensional image plane in the spectral sequence is Where n is the number of bands, the characteristic grayscale of the target pixel at (i, j) in the local range of band k is Where g k represents the characteristic grayscale in the local range of the k-band, N represents the number of pixels in the current local area, then the characteristic vector v a = {g 1 ,g 2 ,…,g n};
[0041] Since abnormal points often occupy only a few points in the hyperspectral image data, the feature vector can be approximately regarded as the background spectral vector within the local area. The more similar the spectral vector is to the feature vector, the higher the possibility that the pixel is identified as the background vector. In the filtering process, a larger spectral domain difference weight should be given to facilitate the background grayscale reconstruction of the target pixel, thereby achieving background purification. The spectral cosine calculation formula is introduced to quantify the similarity between the target pixel spectral vector and the feature vector. In the formula, w i,j (k) refers to the spectral difference weight at position (i, j) in the two-dimensional image plane under the k-band, v i,j is the spectral vector of the pixel at point (i, j).
[0042] Step 103: determining a target pixel reconstructed grayscale value according to a spectral domain difference weight of the target pixel point in a local range of the k-band;
[0043] Specifically, since the weights in the current local area need to be unified during the pixel grayscale reconstruction process, and in order to distinguish the weight percentages between abnormal pixels and background pixels, redistribution is achieved through weight normalization. First, the spectral difference weights of all pixels in the area are calculated as the basis, and then the spectral domain difference weights of each pixel are divided by it. The specific expression is: Where w i,j '(k) represents the spectral domain difference weight at position (i, j) in the two-dimensional image plane in band k after normalization;
[0044] Step 104: determining a spatial domain distance weight of a target pixel point in the pixel point sequence within a local range of the k-band;
[0045] Specifically, however, simply considering pixel changes is not enough. Due to the non-singularity of the background of the hyperspectral image, if the restricted local area is large, background pixels that are slightly farther away may be introduced as background pixels in the current target pixel-related area. The lack of similarity between the two to a certain extent may cause the final reconstruction result to be offset from the background pixel values in the original related area, ultimately causing purification anomalies and the appearance of abnormal pixels that should not appear. Therefore, a Gaussian weight distribution function based on distance weights is introduced to assign distance weights in the spatial domain. The principle is that the closer the pixel is to the target pixel, the greater the grayscale similarity between the target pixel and the target pixel. When the target pixel is a background pixel, it can effectively assign a high weight value to the adjacent background pixel, and the target pixel is still a background pixel after reconstruction. However, when the target pixel is an abnormal point, since the abnormal target is small in size but still has a planar local aggregation phenomenon, when the adjacent abnormal pixels also obtain high weights, it deviates from the purpose of purification and reconstruction. Therefore, a double window matrix is introduced to restrict the spatial domain. The schematic diagram of its principle is shown in the figure. Figure 2 shown.
[0046] Figure 2 It can be found that the local area is composed of two rectangular intervals of different sizes. First, the large rectangular interval is responsible for limiting the farthest adjacent distance of the relevant pixels. This is because although the pixels within a certain distance range may be related to the target pixel, there are also background pixels, but the pixels at too far a distance already belong to other types of background modules. If they are introduced, the current local area background will be polluted, which will increase the false alarm probability of abnormal pixels. Secondly, the pixels in the small rectangular interval will be isolated. This is because abnormal targets are often accompanied by local aggregation. If there are a large number of abnormal pixels within a certain spatial range, the weight value assigned during the reconstruction process will also increase. Therefore, based on the perspective of suppressing abnormal pixels, the pixels within a certain adjacent area are restricted from participating in the pixel filtering process. Although this will also suppress the weight assignment of adjacent background pixels when the target is a background pixel, since background pixels often have a large coverage range, the number of background pixels in the interval module between the outer interval and the inner interval is sufficient for the background reconstruction of the target pixel. In the specific application process, the four situations that occur are analyzed.
[0047] a) The target pixel is a background pixel, far away from the abnormal target
[0048] At this time, since there are no abnormal target pixels in the adjacent area of the target pixel, there are only background pixels in the inner and outer intervals. Since the interval window size is already limited, the pixels of the current background type will bear the main weight, and the target pixel can be reconstructed as a background pixel.
[0049] b) The target pixel is a background pixel and is adjacent to an abnormal target
[0050] At this time, since there are abnormal target pixels in the adjacent area of the target pixel, there are abnormal pixels in the inner and outer intervals. However, due to the local aggregation of abnormal targets, the abnormal pixels in the inner interval are isolated and restricted, and the proportion of abnormal pixels in the outer interval is low. In the process of reconstructing the target pixel, although the grayscale value of the pixel will be raised, the overall impact is low, and the target pixel will still be reconstructed as a background pixel.
[0051] c) The target pixel is an abnormal target edge
[0052] At this time, since the target pixel itself is the edge of an abnormal target, a large number of abnormal pixels will gather in a certain direction. However, the abnormal pixels in the inner interval on the side will be isolated and will not participate in the pixel reconstruction work. The abnormal pixels in the outer interval only occupy pixels in one direction. Therefore, during the reconstruction process, the background pixels in other directions will dominate the pixel grayscale value, which will be fed back to the grayscale value of the originally higher abnormal pixels, and the grayscale value of the background pixels will be brought closer to the grayscale value of the background pixels, thereby achieving the effect of suppressing abnormal reconstruction.
[0053] d) The target pixel is an abnormal target core
[0054] At this time, since the target pixel itself is the core of the abnormal target, due to the local aggregation characteristics of the abnormal pixels, a large number of abnormal pixels will be filled around it. However, due to the small characteristics of the abnormal target, most of the abnormal pixels will be concentrated in the inner interval and isolated and will not participate in the pixel reconstruction process. Although there are also a large number of abnormal pixels in the outer interval, a small number of background pixels will also be mixed. Therefore, in the process of weighted pixel reconstruction, only pure abnormal pixels will be used for reconstruction. The target pixel will move from the original abnormal pixel grayscale value to the background pixel grayscale value, thereby achieving the effect of suppressing abnormal reconstruction.
[0055] Since the closer the pixel is to the target pixel, the stronger the correlation between it and the target pixel is, and the interval based on the double window matrix reduces the contribution of abnormal pixels in the reconstruction process, the Euclidean distance combined with the Gaussian function is used to calculate the weight value. The gray value of the pixel at position (i, j) on the two-dimensional image plane on band k is defined as According to the Euclidean distance calculation formula, the Euclidean distance d between the target pixel and the related pixel is: Where (a, b) is the coordinate point of the target pixel, (i 1 ,j 1 ) is the coordinate point of the relevant pixel; combined with the Gaussian function, the spatial domain distance weight is Where w(d) is the weight calculated based on the distance d, and σ is the standard deviation of the Gaussian function.
[0056] Since the target pixel needs to be reconstructed based on all pixels in the interval from the outer interval to the inner interval, the weights of all relevant pixels need to be integrated and normalized. The final spatial domain distance weight of the relevant pixels should be: In the formula, m and n refer to the horizontal and vertical coordinate ranges within the inner and outer intervals.
[0057] Step 105: obtaining a joint feature weight in a target pixel reconstruction process according to the spectral domain difference weight and the spatial domain distance weight;
[0058] Specifically, the joint feature weight in the target pixel reconstruction process is determined according to w(d,k)=th·w(d)+(1-th)·w(k), where th represents the correlation coefficient of the spectral domain difference weight and the spatial domain distance weight in the joint feature weight.
[0059] Step 106: obtaining the grayscale size of the target pixel reconstruction according to the joint feature weight and the target pixel reconstruction grayscale value;
[0060] Specifically, according to Determine the grayscale size of the target pixel reconstructed at the k-band (a, b) point.
[0061] Step 107: determining the cosine similarity of each band according to the spectral cosine similarity algorithm and the grayscale size of the target pixel reconstruction;
[0062] Specifically, due to the huge data scale and Hughes phenomenon of hyperspectral images, in the process of using hyperspectral images for anomaly detection, data redundancy often occurs due to the similar characteristics between some bands. If the number of samples in the band interval containing abnormal targets is large, while the number of samples in the band interval containing pure background is small, the network model may blur the concept of abnormality due to the imbalance of proportions, resulting in the anomaly to be detected being regarded as the background that needs to be reconstructed, and accurate anomaly detection results cannot be obtained. At the same time, a large amount of redundant data will also cause negative effects such as slow network training and reduced detection rate. Therefore, using band selection methods to pre-process the data to filter out some redundant data is a research hotspot in the current hyperspectral anomaly detection task and is also an indispensable part.
[0063] As for the hyperspectral image, it can be regarded as a collection of two-dimensional images under multiple single bands, so as to consider the similarity between each two band images from a global perspective as a standard for evaluating whether the data is redundant. Therefore, the spectral cosine similarity algorithm (SCS) is proposed. Its principle is to use the image of the current band as the benchmark each time and calculate the cosine similarity with the image of the next band. If the similarity is higher than a certain threshold, it is regarded as a redundant image. If it is lower than a certain threshold, the benchmark is replaced by the current comparison image, and then the comparison of the next band is continued until all bands are completed. The mathematical expression is Among them, m and n represent the length and width of the two-dimensional image matrix image, It means that the two-dimensional image matrix under the k-th band is compared and calculated. represents the two-dimensional image matrix of the reference band, i and j represent the rows and columns in the current two-dimensional image matrix, and th represents the correlation coefficient of the spectral domain difference weight and the spatial domain distance weight in the joint feature weight.
[0064] Since the bands of hyperspectral abnormal images often appear clustered in some bands, and the spectral distribution of abnormal targets is quite different from that of the background. When selecting, a rotation strategy should be adopted instead of being limited to fixed basic bands.
[0065] Step 108: determining whether the image of each band is redundant or valid according to the cosine similarity of each band;
[0066] Specifically, according to Determine whether the image in each band is redundant or valid.
[0067] There are two situations: one is that when SCS is greater than th value, that is, when band image redundancy occurs, the reference band remains unchanged, the redundant band is filtered out from the current hyperspectral image, and the comparison with the subsequent bands continues. The other is that when SCS is less than or equal to th value, that is, when the band image is valid, the current reference band is converted to the current comparison band image and the comparison calculation is continued until all bands are traversed.
[0068] At the same time, the abnormal targets in the hyperspectral abnormal images are often small, and because the spectrum has continuity, the pixel value of the abnormal target changes randomly with the change of the band image, and the pixel value of the background part will also change. Therefore, it is difficult to find an appropriate calculation formula to define the SCS threshold. Abnormal targets in the usual sense, such as airplanes, often include dozens of pixels. Compared with the image size of 100×100, the background part often occupies more than 99% of the image data information. The similarity between bands in the hyperspectral image is judged by the actual adjacent band similarity measurement, and converted into a heat map analysis rule such as Figure 3 As shown in the figure, when 99.90% is used as the th threshold for band selection, some similar band images can be filtered out. At the same time, this value also conforms to the pixel ratio in the two-dimensional image when only abnormal pixels mutate in extreme cases. The advantages of this algorithm are simplicity, efficiency, fast calculation speed, high robustness in similarity calculation using global information, and certain invariance to image translation and scale transformation, which can reduce the burden on the network and will not reduce the accuracy of abnormal detection results.
[0069] The present invention can improve the detection accuracy: reduce data redundancy through band screening and enhance the network's ability to distinguish abnormal backgrounds.
[0070] The present invention can enhance the feature expression capability: the joint feature encoder combines the space-spectrum joint feature with the double-window filter template to improve the background weight and reduce abnormal reconstruction phenomenon.
[0071] The present invention fuses global and local information: combining the global receptive field of ViT and the local spatial spectrum features, the overall utilization capability of the network for hyperspectral image data is improved.
[0072] The experimental results of the present invention on multiple hyperspectral data sets show that the algorithm proposed in the present invention is superior to the existing comparative algorithms in terms of both subjective visual evaluation and objective parameters, and has good hyperspectral anomaly detection performance.
[0073] The present invention makes full use of the spectral and spatial information of hyperspectral data, effectively learns the global correlation distribution characteristics between anomalies and background through ViT, and takes into account the joint characteristics of space and spectrum to achieve efficient and accurate anomaly detection.
[0074] Basic parameter design and environment configuration of the present invention
[0075] A total of three groups of real hyperspectral remote sensing images collected in different scenes are selected as experimental data sets to evaluate the detection performance of the proposed anomaly detection algorithm and the comparison algorithm. The data sets are introduced in detail below.
[0076] (1) AVI RI S-2 dataset
[0077] The AVI RI S-2 dataset was collected by the AVI RI S sensor in the airspace near Los Angeles Airport in the United States. Its spectral range is 370-2510nm, the spectral resolution is 10nm, and the image space size is 100×100 pixels. After removing the bands with large noise, 189 main bands remain. The main scenes cover the airport and part of the urban landscape, including targets such as buildings, highway runways and aprons. The three aircraft parked on the apron are distinguished as abnormal targets in the hyperspectral image. The corresponding scene pseudo-color image and abnormal target true value image are shown in the figure. Figure 4 (a) shown.
[0078] (2) San Diego Dataset
[0079] The San Diego dataset was collected by the AVI RI S sensor in the airspace near the island. Its spectral range is 370-2510nm, the spectral resolution is 10nm, the spatial resolution is 17.2m, and the spatial size of the image is 100×100 pixels. After removing the bands with large noise, 193 main bands remain. The main scenes cover the sea surface and part of the island landscape, including island reefs, island buildings, surrounding waters and other targets. Buildings on the island are distinguished as abnormal targets in the hyperspectral image. The corresponding scene pseudo-color image and abnormal target true value image are shown in the figure below. Figure 4 (b) as shown.
[0080] (3) Texas Coast Dataset
[0081] The Texas Coast dataset was collected by the AVI RI S sensor in the airspace of Los Angeles, USA. Its spectral range is 370-2510nm, the spectral resolution is 10nm, the spatial resolution is 17.2m, and the spatial size of the image is 100×100 pixels. After removing the bands with large noise, 204 main bands remain. The main scenes cover the urban area and some mountainous areas, including roads, buildings and other targets. The houses in the scenes are distinguished as abnormal targets in the hyperspectral images. The corresponding scene pseudo-color images and abnormal target true value images are shown in the figure. Figure 4 (c) as shown.
[0082] Experimental environment 1 is mainly used for training and testing the constructed ViT hyperspectral anomaly detection network based on band screening joint feature encoder and some comparison algorithms based on neural networks. Experimental environment 2 is mainly used for testing some traditional algorithms, and relies on MATLAB's powerful linear computing and drawing capabilities to integrate the final detection results and visualize related detection indicators.
[0083] Experimental environment 1: System: Windows 11; Code tool library and version: torch 2.1.2 + cu118 and Python 3.9; GPU: GeForce RTX 4060 Video memory: 16GB
[0084] Experimental environment 2:; System: Windows 11; Code tool library and version: MATLAB R 2021a;
[0085] CPU: Intel(R)Core(TM)i7-13700H Main frequency: 2.4GHz
[0086] Basic algorithm parameter settings:
[0087] The training parameters of the Vi T network based on band selection joint feature encoder (hereinafter referred to as BSJFE-Vi T algorithm) include training round epoch and learning rate lr. The end standard of network training is based on the training round. When the round reaches the specified value of epoch, the network training ends. Set the initial learning rate lr to 5e-3, each learning sample is the original image, and set the epoch to 900 as the benchmark for training.
[0088] The logarithmic ROC curves of the detection results of each algorithm are plotted for analysis and comparison. The results are as follows: Figure 5 shown.
[0089] When the false alarm probability is lower than 10-4, the detection probability of each algorithm is low. As the false alarm probability gradually increases, this algorithm always occupies the highest position.
[0090] In summary, compared with other algorithms, the hyperspectral anomaly detection effect of the present invention has a larger advantage range and is relatively superior overall.
[0091] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.
Claims
1. A hyperspectral anomaly detection method based on band screening and joint feature encoder, characterized in that: The method includes: The bands of the hyperspectral image are regarded as a sequence, and each pixel point sequence is regarded as a single longitudinal spectrum; Determining the spectral domain difference weight of the target pixel point in the pixel point sequence within the local range of the k-band; Determine the reconstructed grayscale value of the target pixel according to the spectral domain difference weight of the target pixel point in the local range of the k-band; Determine the spatial domain distance weight of the target pixel point in the pixel point sequence within the local range of the k-band; Obtaining a joint feature weight in a target pixel reconstruction process according to the spectral domain difference weight and the spatial domain distance weight; Obtaining the grayscale size of the target pixel reconstruction according to the joint feature weight and the target pixel reconstruction grayscale value; The cosine similarity of each band is determined according to the spectral cosine similarity algorithm and the grayscale size of the target pixel reconstruction; It is determined whether the image of each band is redundant or valid according to the cosine similarity of each band.
2. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 1 is characterized in that: The step of determining the spectral domain difference weight of the target pixel point in the pixel point sequence in the local range of the k-band specifically includes: assuming that the value of the pixel point located at the position (i, j) on the two-dimensional image plane on the spectral sequence is Where n is the number of bands, then the characteristic grayscale of the target pixel at (i, j) in the local range of band k is Where g k represents the characteristic grayscale in the local range of the k-band, N represents the number of pixels in the current local area, then the characteristic vector v a = {g 1 ,g 2 ,…,g n }; Quantify the similarity between the target pixel spectral vector and the feature vector. In the formula, w i,j (k) refers to the spectral difference weight at position (i, j) in the two-dimensional image plane under the k-band, v i,j is the spectral vector of the pixel at point (i, j).
3. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 1 or 2 is characterized in that: The method of determining the target pixel reconstructed grayscale value according to the spectral domain difference weight of the target pixel in the local range of the k-band specifically includes: calculating the spectral difference weights and of all pixels in the region as a basis, and then dividing the spectral domain difference weights of each pixel by the sum of ... Where w i,j '(k) represents the spectral domain difference weight at position (i, j) in the two-dimensional image plane in band k after normalization; The reconstructed gray value of the target pixel can be obtained by summing the gray values of all pixels in the area under the k band through weighted calculation. In the formula It represents the gray value of the target pixel at the position (a, b) in the two-dimensional image plane under the k-band, which is finally reconstructed by combining the spectral domain difference weights with the pixel values in the local area.
4. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 3 is characterized in that: The step of determining the spatial domain distance weight of the target pixel point in the pixel point sequence within the local range of the k-band specifically includes: defining the gray value of the pixel point located at the position (i, j) on the two-dimensional image plane on the band k as According to the Euclidean distance calculation formula, the Euclidean distance d between the target pixel and the related pixel is: Where (a, b) is the coordinate point of the target pixel, (i1, j1) is the coordinate point of the related pixel; Combined with the Gaussian function, the spatial domain distance weight is Where w(d) is the weight calculated based on the distance d, and σ is the standard deviation of the Gaussian function.
5. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 4 is characterized in that: The spatial domain distance weights are integrated and normalized, and the final spatial domain distance weights of the relevant pixels should be In the formula, m and n refer to the horizontal and vertical coordinate ranges within the inner and outer intervals.
6. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 5 is characterized in that: The method of obtaining the joint feature weight in the target pixel reconstruction process according to the spectral domain difference weight and the spatial domain distance weight specifically includes: determining the joint feature weight in the target pixel reconstruction process according to w(d,k)=th·w(d)+(1-th)·w(k), wherein th represents the correlation coefficient of the spectral domain difference weight and the spatial domain distance weight in the joint feature weight.
7. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 6 is characterized in that: The step of obtaining the grayscale size of the target pixel reconstruction according to the joint feature weight and the target pixel reconstruction grayscale value specifically includes: Determine the grayscale size of the target pixel reconstructed at the k-band (a, b) point.
8. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 7 is characterized in that: The cosine similarity of each band is determined according to the spectral cosine similarity algorithm and the grayscale size of the target pixel reconstruction, specifically including: Determine the cosine similarity of each band, where m and n represent the length and width of the two-dimensional image matrix image. It means that the two-dimensional image matrix under the k-th band is compared and calculated. represents the two-dimensional image matrix of the reference band, i and j represent the rows and columns in the current two-dimensional image matrix, and th represents the correlation coefficient of the spectral domain difference weight and the spatial domain distance weight in the joint feature weight.
9. The hyperspectral anomaly detection method based on band screening and joint feature encoder according to claim 8 is characterized in that: The step of determining whether the image of each band is redundant or valid according to the cosine similarity of each band specifically includes: Determine whether the image in each band is redundant or valid.
Citation Information
Patent Citations
Hyperspectral image anomaly detection method based on space-spectrum extraction
CN113657199A
Cited By
Plant growth monitoring and protecting method based on spectrum monitoring technology
CN120431471A
Hyperspectral image anomaly detection method and device, and medium
CN121505460A
A hyperspectral image anomaly detection method, device and medium
CN121505460B