DeepMask: an Algorithm for Cloud and Cloud Shadow Detection

DeepMask: an algorithm for cloud and cloud shadow detection in optical satellite remote sensing images using deep residual network 

Ke Xu, Kaiyu Guan, Jian Peng, Yunan Luo, Sibo Wang 


A new method based on deep learning techniques, DeepMask, for cloud and cloud shadow detection in optical satellite remote sensing data is proposed in this study. Given the raw spectral bands of a satellite scene image (of any size), DeepMask is able to generate a pixel-level cloud mask. We cast the cloud mask prediction as a binary classification problem. All pixels are labeled as one of the 2 classes: “clear” (ground) pixels and “cloud/shadow” pixels. 

Data & Pre-processing

The algorithm is trained and evaluated on the Landsat 8 Cloud Cover Assessment Validation Dataset distributed across 8 different land types: barren, forest, shrubland, cropland, snow/ice, wetlands, water, and urban. Each image consists of the following spectral bands: band 1 (ultra-blue), band 2 (blue), band 3 (green), band 4 (red), band 5 (NIR), band 6 (SWIR 1), and band 7 (SWIR 2). The spectral bands are at 30-meter resolution, and the size of each individual scene is approximately 170 km north-south and 183 km east-west. 

Data Pre-processing includes: projection of the level 1 ground truth mask with level 2 surface reflectance bands, clip valid region, and local patch sampling.

DeepMask Algorithm

DeepMask consists of two modules. The first module is the local region extractor (module A), and the second module is the ResNet central pixel classifier (module B). The local region extractor takes the raw spectral bands (shown as a stack of image bands in different colors) and extracts 15x15 pixel local regions. The ResNet module then takes the 15x15 pixel local region and predicts the class label for the central pixel of the local patch. A zoomed-in view of a typical residual block is given in module C

Evaluation and Analysis

CloudMask Visualization

For ground truth label, CFMask results and DeepMask results, gray color denotes clear pixels, and white color denotes cloud/shadow pixels. 

Land type specific experiments 

In land-type-specific experiments, we train a model for each land cover type and evaluate its performance on images of that specific land type. We use “leave-one-out” training and testing scheme. 

All land type experiments and ablation experiments

We also apply DeepMask to all the land cover types, aiming to test how generic DeepMask can be when trained using images from all the land cover types. Different from the land-type-specific experiments, all-land-type models are trained using a sample of images from all the land cover types, and then tested on a set of reserved test images. 

To analyze the contribution of individual spectral band to cloud and shadow detection accuracy, we also perform ablation experiments on the spectral bands. These experiments also give insights to the transferability of our algorithm to other satellites with fewer spectral bands.