Hyperspectral image anomaly detection method based on two-stage decision-making and dual dictionary construction

The dual dictionary construction method guided by two-stage decision-making solves the problem of low purity of potential anomaly dictionary in hyperspectral image anomaly detection and achieves more accurate anomaly detection results.

CN114758226BActive Publication Date: 2024-09-27XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210273865.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-19
Publication Date
2024-09-27
Estimated Expiration
2042-03-19

AI Technical Summary

Technical Problem

In existing hyperspectral image anomaly detection methods, the purity of the potential anomaly dictionary is low and is easily interfered by background pixels, affecting the anomaly characterization effect.

Method used

A two-stage decision-guided dual dictionary construction method is used to generate rough binary images and fine binary images through superpixel segmentation and saliency detection, build a background dictionary and a potential anomaly dictionary, and use low-rank and sparse representation models for detection.

Benefits of technology

It improves the purity of the potential anomaly dictionary, can better describe anomaly characteristics, and improves the effect and accuracy of hyperspectral image anomaly detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114758226B
    Figure CN114758226B
Patent Text Reader

Abstract

The present invention proposes a method for anomaly detection in hyperspectral images guided by dual dictionary construction with two-stage decision making, which mainly solves the problems of low purity of potential anomaly dictionaries and poor detection effects in existing methods. It includes: superpixel segmentation of hyperspectral images, designing inner and outer windows according to superpixels for significance detection, and post-processing the detection results to obtain a rough binary image; building a background estimation network and training and reasoning, using reasoning errors to model the background, calculating the Mahalanobis distance of each pixel as an anomaly discrimination criterion, and post-processing the calculation results to obtain a fine binary image; using the rough binary image, the fine binary image and the superpixel to jointly construct a background dictionary and a potential anomaly dictionary; constructing a low-rank and sparse representation model based on the dual dictionary and optimizing and solving it to obtain the final detection result. The present invention can obtain a pure potential anomaly dictionary, which is conducive to better describing the abnormal characteristics and effectively improving the anomaly detection effect of hyperspectral images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and further relates to hyperspectral image anomaly detection, specifically a hyperspectral image anomaly detection method with two-stage decision-guided dual dictionary construction, which can be used for smart agriculture, battlefield reconnaissance and space exploration. Background Art

[0002] Hyperspectral image anomaly detection refers to finding pixels with large spectral differences from neighboring pixels without prior knowledge. Compared with hyperspectral image target detection technology, it does not require spectral prior information and is therefore widely used in smart agriculture, battlefield reconnaissance, space exploration and other fields.

[0003] In the literature [Huyan N, Zhang X, Zhou H, et al. Hyperspectral anomaly detection via background and potential anomaly dictionaries construction [J]. IEEE Transactions on Geoscience and Remote Sensing, 2018, 57 (4): 2263-2276], Huyan et al. proposed a hyperspectral image anomaly detection method based on background and potential anomaly dictionaries. This method defines the pixel anomaly level by utilizing the residual of the joint sparse representation model in the local area, and constructs a potential anomaly dictionary based on this. However, in the process of constructing the potential anomaly dictionary, the potential anomaly dictionary is easily interfered by background pixels, which affects the anomaly characterization effect to a certain extent. Summary of the invention

[0004] The purpose of the present invention is to propose a two-stage decision-making guided dual dictionary construction hyperspectral image anomaly detection method for solving the problem of low purity of the potential anomaly dictionary constructed in the existing method. First, the hyperspectral image is segmented into superpixels, and the obtained superpixels are used as inner windows. By designing outer windows, saliency detection is realized, and the saliency detection results are post-processed to obtain a rough binary map; secondly, a background estimation network is constructed, and the obtained rough binary map is used to guide the selection of background pixels, and it is used for the training of the background estimation network. After the training is completed, the hyperspectral image is sent to the trained background estimation network to obtain a reconstructed image, and the residual image of the input hyperspectral image and the reconstructed image is modeled, and the Mahalanobis distance of each pixel is calculated. This is used as an abnormality discrimination criterion to obtain an abnormal response map, and the abnormal response map is post-processed to obtain a fine binary map; then, the obtained rough binary map, fine binary map and superpixel are used to jointly construct a background dictionary and a potential anomaly dictionary; finally, a low-rank and sparse representation model is constructed using the obtained background dictionary and the potential anomaly dictionary to calculate the detection result of the obtained abnormal part. The present invention can obtain a pure potential anomaly dictionary, which is conducive to better describing the anomaly characteristics and thus improving the anomaly detection effect of hyperspectral images.

