FCAE-AD: Full Convolutional Autoencoder Based on Attention Gate for Hyperspectral Anomaly Detection
Abstract
:1. Introduction
- (1)
- A fully convolutional AE network is used to recreate the background in the same dimension and scale as the original image, avoiding the lack of spectral information.
- (2)
- By introducing the AG model into the AE skip connection, a higher weight is assigned to the background reconstruction to better rebuild the background than the anomaly, thus increasing the separability of the two types of pixels.
- (3)
- Error map processing based on GF eliminates the irregular background pixels generated during image reconstruction and mitigates the effect of false anomalies on the rate of false alarms.
2. Related Works
2.1. Autoencoders
2.2. Guided Filter
2.3. Attention Gates
3. Methodology
3.1. Full Convolution AE Network Connected by AG
- (1)
- Encoder: It contains 15 convolutional modules. A convolution layer, a batch normalization (BatchNorm) function, and a leaky rectified linear unit (LeakyReLU) activation function are all included in each convolution module. A convolutional layer with a stride of 1 is used in Block 1 and Block 4. Through AG, the created feature maps are linked to the feature maps produced by the respective decoder layers. A convolutional layer with a stride of 2 is used in Block 2 and Block 5 primarily for downsampling. In Block 3, to follow Block 2 or Block 5, a convolutional layer with a stride of 1 is employed. The feature map dimension is always maintained at 128 dimensions at this stage.
- (2)
- Converter: It contains 5 AGs with skip connections. The AG model is shown in Figure 1, and its implementation steps are as follows: (a) Convolution is performed on the input feature maps g and x. Then, add the two feature maps to obtain the new feature map. To achieve the purpose of enhancing the feature area; (b) To create the feature map , the feature map is first processed by the ReLU activation function and then put through a convolution operation; (c) The weight map (taking values in the range [0, 1]) is obtained after the sigmoid activation function is applied to , the background feature area, which tends to 1, and the anomalous feature area, which tends to 0; (d) Resample and add it to the feature map x to obtain to enhance the background features and weaken abnormal features [28]. The coarse feature map generated by Block 1 or Block 4 and the fine feature map extracted at multi-scales are sampled, and the complementary information is extracted and fused by AG input before finally being merged into the next Block 6 by skip connection.
- (3)
- Decoder: It contains 11 convolution modules. Each convolution module has a convolution layer, a BatchNorm layer, and a LeakyReLU layer. The last convolution module also contains a sigmoid activation function. A convolution layer with a stride of 1 is used in Block 6, the input is a 256-dimensional feature map that combines the AG feature map with the encoding stage feature map, and the output is a 128-dimensional feature map. Block 4 uses a convolution layer with a step size of 1, following Block 6, with the feature map dimension kept at 128 dimensions. Block 7 uses a convolution layer with a step size of 1 to convert the feature map with a depth of 128 dimensions to the same dimensions as the HSI.
Algorithm 1 FCAE-AE network. |
Input: HSI . |
Initialization: Random noise map ; |
Do |
1: Network forward; |
2: The difference map of the X and the network reconstructed background map |
Weight is constructed by Formula (11)–(13) for the weight graph; |
3: The adaptive weighted loss L is calculated by Formula (14); |
4: Network backward; |
Until average weighted loss ; |
Output: Reconstruct Error E. |
3.2. Post Processing Optimization Based on GF
3.2.1. Guide Image Construction
- (a)
- Both the pixel to be measured and the window pixels are the background. The similarity scores of the image pixel A to be measured and all sub-volumes are high.
- (b)
- The pixel to be measured is the background, but there are anomalies in the window. The similarity scores between containing the anomaly and the image pixel A to be tested are lower than those of not containing the anomalous pixels.
- (c)
- The image pixel to be measured is anomalous, but the pixels in the window are background. All values are very low, and it is easy to determine that the image element A to be measured is anomalous.
- (d)
- The image pixel to be measured is anomalous, and window pixels also have anomalous pixels. The similarity score between containing anomalies and pixel A to be measured is higher than without anomalies. However, in the actual HSI, anomalies only occupy a few, so the situation almost does not exist.
3.2.2. Process of Guide Filtering
3.3. Algorithm Implementation
Algorithm 2 Overall framework. |
Input: HSI . |
Initialization: Random noise map ; Window size c; Guide filter size r; Guide filter |
regularization parameters . |
1: The random noise image is input into the network, and the background reconstruction |
image W is obtained by Algorithm 1 after the correction of the X; |
2: The reconstruction error E is obtained by the X and the W; |
3: The X is divided into 8 volumes by the single-window model, and the difference |
between each sub-volume and the pixel A to be measured is calculated by Formula (15); |
4: The similarity score of and A is calculated by Formula (16); |
5: According to Formula (17), the highest score in is selected as the pixel |
value to guide image D; |
6: The final detection image is obtained by GF the residual map E with the guide image D; |
Output: Anomaly Detection Map . |
4. Analysis and Experiment
4.1. Experimental Datasets
- (1)
- Gulfport Airport: The dataset has a spatial resolution of 3.5 m and was acquired by the AVIRIS sensor in Gulfport, Mississippi, in the United States. The size is 100 × 100 and the total number of spectral bands is 191 spectral bands. The anomalous area that must be found is the aircraft in the photograph. The sample image and the ground truth map for this dataset are displayed in Figure 7a.
- (2)
- Texas Coast: The dataset, which has a size of 100 × 100, a spatial resolution of 17.2 m, and 204 bands, was acquired by AVIRIS sensors off the Texas coast. Residents’ houses of various shapes in the image are marked as anomaly, containing 155 anomalous pixels. The sample image and the ground truth map for this dataset are displayed in Figure 7b.
- (3)
- Cat Island: The dataset was acquired by the AVIRIS sensor over the beaches and sea areas surrounding Cat Island and contains 188 spectral bands in an image of size 150 × 150. The dataset includes 19 anomalous pixels from airplane scenes. The sample image and the ground truth map for this dataset are displayed in Figure 7c.
- (4)
- HYDICE Urban: The dataset was acquired by the HYDICE sensor in an urban area in California, USA. The size of the test image used in the experiment is 80 × 100. After removing the noise band, there are still 175 spectral bands remaining. and the spatial resolution is 3 m. It contains 17 anomalous pixels, including cars and roofs. The example image and ground truth map for this dataset are shown in Figure 7d.
4.2. Parameter Setting
- (1)
- Window size c: A line chart of the AUC values with parameter c is shown in Figure 8a. The AUC value of Gulfport Airport fluctuates up and down in the general trend and reaches its peak when c = 13, so the Gulfport Airport window size c is set to 13. For Texas Coast, the general trend of AUC value is increasing first, then decreasing to reach the peak at c = 9. Therefore, the Texas Coast window size c is set to 9. For Cat Island, the AUC value is constant from window sizes 3–9 and decreasing from c = 9, so the Cat Island window size c is set to 9. For HYDICE Urban, the AUC value tends to increase all the time, so the HYDICE Urban window size c is set to 13. To sum up, the parameters c for the above four datasets are set to 13, 9, 9, and 13, respectively. In the order given in Section 4.1.
- (2)
- Guide filter size r: A line chart of the AUC values with parameter r is shown in Figure 8b. The general trend of the AUC value for Cat Island increases from r = 1 to decreases at r = 4. For Gulfport Airport, Texas Coast, and HYDICE Urban, the AUC value decreases from r = 1. To sum up, r of Cat Island is set to 4 in this paper, and r of other datasets is set to 1.
- (3)
- Guide filter regularization parameters : A line chart of the AUC values with parameter is shown in Figure 8c. As we can see from the figure, for Gulfport Airport and HYDICE Urban, the general trend of the AUC value decreases from to , so the above two datasets are 0.5. For Texas Coast, the general trend of the AUC value is to first increase to , stabilize to , and then decrease, so the value of for Texas Coast is 0.2. For Cat Island, the AUC value first stays the same at and then decreases, so for Cat Island is 0.4. To sum up, parameter is set to 0.5, 0.2, 0.4, and 0.5, respectively, in the sequence of datasets in Section 4.1.
4.3. Analysis and Comparison of Detection Results
4.4. Ablation Study
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Ben Salem, M.; Ettabaa, K.S.; Hamdi, M.A. Anomaly Detection in Hyperspectral Imagery: An Overview. In Proceedings of the International Image Processing, Applications and Systems Conference, Sfax, Tunisia, 5–7 November 2014; pp. 1–6. [Google Scholar]
- Racetin, I.; Krtalić, A. Systematic review of anomaly detection in hyperspectral remote sensing applications. Appl. Sci. 2021, 11, 4878. [Google Scholar] [CrossRef]
- Reed, I.S.; Yu, X. Adaptive multiple-band CFAR detection of an optical pattern with unknown spectral distribution. IEEE Trans. Acoust. Speech Signal Process. 1990, 38, 1760–1770. [Google Scholar] [CrossRef]
- Chun-Tong, L.; Shi-Xin, M.; Hao, W.; Yang, W.; Hong-Cai, L. A Density-Based Cluster Kernel RX Algorithm for Hyperspectral Anomaly Detection. Spectrosc. Spectr. Anal. 2019, 39, 1878–1884. [Google Scholar]
- Li, Z.; Zhang, Y. Hyperspectral Anomaly Detection Based on Improved RX with CNN Framework. In Proceedings of the IGARSS 2019–2019 IEEE International Geoscience and Remote Sensing Symposium, Yokohama, Japan, 28 July–2 August 2019; pp. 2244–2247. [Google Scholar]
- Ren, L.; Zhao, L.; Wang, Y. A superpixel-based dual window RX for hyperspectral anomaly detection. IEEE Geosci. Remote Sens. Lett. 2019, 17, 1233–1237. [Google Scholar] [CrossRef]
- Yang, Y.; Zhang, J.; Song, S.; Liu, D. Hyperspectral anomaly detection via dictionary construction-based low-rank representation and adaptive weighting. Remote Sens. 2019, 11, 192. [Google Scholar] [CrossRef]
- Ruhan, A.; Mu, X.; He, J. Enhance Tensor RPCA-Based Mahalanobis Distance Method for Hyperspectral Anomaly Detection. IEEE Geosci. Remote Sens. Lett. 2022, 19, 6008305. [Google Scholar]
- Xu, Y.; Du, B.; Zhang, L.; Chang, S. A low-rank and sparse matrix decomposition-based dictionary reconstruction and anomaly extraction framework for hyperspectral anomaly detection. IEEE Geosci. Remote Sens. Lett. 2019, 17, 1248–1252. [Google Scholar] [CrossRef]
- Wang, R.; Hu, H.; He, F.; Nie, F.; Cai, S.; Ming, Z. Self-weighted collaborative representation for hyperspectral anomaly detection. Signal Process. 2020, 177, 107718. [Google Scholar] [CrossRef]
- Wu, Z.; Su, H.; Tao, X.; Han, L.; Paoletti, M.E.; Haut, J.M.; Plaza, J.; Plaza, A. Hyperspectral anomaly detection with relaxed collaborative representation. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5533417. [Google Scholar] [CrossRef]
- Hou, Z.; Li, W.; Tao, R.; Ma, P.; Shi, W. Collaborative representation with background purification and saliency weight for hyperspectral anomaly detection. Sci. China Inf. Sci. 2022, 65, 112305. [Google Scholar] [CrossRef]
- Kuswidiyanto, L.W.; Noh, H.H.; Han, X. Plant Disease Diagnosis Using Deep Learning Based on Aerial Hyperspectral Images: A Review. Remote Sens. 2022, 14, 6031. [Google Scholar] [CrossRef]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
- Minaee, S.; Kalchbrenner, N.; Cambria, E.; Nikzad, N.; Chenaghlu, M. Deep learning—Based text classification: A comprehensive review. ACM Comput. Surv. CSUR 2021, 54, 1–40. [Google Scholar] [CrossRef]
- Kingma, D.P.; Welling, M. Auto-encoding variational bayes. arXiv 2013, arXiv:1312.6114. [Google Scholar]
- Bati, E.; Çalışkan, A.; Koz, A.; Aydin, A. Hyperspectral anomaly detection method based on auto-encoder. Image Signal Process. Remote Sens. XXI. Spie 2015, 9643, 220–226. [Google Scholar]
- Zhao, C.; Li, X.; Zhu, H. Hyperspectral anomaly detection based on stacked denoising autoencoders. J. Appl. Remote Sens. 2017, 11, 042605. [Google Scholar] [CrossRef]
- Xie, W.; Lei, J.; Liu, B.; Li, Y.; Jia, X. Spectral constraint adversarial autoencoders approach to feature representation in hyperspectral anomaly detection. Neural Netw. 2019, 119, 222–234. [Google Scholar] [CrossRef] [PubMed]
- Lu, X.; Zhang, W.; Huang, J. Exploiting embedding manifold of autoencoders for hyperspectral anomaly detection. IEEE Trans. Geosci. Remote Sens. 2019, 58, 1527–1537. [Google Scholar] [CrossRef]
- Makhzani, A.; Shlens, J.; Jaitly, N.; Goodfellow, L.; Frey, B. Adversarial autoencoders. arXiv 2015, arXiv:1511.05644. [Google Scholar]
- He, K.; Sun, J.; Tang, X. Guided image filtering. IEEE Trans. Pattern Anal. Mach. Intell. 2013, 35, 1397–1409. [Google Scholar] [CrossRef]
- Li, S.; Kang, X.; Hu, J. Image fusion with guided filtering. IEEE Trans. Image Process. 2013, 22, 2864–2875. [Google Scholar]
- Xie, W.; Li, Y.; Zhou, W.; Zheng, Y. Efficient coarse-to-fine spectral rectification for hyperspectral image. Neurocomputing 2018, 275, 2490–2504. [Google Scholar] [CrossRef]
- Kang, X.; Li, S.; Benediktsson, J.A. Spectral–spatial hyperspectral image classification with edge-preserving filtering. IEEE Trans. Geosci. Remote Sens. 2013, 52, 2666–2677. [Google Scholar] [CrossRef]
- Oktay, O.; Schlemper, J.; Folgoc, L.L.; Lee, M.; Heinrich, M.; Misawa, K.; Mori, K.; McDonagh, S.; Hammerla, N.Y.; Kainz, B.; et al. Attention u-net: Learning where to look for the pancreas. arXiv 2018, arXiv:1804.03999. [Google Scholar]
- Wang, S.; Wang, X.; Zhang, L.; Zhong, Y. Auto-AD: Autonomous hyperspectral anomaly detection network based on fully convolutional autoencoder. IEEE Trans. Geosci. Remote Sens. 2021, 60, 5503314. [Google Scholar] [CrossRef]
- Yu, M.; Chen, X.; Zhang, W.; Liu, Y. AGs-Unet: Building Extraction Model for High Resolution Remote Sensing Images Based on Attention Gates U Network. Sensors 2022, 22, 2932. [Google Scholar] [CrossRef]
- Xiang, P.; Ali, S.; Jung, S.K.; Zhou, H. Hyperspectral anomaly detection with guided autoencoder. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5538818. [Google Scholar] [CrossRef]
- Mu, Z.; Wang, M.; Wang, Y.; Song, R.; Wang, X. SI2FM: SID Isolation Double Forest Model for Hyperspectral Anomaly Detection. Remote Sens. 2023, 15, 612. [Google Scholar] [CrossRef]
- Tan, K.; Hou, Z.; Ma, D.; Chen, Y.; Du, Q. Anomaly detection in hyperspectral imagery based on low-rank representation incorporating a spatial constraint. Remote Sens. 2019, 11, 1578. [Google Scholar] [CrossRef]
- Ma, Y.; Fan, G.; Jin, Q.; Huang, J.; Mei, X.; Ma, J. Hyperspectral anomaly detection via integration of feature extraction and background purification. IEEE Geosci. Remote Sens. Lett. 2020, 18, 1436–1440. [Google Scholar] [CrossRef]
- Li, W.; Du, Q. Collaborative representation for hyperspectral anomaly detection. IEEE Trans. Geosci. Remote Sens. 2014, 53, 1463–1474. [Google Scholar]
- Shang, W.; Jouni, M.; Wu, Z.; Xu, Y. Hyperspectral Anomaly Detection Based on Regularized Background Abundance Tensor Decomposition. Remote Sens. 2023, 15, 1679. [Google Scholar] [CrossRef]
Method | Parameters |
---|---|
RX | — |
LRX | |
CRD | |
GAED | |
Auto-AD | — |
MLW_LRRSTO | |
FEBPAD |
Method | ||||||||
---|---|---|---|---|---|---|---|---|
CRD | 0.6272 | 0.0660 | 0.0541 | 0.6932 | 0.5731 | 1.2208 | 0.0119 | 0.6391 |
RX | 0.9526 | 0.0736 | 0.0248 | 1.0262 | 0.9278 | 2.9743 | 0.0489 | 1.0015 |
LRX | 0.7917 | 0.0277 | 0.0144 | 0.8194 | 0.7773 | 1.9235 | 0.0133 | 0.8050 |
GAED | 0.9680 | 0.2930 | 0.0347 | 1.2609 | 0.9333 | 8.4396 | 0.2582 | 1.2262 |
Auto-AD | 0.9696 | 0.3230 | 0.0302 | 1.2926 | 0.9394 | 10.6847 | 0.2928 | 1.2624 |
FEBPAD | 0.9664 | 0.1116 | 0.0023 | 1.0779 | 0.9641 | 48.9449 | 0.1093 | 1.0756 |
LRRSTO | 0.9687 | 0.4239 | 0.0552 | 1.3926 | 0.9135 | 7.6839 | 0.3687 | 1.3374 |
FCAE-AD | 0.9916 | 0.5013 | 0.0416 | 1.4929 | 0.9500 | 12.0475 | 0.4597 | 1.4513 |
Method | ||||||||
---|---|---|---|---|---|---|---|---|
CRD | 0.9918 | 0.2739 | 0.0527 | 1.2657 | 0.9390 | 5.1932 | 0.2212 | 1.2129 |
RX | 0.9907 | 0.3143 | 0.0556 | 1.3049 | 0.9351 | 5.6570 | 0.2587 | 1.2494 |
LRX | 0.9711 | 0.0372 | 0.0008 | 1.0083 | 0.9703 | 44.4876 | 0.0363 | 1.0075 |
GAED | 0.9436 | 0.3644 | 0.0631 | 1.3080 | 0.8805 | 5.7757 | 0.3013 | 1.2449 |
Auto-AD | 0.9846 | 0.2840 | 0.0060 | 1.2686 | 0.9786 | 47.0579 | 0.2779 | 1.2626 |
FEBPAD | 0.9861 | 0.3297 | 0.0648 | 1.3158 | 0.9213 | 5.0863 | 0.2649 | 1.2510 |
LRRSTO | 0.9802 | 0.3122 | 0.0326 | 1.2924 | 0.9476 | 9.5783 | 0.2796 | 1.2598 |
FCAE-AD | 0.9981 | 0.4808 | 0.0108 | 1.4789 | 0.9873 | 44.5410 | 0.4700 | 1.4681 |
Method | ||||||||
---|---|---|---|---|---|---|---|---|
CRD | 0.9685 | 0.2935 | 0.0184 | 1.2620 | 0.9501 | 15.9346 | 0.2751 | 1.2435 |
RX | 0.9807 | 0.2496 | 0.0065 | 1.2304 | 0.9742 | 38.1909 | 0.2431 | 1.2238 |
LRX | 0.9934 | 0.1933 | 0.0011 | 1.1867 | 0.9923 | 177.5045 | 0.1923 | 1.1856 |
GAED | 0.9223 | 0.1100 | 0.0172 | 1.0323 | 0.9050 | 6.3794 | 0.0928 | 1.0151 |
Auto-AD | 0.9640 | 0.1509 | 0.0026 | 1.1149 | 0.9613 | 57.1912 | 0.1483 | 1.1122 |
FEBPAD | 0.9663 | 0.0404 | 0.0046 | 1.0067 | 0.9616 | 8.7300 | 0.0358 | 1.0020 |
LRRSTO | 0.9596 | 0.2198 | 0.0104 | 1.1794 | 0.9492 | 21.1154 | 0.2094 | 1.1690 |
FCAE-AD | 0.9998 | 0.5799 | 0.0168 | 1.5749 | 0.9830 | 34.5258 | 0.5631 | 1.5629 |
Method | ||||||||
---|---|---|---|---|---|---|---|---|
CRD | 0.9943 | 0.3212 | 0.0288 | 1.3155 | 0.9655 | 11.1567 | 0.2924 | 1.2867 |
RX | 0.9857 | 0.2404 | 0.0351 | 1.2261 | 0.9506 | 6.8442 | 0.2053 | 1.1910 |
LRX | 0.9922 | 0.2217 | 0.0039 | 1.2139 | 0.9883 | 56.8040 | 0.2178 | 1.2100 |
GAED | 0.9649 | 0.3409 | 0.0082 | 1.3058 | 0.9567 | 41.6638 | 0.3327 | 1.2976 |
Auto-AD | 0.9790 | 0.3100 | 0.0085 | 1.2889 | 0.9705 | 36.6122 | 0.3015 | 1.2805 |
FEBPAD | 0.9357 | 0.1561 | 0.0130 | 1.0919 | 0.9227 | 11.9830 | 0.1431 | 1.0788 |
LRRSTO | 0.9953 | 0.4769 | 0.0346 | 1.4722 | 0.9607 | 13.7852 | 0.4423 | 1.4376 |
FCAE-AD | 0.9963 | 0.3018 | 0.0202 | 1.2981 | 0.9760 | 14.9082 | 0.2816 | 1.2778 |
Framework | AUC | |||
---|---|---|---|---|
Gulfport Airport | Texas Coast | Cat Island | HYDICE Urban | |
AE | 0.9696 | 0.9846 | 0.9640 | 0.9790 |
AG connected AE | 0.9900 | 0.9910 | 0.9751 | 0.9829 |
FCAE-AD | 0.9916 | 0.9981 | 0.9998 | 0.9963 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, X.; Wang, Y.; Mu, Z.; Wang, M. FCAE-AD: Full Convolutional Autoencoder Based on Attention Gate for Hyperspectral Anomaly Detection. Remote Sens. 2023, 15, 4263. https://doi.org/10.3390/rs15174263
Wang X, Wang Y, Mu Z, Wang M. FCAE-AD: Full Convolutional Autoencoder Based on Attention Gate for Hyperspectral Anomaly Detection. Remote Sensing. 2023; 15(17):4263. https://doi.org/10.3390/rs15174263
Chicago/Turabian StyleWang, Xianghai, Yihan Wang, Zhenhua Mu, and Ming Wang. 2023. "FCAE-AD: Full Convolutional Autoencoder Based on Attention Gate for Hyperspectral Anomaly Detection" Remote Sensing 15, no. 17: 4263. https://doi.org/10.3390/rs15174263
APA StyleWang, X., Wang, Y., Mu, Z., & Wang, M. (2023). FCAE-AD: Full Convolutional Autoencoder Based on Attention Gate for Hyperspectral Anomaly Detection. Remote Sensing, 15(17), 4263. https://doi.org/10.3390/rs15174263