Hyperspectral anomaly detection method based on deep features and two-tributary isolation forest

By combining deep features and dual-branch isolated forests, and utilizing neural networks for spectral feature dimensionality reduction and spatial information mining, the problem of poor performance in hyperspectral anomaly detection in existing technologies is solved, achieving more efficient detection results.

CN116486263BActive Publication Date: 2025-10-28XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310463686.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2025-10-28
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

Existing hyperspectral anomaly detection methods, when using isolated forest models, fail to effectively extract spectral and spatial information from hyperspectral images, resulting in poor detection performance, especially in sub-pixel anomaly detection.

Method used

We employ a method based on deep features and dual-branch isolated forests. We use neural networks to reduce the dimensionality of spectral features and extract them. We combine global and local samples to construct isolated forests, use morphological filtering and Gaussian filtering to mine spatial information, and perform nonlinear fusion to improve the detection effect.

Benefits of technology

It significantly improves the detection performance of hyperspectral anomaly detection, enhances the sensitivity to local anomalies, and optimizes the final detection results through nonlinear operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116486263B_ABST
    Figure CN116486263B_ABST
Patent Text Reader

Abstract

This invention proposes a hyperspectral anomaly detection method based on deep features and a dual-branch isolated forest, primarily addressing the problem of insufficient utilization of spatial and spectral information in existing technologies, which affects detection accuracy. The method includes: 1) extracting global and local samples from a 3D hyperspectral image; 2) introducing a neural network based on global and local features to perform spectral feature dimensionality reduction and extraction, obtaining global and local samples representing spectral information, and using these samples to construct and test isolated forests, generating spectral-based detection results; 3) using morphological filtering and Gaussian filtering to mine spatial information, generating spatial-based detection results; 4) fusing the two detection results through nonlinear operations to obtain the final hyperspectral anomaly detection result. This invention can more effectively mine the spectral and spatial information of hyperspectral images, improving the detection performance of hyperspectral anomalies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and machine learning technology, and further relates to hyperspectral anomaly detection, specifically a hyperspectral anomaly detection method based on deep features and dual-branch isolated forest, which can be used for environmental monitoring, disaster prediction and precision agriculture, etc. Background Technology

[0002] Hyperspectral anomaly detection is a task in hyperspectral image processing. Compared to other hyperspectral tasks, it lacks prior spectral and spatial information for learning, making it challenging. Hyperspectral image anomalies are defined as anomalous pixels in a hyperspectral image that exhibit significant spectral differences from their surrounding pixels. Based on this characteristic, hyperspectral anomaly detection technology has been applied in military, agricultural, geological, and marine fields. In recent years, the isolated forest model has attracted the attention of researchers in the hyperspectral field, and its application in hyperspectral anomaly detection has achieved good detection accuracy.

[0003] In existing technical literature [Wang R, Nie F, Wang Z, et al. Multiple features and isolation forest-based fast anomaly detector for hyperspectral imagery[J]. IEEE Transactions on Geoscience and Remote Sensing, 2020, 58(9):6664-6676.], on the one hand, isolated forests are constructed and tested in the spectral dimension of the original hyperspectral image; on the other hand, spatial features are introduced by Gaussian filtering, extended morphological filtering and extended multi-attribute filtering respectively, and isolated forests are constructed and tested on the three spatial features; finally, the images are fused by pixel-level addition. In the process of constructing isolated forests in the original hyperspectral image, this method only uses a single spectral band. For the many bands of the hyperspectral image, this makes the construction of isolated forests not very effective; and the construction of isolated forests based on three spatial features results in poor detection of sub-pixel anomalies due to insufficient spatial utilization. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of the existing technology by proposing a hyperspectral anomaly detection method based on depth features and dual-branch isolated forests, which solves the problem of poor detection performance of local anomaly detection. This invention can more effectively mine the spectral and spatial information of hyperspectral images, thereby improving the detection effect of hyperspectral anomaly detection.

[0005] The approach to achieving this invention is as follows: First, global and local samples are extracted from the three-dimensional hyperspectral image. Then, based on the global and local features, a neural network is introduced to perform dimensionality reduction and extraction of spectral features, obtaining global and local samples that characterize spectral information. These samples are then used to construct and test isolated forests, generating spectral-based detection results. Finally, spatial information is mined using morphological filtering and Gaussian filtering to generate spatial-based detection results. The spectral-based and spatial-based detection results are then fused through nonlinear operations to obtain the final result of hyperspectral anomaly detection.

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

[0007] (1) Extract global and local samples from the hyperspectral image:

[0008] (1.1) Transform the three-dimensional hyperspectral image Transform into a two-dimensional matrix The global sample is obtained, where H, W and B represent the height, width and band of the three-dimensional hyperspectral image, respectively, and N = H × W represents the number of pixels;

[0009] (1.2) Transform the two-dimensional matrix As input to the Principal Component Analysis (PCA) algorithm, the first principal component features are extracted. These features are then input into the Simple Linear Iterative Clustering (SLIC) algorithm, with the number of superpixel blocks set to k. The first principal component features are used to segment the data, resulting in a segmentation map. The spatial information of this segmentation map is then used to analyze the two-dimensional matrix. The index yields k locally homogeneous regions, N = N1 + N2 + ... + N v +...+N k , where N v Let v represent the number of pixels in the v-th homogeneous region, where v = 1, 2, ..., k; then the local sample HSI is obtained. L ={X L1 X L2 , ..., X Lv , ..., X Lk}, where X Lv This represents all pixels in the v-th homogeneous region of a local sample.

[0010] (2) Construct an isolated forest model using spectral information, obtain detection results, and fuse them:

[0011] (2.1) The spectral dimension of global and local samples is transformed by using the random initialization operation of the neural network, reducing it from B dimensions to D dimensions, thus obtaining the dimensionality-reduced global and local spectral information, i.e., the entire global sample set. and all local sample sets in This represents the global sample obtained by the i-th random initialization of the neural network. This represents the local sample obtained by the i-th random initialization of the neural network. Let λ represent all pixels in the v-th homogeneous region of the local sample obtained by the i-th random initialization of the neural network, where i = 1, 2, ..., λ;

[0012] (2.2) Randomly select pixels from the global spectral information and continuously divide them into child nodes through the segmentation threshold until the height of the tree reaches the preset height or the number of samples of the child node is less than or equal to 2, and a tree is constructed. Repeat the tree construction process t times to complete the construction of the global isolated forest model. Use the model to test and obtain the global detection results.

[0013] (2.3) From the local spectral information, randomly select pixels for the v-th homogeneous region, and continuously divide it into child nodes through the segmentation threshold until the height of the tree reaches the preset height or the number of samples of the child node is less than or equal to 2, and construct a tree. Repeat the tree construction process t times to complete the construction of the isolated forest model for the v-th homogeneous region. Use this model to test the current local region and obtain the detection results of the region; take v = 1, 2, ..., k, complete the construction of the isolated forest model for all local regions, and obtain the local detection results;

[0014] (2.4) By multiplying at the pixel level, the global detection results are fused with the local detection results to generate a spectral-based detection result S1;

[0015] (3) Input the first principal component features extracted by the principal component analysis algorithm into the morphological attribute filter, perform opening and closing operations, and then optimize the results by Gaussian filtering to obtain the spatial detection result S2.

[0016] (4) Perform nonlinear operations on the spatial-based detection result S2 and the spectral-based detection result S1 to obtain the final hyperspectral anomaly detection S.

[0017] Compared with the prior art, the advantages of this invention are:

[0018] First, this invention combines neural networks and isolated forests and applies them for the first time to hyperspectral anomaly detection, enabling the construction of isolated forests with better spectral information, thereby improving detection performance.

[0019] Secondly, because the present invention adopts a dual-branch isolated forest strategy based on global and local factors, it can effectively mine the spatial information of hyperspectral images, thereby enhancing the sensitivity of the dual-branch isolated forest model to anomalies in hyperspectral images.

[0020] Third, when using filtering technology for spatial anomaly detection, this invention introduces morphological attribute filtering and Gaussian filtering to extract spatial information, further capturing anomalies from a spatial perspective to generate spatial-based detection results; and through nonlinear fusion, it fuses the spectral-based detection results and spatial-based detection results generated by the dual-branch isolated forest, thereby further improving the performance of hyperspectral anomaly detection. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the overall implementation of the present invention;

[0022] Figure 2 This is a schematic diagram illustrating an example of the present invention;

[0023] Figure 3 This is a comparison chart of the detection effects of the present invention and existing methods. Detailed Implementation

[0024] To make the objectives 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.

[0025] Example 1, Reference Figure 1 and Figure 2 This invention relates to a hyperspectral anomaly detection method based on deep features and a dual-branch isolated forest, comprising the following steps:

[0026] Step 1. Extract global and local samples from the hyperspectral image:

[0027] (1.1) Transform the three-dimensional hyperspectral image Transform into a two-dimensional matrix The global sample is obtained, where H, W and B represent the height, width and band of the three-dimensional hyperspectral image, respectively, and N = H × W represents the number of pixels;

[0028] (1.2) Transform the two-dimensional matrix As input to the Principal Component Analysis (PCA) algorithm, the first principal component features are extracted. These features are then input into the Simple Linear Iterative Clustering (SLIC) algorithm, with the number of superpixel blocks set to k. The first principal component features are then segmented to obtain a segmentation map. The spatial information of this segmentation map is then used to analyze the two-dimensional matrix. The index yields k locally homogeneous regions, N = N1 + N2 + ... + N v +...+N k, where N v This represents the number of pixels in the v-th homogeneous region; the local sample HSI is obtained. L ={X L1 X L2 , ..., X Lv , ..., X Lk}, where X Lv This represents all pixels in the v-th homogeneous region of a local sample.

[0029] Step 2. Construct an isolated forest model using spectral information, obtain the detection results, and fuse them:

[0030] (2.1) The spectral dimension of global and local samples is transformed by using the random initialization operation of the neural network, reducing it from B dimensions to D dimensions, thus obtaining the dimensionality-reduced global and local spectral information, i.e., the entire global sample set. and all local sample sets in This represents the global sample obtained by the i-th random initialization of the neural network. This represents the local sample obtained by the i-th random initialization of the neural network. Let represent all pixels in the v-th homogeneous region of the local samples obtained by the i-th random initialization of the neural network, where i = 1, 2, ..., λ; the specific implementation steps are as follows:

[0031] (2.1.1) The neural network constructed in this embodiment contains two fully connected layers. The first fully connected layer is used to transform B-dimensional features into 100-dimensional features; the second fully connected layer is used to transform 100-dimensional features into D-dimensional features. The neural network is represented as follows:

[0032] x1 = Lay1(x)

[0033]

[0034] Where x represents any hyperspectral pixel, and x1 represents the feature obtained after passing through the first fully connected layer. This indicates a short connection operation, and x2 represents the feature obtained after passing through the second fully connected layer, i.e., the output feature;

[0035] (2.1.2) Randomly initialize the neural network by inputting the global sample and local sample with high dimension B into the neural network respectively, thereby obtaining the first random network initialization sample, that is, the first global sample with low dimension D. and the first local sample

[0036] (2.1.3) Repeat step (2.1.2) λ times, that is, randomly initialize the neural network λ times to obtain the entire global sample set with low dimension D. and all local sample sets

[0037] (2.2) Randomly select pixels from the global spectral information and continuously divide them into child nodes through the segmentation threshold until the height of the tree reaches the preset height or the number of samples of the child node is less than or equal to 2, and a tree is constructed. Repeat the tree construction process t times to complete the construction of the global isolated forest model. Use the model to test and obtain the global detection results.