[0005] The specific steps of the present invention to achieve the above-mentioned purpose include the following:

[0006] (1) Generate a rough binary image:

[0007] (1.1) Hyperspectral images Perform superpixel segmentation and obtain the superpixel set S = {s i |i∈[1,K * ]}, where h, w and b represent the height, width and number of bands of the hyperspectral image X respectively. represents the i-th superpixel, N i represents the number of pixels in the i-th superpixel, K * represents the total number of superpixels;

[0008] (1.2) s i As an inner window, i The four sides of the minimum enclosed rectangular frame are used as the reference, and the distance R is expanded outward to obtain the outer window. i The tth pixel in where t∈[1,N i ], calculate the saliency values ​​of all pixels between its inner and outer windows respectively, and take their average value as the saliency value of the pixel Traverse all superpixels to obtain the saliency detection result d1;

[0009] (1.3) Post-process the saliency detection result d1 to obtain a rough binary image

[0010] (2) Generate a fine binary image:

[0011] (2.1) Searching for a rough binary graph The elements with a value of 0 in the , and record their spatial position SP;

[0012] (2.2) Select pixels identical to SP in the hyperspectral image X to form a background pixel set And use it as a training sample, where Represents C B The i'th background pixel in C B The total number of background pixels contained in ;

[0013] (2.3) Build a background estimation network and use C B After training, X is sent to the trained background estimation network to obtain the reconstructed image X rec ;

[0014] (2.4) For the hyperspectral image X and the reconstructed image X rec The residual image X res Perform background modeling and calculate pixels The Mahalanobis distance That is, the residual image X res The abnormality discrimination result of the "i"th pixel in:

[0015]

[0016] Where N represents the total number of pixels of the hyperspectral image X; Represents the residual image X res The i-th pixel in the image, μ and Σ represent X res The mean vector and covariance matrix of ; traverse all pixels to get the detection results

[0017] (2.5) Post-process the detection result d2 and convert it into a 2D matrix to obtain a refined binary image

[0018] (3) Constructing a double dictionary:

[0019] (3.1) Construct background dictionary: transform the rough binary image and fine binary image The sum is used as the background index map B idx , and B idx Divide according to the superpixel set S and get the division result in Indicates B idx For the i-th superpixel in The sum of all pixels in is determined to see if it is 0; if it is 0, then record The spatial position of the center of mass SP B , and according to SP B Select the corresponding pixel in the hyperspectral image X as an atom to construct the background dictionary; if it is not 0, the corresponding superpixel does not participate in the background dictionary construction; after traversing all superpixels, the background dictionary D can be obtained B ;

[0020] (3.2) Constructing a potential anomaly dictionary: transform the rough binary graph into and fine binary image The dot product of is used as the potential abnormal index map A idx , search for A idx The element with a value of 1 in the space records its spatial position SP A , and according to SP A Select corresponding pixels in the hyperspectral image X as atoms to construct the potential anomaly dictionary D A ;

[0021] (4) Based on the background dictionary D B and a dictionary of potential exceptions D A , construct a low-rank and sparse representation model based on dual dictionaries:

[0022] X=D B W+D A S+E,

[0023] Among them, W and S represent the representation coefficients of background terms and abnormal terms respectively, and E represents the noise term;

[0024] (5) Objective function optimization solution:

[0025] According to the low-rank characteristics of the background and the sparse characteristics of the anomaly, the objective function is established:

[0026]

[0027] The alternating direction multiplier method is used to optimize the objective function and obtain W, S, and E. A Solving the L2 norm of each column vector of S can obtain the detection result; where β and λ represent the coefficients of each balance item, st represents the constraint condition, ||·|| * represents the nuclear norm of the matrix, ||·||1 represents the L1 norm of the matrix, ||·|| 2,1 L represents the matrix 2,1 Norm.

[0028] Compared with the prior art, the present invention has the following advantages:

[0029] First, since the present invention adopts a saliency detection method based on superpixels, it can effectively alleviate the influence of abnormal pixels between inner and outer windows on the detection results, making the detection results more accurate;

[0030] Second, the present invention adopts two-stage decision-making to jointly guide the construction of the potential anomaly dictionary, which can obtain a purer potential anomaly dictionary, thereby effectively describing the anomaly characteristics; at the same time, in the process of two-stage decision-making to jointly guide the construction of the background dictionary, by introducing superpixels, it is ensured that the background dictionary covers all ground object categories, and the larger the ground object, the more pixels are used to construct the background dictionary, thereby achieving an effective description of the background characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 Flow chart for realizing the method of the present invention;

