WIP Unofficial implementation of "Free-Form Image Inpainting with Gated Convolution".
- Install conda environment
conda env create -f environment.yml conda activate iminpaint
- Setup data
-
Put the training dataset into one folder of images, e.g.,
data/training_imgs
-
Run the edge extraction
python iminpaint/data/scripts/generate_edge_masks --input_folder data/training_imgs --output_folder some_folder --prototxt path_to_prototxt --caffemodel path_to_model
Download the prototxt from here and the caffe model from here.
Optionally, one can add the--visualize
flag to plot an example edge output. -
Adjust the paths to the folder with training images and edges in the training script
train.py
in theData
dataclass.
-
Hydra together with PyTorch-Lightning is used for implementation. To start default training:
python train.py
and a folder will be created with Tensorboard logs and checkpoints in ./outputs
.
- Implement Contextual Attention & respective network branch
- Add support for Places2 and CelebA-HQ faces datasets used in the paper
- Add pre-trained models