This repository implements the training and testing code for "Region-wise Generative Adversarial Image Inpainting for Large Missing Areas". We propose an generic inpainting framework capable of handling with incomplete images on both continuous and discontinuous large missing areas, in an adversarial manner. We extend upon our prior conference publication "Coarse-to-Fine Image Inpainting via Region-wise convolutions and Non-local correlation" that mainly focuses on the discontinuous missing areas using the region-wise convolutions, suffering severe artifacts when the large missing areas are continuous. Some results are as follows.
Requirements:
The code was trained and tested with Tensorflow 1.x.0.CUDA 9.0 ,Python 3.6
Install python3.
Install tensorflow (tested on Release 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0).
clone this repo
git clone https://github.com/vickyFox/Region-wise-Inpainting.git
cd Region-wise-Inpainting Private
Datasets
Training
/vgg
.python train.py --train_data_path your_image_path --output your_output_path
python train.py -h
to get more command line argumentsTesting
python test.py --test_data_path your_data_path --mask_path your_mask_path --model_path pretrained_model
--file_out
to choose a new path.Download the pre-trained models and put them under the default directory \models
or any other path you want.
Our main novelty of this project is the ability to handle with incomplete images on both continuous and discontinuous large missing areas.
@ARTICLE{2019arXiv190912507M,
author = {{Ma}, Yuqing and {Liu}, Xianglong and {Bai}, Shihao and {Wang}, Lei and
{Liu}, Aishan and {Tao}, Dacheng and {Hancock}, Edwin},
title = "{Region-wise Generative Adversarial ImageInpainting for Large Missing Areas}",
journal = {arXiv e-prints},
keywords = {Computer Science - Computer Vision and Pattern Recognition},
year = "2019",
month = "Sep",
eid = {arXiv:1909.12507},
pages = {arXiv:1909.12507},
archivePrefix = {arXiv},
eprint = {1909.12507},
primaryClass = {cs.CV},
adsurl = {https://ui.adsabs.harvard.edu/abs/2019arXiv190912507M},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@inproceedings{ma2019inpainting,
title={Coarse-to-Fine Image Inpainting via Region-wise Convolutions and Non-Local Correlation.},
author={Yuqing Ma and Xianglong Liu and Shihao Bai and Lei Wang and Dailan He and Aishan Liu},
booktitle={IJCAI},
year={2019}
}