This repository prototypes the fusion of Sentinel-1 SAR and Sentinel-2 optical data time-series for mapping tropical dry-forests. Since seasonality is the main challenge to map tropical dry-forests, we learn the seasonality pattern in the data implicitly using transformers. The implementation uses Google Earth Engine (GEE) to prepare Sentinel-1 and Sentinel-2 time series data and Tensorflow for deep learning.
The architecture used in this implementation is a siamese arechitecture with transformers used on each branch separately. It requires the data to be prepared as tables of time series values for different spatial locations. The reference data should be prepared as sparse point feature collection as a GEE asset.
To train a model, the user needs to provide an area of interest in GEE geometry format and run the prepare_data.ipynb first to prepare the training datasets. It is assumed the user has access to a Google Cloud Storage bucket. Time series smoothing using a moving median filter is implemented to smoothen both Sentinel-1 and Sentinel-2 time series. The user can select the smoothing interval in the params dictionary.
The script is provided in a jupyter notebook format. This should make it easier for users to run the code in Google colab without worrying about software dependencies.
The scripts are written in Tensorflow 2.8 so there may be issues with earlier versions of Tensorflow.
Some helper functions were adopted from Google Earth Engine example workflow page.