[0038] (2.3) From the local spectral information, randomly select pixels for the v-th homogeneous region, and continuously divide it into child nodes through the segmentation threshold until the height of the tree reaches the preset height or the number of samples of the child node is less than or equal to 2, and construct a tree. Repeat the tree construction process t times to complete the construction of the isolated forest model for the v-th homogeneous region. Use this model to test the current local region and obtain the detection results of the region; take v = 1, 2, ..., k, complete the construction of the isolated forest model for all local regions, and obtain the local detection results;

[0039] (2.4) By multiplying at the pixel level, the global detection results are fused with the local detection results to generate a spectral-based detection result S1;

[0040] Step 3. Input the first principal component features extracted by the principal component analysis algorithm into the morphological attribute filter, perform opening and closing operations, and then optimize the result with Gaussian filtering to obtain the spatial detection result S2. The specific implementation steps are as follows:

[0041] (3.1) Input the first principal component feature PC1 from the principal component analysis method into the morphological attribute filter, perform opening and closing operations, and obtain the feature A generated by the morphological attribute filter:

[0042] A=|PC1-δ(PC1)|+|PC1-φ(PC1)|=φ(PC1)-δ(PC1)

[0043] Where δ(·) and φ(·) represent the opening and closing operations, respectively;

[0044] (3.2) Gaussian filtering is applied to feature A to obtain the spatial detection result S2:

[0045] S2 = G a (A)

[0046] Step 4. Perform a nonlinear operation on the spatial-based detection result S2 and the spectral-based detection result S1 to obtain the final hyperspectral anomaly detection S:

[0047]

[0048] Where α is the nonlinear fusion coefficient.

[0049] This invention, on the one hand, applies a strategy combining neural networks and isolated forests to hyperspectral anomaly detection for the first time, improving the utilization rate of spectral information in the construction of isolated forests; on the other hand, it employs a global and local dual-branch isolated forest network for training and detection, fully mining hyperspectral spatial information and enhancing the model's ability to detect local anomalies; simultaneously, it introduces morphological attribute filtering and Gaussian filtering to further extract spatial information and generate spatially based detection results; to optimize the final detection results, a nonlinear operation is finally used to fuse the spatially based detection results and the spectral detection results generated by the dual-branch isolated forest. This effectively improves the detection performance of hyperspectral anomalies.

[0050] Example 2: The overall implementation steps of the hyperspectral anomaly detection method in this example are the same as in Example 1. The specific implementation steps for constructing the global isolated forest model and using this model to test and obtain global detection results are further described below:

[0051] (a) Global samples obtained from the i-th random initialization of the neural network Randomly select n pixels

[0052] (b) From Randomly select one spectral band from the D bands, and randomly select a value from the maximum and minimum values ​​of all pixel values ​​in the band as the segmentation threshold. Based on the selected band, the current sample is divided into two sub-nodes by the segmentation threshold.

[0053] (c) Repeat step (b) until the tree height reaches the preset limit height H. max A tree is obtained by calculating the number of pixels in a node until the value of log2n or the number of pixels in a child node does not exceed 2.

[0054] (d) Based on the global samples randomly initialized by the random neural network each time, construct the isolated forest. After repeating steps (a)-(c) t times, t trees are obtained, and the process of constructing the isolated forest based on the global samples obtained by the i-th random initialization of the neural network is completed.

[0055] (e) Take i = 1, 2, ..., λ, complete the process of building an isolated forest based on all global samples, and obtain a global isolated forest model;

[0056] (f) Using a global isolated forest model for HSI GEach pixel y in the dataset is tested, and the average anomaly score γ of each test pixel is obtained under the global samples obtained based on the λ-th random initialization of the neural network. The anomaly score of each pixel is determined by the product of the path length and weight coefficient under the λ-th depth features (depth features generated by the λ-th random initialization of the neural network):

[0057] γ=E(ω(y)×z(y))

[0058] Where E(·) is the mean function, and ω(y) and z(y) represent the final path length and weight coefficient in the t trees in each random initialization of the neural network; they are calculated as follows:

[0059]

[0060]

[0061] Among them, g i (y) represents the weight values ​​of all child nodes in the i-th tree; e and e max These represent the height of the current child node tree and the maximum height of the tree, respectively; ζ e To test the difference between pixel attributes and the segmentation threshold at heights of e child nodes; P e This indicates the spectral attribute index at the current child node height;

[0062]

[0063]

[0064] Where H(y) represents the average path length in t trees; c(n) is the regularization factor, calculated by c(n) = 2H(n-1) - 2(n-1) / n; h i (y) represents the path length in the i-th tree.

[0065] (g) The total path length on the j-th tree is expressed as: h + c(T.Size), where h is the path length participating in tree construction, i.e., the path length of the bottom-level child node, and c(T.Size) represents the path length that did not participate in tree construction, j = 1, 2, ..., t; when the test pixel is identified as an external node, and the current node still has some pixels, the path length of the pixels that did not participate in tree construction is evaluated using the following formula to obtain the path length c(m) that did not participate in tree construction:

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

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

[0068] Example 3: The overall implementation steps of the hyperspectral anomaly detection method in this example are the same as in Example 1. The construction and testing of the local isolated forest model are further described below:

[0069] In the entire local sample set middle, For the local samples obtained by the i-th random initialization of the neural network, this refers to all pixels in the v-th homogeneous region within the local samples obtained by the i-th random initialization of the neural network. The same construction method as the global isolated forest model is adopted, that is, similar to the steps in Example 2. Pixels are randomly selected from the v-th homogeneous region, and child nodes are continuously divided into them according to the segmentation threshold until the height of the tree reaches the preset height or the number of samples of the child nodes is less than or equal to 2, thus constructing a tree. The tree construction process is repeated t times to complete the construction of the isolated forest model for the v-th homogeneous region. The model is then used to test each pixel in the corresponding region to obtain the anomaly score of each pixel in the current local region. Taking v = 1, 2, ..., k, pixels are randomly selected from the local spectral information for each homogeneous region. The above operation is repeated to complete the construction of the isolated forest model for all local regions. The isolated forest model constructed in each local region is used to test the pixels in the region to obtain anomaly scores, and finally, the local detection results are obtained.

[0070] The advantages of this invention are further demonstrated through qualitative and quantitative comparisons below:

[0071] Reference Figure 3The comparison chart of the detection performance of the present invention and existing methods shows that, based on the subjective qualitative comparison results of the present invention and six popular algorithms on five publicly available hyperspectral anomaly detection datasets, the method of the present invention is closer to the ground truth map, that is, it more accurately detects all hyperspectral anomaly pixels. The publicly available hyperspectral anomaly detection datasets used in the experiments included Los Angeles, Gulfport, Pavia, HYDICE, and SpecTIR. The six popular algorithms compared were: 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.], and 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.], RGAE [Reference: Fan G, Ma Y, Mei X, etal. Hyperspectral anomaly detection with robust graph autoencoders[J]. IEEETransactions on Geoscience and Remote Sensing,2021,60:1-14.], 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 [Reference: S.Li, K.Zhang, P.Duan, andX.Kang, "Hyperspectral anomaly detection with kernel isolation forest,” IEEETrans.Geosci.Remote Sens., vol.58, no.1, pp.319-329, Jan.2020.]. .

[0072] The following table lists a quantitative comparison of this invention and six popular algorithms on five datasets, specifically the detection rate AUC(P). d ,P f ) and runtime. Among them, the detection rate AUC(P) d ,P f The larger the value, the better the performance in detecting abnormal pixels. See Table 1 below:

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

[0074]

[0075] From the quantitative comparison in the table above, we can clearly see that this invention far surpasses six popular algorithms in terms of detection accuracy, highlighting its superior detection performance. In terms of detection time, it is second only to the RX algorithm, exhibiting excellent real-time performance.

[0076] The above comparative analysis proves the correctness and effectiveness of the method proposed in this invention.

[0077] The parts of this invention not described in detail are common knowledge to those skilled in the art.

[0078] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Obviously, those skilled in the art, after understanding the content and principle of the present invention, may make various modifications and changes in form and detail without departing from the principle and structure of the present invention. However, these modifications and changes based on the concept of the present invention are still within the scope of protection of the claims of the present invention.

Claims

1. A hyperspectral anomaly detection method based on depth features and isolated forests with two branches, characterized in that, Includes the following steps: (1) Extract global and local samples from the hyperspectral image: (1.1) Transform the three-dimensional hyperspectral image Transform into a two-dimensional matrix The global sample is obtained, where H, W and B represent the height, width and band of the three-dimensional hyperspectral image, respectively, and N = H × W represents the number of pixels; (1.2) Transform the two-dimensional matrix As input to the Principal Component Analysis (PCA) algorithm, the first principal component features are extracted. These features are then input into the Simple Linear Iterative Clustering (SLIC) algorithm, with the number of superpixel blocks set to k. The first principal component features are then segmented to obtain a segmentation map. The spatial information of this segmentation map is then used to analyze the two-dimensional matrix. The index yields k locally homogeneous regions, N = N1 + N2 + ... + N v +...+N k , where N v Let v represent the number of pixels in the v-th homogeneous region, where v = 1, 2, ..., k; then the local sample HSI is obtained. L ={X L1 X L2 , ..., X Lv , ..., X Lk }, Where X Lv This represents all pixels in the v-th homogeneous region of a local sample. (2) Construct an isolated forest model using spectral information, obtain detection results, and fuse them: (2.1) The spectral dimensions of global and local samples are transformed by using the random initialization operation of the neural network, reducing them from B dimensions to D dimensions, thus obtaining the dimensionality-reduced global and local spectral information, i.e., the entire global sample set. and all local sample sets in This represents the global sample obtained by the i-th random initialization of the neural network. This represents the local sample obtained by the i-th random initialization of the neural network. Let λ represent all pixels in the v-th homogeneous region of the local sample obtained by the i-th random initialization of the neural network, where i = 1, 2, ..., λ; (2.2) Randomly select pixels from the global spectral information and continuously divide them into child nodes through the segmentation threshold until the height of the tree reaches the preset height or the number of samples of the child node is less than or equal to 2, and a tree is constructed. Repeat the tree construction process t times to complete the construction of the global isolated forest model. Use the model to test and obtain the global detection results. (2.3) From the local spectral information, randomly select pixels for the v-th homogeneous region and continuously divide it into child nodes through the segmentation threshold until the height of the tree reaches the preset height or the number of samples of the child node is less than or equal to 2, and construct a tree. Repeat the tree construction process t times to complete the construction of the isolated forest model for the v-th homogeneous region. Use this model to test the current local region and obtain the detection results of the region; take v = 1, 2, ..., k, complete the construction of the isolated forest model for all local regions, and obtain the local detection results; (2.4) By multiplying at the pixel level, the global detection results are fused with the local detection results to generate a spectral-based detection result S1; (3) Input the first principal component features extracted by the principal component analysis algorithm into the morphological attribute filter, perform opening and closing operations, and then optimize the results by Gaussian filtering to obtain the spatial detection result S2. (4) Perform nonlinear operations on the spatial-based detection result S2 and the spectral-based detection result S1 to obtain the final hyperspectral anomaly detection S.

2. The method according to claim 1, characterized in that: The dimensionality-reduced global and local spectral information mentioned in step (2.1) is obtained according to the following steps: (2.1.1) Construct a neural network containing two fully connected layers, where the first fully connected layer is used to transform B-dimensional features into 100-dimensional features; the second fully connected layer is used to transform 100-dimensional features into D-dimensional features; the neural network is represented as follows: x1 = Lay1(x) Where x represents any hyperspectral pixel, and x1 represents the feature obtained after passing through the first fully connected layer. This indicates a short connection operation, and x2 represents the feature obtained after passing through the second fully connected layer, i.e., the output feature; (2.1.2) Randomly initialize the neural network by inputting the global sample and local sample with high dimension B into the neural network respectively, thereby obtaining the first random network initialization sample, that is, the first global sample with low dimension D. and the first local sample (2.1.3) Repeat step (2.1.2) λ times, that is, randomly initialize the neural network λ times to obtain the entire global sample set with low dimension D. and all local sample sets 3. The method according to claim 1, characterized in that: The construction of the global isolated forest model described in step (2.2), and the testing of this model to obtain global detection results, are implemented through the following steps: (2.2.1) Global samples obtained from the i-th random initialization of the neural network Randomly select n pixels (2.2.2) From Randomly select one spectral band from the D bands, and randomly select a value from the maximum and minimum values ​​of all pixel values ​​in the band as the segmentation threshold. Based on the selected band, the current sample is divided into two sub-nodes by the segmentation threshold. (2.2.3) Repeat step (2.2.2) until the tree height reaches the preset limit height H. max A tree is obtained by calculating the number of pixels in a node until the value of log2n or the number of pixels in a child node does not exceed 2. (2.2.4) Repeat steps (2.2.1)-(2.2.3) t times to obtain t trees, thus completing the process of constructing an isolated forest based on the global samples obtained from the i-th random initialization of the neural network; (2.2.5) Take i = 1, 2, ..., λ, complete the process of constructing an isolated forest based on all global samples, and obtain the global isolated forest model; (2.2.6) Using a global isolated forest model to analyze HSI G Each pixel y in the dataset is tested, and the average anomaly score γ of each test pixel is obtained from the global samples obtained based on the neural network with λ random initializations. γ=E(ω(y)×z(y)) Where E(·) is the mean function, and ω(y) and z(y) represent the final path length and weight coefficient in the t trees in each random initialization of the neural network; (2.2.7) The total path length on the j-th tree is expressed as: h + c(T.Size), where h is the path length participating in tree construction, i.e., the path length of the bottom-level child node, and c(T.Size) represents the path length that did not participate in tree construction, j = 1, 2, ..., t; when the test pixel is identified as an external node, and the current node still has some pixels, the path length of the pixels that did not participate in tree construction is evaluated using the following formula to obtain the path length c(m) that did not participate in tree construction: c(m)=2H(m-1)-2(m-1) / m Where H(·) is the harmonic number; the number of pixels in the current child node m = T.Size.

4. The method according to claim 3, characterized in that: The final path length ω(y) and weight coefficient z(y) are calculated as follows: Among them, g i (y) represents the weight values ​​of all child nodes in the i-th tree; e and e max These represent the height of the current child node tree and the maximum height of the tree, respectively; ζ e To test the difference between pixel attributes and the segmentation threshold at heights of e child nodes; P e This indicates the spectral attribute index at the current child node height; Where H(y) represents the average path length in t trees; c(n) is the regularization factor, calculated by c(n) = 2H(n-1) - 2(n-1) / n; h i (y) represents the path length in the i-th tree.

5. The method according to claim 1, characterized in that: The spatial detection result S2 in step (3) is obtained as follows: (3.1) Input the first principal component feature PC1 from the principal component analysis method into the morphological attribute filter, perform opening and closing operations, and obtain the feature A generated by the morphological attribute filter: A=|PC1-δ(PC1)|+|PC1-φ(PC1)|=φ(PC1)-δ(PC1) Where δ(·) and φ(·) represent the opening and closing operations, respectively; (3.2) Gaussian filtering is applied to feature A to obtain the spatial detection result S2: S2=G a (A)。 6. The method according to claim 1, characterized in that: In step (4), a nonlinear fusion operation is performed on the spatial-based detection result S2 and the spectral-based detection result S1, as shown in the following formula: Where α is the nonlinear fusion coefficient.

Citation Information

Patent Citations

  • Hyperspectral image anomaly detection method and device, computer equipment and storage medium

    CN112990313A

  • Hyperspectral image anomaly detection method and device based on improved isolated forest algorithm

    CN112990314A