/WaterNet

WaterNetV1. Official implementation of "WaterNet: An adaptive matching pipeline for segmenting water with volatile appearance", published in Computer VIsual Media (CVM), 2020.

Primary LanguagePython

WaterNetV1

This is an official implementation for the paper "WaterNet: An adaptive matching pipeline for segmenting water with volatile appearance" Computational Visual Media, 2020: 1-14. Paper is open access.

Legacy version: WaterNetV0.

1 Prepare environment

1.1 Dataset

Download the WaterDataset from Kaggle and extract it. It includes training data and evaluation data.

In the settings.conf, update the 3rd line dataset_ubuntu as the path to the dataset.

1.2 Dependant packages

This repository is developed and tested on Ubuntu 18.04, Python 3.6.9 and PyTorch 1.4.0. More dependant packages are listed in requirements.txt. We recommend you create a Python virtual environment to install them by

pip3 install -r requirements.txt

1.3 Pretrained model

The link to download the pretrained model.

2 Evaluation

Evaluate the WaterDataset with the pretrained model

python3 eval_WaterNet.py -c=/path/to/cp_WaterNet_199.pth.tar -v <video_name>

Make sure the <video_name> is in the dataset path (dataset_ubuntu) in settings.conf.

The results will be saved under the dataset path.

If you want to run your own video, please follow the WaterDataset format.

Update: We set new hyper parameters to obtain better segmentation results. In settings.conf, r0=r1=4. In eval_WaterNet.py, l0, l1, l2 = 0.5, 0.3, 0.2.

3 Retrain the model

python3 train_WaterNet.py

4 Citations

If you use our codes or dataset in your research, please cite our paper.

@article{liang2020waternet,
  title={WaterNet: An adaptive matching pipeline for segmenting water with volatile appearance},
  author={Liang, Yongqing and Jafari, Navid and Luo, Xing and Chen, Qin and Cao, Yanpeng and Li, Xin},
  journal={Computational Visual Media},
  pages={1--14},
  year={2020},
  publisher={Springer}
}

It's free for academic research. For commercial usage, please contact email xinli@cct.lsu.edu.