[0032] Figure 2 It is a schematic diagram of the application of the method of the present invention in a specific example;

[0033] Figure 3 The datasets used in the present invention; (a) represents the HYDICE dataset and its corresponding labels, (b) represents the Pavia dataset and its corresponding labels, (c) represents the Los Angeles dataset and its corresponding labels, (d) represents the San Diego-I dataset and its corresponding labels, (e) represents the San Diego-II dataset and its corresponding labels, and (f) represents the Texas Coast dataset and its corresponding labels;

[0034] Figure 4 The figure is a comparison chart of the subjective effects of the method of the present invention and the existing methods; wherein (I)-(VI) represent the HYDICE, Pavia, Los Angeles, San Diego-I, San Diego-II and Texas Coast data sets, respectively; (a)-(g) represent the existing comparison methods RX, CRD, LRASR, LSMAD, PAB-DC, LSDM-MoG and KIFD, respectively; (h) represents the method of the present invention; (i) represents the label corresponding to the data set;

[0035] Figure 5 The ROC curves and background-anomaly separation diagrams of the method of the present invention and the existing method on the HYDICE data set; (a) represents the ROC curve; (b) represents the background-anomaly separation diagram;

[0036] Figure 6 The ROC curves and background-anomaly separation diagrams of the method of the present invention and the existing method on the Pavia data set; (a) represents the ROC curve; (b) represents the background-anomaly separation diagram;

[0037] Figure 7 The ROC curves and background-anomaly separation diagrams of the method of the present invention and the existing method on the Los Angeles data set; (a) represents the ROC curve; (b) represents the background-anomaly separation diagram;

[0038] Figure 8 The ROC curves and background-anomaly separation diagrams of the method of the present invention and the existing method on the San Diego-I data set; (a) represents the ROC curve; (b) represents the background-anomaly separation diagram;

[0039] Fig. 9 The ROC curves and background-anomaly separation diagrams of the method of the present invention and the existing method on the San Diego-II data set; (a) represents the ROC curve; (b) represents the background-anomaly separation diagram;

[0040] Fig.10 The ROC curves and background-anomaly separation diagrams of the method of the present invention and the existing method on the Texas Coast data set; (a) represents the ROC curve; (b) represents the background-anomaly separation diagram. DETAILED DESCRIPTION

[0041] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0042] Reference Figure 1 and Figure 2 The present invention proposes a two-stage decision-making-guided dual-dictionary construction method for hyperspectral image anomaly detection, which is specifically implemented in the following steps:

[0043] Step 1: Generate a rough binary image:

[0044] (1.1) Hyperspectral images Perform superpixel segmentation and obtain the superpixel set S = {s i |i∈[1,K * ]}, where h, w and b represent the height, width and number of bands of the hyperspectral image X respectively. represents the i-th superpixel, N i represents the number of pixels in the i-th superpixel, K * Represents the total number of superpixels. The steps of superpixel segmentation for the hyperspectral image X include:

[0045] (1.1.1) Set the expected number of superpixels K to As the initial superpixel side length, we get the initial superpixel set And select the centers of all superpixels as the initial clustering centers to obtain the initial clustering center set in Indicates rounding down. represents the i0th initial superpixel, K0 represents the number of initial superpixels, and Where h and w represent the height and width of the hyperspectral image, respectively;

[0046] (1.1.2) The initial cluster center of the i0th superpixel As the center, calculate The distance between the pixels in the 2s×2s range in Contains spatial distance d spa and the spectral distance d spe , as follows:

[0047]

[0048]

[0049]

[0050] in, Indicates is the jth pixel within the 2s×2s range of the center, represents the spatial coordinates of the center of the i0th superpixel, (x j ,y j ) indicates is the spatial coordinate of the jth pixel within the central 2s×2s range; <·, ·> represents the inner product of two vectors, ||·|| represents the modulus of the vector, and ω represents the spatial-spectral distance weighting coefficient;

[0051] (1.1.3) All pixels are assigned to the cluster closest to them, then the mean of all pixels in each cluster is calculated, and the pixel closest to the mean in the cluster is used as the new cluster center;

[0052] (1.1.4) Repeat steps (1.1.2)-(1.1.3) until the cluster center no longer changes, and the superpixel segmentation result is obtained;

[0053] (1.1.5) Process the superpixel segmentation result obtained in step (1.1.4), that is, merge the superpixels that are too small into the adjacent superpixels, [reference: R. Achanta, A. Shaji, K. Smith, A. Lucchi, P. Fua and S. Süsstrunk, "SLIC Superpixels Compared to State-of-the-Art Superpixel Methods," in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, no. 11, pp. 2274-2282], to form the final superpixel set S = {s i |i∈[1,K * ]}.

[0054] (1.2) s i As an inner window, i The four sides of the minimum enclosed rectangular frame are used as the reference, and the distance R is expanded outward to obtain the outer window. i The tth pixel in where t∈[1,N i ], calculate the saliency values ​​of all pixels between its inner and outer windows respectively, and take their average value as the saliency value of the pixel Traverse all superpixels to obtain the saliency detection result d1; the steps of saliency detection include:

[0055] (1.2.1) Calculate the pixels to be tested The pixel x between its inner and outer windows m The significant values ​​are as follows:

[0056]

[0057]

[0058]

[0059] in, Indicates the pixel to be tested The mth pixel x between its inner and outer windows m The significant value of and Represent the pixels to be tested The pixel x between its inner and outer windows m spectral distance and spatial distance, c is a constant. Since it has little effect on the result, for convenience, c is set to 1 here; <·, ·> represents the inner product of two vectors, ||·|| represents the modulus of the vector, and (xm ,y m ) are the pixels to be tested respectively The pixel x between its inner and outer windows m The spatial coordinates of

[0060] (1.2.2) Calculate the pixels to be tested The mean of all pixel saliency values ​​between its inner and outer windows is as follows:

[0061]

[0062] Among them, M represents the pixel to be tested The number of pixels between the inner and outer windows.

[0063] (1.3) Post-process the saliency detection result d1 to obtain a rough binary image Specifically, the OTSU algorithm [Otsu NA threshold selection method from gray-level histograms [J]. IEEE Transactions on Systems, Man, and Cybernetics, 1979, 9 (1): 62-66] is used to process the saliency detection result d1 to obtain a preliminary binary image. Then the binary image The larger connected domains are removed to obtain a rough binary graph

[0064]

[0065] AREA_FILTERING(·; τ) represents a connected domain filtering operation. When the area of ​​the connected domain exceeds a specified threshold τ, the threshold is set to N / 100 in this embodiment, and the value of the corresponding area is set to 0.

[0066] Step 2: Generate a fine binary image:

[0067] (2.1) Searching for a rough binary graph The elements with a value of 0 in the , and record their spatial position SP;

[0068] (2.2) Select pixels identical to SP in the hyperspectral image X to form a background pixel set And use it as a training sample, where Represents C B The i'th background pixel in C B The total number of background pixels contained in ;

[0069] (2.3) Build a background estimation network and use C BAfter training, X is sent to the trained background estimation network to obtain the reconstructed image X rec ; Here the background estimation network is constructed and the training details are as follows:

[0070] Constructing background estimation network: The background estimation network consists of three sub-networks, namely encoder, decoder and discriminator. The encoder and decoder together constitute the autoencoder, and the encoder and discriminator together constitute the generative adversarial network. All sub-networks are composed of 4 fully connected layers, and the number of nodes in the three sub-networks is {b, 512, 512, N Z},{N Z ,512,512,b} and {N Z ,512,512,1}, where b represents the number of bands of the hyperspectral image, After each fully connected layer, a LeakyReLU activation function with a slope of 0.2 is included. After each activation function, a dropout strategy with a sampling rate of 0.5 is used to prevent overfitting. In addition, after the discriminator, a Sigmoid function is added to ensure that the output is in [0,1].

[0071] Model training details: When training the background estimation network, the learning rates of the encoder and decoder are both 0.001, the learning rate of the discriminator is 0.0001, the optimizer of the three sub-networks is Adam, and the number of iterations is 1000. The loss function L of the background estimation network consists of two parts, namely the loss L of the autoencoder AE and the loss L of the generative adversarial network GAN , as follows:

[0072] L=L AE +α·L GAN

[0073]

[0074]

[0075] Among them, x bac and denote the selected background pixels and the reconstructed background pixels, respectively, ||·||2 denotes the L2 norm of the vector, z′ denotes the real sample sampled from N(0,I), En(·) denotes the encoding operation, D(·) denotes the discrimination operation, and p data represents the distribution of selected background pixels, α represents the coefficient that weighs the loss of the autoencoder and the loss of the generative adversarial network, and α is set to 1 here.

[0076] (2.4) For the hyperspectral image X and the reconstructed image X rec The residual image X resPerform background modeling and calculate pixels The Mahalanobis distance That is, the residual image X res The abnormality discrimination result of the "i"th pixel in:

[0077]

[0078] Where N represents the total number of pixels of the hyperspectral image X; Represents the residual image X res The i-th pixel in the image, μ and Σ represent X res The mean vector and covariance matrix of ; traverse all pixels to get the detection results

