# An Introduction to Machine and Deep Learning Methods for Cloud Masking Applications
## 4 Deep Learning Methods
### Deep Learning for Cloud Masking
in [101] introduced the CloudFCN, a U-Net model that was trained and evaluated on a high-resolution Carbonite-2 dataset (80 cm), manually annotated by the authors, and on the L8 Biome dataset [27,102] from Landsat 8 level-1 images with annotations for different terrain types. CloudFCN predicts cloudy/clear pixel masks, but can also provide mask of pixel cloudiness for cloud amount evaluation, according to the user need. Relying on the texture characteristics of the surface, its performance decreases when clouds are over ice/snow if high-resolution bands are not available or only low-resolution RGB bands are included. [PERSON] et al. [103] present the KappaMask processor based on a 5-level U-Net, designed to provide 10 m resolution masks for Sentinel-2 images, at Northern European latitudes. It is an example of multi-class segmentation (clear, cloud, cloud shadow, thin cloud, and invalid). KappaMask was trained on KappaZeta Sentinel-2 annotated masks created by the authors and is freely available, and on Sentinel-2 CloudCatalogue [104]. The authors provide a comprehensive analysis of KappaMask's performance compared to state-of-the-art rule-based and Machine Learning methods. Key findings include KappaMask's superiority in cloud and cloud shadow detection with finer resolution (10 m) and a consistent reduction in false negatives for the clear class. CDUNet (Cloud Detection UNet) is proposed in [105] to cope with a better definition of cloud boundaries and fragmented clouds in cloud/cloud-shadow masking. The model improves detail feature extraction and feature fusion in upsampling steps, achieving the best results in various standard performance indices among a significant set of methods on SPARCS [55] datasets and selected Google Earth images. There are also methods utilizing, as post-processing algorithms, the conditional random field (CRF)-based method to improve boundaries via local features and distance information. The authors in [106] applied a slightly modified version of the U-Net architecture to obtain cloud detection masks for very-high-resolution images. Manually annotated images over three regions were used to train and validate the predicted cloud/non-cloud masks. Particular attention was paid to the case of terrain characteristics that can lead to misleading detection at this resolution; seasonality by choosing images from sites with different climate characteristics. SegNet, is adopted in [107] to effectively process Landsat imagery, including cloud shadow detection. Various architectures, such as MSCFF (Multi-Scale Convolutional Feature Fusion) [108], MF-CNN (Multiscale Features-CNN) [109], CD-FM3 SF [110], were designed to work with multiscale feature extraction that, combined with FCN, performed more accurately than single-scale feature-based methods. Moreover, the incorporation of augmented atrous spatial pyramid pooling and fully connected fusion paths in FCN architectures was presented for high-resolution remote sensing imagery in [111]. [PERSON] et al. [39] provide a review of the most popular models and their modified versions for a more general cloud detection objective and focusing on the architectural aspects. In order to capture a wider information about global context, the authors in [112] present the U-shape Attention-based Transformer Net, (UATNet). It includes two transformer structures that integrate spatial and multi-spectral features. The model was trained and tested on the CRMSCD dataset, China Region Meteorological Satellite Cloud images, which was created by the authors taking images covering China, from the L1 data product of FY-4A labelled according to the synchronized Himawari-8 image classification. The overall performance was comparable to state-of-the-art FCNs-based and transformer-based models, on the same dataset, but it was not tested on other datasets. Some authors have focused their attention on the use of transfer learning technique.