This repository contains source code used in
[1] 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” paper
The following code creates a new conda virtual environment with required dependencies.
conda create -n dl_l8s2_uv -c conda-forge python=3.7 tensorflow=2 matplotlib --y
conda activate dl_l8s2_uv
python setup.py install
Expects an L1T Landsat-8 image from the EarthExplorer.
The --l8image
attribute points to the unzipped folder with a GeoTIFF image for each band.
python inference.py CloudMaskL8 --l8image ./LC08_L1TP_002054_20160520_20170324_01_T1/ --namemodel rgbiswir
The folder ./LC08_L1TP_002054_20160520_20170324_01_T1
will contain a GeoTIFF with the cloud mask.
Expects an L1C Sentinel-2 image from the OpenHub.
The --s2image
attribute points to the unzipped SAFE
folder. The --resolution
attribute select the output resolution of the product (10, 20, 30 or 60)
python inference.py CloudMaskS2 --s2image ./S2A_MSIL1C_20160417T110652_N0201_R137_T29RPQ_20160417T111159.SAFE/ --namemodel rgbiswir --resolution 30
The folder ./S2A_MSIL1C_20160417T110652_N0201_R137_T29RPQ_20160417T111159.SAFE
will contain a GeoTIFF with the cloud mask.
We have also included a notebook that uses the model and plots the results inline here.
If you use this code please cite:
@article{lopez-puigdollers_benchmarking_2021,
title={Benchmarking Deep Learning Models for Cloud Detection in Landsat-8 and Sentinel-2 Images},
author={L{\'o}pez-Puigdollers, Dan and Mateo-Garc{\'\i}a, Gonzalo and G{\'o}mez-Chova, Luis},
journal={Remote Sensing},
doi={10.3390/rs13050992},
link={https://www.mdpi.com/2072-4292/13/5/992/htm},
volume={13},
number={5},
pages={992},
year={2021},
publisher={Multidisciplinary Digital Publishing Institute}
}
- Multitemporal cloud masking in the Google Earth Engine
- Landsat-8 to Proba-V transfer learning and Domain adaptation for cloud detection
This work has been developed in the context of the projects TEC2016-77741-R and PID2019-109026RB-I00 (MINECO-ERDF) granted to Luis Gómez-Chova.