Skip to content

Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery

License

Notifications You must be signed in to change notification settings

LK-Peng/CNN-based-Cloud-Detection-Methods

Repository files navigation

CNN-based-Cloud-Detection-Methods

Paper: Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery

TODO

  • Support different convolutional neural networks for cloud detection
  • Support calculation of effective receptive field
  • Multi-GPU training
  • The supported networks are as follows:
Method Reference
TL-Net Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
MUNet Multi-sensor cloud and cloud shadow segmentation with a convolutional neural network
UNet U-net: Convolutional networks for biomedical image segmentation
MF-CNN Cloud detection in remote sensing images based on multiscale features-convolutional neural network
MSCFF Deep learning based cloud detection for medium and high resolution remote sensing images of different sensors
DeepLabv3+ Encoder-decoder with atrous separable convolution for semantic image segmentation
UNet-1 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
UNet-2 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
UNet-3 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
UNet-D2 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
UNet-D4 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
UNet-S3 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
UNet-S2 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
UNet-S1 Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery
  • The links of the trained models are as follows:
Input Band Number Band Download Link Password
8 red/green/blue/NIR/SWIR1/SWIR2/cirrus/TIR1 Baidu Netdisk 3tre
6 red/green/blue/NIR/SWIR1/SWIR2 Baidu Netdisk m6nt
4 red/green/blue/NIR Baidu Netdisk qy48

The trained model for the input data of 8 channels can also be downloaded from Google Drive

Introduction

This is a PyTorch(1.7.1) implementation of varied convolutional neural networks (CNNs) for cloud detection in Landsat 8 OLI imagery. Currently, we train these networks using L8 Biome dataset. The related paper aims to understand the role of receptive field of CNN for cloud detection in Landsat 8 OLI imagery and is under review.

Installation

The code was tested with Anaconda and Python 3.7.3.

  1. For PyTorch dependency, see pytorch.org for more details.

  2. For Captum dependency used for computing the effective receptive field, see captum.ai for more details.

  3. For GDAL dependency used for reading and writing raster data, use version 2.3.3.

Training

Follow steps below to train your model

  1. Configure your dataset path in config.py

    def get_config_tr(net_name):
      ...
      parser.add_argument('--train-root', type=str,
                          default='./example/train/Images',
                          help='image root of train set')
      parser.add_argument('--train-list', type=str,
                          default='./example/train/train.txt',
                          help='image list of train set')
      parser.add_argument('--val-root', type=str,
                          default='./example/val/Images',
                          help='image root of validation set')
      parser.add_argument('--val-list', type=str,
                          default='./example/val/val.txt',
                          help='image list of validation set')
  2. Configure the network you want to use in config.py

    def get_config_tr(net_name):
      ...
      parser.add_argument('--net', type=str, default='{}'.format(net_name),
                          choices=['DeeplabV3Plus', 'MFCNN', 'MSCFF', 'MUNet',
                                   'TLNet', 'UNet', 'UNet-3', 'UNet-2', 'UNet-1',
                                   'UNet-dilation', 'UNetS3', 'UNetS2', 'UNetS1'],
                          help='network name (default: ?)')

    or train.py

     def main():
       # choices=['DeeplabV3Plus', 'MFCNN', 'MSCFF', 'MUNet', 'TLNet', 'UNet', 'UNet-3', 'UNet-2', 'UNet-1', 'UNet-dilation', 'UNetS3', 'UNetS2', 'UNetS1']
       args = get_config_tr('TLNet')
  3. Run script

    python train.py

Others

  1. inference.py is used for predicting cloud detection results and output accuracies.

  2. erf.py is used for computing the effective receptive field

  3. comparator.py is used for computing the accuracies of the predicted results.

Acknowledgement

About

Understanding the Role of Receptive Field of Convolutional Neural Network for Cloud Detection in Landsat 8 OLI Imagery

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages