Dynamic context-driven progressive image inpainting with auxiliary generative units
Zhiwen Wang, Kai Li, Jinjia Peng
In The visual Computer (2023)
- Python >= 3.6
- PyTorch >= 1.0
- Clone this repository:
git clone https://github.com/slowwords/DCDPI.git
cd DCDPI
- Install PyTorch and dependencies from http://pytorch.org
- Install python requirements:
pip install -r requirements.txt
Image Dataset. We evaluate the proposed method on the CelebA and Paris StreetView datasets, which are widely adopted in the literature.
Mask Dataset. Irregular masks are obtained from Irregular Masks and classified based on their hole sizes relative to the entire image with an increment of 10%.
To train the model, you run the following code.
python train.py \
--image_root [path to image directory] \
--mask_root [path to mask directory] \
--pre_trained [path to checkpoints]
To test the model, you run the following code.
python test.py \
--pre_trained [path to checkpoints] \
--image_root [path to image directory] \
--mask_root [path to mask directory] \
--result_root [path to output directory] \
--number_eval [number of images to test]
If any part of our paper and repository is helpful to your work, please generously cite with:
@article{Wang_2023_TVCJ,
title={Dynamic context-driven progressive image inpainting with auxiliary generative units},
author={Wang, Zhiwen and Li, Kai and Peng, Jinjia},
journal={The Visual Computer},
pages={1--16},
year={2023},
publisher={Springer}
}