[0079] (2.5) Post-process the detection result d2 and convert it into a 2D matrix to obtain a refined binary image The principle of post-processing the detection result d2 in this step is the same as step (1.3), specifically: firstly, the detection result d2 is processed using the OTSU algorithm to obtain a preliminary binary image Then the binary image The larger connected domains are removed to obtain a rough binary graph

[0080]

[0081] Step 3: Build a double dictionary:

[0082] (3.1) Construct background dictionary: transform the rough binary image and fine binary image The sum is used as the background index map B idx , and B idx Divide according to the superpixel set S and get the division result in Indicates B idx For the i-th superpixel in The sum of all pixels in is determined to see if it is 0; if it is 0, then record The spatial position of the center of mass SP B , and according to SP B Select the corresponding pixel in the hyperspectral image X as an atom to construct the background dictionary; if it is not 0, the corresponding superpixel does not participate in the background dictionary construction; after traversing all superpixels, the background dictionary D can be obtained B ;

[0083] (3.2) Constructing a potential anomaly dictionary: transform the rough binary graph into and fine binary image The dot product of is used as the potential abnormal index map A idx , search for Aidx The element with a value of 1 in the space records its spatial position SP A , and according to SP A Select corresponding pixels in the hyperspectral image X as atoms to construct the potential anomaly dictionary D A ;

[0084] Step 4: Based on the background dictionary D B and a dictionary of potential exceptions D A , construct a low-rank and sparse representation model based on dual dictionaries:

[0085] X=D B W+D A S+E,

[0086] Among them, W and S represent the representation coefficients of background terms and abnormal terms respectively, and E represents the noise term;

[0087] Step 5: Optimize and solve the objective function:

[0088] According to the low-rank characteristics of the background and the sparse characteristics of the anomaly, the objective function is established:

[0089]

[0090] The alternating direction multiplier method is used to optimize the objective function and obtain W, S, and E. A Solving the L2 norm of each column vector of S can obtain the detection result; where β and λ represent the coefficients of each balance item, st represents the constraint condition, ||·|| * represents the nuclear norm of the matrix, ||·||1 represents the L1 norm of the matrix, ||·|| 2,1 L represents the matrix 2,1 Norm.

[0091] The objective function is optimized and solved as follows:

[0092] By introducing auxiliary variables J and L, the objective function is transformed into:

[0093]

[0094] stX=D B W+D A S+E,W=J,S=L

[0095] Construct the augmented Lagrangian function for the above objective function:

[0096]

[0097] Among them, Y1, Y2 and Y3 represent Lagrange multipliers, μ represents the penalty parameter, Represents the square of the matrix Frobenius norm; it is solved using the alternating direction multiplication method, that is, one variable is updated each time and the rest are fixed:

[0098] 1) Fix W, S, E and L, and update J:

[0099]

[0100] in, U,Σ=(σ1,σ2,···,σ r ) T , V represent the left singular matrix, the main diagonal elements of the diagonal matrix and the right singular matrix obtained by singular value decomposition of the matrix W+Y2 / μ respectively;

[0101] 2) Fix W, S, E and J, and update L:

[0102]

[0103] 3) Fix W, S, L and J, and update E:

[0104]

[0105] in,

[0106] 4) Fix S, E, L and J, and update W:

[0107]

[0108] 5) Fix W, E, L and J, and update S:

[0109]

[0110] After W, S, E, J and L are updated, continue to update the Lagrange multipliers Y1, Y2 and Y3:

[0111] Y1=Y1+μ(XD B WD A SE)

[0112] Y2=Y2+μ(WJ)

[0113] Y3=Y3+μ(SL)

[0114] Finally, update the parameter μ:

[0115] μ=min(pμ,μ max )

[0116] Among them, the initial values ​​of W, S, E, J and L are all zero matrices, μ, p and μ max The values ​​are 10-6 , 1.2 and 10 10 .

[0117] Repeat the above steps until the iteration termination condition is met:

[0118] max(||XD B WD A SE|| F ,||WJ|| F ,||SL|| F )<ε,

[0119] Among them, ε represents the iterative convergence value, and the specific value is 10 -6 .

[0120] After W, S, and E are calculated, the test result is obtained according to the following formula:

[0121]

[0122] Among them, v∈[1,b] represents the vth band of the hyperspectral image X.

[0123] The effect of the present invention is further verified by comparative experiments below:

[0124] The hyperspectral images used in this experiment include HYDICE, Pavia, Los Angeles, San Diego-I, SanDiego-II, and Texas Coast datasets, respectively. Figure 3As shown in (a), (b), (c), (d), (e) and (f). On each data set, the method of the present invention is compared with seven methods (RX: [reference: IS Reed, and X. Yu, "Adaptive multiple-band CFAR detection of an optical pattern with unknown spectral distribution," IEEE Trans. Acoust. Speech Signal Process., vol. 38, no. 10, pp. 1760-1770, Oct. 1990], CRD: [reference: W. Li, and Q. Du, "Collaborative representation for hyperspectral anomaly detection," IEEE Trans. Geosci. Remote Sens., vol. 53, no. 3, pp. 1463-1474, Mar. 2015], LRASR: [reference: Y. Xu, Z. Wu, J. Li, A. Plaza, and Z. Wei, "Anomaly detection in hyperspectral images based on low-rank and sparse representation," IEEE Trans. Geosci. Remote Sens., vol. 53, no. 3, pp. 1463-1474, Mar. 2015], Sens., vol.54, no.4, pp.1990-2000, Apr.2016], LSMAD: [Reference: Y.Zhang, B.Du, L.Zhang, and S.Wang, "A low-rank and sparse matrix decomposition-based mahalanobis distance method for hyperspectral anomaly detection," IEEE Trans.Geosci.Remote Sens., vol.54, no.3, pp.1376-1389, Mar.2016], PAB-DC: [Reference: Huyan N, Zhang X, Zhou H, etal. Hyperspectral anomaly detection via background and potential anomalydictionaries construction[J].IEEE Transactions on Geoscience and Remote Sensing, 2018, 57(4): 2263-2276], LSDM-MoG: [Reference: L. Lu, L. Wei, D. Qian, and T. Ran, "Low-rank and sparse decomposition with mixture of Gaussian for hyperspectral anomaly detection," IEEE Trans. Cybern., vol. 51, no. 9, pp. 4363-4372, Feb. 2020] and KIFD: Li S, Zhang K, Duan P, et al. Hyperspectral anomaly detection with kernel isolation forest [J]. IEEE Transactions on Geoscience and Remote Sensing, 2019, 58(1): 319-329) are analyzed from both qualitative and quantitative perspectives, where the qualitative analysis mainly includes detection graphs, ROC curves, background-anomaly separation graphs, and the quantitative analysis uses AUC values. .

[0125] Figure 4 The comparison results of the detection images of the method of the present invention and seven comparison methods on six data sets, where (I)-(VI) are HYDICE, Pavia, Los Angeles, San Diego-I, San Diego-II and Texas Coast data sets, respectively, and (a)-(h) are RX, CRD, LRASR, LSMAD, PAB-DC, LSDM-MoG, KIFD and the method of the present invention, respectively. By comparing with label (i), it can be seen that the method of the present invention has the best effect.

[0126] Figure 5 (a) Figure 6 (a) Figure 7 (a) Figure 8 (a) Fig. 9 (a) and Fig.10 (a) ROC curves of the method of the present invention and seven comparison methods on the HYDICE, Pavia, Los Angeles, San Diego-I, San Diego-II and Texas Coast data sets, respectively. The larger the area under the curve, the better the detection effect, which shows that the method of the present invention has the best effect.

[0127] Figure 5 (b) Figure 6 (b) Figure 7 (b) Figure 8 (b) Fig. 9 (b) and Fig.10 (b) are the background-anomaly separation diagrams of the method of the present invention and seven comparison methods on the HYDICE, Pavia, Los Angeles, San Diego-I, San Diego-II and Texas Coast datasets. The larger the distance between the background and the anomaly, the better the separation effect, that is, the better the detection effect. It can be seen that the distance between the background and the anomaly of the method of the present invention is the largest, that is, the separation effect is the best.

[0128] The following table (Table 1) lists the AUC value comparison results of the method of the present invention and seven comparison methods on six hyperspectral data sets. The AUC value is between 0 and 1, and the larger the value, the better the effect.

[0129] Table 1 Comparison of AUC values ​​of the method of the present invention and seven comparative methods on different data sets (wherein the best result is indicated in bold and the second best result is indicated in shaded form)

[0130]

[0131] It can be seen from the above table that the method of the present invention has obvious advantages over the existing methods on different data sets. The AUC value of the method of the present invention for detection is the largest, that is, the detection effect is the best.

[0132] The above experimental results prove the correctness and effectiveness of the method proposed in the present invention.

[0133] Parts of the present invention that are not described in detail belong to common knowledge among those skilled in the art.

[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It is obvious that for professionals in this field, after understanding the content and principles of the present invention, they may make various modifications and changes in form and details without departing from the principles and structures of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.

Claims

1. A two-stage decision-making guided dual dictionary construction method for hyperspectral image anomaly detection, characterized in that: The steps include: (1) Generate a rough binary image: (1.1) Hyperspectral images Perform superpixel segmentation and obtain the superpixel set S = {s i |i∈[1,K * ]}, where h, w and b represent the height, width and number of bands of the hyperspectral image X respectively. represents the i-th superpixel, N i represents the number of pixels in the i-th superpixel, K * represents the total number of superpixels; ( 1.2) s i As an inner window, i The four sides of the minimum enclosed rectangular frame are used as the reference, and the distance R is expanded outward to obtain the outer window. i The tth pixel in where t∈[1,N i ], calculate the saliency values ​​of all pixels between its inner and outer windows respectively, and take their average value as the saliency value of the pixel Traverse all superpixels to obtain the saliency detection result d1; (1.3) Post-process the saliency detection result d1 to obtain a rough binary image (2) Generate a fine binary image: (2.1) Searching for a rough binary graph The elements with a value of 0 in the , and record their spatial position SP; (2.2) Select pixels identical to SP in the hyperspectral image X to form a background pixel set And use it as a training sample, where Represents C B The i'th background pixel in C B The total number of background pixels contained in ; (2.3) Build a background estimation network and use C B After training, X is sent to the trained background estimation network to obtain the reconstructed image X rec ; (2.4) For the hyperspectral image X and the reconstructed image X rec The residual image X res Perform background modeling and calculate pixels The Mahalanobis distance That is, the residual image X res The abnormality discrimination result of the "i"th pixel in: Where N represents the total number of pixels of the hyperspectral image X; Represents the residual image X res The i-th pixel in the image, μ and Σ represent X res The mean vector and covariance matrix of ; traverse all pixels to get the detection results (2.5) Post-process the detection result d2 and convert it into a 2D matrix to obtain a refined binary image (3) Constructing a double dictionary: (3.1) Construct background dictionary: transform the rough binary image and fine binary image The sum is used as the background index map B idx , and B idx Divide according to the superpixel set S and get the division result in Indicates B idx For the i-th superpixel in The sum of all pixels in is determined to see if it is 0; if it is 0, then record The spatial position of the center of mass SP B , and according to SP B Select the corresponding pixel in the hyperspectral image X as an atom to construct the background dictionary; if it is not 0, the corresponding superpixel does not participate in the background dictionary construction; after traversing all superpixels, the background dictionary D can be obtained B ; (3.2) Constructing a potential anomaly dictionary: transform the rough binary graph into and fine binary image The dot product of is used as the potential abnormal index map A idx , search for A idx The element with a value of 1 in the space records its spatial position SP A , and according to SP A Select corresponding pixels in the hyperspectral image X as atoms to construct the potential anomaly dictionary D A ; (4) Based on the background dictionary D B and a dictionary of potential exceptions D A , construct a low-rank and sparse representation model based on dual dictionaries: X=D B W+D A S+E, Among them, W and S represent the representation coefficients of background terms and abnormal terms respectively, and E represents the noise term; (5) Objective function optimization solution: According to the low-rank characteristics of the background and the sparse characteristics of the anomaly, the objective function is established: The alternating direction multiplier method is used to optimize the objective function and obtain W, S, and E. A Solving the L2 norm of each column vector of S can obtain the detection result; where β and λ represent the coefficients of each balance item, st represents the constraint condition, ||·|| * represents the nuclear norm of the matrix, ||·||1 represents the L1 norm of the matrix, ||·|| 2,1 L represents the matrix 2,1 Norm.

2. The method according to claim 1, characterized in that: The steps of superpixel segmentation of the hyperspectral image X described in step (1.1) are as follows: (1.1.1) Set the expected number of superpixels K to As the initial superpixel side length, we get the initial superpixel set And select the centers of all superpixels as the initial clustering centers to obtain the initial clustering center set in Indicates rounding down. represents the i0th initial superpixel, K0 represents the number of initial superpixels, and Where h and w represent the height and width of the hyperspectral image, respectively; (1.1.2) The initial cluster center of the i0th superpixel As the center, calculate The distance between the pixels in the 2s×2s range in Contains spatial distance d spa and the spectral distance d spe , as follows: in, Indicates is the jth pixel within the 2s×2s range of the center, represents the spatial coordinates of the center of the i0th superpixel, (x j ,y j ) indicates is the spatial coordinate of the jth pixel within the central 2s×2s range; <·, ·> represents the inner product of two vectors, ||·|| represents the modulus of the vector, and ω represents the spatial-spectral distance weighting coefficient; (1.1.3) All pixels are assigned to the cluster closest to them, then the mean of all pixels in each cluster is calculated, and the pixel closest to the mean in the cluster is used as the new cluster center; (1.1.4) Repeat steps (1.1.2)-(1.1.3) until the cluster center no longer changes, and the superpixel segmentation result is obtained; (1.1.5) Process the superpixel segmentation result obtained in step (1.1.4), that is, merge the superpixels that are too small into the adjacent superpixels to form the final superpixel set S = {s i |i∈[1,K * ]}.

3. The method according to claim 1, characterized in that: The steps of the significance test described in step (1.2) are as follows: (1.2.1) Calculate the pixels to be tested The pixel x between its inner and outer windows m The significant values ​​are as follows: in, Indicates the pixel to be tested The mth pixel x between its inner and outer windows m The significant value of and Represent the pixels to be tested The pixel x between its inner and outer windows m spectral distance and spatial distance, c is a constant. Since it has little effect on the result, for convenience, c is set to 1 here; <·, ·> represents the inner product of two vectors, ||·|| represents the modulus of the vector, and (x m ,y m ) are the pixels to be tested respectively The pixel x between its inner and outer windows m The spatial coordinates of (1.2.2) Calculate the pixels to be tested The mean of all pixel saliency values ​​between its inner and outer windows is as follows: Among them, M represents the pixel to be tested The number of pixels between the inner and outer windows.

4. The method according to claim 1, characterized in that: The post-processing described in step (1.3) and step (2.5) is to first process the results using the OTSU algorithm to obtain a preliminary binary image B bmp0 , and then the binary image B bmp0 The larger connected domains are removed to obtain a rough binary graph Fine Binary Image It is expressed as follows: AREA_FILTERING(B bmp0 ;τ) Among them, AREA_FILTERING(·; τ) represents the connected domain filtering operation. When the area of ​​the connected domain exceeds the specified threshold τ, the value of the corresponding area is set to 0.

5. The method according to claim 1, characterized in that: The background estimation network is constructed as described in step (2.3), as follows: A background estimation network consisting of three sub-networks, namely the encoder, decoder and discriminator, is constructed. The encoder and decoder together constitute an autoencoder, and the encoder and discriminator together constitute a generative adversarial network. All sub-networks are composed of four fully connected layers. The number of nodes in the three sub-networks is {b, 512, 512, N Z },{N Z ,512,512,b} and {N Z ,512,512,1}, where b represents the number of bands of the hyperspectral image, After each fully connected layer, a LeakyReLU activation function with a slope of 0.2 is included; after each layer of activation function, a dropout strategy with a sampling rate of 0.5 is used to prevent overfitting; in addition, after the discriminator, a Sigmoid function is added to ensure that the output is in [0,1].

6. The method according to claim 5, characterized in that: Training the background estimation network includes the following steps: when training the background estimation network, the learning rates of the encoder and decoder are set to 0.001, the learning rate of the discriminator is set to 0.0001, the optimizers of the three sub-networks are all Adam, and the number of iterations is set to 1000; the loss function L of the background estimation network includes two parts, namely, the loss L of the autoencoder AE and the loss L of the generative adversarial network GAN : L=L AE +α·L GAN Among them, x bac and denote the selected background pixels and the reconstructed background pixels, respectively, ||·||2 denotes the L2 norm of the vector, z′ denotes the real sample sampled from N(0,I), En(·) denotes the encoding operation, D(·) denotes the discrimination operation, and p data represents the distribution of selected background pixels, and α represents the coefficient that weighs the loss of the autoencoder and the loss of the generative adversarial network.

7. The method according to claim 1, characterized in that: The alternating direction multiplier method is used in step (5) to optimize and solve the objective function. The specific steps are as follows: (5.1) Introducing auxiliary variables J and L, the objective function is transformed into: s.t.X=D B W+D A S+E,W=J,S=L (5.2) Construct the augmented Lagrangian function: Among them, Y1, Y2 and Y3 represent Lagrange multipliers, μ represents the penalty parameter, represents the square of the matrix Frobenius norm; (5.3) is solved by the alternating direction multiplication method, that is, one variable is updated each time, the other variables are fixed, and the solution process is repeated until the iteration termination condition is met: max(||X-D B W-D A S-E|| F ,||W-J|| F ,||S-L|| F )<ε, Among them, ε represents the iterative convergence value; After W, S, and E are calculated, the test result is obtained according to the following formula: Among them, v∈[1,b] represents the vth band of the hyperspectral image X.