Hyperspectral Anomaly Detection Method Based on Superpixel-Guided Discriminant Forest

By using superpixel-guided discriminant forest method and guide filtering multi-scale fusion module in hyperspectral anomaly detection, the problems of poor local anomaly detection performance and high false alarm rate in the prior art are solved, and more efficient abnormal detection effect is achieved.

CN115471750BActive Publication Date: 2025-07-01XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211123551.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2025-07-01
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

The existing hyperspectral anomaly detection methods have poor local anomaly detection performance and are prone to misdetecting normal pixels as abnormalities.

Method used

The discriminant forest method based on superpixel guidance is adopted, and the hyperspectral image is divided into multiple homogeneous regions through superpixel segmentation. The discriminant forest model is constructed in combination with the multi-band gain criterion, and the detection results are optimized using the multi-scale fusion module of guiding filtering.

Benefits of technology

It improves the performance of local abnormality detection, reduces false alarm rate, and enhances the sensitivity and detection accuracy to abnormal pixels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115471750B_ABST
    Figure CN115471750B_ABST
Patent Text Reader

Abstract

The present invention proposes a hyperspectral anomaly detection method based on superpixel-guided discriminant forest, which mainly solves the problems of poor local anomaly target detection performance and high false alarm rate in existing methods. The scheme includes: 1) extracting the three most important component features of the hyperspectral image through principal component analysis method, and using these features to perform superpixel segmentation at multiple different scales to obtain superpixel features with multiple scales and including all bands; 2) constructing a discriminant forest model based on multiple band gain criteria to train and test the features of each superpixel block, generating initial detection maps at multiple scales; 3) fusing and optimizing all the initial detection maps through a multi-scale fusion model based on guided filter to obtain the final detection result. The present invention combines superpixel segmentation based on space and discriminant forest based on multiple spectral bands, effectively mines the spatial and spectral information of hyperspectral images, enhances the model's ability to identify abnormal pixels, and improves its detection performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision and machine learning, and further relates to hyperspectral anomaly detection. Specifically, it is a hyperspectral anomaly detection method based on superpixel-guided discriminant forest, which can be used for environmental monitoring, disaster prediction, precision agriculture, military reconnaissance, etc. Background Art

[0002] Hyperspectral anomaly detection is one of the important branches of hyperspectral image processing. Its definition: Without prior knowledge, spectral information and spatial information are used for anomaly detection. Thanks to this feature, hyperspectral anomaly detection technology has been widely applied in fields such as agriculture and military. Among the existing popular hyperspectral anomaly detection methods, the method based on the isolation forest model has received much attention from researchers in recent years and achieved good detection results. This method is based on the feature that abnormal pixels are "few and different" in the whole hyperspectral image, and compared with background pixels, abnormal pixels are more easily isolated in the isolation forest.

[0003] In the existing technical literature [S. Chang, B. Du, and L. Zhang, "A subspace selection-based discriminative forest method for hyperspectral anomaly detection," IEEE Trans. Geosci. Remote Sens., vol. 58, no. 6, pp. 4033 - 4046, Jun. 2020.], in the training stage, for the node splitting of the binary tree in the discriminant forest, the axis-parallel subspace selection method is adopted to retain the key band information of the abnormal target and enhance the reliability of the splitting criterion; in the testing stage, each pixel of the hyperspectral image is tested through the trained discriminant forest model to obtain the anomaly value of the whole image as the detection result. However, due to the current isolation forest method being limited by the information utilization of the hyperspectral image and the complex scene processing ability, two problems are caused: the detection performance of local anomalies is not good and normal pixels are misdetected as anomalies. Summary of the Invention

[0004] The purpose of the present invention is to address the above deficiencies in the prior art, and provide a hyperspectral anomaly detection method based on superpixel-guided discriminant forest, to solve the problems of poor detection performance of local anomalies and misdetection of normal pixels as anomalies in the existing detection methods. The present invention can more effectively mine the spectral and spatial information of the hyperspectral image and improve the detection effect.

[0005] The idea of implementing the present invention is as follows: First, convert the three-dimensional hyperspectral image into a two-dimensional matrix, and use the principal component analysis method to extract the main three component features. Set three different numbers of superpixels for the simple linear iterative clustering (SLIC) model to perform superpixel segmentation to obtain three-scale superpixel features. Use the spatial information of its superpixel blocks to index the multi-scale hyperspectral superpixel features containing all band information. Then, adopt a discriminant forest model based on multiple band gain criteria to train and test each superpixel block feature to obtain three-scale initial detection maps. Finally, use a multi-scale fusion module based on guided filtering to fuse and refine the three initial detection maps to obtain the final anomaly detection map.

[0006] To achieve the above object, the implementation steps of the technical solution of the present invention are as follows:

[0007] (1) Extract multi-scale hyperspectral superpixel features:

[0008] (1.1) Convert the hyperspectral image into a two-dimensional matrix where h, l, and b respectively represent the height, width, and bands of the image; N is the number of pixels and N = l × h;

[0009] (1.2) Input the two-dimensional matrix into the publicly available principal component analysis model PCA, and use the model to obtain the three most main component features

[0010] (1.3) Set the scale of the simple linear iterative clustering model SLIC to r, and the number of superpixels in each scale ranges from [1, 30]; use this SLIC model to segment the component features into r-scale superpixel segmentation maps, and then use the spatial information of the superpixel segmentation to generate r-scale hyperspectral superpixel features through indexing; among them, the r-scale hyperspectral superpixel feature is indicating the feature of the w-th superpixel block region at the r-th scale, indicating the number of feature pixels of

[0011] (2) Construct a discriminant forest model and train and test it:

[0012] (2.1) Randomly extract a subsample X′ from the superpixel block region features as the input sample for training the discriminant forest model, where represent each pixel of the input sample as x = {x1,…,x b};

[0013] (2.2) Randomly select samples of q bands from X′ to construct a hyperplane f, and map each pixel of the selected samples into the hyperplane f to obtain a new set of attribute values Z;

[0014] (2.3) Based on the set Z, obtain the best splitting threshold S through the gain criterion S gain Obtain the best splitting threshold S;

[0015] (2.4) Use the best splitting threshold S to split the input samples into two child nodes;

[0016] (2.5) Repeat steps (2.2)-(2.4) until the height of the tree reaches the preset limit height H max = log2n or the number of pixels in the child node does not exceed 2, obtaining a tree; where n represents the number of pixels in X′;

[0017] (2.6) Repeat steps (2.1)-(2.5) t times, obtaining t trees and using them to form a discriminant forest for the local area;

[0018] (2.7) Use the hyperspectral pixel samples of each superpixel block area to construct and train the discriminant forest for the local area, and all the discriminant forests for the local area form the discriminant forest model of the hyperspectral image at the r-th scale;

[0019] (2.8) Input the hyperspectral superpixel features at the r-th scale into the discriminant forest model at the current scale for detection, obtaining the initial anomaly detection map at this scale;

[0020] (2.9) Through the detection of the discriminant forest model of the hyperspectral image at each scale, obtain the initial anomaly detection maps corresponding to multiple scales;

[0021] (3) Based on guided filtering, use the initial anomaly detection map to optimize the discriminant forest model, and use the optimized model to obtain the final detection result:

[0022] (3.1) Perform pixel-level multiplication fusion on the initial anomaly detection maps corresponding to each scale to obtain the first fusion result R1;

[0023] (3.2) Input the fusion result R1 into the guided filtering network, and use the component feature Y as the guidance image to generate the guidance result O1;

[0024] (3.3) Perform pixel-level addition fusion on the guidance result O1 and the fusion result R1 to obtain the second fusion result R2;

[0025] (3.4) Perform pixel-level multiplication fusion on the two fusion results R1 and R2 to obtain the final fusion result, that is, the anomaly detection map R3.

[0026] Compared with the prior art, the advantages of the present invention are as follows:

[0027] First, since the present invention combines superpixels and discriminant forests, that is, uses superpixels to guide the discriminant forest for anomaly detection. Among them, superpixel segmentation is used to divide the entire hyperspectral image into multiple homogeneous regions containing abnormal pixels, improving the distinguishability of abnormal pixels in the local space; while in the discriminant forest, a gain splitting criterion is constructed based on the information of multiple spectral bands to enhance the sensitivity to abnormal pixels. This combination method can better explore the spatial information and spectral information of the hyperspectral image, thus solving the problem of poor local anomaly detection performance of the existing isolation forest and effectively improving the accuracy of the anomaly pixel detection rate of the model.

[0028] Second, the present invention adopts a multi-scale fusion network based on guided filtering, fully utilizes the spatial information of the multi-scale initial detection maps and fuses them, and introduces the method of guided filtering to refine the detection effect, thereby effectively solving the problem of high false alarm rate in the existing isolation forest method. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is the overall implementation flowchart of the method of the present invention.

[0030] Figure 2 is the schematic diagram of an example of the present invention.

[0031] Figure 3 is the comparison diagram of the detection effects of the present invention and the existing method. DETAILED DESCRIPTION OF THE INVENTION

[0032] In order to make the purpose and advantages of the present invention clearer, the technical content of the present invention will be described in detail below with reference to the accompanying drawings.

[0033] Example 1. Referring to Figure 1 and Figure 2 , the hyperspectral anomaly detection method based on superpixel-guided discriminant forest of the present invention includes the following steps:

[0034] Step 1. Extract multi-scale hyperspectral superpixel features:

[0035] (1.1) Convert the hyperspectral image into a two-dimensional matrix where h, l, and b respectively represent the height, width, and number of bands of the image; N is the number of pixels and N = l × h;

[0036] (1.2) Input the two-dimensional matrix into the publicly available principal component analysis model PCA, and use the model to obtain the three most important component features The specific steps are as follows:

[0037] (1.2.1) Input the two-dimensional matrix into the publicly available principal component analysis model PCA. The formula is as follows:

[0038]

[0039] where, is the projection matrix; represents the identity matrix; tr(·) represents the trace of the matrix;

[0040] (1.2.2) Use the principal component analysis model to obtain the three most important component features

[0041]

[0042] where, E(·) represents the mean function.

[0043] (1.3) Set the scale of the simple linear iterative clustering model SLIC to r, and the number of superpixels in each scale ranges from [1, 30]; use this SLIC model to segment the component features into superpixel segmentation maps of r scales, and then use the spatial information of the superpixel segmentation to generate hyperspectral superpixel features of r scales through indexing; among them, the hyperspectral superpixel feature of the rth scale is represents the feature of the wth superpixel block region at the rth scale, represents the number of feature pixels;

[0044] The calculation formula of the simple linear iterative clustering SLIC model is as follows:

[0045]

[0046]

[0047]

[0048] where, d c represents the color distance, which is the main component feature obtained by PCA; d s represents the spatial distance; represents the maximum spatial distance within the class, M represents the number of hyperspectral pixels, K represents the number of superpixels; N c represents the maximum color distance; D′ represents the final distance metric.

[0049] Step 2. Build a discriminant forest model and train and test it:

[0050] (2.1) Randomly extract a subsample X′ from the superpixel block region features as the input sample for training the discriminant forest model, where Represent the pixels of each input sample as x = {x1, …, x b};

[0051] (2.2) Randomly select samples of q bands from X′ to construct a hyperplane f, and map each pixel of the selected samples into the hyperplane f to obtain a new set of attribute values Z; It is implemented according to the following formula:

[0052]

[0053] where, Q represents randomly selecting q bands as the attribute index; c j represents the coefficient randomly selected from [-1, 1]; μ(·) and σ(·) represent the mean function and the standard deviation function respectively; X′ j is the attribute value of the j-th band from the sample X′; x j represents the attribute value of the j-th band of a single pixel x; j represents one of the q bands.

[0054] (2.3) Based on the set Z, obtain the best splitting threshold S through the gain criterion S gain ; The specific formula is as follows:

[0055]

[0056] where, Z l ∪ Z r = Z, Z l and Z r represent the pixels of the left node and the right node respectively; n Z represents the number of pixels in Z. When the gain criterion S gain obtains the minimum value, the best splitting threshold S can be obtained.

[0057] (2.4) Use the best splitting threshold S to split the input sample into two sub-nodes;

[0058] (2.5) Loop through steps (2.2)-(2.4) until the height of the tree reaches the preset limit height H max = log2n or the number of pixels in the sub-node does not exceed 2, and a tree is obtained; where n represents the number of pixels of X′;

[0059] (2.6) Repeat steps (2.1)-(2.5) t times to obtain t trees and use them to form the discriminant forest of the local area;

[0060] (2.7) Construct and train a local discriminant forest using the hyperspectral pixel samples in each superpixel block region. All local discriminant forests constitute the hyperspectral image discriminant forest model at the r-th scale.

[0061] (2.8) Input the hyperspectral superpixel features at the r-th scale into the discriminant forest model at the current scale for detection to obtain the initial anomaly detection map at this scale.

[0062] (2.9) By detecting the hyperspectral image discriminant forest model at each scale, obtain the initial anomaly detection maps corresponding to multiple scales. The implementation is as follows: The anomaly value of each test pixel in the current superpixel block region is determined by the average path length of t trees. The path length of each tree is determined by the path length from the root to the external node, and its path length includes two parts, namely the path length participating in tree construction and the path length not participating in tree construction. In this way, the anomaly values of all pixels can be obtained, that is, an initial anomaly detection map of the hyperspectral image is generated. Input the r different-scale hyperspectral superpixel features generated by superpixel segmentation into the discriminant forest model at this scale for detection to obtain the initial anomaly detection maps corresponding to multiple scales.

[0063] The initial anomaly detection map is obtained by evaluating the anomaly value of the test pixel based on the total path length. The steps are as follows:

[0064] (2.9.1) Represent the total path length of each pixel on a tree as: h + c(T.Size), where h is the path length participating in tree construction, and c(T.Size) represents the path length not participating in tree construction.

[0065] (2.9.2) Evaluate h and c(T.Size) respectively:

[0066] For the path length h participating in tree construction, introduce a penalty mechanism for child node pixels, that is, set an acceptable range for the attribute value z. For the z attribute value in the test stage exceeding the acceptable range [S - v, S + v] of the z attribute value in the training stage, give a constraint that the path length does not increase, where v is the difference between the maximum and minimum values of all pixels of the child node in the attribute value z.

[0067] For the path length c(T.Size) not participating in tree construction, when the test pixel is judged as an external node and there are still some pixels in the current node, use the following formula to evaluate the path length of the pixels not participating in tree construction:

[0068] c(m) = 2H(m - 1) - 2(m - 1) / m

[0069] where H(·) is the harmonic number; the number of current child node pixels m = T.Size;

[0070] (2.9.3) Obtain the path length of each test pixel on a tree, then the average path length of each test pixel in the entire discriminant forest model is as follows:

[0071]

[0072] where x represents a test pixel; t represents the number of trees;

[0073] (2.9.4) Normalize the average path length of the test points to obtain the anomaly evaluation value s(x) of the test pixel:

[0074]

[0075] where c(n) represents the average height of a tree, and c(n) = 2H(n - 1) - 2(n - 1) / n, and n represents the total number of pixels in the input discriminant forest.

[0076] Step 3. Based on guided filtering, use the initial anomaly detection map to optimize the discriminant forest model, and use the optimized model to obtain the final detection result.

[0077] The specific operation of the guided filtering is as follows:

[0078] Input the fusion result R1 into the guided filtering network for optimization, and its guided filtering formula is defined as:

[0079] O i = a k I i + b k

[0080] where O i is the optimized hyperspectral anomaly detection map, initially R1; I i is the guidance image, that is, the component feature Y; a k and b k represent the first and second linear coefficients respectively;

[0081]

[0082]

[0083] where ε represents the regularization parameter; u j and ∑j represent the mean and 3×3 covariance of pixel j in the window Ω i in the guidance I j ; U is a 3×3 identity matrix; |Ω| represents the number of pixels in the window Ω j ; represents the input optimized image; is the mean value in the window Ω j in it.

[0084] The initial anomaly detection map is used to optimize the discriminant forest model, and the optimized model is used to obtain the final detection result.

[0085] (3.1) Multiply the initial anomaly detection maps corresponding to each scale pixel by pixel to obtain the first fusion result R1;

[0086] (3.2) Input the fusion result R1 into the guided filter network, and use the component feature Y as the guiding image to generate the guiding result O1;

[0087] (3.3) Add the guiding result O1 and the fusion result R1 pixel by pixel to obtain the second fusion result R2;

[0088] (3.4) Multiply the two fusion results R1 and R2 pixel by pixel to obtain the final fusion result, that is, the anomaly detection map R3.

[0089] Example 2. Refer to Figure 1 and Figure 2 . The overall implementation steps of this example are the same as those of Example 1. Now, some parameter values are set to further describe the implementation process of the method of the present invention:

[0090] Step a: Extract multi-scale hyperspectral superpixel features:

[0091] Convert the hyperspectral image into a two-dimensional matrix where h, l, and b represent the height, width, and band of the image respectively; N is the number of pixels and N = l × h; Input the two-dimensional matrix into the publicly available principal component analysis model PCA, and use the model to obtain the three most important component features

[0092] By setting three different numbers of superpixels for the publicly available simple linear iterative clustering model SLIC, input the feature and segment it into three different-scale superpixel segmentation maps, and use the spatial information index to generate three-scale hyperspectral superpixel features. Each superpixel block feature is represented as r and w represent the scale of the superpixel and the number of superpixels set at the r-th scale respectively. The hyperspectral superpixel feature at the r-th scale is Moreover, the pixels of each superpixel block are used as samples to construct a local region discriminant forest.

[0093] The calculation formula of the simple linear iterative clustering model SLIC, that is, the superpixel segmentation feature extraction model, is as follows:

[0094]

[0095]

[0096]

[0097] where d c is the color distance, which is the main three component features obtained by PCA d s is the spatial distance; N s is the maximum spatial distance within a class, defined as M is the number of hyperspectral pixels, and K is the number of superpixels; N c is the maximum color distance, set to 10; D′ represents the final distance measure.

[0098] Step b: Construct a discriminant forest model and train and test it:

[0099] The discriminant forest is composed of t trees. The construction process of each tree is as follows: Randomly extract a subsample X′ from the superpixel block region features as the input sample for training the discriminant forest model, where represent the pixels of each input sample as x = {x1, …, x b}; Randomly select samples of q bands from X′ to construct a hyperplane f, and map each pixel of the selected samples to the hyperplane f to obtain a new set of attribute values Z; Based on the set Z, obtain the best splitting threshold S through the gain criterion S gain ; The best splitting threshold is determined by the hyperplane gain criterion constructed by the pixels of the child nodes. Use the best splitting threshold S to split the input sample into two child nodes; Repeat the splitting process until the height of the tree reaches the preset limit height H max = log2n or the number of pixels in the child node does not exceed 2, obtaining a tree; where n represents the number of pixels in X′.

[0100] Repeat the above construction process t times to obtain t trees, and finally use these t trees to form the discriminant forest Diforest of the local area.

[0101] Construct and train a local discriminant forest using the hyperspectral pixel samples in each superpixel block region. All local discriminant forests constitute the hyperspectral image discriminant forest model at the r-th scale. Input the hyperspectral superpixel features at the r-th scale into the discriminant forest model at the current scale for detection to obtain the initial anomaly detection map at this scale. By detecting the hyperspectral image discriminant forest model at each scale, initial anomaly detection maps corresponding to multiple scales are obtained.

[0102] In constructing the discriminant forest, relevant designs are made for the optimal splitting threshold. On the randomly selected q-band hyperplane f, the optimal splitting threshold is obtained through the gain criterion S gain Obtain the optimal splitting threshold.

[0103] The anomaly value of each test pixel is the average path length of t trees. And the path length of each tree is determined by the path length from the root to the external node, which consists of two parts, namely the path length participating in tree construction and the path length not participating in tree construction. In this way, the anomaly values of all pixels can be obtained, that is, an initial anomaly detection map of the hyperspectral image is generated. Due to the three different-scale hyperspectral superpixel features generated by superpixel segmentation, they are input into the discriminant forest model for testing, and three different initial anomaly detection maps are obtained.

[0104] Step c: The multi-scale fusion network optimization process based on guided filtering, that is, the process of optimizing the discriminant forest model using the initial anomaly detection map based on guided filtering and obtaining the final detection result using the optimized model is as follows:

[0105] First, perform pixel-wise multiplication on the three different initial anomaly detection maps obtained by the discriminant forest model to fuse and obtain the result R1. Then, input R1 into the guided filtering network, and use the three main component features Y of PCA as the guidance image, then the result O1 can be generated, and O1 and R1 are fused by pixel-wise addition to obtain R2. Finally, R1 and R2 are fused by pixel-wise multiplication to obtain the final anomaly detection map R3.

[0106] Input the fusion result R1 into the guided filtering network optimization process. The guided filtering formula is:

[0107] O i = a k I i + b k

[0108] where, O i is the optimized hyperspectral anomaly detection map, initially R1; I i is the guidance image, that is, the three main component features Y of PCA; a k and bk Linear coefficient.

[0109]

[0110]

[0111] where ε is the regularization parameter, set to 0.001; u j and ∑j are the mean and 3×3 covariance of pixel j in the guidance I i in the window Ω j ; U is a 3×3 identity matrix; |Ω| represents the number of pixels in the window Ω j ; is the input optimized image, i.e., R1; is the mean in the window Ω j ; the window size is 3×3.

[0112] The superiority of the present invention is further demonstrated by qualitative and quantitative comparisons and validations as follows:

[0113] Refer to Figure 3, The comparison chart of the detection effects between the present invention and existing methods. From the subjective qualitative comparison results of the present invention and six popular algorithms on four publicly available hyperspectral anomaly detection datasets, it can be seen that the method of the present invention is closer to the ground truth map, that is, it can more accurately detect all hyperspectral anomaly pixels. The publicly available hyperspectral anomaly detection datasets used in the experiment include Cat Island, Pavia, Gainesville, and San Diego; the six popular algorithms for comparison are: RX [Reference: I.S. 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. 54, no. 4, pp. 1990 - 2000, Apr. 2016.], 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.], SSDF [Reference: S. Chang, B. Du, and L.Zhang, “A subspace selection-based discriminative forest method for hyperspectral anomaly detection,” IEEE Trans. Geosci. Remote Sens., vol. 58, no. 6, pp. 4033-4046, Jun. 2020.]、KIFD [References: S. Li, K. Zhang, P. Duan, and X. Kang, “Hyperspectral anomaly detection with kernel isolation forest,” IEEE Trans. Geosci. Remote Sens., vol. 58, no. 1, pp. 319-329, Jan. 2020.].

[0114] The following lists the quantitative comparison between the present invention and six popular algorithms in four datasets, namely the detection rate AUC(P d , P f ), the false alarm rate AUC(P f , τ), and the running time. Among them, the larger the detection rate AUC(P d , P f ), the better the performance of detecting abnormal pixels; the smaller the false alarm rate AUC(P f , τ), the better the performance of misdetecting abnormal pixels. As shown in Table 1 below:

[0115] Table 1 Comparison table of the present invention and six popular algorithms

[0116]

[0117] From the AUC values in the above table, it can be found that the detection effect of the present invention has obvious advantages compared with the prior art, and the detection effect is the best. Moreover, the detection running time of the present invention is second only to the RX algorithm, and it also has good real-time performance.

[0118] The parts not detailed in the present invention belong to the common general knowledge of those skilled in the art.

