Repository for the paper Using deep learning and radar backscatter for mapping river water surface
Clone this repository
git clone https://github.com/galatolofederico/gistam2023.git
cd gistam2023
Create a virtualenv and install the requirements
virtualenv --python=python3.8 env
. ./env/bin/activate
pip install -r requirements.txt
If you are interested in the dataset please contact us
python -m scripts.build-dataset -cn IDAN
python -m scripts.build-dataset -cn leesigma
python -m scripts.build-dataset -cn intensity
python train.py \
-cn <CONFIG> \
wandb.log=<True/False> \
wandb.tag=<WANDB_TAG> \
train.steps=<STEPS> \
train.save_file="$(pwd)/model-<CONFIG>-<STEPS>.pth"
Where
<CONFIG>
can be:IDAN
leesigma
oritensity
<STEPS>
has been set to30000
in the paper
This script will save the trained model in $(pwd)/model-<CONFIG>-<STEPS>.pth
python predict-folder.py \
predict_folder.device=cuda:0 \
predict_folder.folder=<DATA_FOLDER> \
predict_folder.river=<RIVER_MASK_TIF> \
predict_folder.model=<MODEL> \
predict_folder.output=<OUTPUT_FOLDER>
To train all the models from the paper run
./train_all.sh
To run the inference with the trained models run
./predict-all.sh
To compute the performance metrics for all the models run
./evaluate-all.sh
The code is released as Free Software under the GNU/GPLv3 license. Copying, adapting and republishing it is not only allowed but also encouraged.
For any further question feel free to reach me at federico.galatolo@ing.unipi.it or on Telegram @galatolo