The paper can be found here.
The codes are initial version, not the revised version. I will update these someday since I am busy currently. However, if you have any question about the paper/codes, you can contact me through Email([email protected]).
Please run the codes where the python is Version 3.x and pytorch>=0.4.
Before running the codes, you should prepare training/evaluation image file list (flist) and mask file list (flist). You can refer to the folowing command to generate .flist file:
python flist.py --path your_dataset_folder --output xxx.flist
There are some hyperparameters that you can adjust in the main.py. To train the model, you can run:
python main.py --bs 14 --gpus 2 --prefix rn --img_flist your_training_images.flist --mask_flist your_training_masks.flist
PS: You can set the "--bs" and "--gpus" to any number as you like. The above is just an example.
To evaluate the model, you can use GPU or CPU to run.
For GPU:
python eval.py --bs your_batch_size --model your_checkpoint_path --img_flist your_eval_images.flist --mask_flist your_eval_masks.flist
For CPU:
python eval.py --cpu --bs your_batch_size --model your_checkpoint_path --img_flist your_eval_images.flist --mask_flist your_eval_masks.flist
PS: The pretrained model under folder './pretrained_model/' is trained from Places2 dataset with Irregular Mask dataset. Please train RN from scratch if you test data not from Places2 or using regular mask.
@misc{yu2019region,
title={Region Normalization for Image Inpainting},
author={Tao Yu and Zongyu Guo and Xin Jin and Shilin Wu and Zhibo Chen and Weiping Li and Zhizheng Zhang and Sen Liu},
year={2019},
eprint={1911.10375},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
The codes refer to EdgeConnect. Thanks for the authors of it!