honeygupta / UW-Net

Code for paper [ICIP 2019] Unsupervised Single Image Underwater Depth Estimation (UW-Net)
MIT License
28 stars 14 forks source link

Unsupervised Single Image Underwater Depth Estimation (UW-Net)

[Project] [Paper]

This repository contains the tensorflow implementation for UW-Net and includes the scripts to train and test the network. The code is written and maintained by Honey Gupta.

Getting Started

Package requirements

Prepare dataset

Training

Restoring from the previous checkpoint

python main.py \
    --to_train=2 \
    --log_dir=out/exp_01 \
    --config_filename=configs/exp_01.json \
    --checkpoint_dir=out/exp_01/#timestamp#

Testing

You can test the models in two ways: (1) using the test.py file that does not require the RGBD dataset (2) Using the main.py file. I recommend using the test.py as it does not require the RGBD dataset.

Using the pre-trained model

Download the pre-trained models from here and extract the files in the working folder.

In the provided checkpoints, the folder checkpoints/pre-trained/ contains the model trained on our collected underwater dataset and checkpoints/finetune contains the model from checkpoints/pre-trained/ fine-tuned on Berman et al.'s dataset for 20 epochs.

To test on the pre-trained models, change the entry for --checkpoint_dir in the above command line script.

Citation

Kindly cite our paper if this repository is useful for your research.

Bibtex:

@article{gupta2019unsupervised, 
  title={Unsupervised Single Image Underwater Depth Estimation}, 
  author={Gupta, Honey and Mitra, Kaushik}, 
  journal={arXiv preprint arXiv:1905.10595}, 
  year={2019}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

This repository is partially built upon the CycleGAN repository written by Harry Yang and Nathan Silberman.