Skip to content

Unofficial PyTorch Implementation of "Free-Form Image Inpainting with Gated Convolution" published at ICCV 2019.

Notifications You must be signed in to change notification settings

selflein/DeepFill-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepFill v2 PyTorch

WIP Unofficial implementation of "Free-Form Image Inpainting with Gated Convolution".

Setup

  • 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 the Data dataclass.

Training

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.

TODOs

  • Implement Contextual Attention & respective network branch
  • Add support for Places2 and CelebA-HQ faces datasets used in the paper
  • Add pre-trained models

About

Unofficial PyTorch Implementation of "Free-Form Image Inpainting with Gated Convolution" published at ICCV 2019.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages