KappaMask: AI-Based Cloudmask Processor for Sentinel-2
<p>General pipeline of the KappaMask model development.</p> "> Figure 2
<p>Sentinel-2 tiles used for labelling. Images with cumulus clouds are indicated as blue dots, images with stratus clouds are marked as red and images with cirrus clouds are marked as green. Each dot corresponds to one Sentinel-2 100 × 100 km data product. If the dots are exactly next to each other, it means the corresponding Sentinel-2 products are from the same location.</p> "> Figure 3
<p>Distribution of the training and test data. Red dots indicate Sentinel-2 images reserved for training and validation dataset, and blue dots indicate images used for the test dataset only. If the dots are exactly next to each other, it means the corresponding Sentinel-2 products are from the same location.</p> "> Figure 4
<p>U-Net model architecture used for training.</p> "> Figure 5
<p>Illustrative images of how full Sentinel-2 image is cropped for prediction and how classification map is rebuilt into the full image with 32 pixels overlap. (<b>a</b>) Cropping original Sentinel-2 image for inference. (<b>b</b>) Prediction output mask combined into the final image.</p> "> Figure 6
<p>Comparison of L2A prediction output for a 512 × 512 pixels sub-tile in the test dataset. (<b>a</b>) Original Sentinel-2 L2A True-Color Image; (<b>b</b>) KappaMask classification map; (<b>c</b>) Segmentation mask prepared by a human labeller; (<b>d</b>) Fmask classification map; (<b>e</b>) MAJA classification map.</p> "> Figure 7
<p>Comparison of L1C prediction output for a 512 × 512 pixels sub-tile in the test dataset. (<b>a</b>) Original Sentinel-2 L1C True-Colour Image; (<b>b</b>) KappaMask classification map; (<b>c</b>) Segmentation mask prepared by a human labeller; (<b>d</b>) Fmask classification map.</p> "> Figure 8
<p>Confusion matrices on test set for (<b>a</b>) KappaMask Level-2A; (<b>b</b>) KappaMask Level-1C; (<b>c</b>) Sen2Cor; (<b>d</b>) Fmask. Confusion matrix consists of clear, cloud shadow, semi-transparent cloud, cloud and missing class; however, the last one is removed from this comparison to make matrices easier to read.</p> "> Figure 9
<p>Comparison of L2A prediction output for a 512 × 512 pixels sub-tile in the test dataset. (<b>a</b>) Original Sentinel-2 L2A True-Colour Image; (<b>b</b>) KappaMask classification map; (<b>c</b>) Segmentation mask prepared by a human labeller; (<b>d</b>) S2cloudless classification map; (<b>e</b>) DL_L8S2_UV classification map.</p> "> Figure 10
<p>Comparison of L1C prediction output for a 512 × 512 pixels sub-tile in the test dataset. (<b>a</b>) Original Sentinel-2 L1C True-Colour Image; (<b>b</b>) KappaMask classification map; (<b>c</b>) Segmentation mask prepared by a human labeller; (<b>d</b>) S2cloudless classification map; (<b>e</b>) DL_L8S2_UV classification map.</p> "> Figure 11
<p>Feature importance obtained by deleting input features during inference for L2A model: (<b>a</b>) feature importance per class; (<b>b</b>) sorted feature importance, summed up for all the classes, and for L1C model: (<b>c</b>) feature importance per class; (<b>d</b>) sorted feature importance, summed up for all the classes.</p> "> Figure A1
<p>The entire Sentinel-2 L2A product classification map at 10 m resolution output (S-2 product S2A_MSIL2A_20200824T093041_N0214_R136_T35VND_20200824T121941).</p> "> Figure A2
<p>The whole Sentinel-2 L1C product (<b>left</b>) and its classification map (<b>right</b>) at 10 m resolution.</p> "> Figure A2 Cont.
<p>The whole Sentinel-2 L1C product (<b>left</b>) and its classification map (<b>right</b>) at 10 m resolution.</p> "> Figure A3
<p>The complete Sentinel-2 L2A product S2B_MSIL2A_20200905T092029_N0214_R093_T35ULR_20200905T113748 (<b>left</b>) and its classification map (<b>right</b>) at 10 m resolution.</p> "> Figure A3 Cont.
<p>The complete Sentinel-2 L2A product S2B_MSIL2A_20200905T092029_N0214_R093_T35ULR_20200905T113748 (<b>left</b>) and its classification map (<b>right</b>) at 10 m resolution.</p> ">
Abstract
:1. Introduction
2. Materials and Methods
2.1. Data Processing
- 10 m bands: “B02” (490 nm), “B03” (560 nm), “B04” (665 nm), “B08” (842 nm);
- 20 m resolution bands: “B05” (705 nm), “B06” (740 nm), “B07” (783 nm), “B8A” (865 nm), “B11” (1610 nm), “B12” (2190 nm);
- 60 m resolution bands: “B01” (443 nm), “B09” (940 nm);
- “AOT” (Aerosol Optical Thickness) and “WVP” (Water vapor map).
2.2. Output Classification Classes
- 0—MISSING: missing or invalid pixels;
- 1—CLEAR: pixels without clouds or cloud shadows;
- 2—CLOUD SHADOW: pixels with cloud shadows;
- 3—SEMI TRANSPARENT CLOUD: pixels with thin clouds through which the land is visible;
- 4—CLOUD: pixels with cloud;
- 5—UNDEFINED: pixels that the labeller is not sure which class they belong to.
2.3. Model Fitting
2.4. Inference
3. Results
3.1. KappaMask L1C and L2A Comparison with Rule-Based Methods
3.2. KappaMask L1C and L2A Comparison with AI-Based Methods
3.3. KappaMask Feature Importance Analysis
3.4. Parameter Tuning
3.5. KappaMask Time Usage Comparison with Other Methods
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
References
- Main-Knorn, M.; Pflug, B.; Louis, J.; Debaecker, V.; Müller-Wilm, U.; Gascon, F. Sen2Cor for Sentinel-2. In Proceedings of the Image and Signal Processing for Remote Sensing XXIII, Warsaw, Poland, 4 October 2017. [Google Scholar] [CrossRef] [Green Version]
- Qiu, S.; Zhu, Z.; He, B. Fmask 4.0: Improved cloud and cloud shadow detection in Landsats 4–8 and Sentinel-2 imagery. Remote Sens. Environ. 2019, 231, 111205. [Google Scholar] [CrossRef]
- Hagolle, O.; Huc, M.; Pascual, D.V.; Dedieu, G. MAJA. Available online: https://github.com/CNES/MAJA (accessed on 10 October 2021).
- Zupanc, A. Improving Cloud Detection with Machine Learning. 2017. Available online: https://medium.com/sentinel-hub/improving-cloud-detection-with-machine-learning-c09dc5d7cf13 (accessed on 18 November 2020).
- FastAI. Available online: https://github.com/fastai/fastai (accessed on 22 November 2020).
- LightGBM. Available online: https://lightgbm.readthedocs.io/en/latest/ (accessed on 10 October 2021).
- Drönner, J.; Korfhage, N.; Egli, S.; Mühling, M.; Thies, B.; Bendix, J.; Freisleben, B.; Seeger, B. Fast Cloud Segmentation Using Convolutional Neural Networks. Remote Sens. 2018, 10, 1782. [Google Scholar] [CrossRef] [Green Version]
- Wieland, M.; Li, Y.; Martinis, S. Multi-sensor cloud and cloud shadow segmentation with a convolutional neural network. Remote Sens. Environ. 2019, 230, 111203. [Google Scholar] [CrossRef]
- Jeppesen, J.H.; Jacobsen, R.; Inceoglu, F.; Toftegaard, T.S. A cloud detection algorithm for satellite imagery based on deep learning. Remote Sens. Environ. 2019, 229, 247–259. [Google Scholar] [CrossRef]
- Foga, S.; Scaramuzza, P.L.; Guo, S.; Zhu, Z.; Dilley, R.D.; Beckmann, T.; Schmidt, G.L.; Dwyer, J.; Hughes, M.J.; Laue, B. Cloud detection algorithm comparison and validation for operational Landsat data products. Remote Sens. Environ. 2017, 194, 379–390. [Google Scholar] [CrossRef] [Green Version]
- L8 SPARCS Cloud Validation Masks. 2016. Available online: https://www.usgs.gov/core-science-systems/nli/landsat (accessed on 10 October 2021).
- Badrinarayanan, V.; Kendall, A.; Cipolla, R. SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 2481–2495. [Google Scholar] [CrossRef] [PubMed]
- Li, Z.; Shen, H.; Cheng, Q.; Liu, Y.; You, S.; He, Z. Deep learning based cloud detection for medium and high resolution remote sensing images of different sensors. ISPRS J. Photogramm. Remote Sens. 2019, 150, 197–212. [Google Scholar] [CrossRef] [Green Version]
- Yan, Z.; Yan, M.; Sun, H.; Fu, K.; Hong, J.; Sun, J.; Zhang, Y.; Sun, X. Cloud and cloud shadow detection using multilevel feature fused segmentation network. IEEE Geosci. Remote Sens. Lett. 2018, 15, 1600–1604. [Google Scholar] [CrossRef]
- Tuia, D.; Ratle, F.; Pacifici, F.; Kanevski, M.; Emery, W. Active Learning Methods for Remote Sensing Image Classification. IEEE Trans. Geosci. Remote Sens. 2009, 47, 2218–2232. [Google Scholar] [CrossRef]
- Baetens, L.; Desjardins, C.; Hagolle, O. Validation of copernicus Sentinel-2 cloud masks obtained from MAJA, Sen2Cor, and FMask processors using reference cloud masks generated with a supervised active learning procedure. Remote Sens. 2019, 11, 433. [Google Scholar] [CrossRef] [Green Version]
- Baetens, L.; Hagolle, O. Sentinel-2 Reference Cloud Masks Generated by an Active Learning Method. Available online: https://zenodo.org/record/1460961#.YWMSJ9pByUk (accessed on 18 November 2020).
- Li, J.; Wu, Z.; Hu, Z.; Jian, C.; Luo, S.; Mou, L.; Zhu, X.X.; Molinier, M. A Lightweight Deep Learning-Based Cloud Detection Method for Sentinel-2A Imagery Fusing Multiscale Spectral and Spatial Features. IEEE Trans. Geosci. Remote Sens. 2021, 1–19. [Google Scholar] [CrossRef]
- Wu, Z.; Li, J.; Wang, Y.; Hu, Z.; Molinier, M. Self-Attentive Generative Adversarial Network for Cloud Detection in High Resolution Remote Sensing Images. IEEE Geosci. Remote Sens. Lett. 2019, 17, 1792–1796. [Google Scholar] [CrossRef]
- KappaMask Predictor. Available online: https://github.com/kappazeta/cm_predict (accessed on 10 October 2021).
- López-Puigdollers, D.; Mateo-García, G.; Gómez-Chova, L. Benchmarking Deep Learning Models for Cloud Detection in Landsat-8 and Sentinel-2 Images. Remote Sens. 2021, 13, 992. [Google Scholar] [CrossRef]
- CREODIAS. Available online: https://creodias.eu/data-offer (accessed on 19 November 2020).
- Data and Information Access Services (DIAS). Available online: https://www.copernicus.eu/en/access-data/dias (accessed on 18 January 2021).
- Copernicus Open Access Hub. Available online: https://scihub.copernicus.eu/ (accessed on 10 October 2021).
- PEPS: French Access to the Sentinel Products. Available online: https://peps.cnes.fr/rocket/#/home (accessed on 19 November 2020).
- The Finnish Data Hub. Available online: https://nsdc.fmi.fi/services/service_finhub_overview (accessed on 19 November 2020).
- Francis, A. Sentinel-2 Cloud Mask Catalogue. Available online: https://zenodo.org/record/4172871#.X6popcgzZaR (accessed on 7 March 2021).
- Sentinel-2 KappaZeta Cloud and Cloud Shadow Masks. Available online: https://zenodo.org/record/5095024#.YQTuzI4zaUk (accessed on 10 October 2021).
- Computer Vision Annotation Tool. Available online: https://cvat.org/ (accessed on 10 October 2021).
- Segments.ai Dataset Tool. Available online: https://segments.ai/ (accessed on 10 October 2021).
- Francis, A. ‘IRIS Toolkit’. Available online: https://github.com/ESA-PhiLab/iris (accessed on 10 October 2021).
- CEOS-WGCV ACIX II CMIX Atmospheric Correction Inter-Comparison Exercise Cloud Masking Inter-Comparison Exercise 2nd Workshop. Available online: https://earth.esa.int/eogateway/events/ceos-wgcv-acix-ii-cmix-atmospheric-correction-inter-comparison-exercise-cloud-masking-inter-comparison-exercise-2nd-workshop (accessed on 10 October 2021).
- Ronneberger, O.; Fischer, P.; Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention, Munich, Germany, 5–9 October 2015; pp. 234–241. [Google Scholar]
- Kingma, D.P.; Ba, J. ‘Adam: A Method for Stochastic Optimization’. 2017. Available online: https://arxiv.org/abs/1412.6980 (accessed on 10 October 2021).
- Sudre, C.H.; Li, W.; Vercauteren, T.; Ourselin, S.; Jorge Cardoso, M. Generalised Dice Overlap as a Deep Learning Loss Function for Highly Unbalanced Segmentations. In BT—Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support; Springer: Cham, Switzerland, 2017; pp. 240–248. [Google Scholar]
- KappaMask Comparison with Rule-Based Methods. Available online: https://kappazeta.ee/cloudcomparison (accessed on 10 October 2021).
- Fisher, A.; Rudin, C.; Dominici, F. All Models are Wrong, but Many are Useful: Learning a Variable’s Importance by Studying an Entire Class of Prediction Models Simultaneously. J. Mach. Learn. Res. 2019, 20, 1–81. [Google Scholar]
- Zhou, Z.; Siddiquee, M.M.R.; Tajbakhsh, N.; Liang, J. Unet++: Redesigning skip connections to exploit multiscale features in image segmentation. IEEE Trans. Med. Imaging 2019, 39, 1856–1867. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hoffer, E.; Hubara, I.; Soudry, D. Train Longer, Generalize Better: Closing the Generalization Gap in Large Batch Training of Neural Networks. May 2017. Available online: http://arxiv.org/abs/1705.08741 (accessed on 10 October 2021).
- University of Tartu. “UT Rocket”. share.neic.no. Available online: https://share.neic.no/marketplace-public-offering/c8107e145e0d41f7a016b72825072287/ (accessed on 10 October 2021).
Sen2Cor | CMIX | KappaMask | Fmask | S2Cloudless | FMSC |
---|---|---|---|---|---|
0 No data | 0 Missing | ||||
1 Saturated or defective | 0 Missing | ||||
2 Dark area pixels | 1 Clear | ||||
3 Cloud shadows | 4 Cloud shadows | 2 Cloud shadows | 2 Cloud shadows | 2 Cloud shadows | |
4 Vegetation | 1 Clear | 1 Clear | 0 Clear | 0 Clear | 0 Clear |
5 Not vegetated | 1 Clear | ||||
6 Water | 1 Clear | 1 Water | |||
7 Unclassified | 5 Undefined | ||||
8 Cloud medium probability | 4 Cloud | ||||
9 Cloud high probability | 2 Cloud | 4 Cloud | 4 Cloud | 1 Cloud | 1 Cloud |
10 Thin cirrus | 3 Semi-transparent cloud | 3 Semi-transparent cloud | |||
11 Snow | 1 Clear | 3 Snow |
Dice Coefficient | KappaMask L2A | KappaMask L1C | Sen2Cor | Fmask | MAJA |
---|---|---|---|---|---|
Clear | 82% | 75% | 72% | 75% | 56% |
Cloud shadow | 72% | 69% | 52% | 49% | - |
Semi-transparent | 78% | 75% | 49% | - | - |
Cloud | 86% | 84% | 62% | 60% | 46% |
All classes | 80% | 76% | 59% | 61% | 51% |
Precision | KappaMask L2A | KappaMask L1C | Sen2Cor | Fmask | MAJA |
---|---|---|---|---|---|
Clear | 75% | 79% | 60% | 66% | 64% |
Cloud shadow | 82% | 79% | 87% | 51% | - |
Semi-transparent | 83% | 71% | 78% | - | - |
Cloud | 85% | 83% | 57% | 44% | 35% |
All classes | 81% | 78% | 71% | 54% | 50% |
Recall | KappaMask L2A | KappaMask L1C | Sen2Cor | Fmask | MAJA |
---|---|---|---|---|---|
Clear | 91% | 71% | 90% | 86% | 50% |
Cloud shadow | 64% | 61% | 37% | 48% | - |
Semi-transparent | 74% | 80% | 36% | - | - |
Cloud | 87% | 85% | 67% | 60% | 65% |
All classes | 79% | 74% | 58% | 65% | 58% |
Overall Accuracy | KappaMask L2A | KappaMask L1C | Sen2Cor | Fmask | MAJA |
---|---|---|---|---|---|
Clear | 89% | 86% | 81% | 84% | 79% |
Cloud shadow | 96% | 95% | 95% | 92% | - |
Semi-transparent | 85% | 79% | 72% | - | - |
Cloud | 92% | 91% | 78% | 67% | 63% |
All classes | 91% | 88% | 82% | 81% | 71% |
Dice Coefficient | KappaMask L2A | KappaMask L1C | S2cloudless | DL_L8S2_UV |
---|---|---|---|---|
Clear | 82% | 75% | 69% | 56% |
Cloud | 86% | 84% | 57% | 67% |
All classes | 84% | 80% | 63% | 62% |
Precision | KappaMask L2A | KappaMask L1C | S2cloudless | DL_L8S2_UV |
---|---|---|---|---|
Clear | 75% | 79% | 59% | 41% |
Cloud | 85% | 83% | 41% | 59% |
All classes | 81% | 76% | 50% | 50% |
Recall | KappaMask L2A | KappaMask L1C | S2cloudless | DL_L8S2_UV |
---|---|---|---|---|
Clear | 91% | 71% | 84% | 90% |
Cloud | 87% | 85% | 93% | 77% |
All classes | 89% | 78% | 89% | 84% |
Overall accuracy | KappaMask L2A | KappaMask L1C | S2cloudless | DL_L8S2_UV |
---|---|---|---|---|
Clear | 89% | 86% | 80% | 61% |
Cloud | 92% | 91% | 62% | 79% |
All classes | 91% | 89% | 71% | 73% |
Architecture | U-Net Level of Depth | Number of Input Filters | Max Dice Coefficient on Validation Set |
---|---|---|---|
U-Net | 5 | 32 | 83.9% |
64 | 84.0% | ||
128 | 84.1% | ||
6 | 32 | 80.7% | |
64 | 80.8% | ||
128 | 82.9% | ||
7 | 32 | 75.1% | |
64 | 83.1% | ||
U-Net++ | 5 | 64 | 75.9% |
KappaMask on GPU | KappaMask on CPU | Fmask | S2cloudless | DL_L8S2_UV | |
---|---|---|---|---|---|
Running time | 03:57 | 10:08 | 06:32 | 17:34 | 03:33 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Domnich, M.; Sünter, I.; Trofimov, H.; Wold, O.; Harun, F.; Kostiukhin, A.; Järveoja, M.; Veske, M.; Tamm, T.; Voormansik, K.; et al. KappaMask: AI-Based Cloudmask Processor for Sentinel-2. Remote Sens. 2021, 13, 4100. https://doi.org/10.3390/rs13204100
Domnich M, Sünter I, Trofimov H, Wold O, Harun F, Kostiukhin A, Järveoja M, Veske M, Tamm T, Voormansik K, et al. KappaMask: AI-Based Cloudmask Processor for Sentinel-2. Remote Sensing. 2021; 13(20):4100. https://doi.org/10.3390/rs13204100
Chicago/Turabian StyleDomnich, Marharyta, Indrek Sünter, Heido Trofimov, Olga Wold, Fariha Harun, Anton Kostiukhin, Mihkel Järveoja, Mihkel Veske, Tanel Tamm, Kaupo Voormansik, and et al. 2021. "KappaMask: AI-Based Cloudmask Processor for Sentinel-2" Remote Sensing 13, no. 20: 4100. https://doi.org/10.3390/rs13204100