deSpeckNet-TF-GEE
This repository contains the re-implementation of our paper deSpeckNet: Generalizing Deep Learning Based SAR Image Despeckling published in IEEE Transactions on Geoscience and Remote Sensing. The original paper version of the code was implemented in Matlab but I think implementing the method in Tensorflow and Google Earth Engine (GEE) will improve its usabiltiy in the remote sensing community. The implementation uses python and seamlessly integrates Sentinel-1 SAR image preparation in GEE with deep learning in Tensorflow.
Note: I have made some modificatons from the original implementation, such as the data is processed in dB scale, patch density is different from the original Matlab implementation and the optimizer is Adam.
Architecture
deSpeckNet uses a simaese architecture to reconstruct the clean image and the original noisy image using two mean square error loss functions. To fine tune the model to new images with unknown speckle distribution, the model does not require any clean reference image.
If interested, the pre-print version of the article is freely available here
Usage
To train a model, the user needs to provide an area of interest in GEE geometry format and run the prepare_data.py first to prepare the training datasets. The user needs to select training mode to run the script. The user needs to also specify their preference for storage of data as 'GCS' or 'Drive'. It is assumed the user have installed and configured Google cloud SDK on their local machine. For users that prefer to use google drive, the drive should be mounted at /content/drive for the scripts to run.
To fine tune the model, the user needs to execute the prepare_data.py script one more time in tuning mode. Once a model is trained, the user can directly execute the test.py script to make inference on the fine tuned area. By default, the despeckled image is uploaded to GEE.
A jupyter notebook version of the scripts is also included in the notebook folder, which should make it easier for users to run the code in Google colab without worrying about software dependencies.
Dependencies
To use the python scripts, we assume you have a gmail account and have already authenticated GEE and Cloud SDK on your local machine. The scripts are written in Tensorflow 2.7 so there may be issues with earlier versions of Tensorflow. To avoid these steps users could alternatively use the jupyter notebooks available in the notebooks folder to run the scripts in colab.
Acknowledgment
Some functions were adopted from Google Earth Engine example workflow page.
Reference
A. G. Mullissa, D. Marcos, D. Tuia, M. Herold and J. Reiche, "deSpeckNet: Generalizing Deep Learning-Based SAR Image Despeckling," in IEEE Transactions on Geoscience and Remote Sensing, vol. 60, pp. 1-15, 2022, Art no. 5200315, doi: 10.1109/TGRS.2020.3042694.