/IL_video_inpainting

Official pytorch implementation for "An Internal Learning Approach to Video Inpainting" (ICCV 2019)

Primary LanguagePython

An Internal Learning Approach to Video Inpainting

Haotian zhang, Long Mai, Ning Xu, Zhaowen Wang, John Collomosse, Hailin Jin

International Conference on Computer Vision (ICCV) 2019.

Paper | Project | Video

Install

The code has been tested on pytorch 1.0.0 with python 3.5 and cuda 9.0. Please refer to requirements.txt for details. Alternatively, you can build a docker image using provided Dockerfile.

Warning! We have noticed that the optimization may not converge on some GPUs when using pytorch==0.4.0. We have observed the issue on Titan V and Tesla V100. Therefore, we highly recommend upgrading your pytorch version above 1.0.0 to avoid the issue if you are training on these GPUs.

Usage

We provide two ways to test our video inpainting approach. Please first download the demo data from here into data/ and download the pretrained model weights for PWC-Net from here (No need to unzip the weights file) into pretrained_models/. (The model was originally trained by Simon Niklaus from here).

  • To run our demo, please run the following command:
python3 train.py --train_mode DIP-Vid-Flow --video_path data/bmx-trees.avi --mask_path data/bmx-trees_mask.avi --resize 192 384 --res_dir result/DIP_Vid_Flow
  • Alternatively, you can run through our demo step by step using the provided jupyter notebook demo.ipynb

Citation

@inproceedings{zhang2019internal,
  title={An Internal Learning Approach to Video Inpainting},
  author={Zhang, Haotian and Mai, Long and Xu, Ning and Wang, Zhaowen and Collomosse, John and Jin, Hailin},
  booktitle={Proceedings of the IEEE International Conference on Computer Vision},
  pages={2720--2729},
  year={2019}
}

License

© 2019 Adobe.

Adobe holds the copyright for all the files found in this repository.

IL_video_inpainting is a project by Adobe Research. It is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License (CC BY-NC-SA 4.0) and may only be used for non-commercial purposes. See the LICENSE file for more information.

Acknowledgement

The implementation of our network architecture is mostly borrowed from the Deep Image Prior repo. The implementation of the PWC-Net is borrowed from this repo. Should you be making use of this work, please make sure to adhere to the licensing terms of the original authors.