This is the official PyTorch implementation of APLRL.
- Python 3.7
- PyTorch 1.2
- NVIDIA GPU + CUDA cuDNN
- Install python requirements:
pip install -r requirements.txt
Image Dataset. We evaluate the proposed method on the CelebA, Paris StreetView, and Places2 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%.
Download the pre-trained models using the following links and copy them under ./snapshots
directory.
Places2 | CelebA | Paris-StreetView
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]
Some of the code of this repo is borrowed from: