# An Introduction to Machine and Deep Learning Methods for Cloud Masking Applications
###### Abstract  
Cloud cover assessment is crucial for meteorology, Earth observation, and environmental monitoring, providing valuable data for weather forecasting, climate modeling, and remote sensing activities. Depending on the specific purpose, identifying and accounting for pixels affected by clouds is essential in spectral remote sensing imagery. In applications such as land monitoring and various remote sensing activities, detecting/removing cloud-contaminated pixels is crucial to ensuring the accuracy of advanced processing of satellite imagery. Typically, the objective of cloud masking is to produce an image where every pixel in a satellite spectral image is categorized as either clear or cloudy. Nevertheless, there is also a prevalent approach in the literature that yields a multi-class output. With the progress in Machine and Deep Learning, coupled with the accelerated capabilities of GPUs, and the abundance of available remote sensing data, novel opportunities and methods for cloud detection have emerged, improving the accuracy and the efficiency of the algorithms. This paper provides a review of these last methods for cloud masking in multispectral satellite imagery, with emphasis on the Deep Learning approach, highlighting  
In general, the cloud masking process aims to generate an image in which each pixel in a spectral satellite image is classified as either clear or cloudy. However, a multi-class output is also common in the literature, where image pixels are classified according to the type of clouds or the type of objects: land, cloud, clear sky, cloud shadow, haze, ice/snow.  
In the past years, when the public access to the remote sensing imagery was limited to a very reduced number of images, cloud cover retrieval was carried out with the intervention of a human operator. Approaches that rely on manually classified images are not only time consuming, depend on the expertise and discretion of the operator, on the criteria used to distinguish ambiguous cases such as clouds over ice/snow, thin clouds versus haze/aerosol, and on how to deal with intrinsic cloud problems such as the blurred nature of cloud edges.  
Subsequently, as a consequence of the large amount of remote sensing data available, such as Terra-Aqua, Landsat, Sentinel open access archives (e.g., Landsat since 2008 [15]), more accurate automatic cloud masking codes have been developed, proposing algorithms for single or multi-temporal scenes. The most widespread traditional methods are known as rule based or thresholding techniques. These approaches apply thresholds to a selected set of image spectral bands according to fixed rules linked to physical properties of clouds.  
Advancements in artificial intelligence methods and the acceleration of GPU, have provided new opportunities and methods with improved accuracy and efficiency. In this paper, we introduce the application of Machine and in particular Deep Learning methods for cloud masking, highlighting their advantages, challenges, and future prospects. However, some traditional methods will be briefly presented below, as they represent the reference methods for comparing the results of the latest approaches.  
This paper is structured as follows. Section 2 introduces the approach utilized by classic thresholding methods that rely on spectral information. Section 3 presents the most common Machine Learning algorithms employed in cloud detection. Section 4 focuses on Deep Learning techniques, providing an examination of their role in cloud detection for the generation of dense masks. Section 5 critically addresses challenges associated with data quality and labelled data, emphasizing their pivotal role in enhancing the accuracy and reliability of Machine and Deep Learning models. Finally, Section 6 summarizes the challenges and future prospects in cloud masking applications.