Post-Processing for Shadow Detection in Drone-Acquired Images Using U-NET
<p>Workflow of methodology. The main steps include dataset preparation, image preprocessing, building of the shadow model, model training, post-processing, and evaluation of results.</p> "> Figure 2
<p>Sample image of SenseFly Drone Dataset.</p> "> Figure 3
<p>Sample image of Aerial Semantic Segmentation Dataset by Kaggle.</p> "> Figure 4
<p>Sample image of Mendeley Thermal and Visible Aerial Imagery.</p> "> Figure 5
<p>Visualization of 3 × 3 rectangle shape structuring element.</p> "> Figure 6
<p>Visualization of 3 × 3 cross shape structuring element.</p> "> Figure 7
<p>Visual comparison of thresholding method for Test Image 1 (row 1), Test Image 2 (row 2), and Test Image 3 (row 3). (<b>a</b>) input image, (<b>b</b>) ground truth, (<b>c</b>) manual thresholding, and (<b>d</b>) Otsu’s thresholding. The outputs using Otsu’s thresholding are comparable to the results using manual thresholding.</p> "> Figure 8
<p>Visual comparison of refinement methods on Test Image 1: (<b>a</b>) input image, (<b>b</b>) ground truth, (<b>c</b>) without refinement, (<b>d</b>) opening using rectangle kernel shape (<b>e</b>), opening using cross kernel shape, (<b>f</b>) closing using rectangle kernel shape, (<b>g</b>) closing using cross kernel shape, and (<b>h</b>) dense CRF. Dense CRF performs considerably well, as most of the white noise is removed.</p> "> Figure 9
<p>Visual comparison of refinement methods on Test Image 2: (<b>a</b>) input image, (<b>b</b>) ground truth, (<b>c</b>) without refinement, (<b>d</b>) opening using rectangle kernel shape (<b>e</b>), opening using cross kernel shape, (<b>f</b>) closing using rectangle kernel shape, (<b>g</b>) closing using cross kernel shape, and (<b>h</b>) dense CRF. Dense CRF performs considerably well, as most of the white noise is removed.</p> ">
Abstract
:1. Introduction
- Implementation of U-Net architecture with a small number of parameters for shadow detection using a small-sized aerial images dataset.
- Implementation of an automatic thresholding method to increase efficiency in obtaining final binary mask prediction.
- Implementation of morphological operations and dense Conditional Random Field (CRF) methods for binary mask refinement.
- Creating an annotated shadow image dataset using existing aerial images from several online sources.
2. Related Studies
2.1. Shadows in Drone Images
2.2. Shadow Detection Methods in Drone Images
2.2.1. Property-Based
2.2.2. Model-Based
2.2.3. Machine Learning
2.3. Post-Processing
3. Materials and Methods
3.1. Dataset Preparation
3.1.1. Dataset Sources
SenseFly Drone Dataset
Aerial Semantic Segmentation Dataset by Kaggle
Mendeley Thermal and Visible Aerial Imagery
3.1.2. Dataset Annotation
3.2. Preprocessing
3.3. Network Architecture
3.4. Comparison of U-Net Shadow Model Using Drone Dataset and Non-Drone Dataset
3.5. Post-Processing
3.5.1. Otsu’s Thresholding
3.5.2. Morphological Operation
3.5.3. Fully Connected Conditional Random Field
3.6. Evaluation
4. Results
4.1. Result of Shadow Models Using Drone Dataset and Non-Drone Dataset
4.2. Result Comparison between U-Net and PSPNet
4.3. Result of Automatic Thresholding
4.4. Result of Binary Mask Refinement
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Trapal, D.D.C.; Leong, B.C.C.; Ng, H.W.; Zhong, J.T.G.; Srigrarom, S.; Chan, T.H. Improvement of Vision-based Drone Detection and Tracking by Removing Cluttered Background, Shadow and Water Reflection with Super Resolution. In Proceedings of the 2021 6th International Conference on Control and Robotics Engineering (ICCRE), Beijing, China, 16–18 April 2021; pp. 162–168. [Google Scholar] [CrossRef]
- Sharma, D.; Singhai, J. An Object-Based Shadow Detection Method for Building Delineation in High-Resolution Satellite Images. PFG J. Photogramm. Remote Sens. Geoinf. Sci. 2019, 87, 103–118. [Google Scholar] [CrossRef]
- Mostafa, Y.; Abdelhafiz, A. Shadow Identification in High Resolution Satellite Images in the Presence of Water Regions. Photogramm. Eng. Remote Sens. 2017, 83, 87–94. [Google Scholar] [CrossRef]
- Luo, S.; Li, H.; Zhu, R.; Gong, Y.; Shen, H. ESPFNet: An Edge-Aware Spatial Pyramid Fusion Network for Salient Shadow Detection in Aerial Remote Sensing Images. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2021, 14, 4633–4646. [Google Scholar] [CrossRef]
- Freitas, V.L.D.S.; Reis, B.M.D.F.; Tommaselli, A.M.G. Automatic shadow detection in aerial and terrestrial images. Bol. Ciências Geodésicas 2017, 23, 578–590. [Google Scholar] [CrossRef] [Green Version]
- Min, S.; Lee, J.; Won, J.; Lee, J. Soft shadow art. In Proceedings of the Joint Symposium on Computational Aesthetics and Sketch Based Interfaces and Modeling and Non-Photorealistic Animation and Rendering, Los Angeles, CA, USA, 29–30 July 2017. [Google Scholar] [CrossRef]
- Gheorghe, C.; Gheorghe, C.; Filip, N. Image Processing Technique Used in Road Traffic Analysis—Opportunities and Challenges. Acta Tech. Napocensis Ser. Appl. Math. Mech. Eng. 2021, 64, S1–S2. Available online: https://atna-mam.utcluj.ro/index.php/Acta/article/view/1532 (accessed on 13 October 2021).
- Che’Ya, N.; Dunwoody, E.; Gupta, M. Assessment of Weed Classification Using Hyperspectral Reflectance and Optimal Multispectral UAV Imagery. Agronomy 2021, 11, 1435. [Google Scholar] [CrossRef]
- Liu, D.; Zhang, J.; Wu, Y.; Zhang, Y. A Shadow Detection Algorithm Based on Multiscale Spatial Attention Mechanism for Aerial Remote Sensing Images. IEEE Geosci. Remote Sens. Lett. 2021, 19, 6003905. [Google Scholar] [CrossRef]
- Luo, S.; Li, H.; Shen, H. Deeply supervised convolutional neural network for shadow detection based on a novel aerial shadow imagery dataset. ISPRS J. Photogramm. Remote Sens. 2020, 167, 443–457. [Google Scholar] [CrossRef]
- Movia, A.; Beinat, A.; Crosilla, F. Shadow detection and removal in RGB VHR images for land use unsupervised classification. ISPRS J. Photogramm. Remote Sens. 2016, 119, 485–495. [Google Scholar] [CrossRef]
- Truptirajendraghewari, M.; Khot, A.S.R.; Pise, A.P.S. Successive Thresholding Scheme for Shadow Detection of Aerial Images. Available online: https://www.ripublication.com/irph/ijert_spl17/ijertv10n1spl_89.pdf (accessed on 13 October 2021).
- Su, N.; Zhang, Y.; Tian, S.; Yan, Y.; Miao, X. Shadow Detection and Removal for Occluded Object Information Recovery in Urban High-Resolution Panchromatic Satellite Images. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2016, 9, 2568–2582. [Google Scholar] [CrossRef]
- Silva, G.F.; Carneiro, G.B.; Doth, R.; Amaral, L.A.; de Azevedo, D.F. Near real-time shadow detection and removal in aerial motion imagery application. ISPRS J. Photogramm. Remote Sens. 2018, 140, 104–121. [Google Scholar] [CrossRef]
- Mostafa, Y.; Nady, B. Study on shadow detection from high-resolution satellite images using color model. Sohag Eng. J. 2021, 1, 85–95. [Google Scholar] [CrossRef]
- Mo, N.; Zhu, R.; Yan, L.; Zhao, Z. Deshadowing of Urban Airborne Imagery Based on Object-Oriented Automatic Shadow Detection and Regional Matching Compensation. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2018, 11, 585–605. [Google Scholar] [CrossRef]
- Zhang, H.; Sun, K.; Li, W. Object-Oriented Shadow Detection and Removal from Urban High-Resolution Remote Sensing Images. IEEE Trans. Geosci. Remote Sens. 2014, 52, 6972–6982. [Google Scholar] [CrossRef]
- Pons, X.; Padró, J.C. An Empirical Approach on Shadow Reduction of UAV Imagery in Forests. In Proceedings of the IGARSS 2019–2019 IEEE International Geoscience and Remote Sensing Symposium, Yokohama, Japan, 28 July–2 August 2019; pp. 2463–2466. [Google Scholar] [CrossRef]
- Wang, Q.; Yan, L.; Yuan, Q.; Ma, Z. An Automatic Shadow Detection Method for VHR Remote Sensing Orthoimagery. Remote Sens. 2017, 9, 469. [Google Scholar] [CrossRef] [Green Version]
- Du, Y.; Li, J.; Wang, Y. Shadow Detection in High-Resolution Remote Sensing Image Based on Improved K-means. In Proceedings of the ICIMCS’16: International Conference on Internet Multimedia Computing and Service, Xi’an, China, 19–21 August 2016; pp. 281–286. [Google Scholar]
- Deshpande, A.M.; Gaikwad, M.; Patki, S.; Rathi, A.; Roy, S. Shadow detection from aerial imagery with morphological preprocessing and pixel clustering methods. ICTACT J. Image Video Process. 2021, 11, 3. [Google Scholar] [CrossRef]
- Vicente, T.F.Y.; Hoai, M.; Samaras, D. Leave-One-Out Kernel Optimization for Shadow Detection and Removal. IEEE Trans. Pattern Anal. Mach. Intell. 2018, 40, 682–695. [Google Scholar] [CrossRef]
- Kang, X.; Huang, Y.; Li, S.; Lin, H.; Benediktsson, J.A. Extended Random Walker for Shadow Detection in Very High Resolution Remote Sensing Images. IEEE Trans. Geosci. Remote Sens. 2018, 56, 867–876. [Google Scholar] [CrossRef]
- Zhao, H.; Shi, J.; Qi, X.; Wang, X.; Jia, J. Pyramid scene parsing network. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 6230–6239. [Google Scholar] [CrossRef] [Green Version]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention 2015; Navab, N., Hornegger, J., Wells, W.M., Frangi, A.F., Eds.; Lecture Notes in Computer Science; Springer International Publishing: Cham, Switzerland, 2015; Volume 9351, pp. 234–241. [Google Scholar] [CrossRef] [Green Version]
- Jin, Y.; Xu, W.; Hu, Z.; Jia, H.; Luo, X.; Shao, D. GSCA-UNet: Towards Automatic Shadow Detection in Urban Aerial Imagery with Global-Spatial-Context Attention Module. Remote Sens. 2020, 12, 2864. [Google Scholar] [CrossRef]
- Jiao, L.; Huo, L.; Hu, C.; Tang, P. Refined UNet: UNet-Based Refinement Network for Cloud and Shadow Precise Segmentation. Remote Sens. 2020, 12, 2001. [Google Scholar] [CrossRef]
- Le, H.; Vicente, T.F.Y.; Nguyen, V.; Hoai, M.; Samaras, D. A+D Net: Training a Shadow Detector with Adversarial Shadow Attenuation. arXiv 2017, arXiv:1712.01361. [Google Scholar]
- Wang, J.; Li, X.; Hui, L.; Yang, J. Stacked conditional generative adversarial networks for jointly learning shadow detection and shadow removal. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; pp. 1788–1797. [Google Scholar] [CrossRef] [Green Version]
- Horwath, J.P.; Zakharov, D.N.; Mégret, R.; Stach, E.A. Understanding important features of deep learning models for segmentation of high-resolution transmission electron microscopy images. npj Comput. Mater. 2020, 6, 108. [Google Scholar] [CrossRef]
- Xu, Y.; Gao, F.; Wu, T.; Bennett, K.M.; Charlton, J.R.; Sarkar, S. U-Net with optimal thresholding for small blob detection in medical images. In Proceedings of the 2019 IEEE 15th International Conference on Automation Science and Engineering (CASE), Vancouver, BC, Canada, 22–26 August 2019; pp. 1761–1767. [Google Scholar] [CrossRef]
- Chen, Z.; Zhu, L.; Wan, L.; Wang, S.; Feng, W.; Heng, P.A. A Multi-Task Mean Teacher for Semi-Supervised Shadow Detection. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 5610–5619. [Google Scholar] [CrossRef]
- Zhu, L.; Deng, Z.; Hu, X.; Fu, C.-W.; Xu, X.; Qin, J.; Heng, P.-A. Bidirectional Feature Pyramid Network with Recurrent Attention Residual Modules for Shadow Detection. In Proceedings of the Computer Vision—ECCV 2018, Munich, Germany, 8–14 September 2018; Volume 11210, pp. 122–137. [Google Scholar] [CrossRef]
- Discover a Wide Range of Drone Datasets—SenseFly. Available online: https://www.sensefly.com/education/datasets/ (accessed on 17 November 2021).
- ICG—DroneDataset. Available online: https://www.tugraz.at/index.php?id=22387 (accessed on 17 November 2021).
- Garcia, L.; Diaz, J.; Correa, H.L.; Restrepo-Girón, A.D. Thermal and Visible Aerial Imagery. Mendeley Data, V2, 2020. Available online: https://data.mendeley.com/datasets/ffgxxzx298/2 (accessed on 20 June 2022).
- Greensted, A. The Lab Book Pages Sitewide RSS. Available online: http://www.labbookpages.co.uk/software/imgProc/otsuthreshold.html (accessed on 8 June 2022).
- Zheng, S.; Jayasumana, S.; Romera-Paredes, B.; Vineet, V.; Su, Z.; Du, D.; Huang, C.; Torr, P.H.S. Conditional random fields as recurrent neural networks. arXiv 2016, arXiv:1502.03240v3. [Google Scholar]
- Arnab, A.; Jayasumana, S.; Zheng, S.; Torr, P.H.S. Higher Order Conditional Random Fields in Deep Neural Networks. In Proceedings of the 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Volume 9906, pp. 524–540. [Google Scholar] [CrossRef] [Green Version]
Dataset | Number of Patches | Objects | Properties of Shadows |
---|---|---|---|
Semantic Drone Dataset | 1540 | Contain objects such as people, houses, trees, and cars, captured at low altitude. | Varying Brightness |
SenseFly dataset (industrial state) | 700 | Contain objects such as vehicles, buildings, and trees, mostly captured at high altitude. | Low Brightness |
Mendeley Thermal and Visible Aerial Imagery | 20 | Contain objects such as trees and buildings, captured at high altitude. | High Brightness |
Training Parameters | Value/Type |
---|---|
Initial learning rate | 0.001 |
Number of epochs | 15 |
Filter size | 3 × 3 |
Pooling size | 2 × 2 |
Batch size | 16 |
Optimizer | Adam |
Loss function | Binary cross entropy |
Dropout | 8 |
Model | Dataset | Description |
---|---|---|
1 | ISTD dataset | The shadow detection dataset that is available online consists of non-drone images with simple shadows. The images are resized into 512 × 512 patches, and all 1330 images from the train set are used for training. |
2 | Self-annotated drone dataset | The main dataset used in this project consists of drone images selected from multiple sources mentioned in Table 1. A total of 1330 patches with the size of 512 × 512 are selected for training. |
Evaluation Metrics | Model Trained with ISTD Dataset | Model Trained with Drone Dataset |
---|---|---|
Overall Accuracy | 0.7962 | 0.9551 |
F1 Score | 0.2916 | 0.3855 |
IoU/Jaccard | 0.2351 | 0.3268 |
Evaluation Metrics | U-Net | PSPNet |
---|---|---|
Overall Accuracy | 0.9624 | 0.8614 |
F1 Score | 0.9620 | 0.8654 |
IoU/Jaccard | 0.9390 | 0.8516 |
Evaluation Metrics | Manual Thresholding = 0.5 | Otsu’s Thresholding |
---|---|---|
Overall Accuracy | 0.9638 | 0.9412 |
F1 Score | 0.3728 | 0.4061 |
IoU/Jaccard | 0.3212 | 0.3490 |
Recall | 0.3885 | 0.4839 |
Precision | 0.4194 | 0.3866 |
Method | Accuracy | |
---|---|---|
Without refinement | 0.9638 | |
Morphological operation opening | Rectangle kernel shape | 0.9640 |
Cross kernel shape | 0.9639 | |
Morphological operation closing | Rectangle kernel shape | 0.9640 |
Cross kernel shape | 0.9637 | |
Dense CRF | 0.9643 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Zali, S.-A.; Mat-Desa, S.; Che-Embi, Z.; Mohd-Isa, W.-N. Post-Processing for Shadow Detection in Drone-Acquired Images Using U-NET. Future Internet 2022, 14, 231. https://doi.org/10.3390/fi14080231
Zali S-A, Mat-Desa S, Che-Embi Z, Mohd-Isa W-N. Post-Processing for Shadow Detection in Drone-Acquired Images Using U-NET. Future Internet. 2022; 14(8):231. https://doi.org/10.3390/fi14080231
Chicago/Turabian StyleZali, Siti-Aisyah, Shahbe Mat-Desa, Zarina Che-Embi, and Wan-Noorshahida Mohd-Isa. 2022. "Post-Processing for Shadow Detection in Drone-Acquired Images Using U-NET" Future Internet 14, no. 8: 231. https://doi.org/10.3390/fi14080231
APA StyleZali, S. -A., Mat-Desa, S., Che-Embi, Z., & Mohd-Isa, W. -N. (2022). Post-Processing for Shadow Detection in Drone-Acquired Images Using U-NET. Future Internet, 14(8), 231. https://doi.org/10.3390/fi14080231