[0119] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Obviously, for professionals in the field, after understanding the content and principle of the present invention, various modifications and changes in form and details may be made without departing from the principle and structure of the present invention. However, these modifications and changes based on the idea of the present invention are still within the protection scope of the claims of the present invention.

Claims

1. Hyperspectral anomaly detection method based on superpixel-guided discriminant forest, characterized in that Including the following steps: (1) Extract multi-scale hyperspectral superpixel features: (1.1)Convert the hyperspectral image into a two-dimensional matrix where h, l, and b represent the height, width, and number of bands of the image, respectively; N is the number of pixels and N = l × h; (1.2) Input the two-dimensional matrix into the publicly available principal component analysis model PCA, and use the model to obtain the three most important component features (1.3) Set the scale of the Simple Linear Iterative Clustering model SLIC to r, and the number of superpixels in each scale ranges from [1, 30]; use this SLIC model to segment the component features into superpixel segmentation maps of r scales, and then use the superpixel segmentation spatial information to generate hyperspectral superpixel features of r scales through indexing; among them, the hyperspectral superpixel feature of the rth scale is the feature of the wth superpixel block region at the rth scale, denotes the number of feature pixels of (2) Construct a discriminant forest model, and train and test it: (2.1) Randomly extract a subsample X′ from the superpixel block regional features as the input sample for the discriminant forest model training, where represent the pixels of each input sample as x = {x1, …, x b}; (2.2) Randomly select samples of q bands from X′ to construct a hyperplane f, and map each pixel of the selected samples into the hyperplane f to obtain a new set of attribute values Z; (2.3) Based on the set Z, through the gain criterion S gain Obtain the optimal segmentation threshold S; (2.4) Use the optimal splitting threshold S to split the input samples into two sub-nodes; (2.5) Repeat steps (2.2)-(2.4) until the height of the tree reaches the preset limit height H max = log2n or the number of pixels of the child node does not exceed 2, and a tree is obtained; where n represents the number of pixels of X′; (2.6) Repeat steps (2.1)-(2.5) t times to obtain t trees and use them to form a discriminant forest for the local area; (2.7) Use the hyperspectral pixel samples in each superpixel block area to construct and train a discriminant forest for the local area, and all the discriminant forests for the local area form a discriminant forest model for the hyperspectral image at the r-th scale; (2.8) Input the hyperspectral superpixel features at the r-th scale into the discriminant forest model at the current scale for detection to obtain the initial anomaly detection map at this scale; (2.9) By detecting the discriminant forest models for the hyperspectral images at each scale, obtain the initial anomaly detection maps corresponding to multiple scales; (3) Based on guided filtering, use the initial anomaly detection map to optimize the discriminant forest model, and use the optimized model to obtain the final detection result: (3.1) Perform pixel-level multiplication fusion on the initial anomaly detection maps corresponding to each scale to obtain the first fusion result R1; (3.2) Input the fusion result R1 into the guided filtering network, and use the component feature Y as the guidance image to generate the guidance result O1; (3.3) Perform pixel-level addition fusion on the guidance result O1 and the fusion result R1 to obtain the second fusion result R2; (3.4) Perform pixel-level multiplication fusion on the two fusion results R1 and R2 to obtain the final fusion result, that is, the anomaly detection map R3.

2. The method according to claim 1, wherein: Component features in step (1.2) Obtained according to the following steps: (1.2.1) Input the two-dimensional matrix into the publicly available principal component analysis model PCA. The formula is as follows: Among them, is the projection matrix; represents the identity matrix; tr(·) represents the trace of a matrix; (1.2.2) Obtain the three most important component features using the principal component analysis model Among them, E(·) represents the mean function.

3. The method according to claim 1, wherein: The calculation formula of the simple linear iterative clustering SLIC model in step (1.3) is as follows: Among them, d c represents the color distance, which is the main component feature obtained by PCA; d s represents the spatial distance; represents the maximum intra-class spatial distance, M represents the number of hyperspectral pixels, and K represents the number of superpixels; N c represents the maximum color distance; D′ represents the final distance metric.

4. The method according to claim 1, wherein: In step (2.2), mapping each pixel of the selected samples into the hyperplane f is realized according to the following formula: Among them, Q represents randomly selecting q bands as attribute indexes; c j represents the coefficient randomly selected from [-1, 1]; μ(·) and σ(·) respectively represent the mean function and the standard deviation function; X′ j is the attribute value of the j-th band in the sample X′; x j represents the attribute value of the j-th band of a single pixel x; j represents one of the q bands.

5. The method according to claim 4, wherein: In step (2.3), the optimal segmentation threshold S is obtained through the gain criterion S gain The specific formula is as follows: Among them, Z l ∪Z r = Z, Z l and Z r represent the pixels of the left and right nodes respectively; n Z represents the number of pixels in Z. When the gain criterion S gain obtains the minimum value, the optimal segmentation threshold S can be obtained.

6. The method according to claim 1, characterized in that: In step (2.9), the initial anomaly detection map corresponding to each scale is obtained in the following way: the anomaly value size of each test pixel in the current superpixel block area is determined by the average path length of t trees, and the path length of each tree is determined by the path length from the root to the external node, and its path length includes two parts, namely the path length participating in the construction of the tree and the path length not participating in the construction of the tree; in this way, the anomaly values of all pixels can be obtained, that is, an initial anomaly detection map of a hyperspectral image is generated; input the r different-scale hyperspectral superpixel features generated by superpixel segmentation into the discriminant forest model at this scale for detection to obtain the initial anomaly detection maps corresponding to multiple scales.

7. The method according to claim 6, wherein: The initial anomaly detection map is obtained by evaluating the anomaly value of the test pixel based on the total path length, and the steps are as follows: (2.9.1) Represent the total path length of each pixel on a tree as: h + c(T.Size), where h is the path length participating in the construction of the tree, and c(T.Size) represents the path length not participating in the construction of the tree; (2.9.2) Evaluate h and c(T.Size) respectively: For the path length h of the tree construction, a pixel penalty mechanism for child nodes is introduced. That is, an acceptable range is set for the attribute value z. When the z attribute value in the test phase exceeds the acceptable range [S - v, S + v] of the z attribute value in the training phase, a constraint that the path length does not increase is given, where v is the difference between the maximum and minimum values of all pixels of the child node in the attribute value z. For the path length c(T.Size) that fails to participate in the tree construction, when the test pixel is judged as an external node and there are still some pixels in the current node, the following formula is used to evaluate the path length of the pixels that do not participate in the tree construction: c(m) = 2H(m - 1) - 2(m - 1) / m where H(·) is the harmonic number; the number of pixels of the current child node m = T.Size; (2.9.3) Obtain the path length of each test pixel on a tree. Then the average path length of each test pixel in the entire discriminant forest model is as follows: where x represents a test pixel; t represents the number of trees; (2.9.4) Normalize the average path length of the test points to obtain the anomaly evaluation value s(x) of the test pixel: where c(n) represents the average height of a tree, and c(n) = 2H(n - 1) - 2(n - 1) / n, and n represents the total number of pixels input to the discriminant forest.

8. The method according to claim 1, wherein: The guided filter described in step (3) is operated as follows: Input the fusion result R1 into the guided filter network for optimization. Its guided filter formula is defined as: O i = a k I i + b k Among them, O i is the optimized hyperspectral anomaly detection map, which is R1 initially; I i is the guiding image, that is, the component feature Y; a k and b k respectively represent the first and second linear coefficients; where ε represents the regularization parameter; u j and ∑j respectively represent the mean value of pixel j in the guiding I i in the window Ω j and the 3×3 covariance; U is the 3×3 identity matrix; |Ω| represents the number of pixels in the window Ω j ; represents the input optimized image; is the mean value in the window Ω j .

Citation Information

Patent Citations

  • Hyperspectral remote sensing image classification method combining quick region growth superpixel segmentation

    CN110796038A

  • Hyperspectral image anomaly detection method constructed by two-stage decision guide double dictionaries

    CN114758226A