Skip to content

Unofficial pytorch implementation of 'Image Inpainting for Irregular Holes Using Partial Convolutions' [Liu+, arXiv2018]

Notifications You must be signed in to change notification settings

GAN-Challenger/pytorch-inpainting-with-partial-conv

 
 

Repository files navigation

pytorch-inpainting-with-partial-conv

Note that this is an ongoing re-implementation and I cannot fully reproduce the results. Suggestions and PRs are welcome!

This is an unofficial pytorch implementation of a paper, Image Inpainting for Irregular Holes Using Partial Convolutions [Liu+, arXiv2018].

Requirements

  • Python 3.6+
  • Pytorch 0.4.1+
pip install -r requirements.txt

Usage

Preprocesse

Generate masks by following [1] (saved under ./masks by default).

Note that the way of the mask generation is different from the original work

python generate_data.py

Train

CUDA_VISIBLE_DEVICES=<gpu_id> python train.py

Fine-tune

CUDA_VISIBLE_DEVICES=<gpu_id> python train.py --finetune --resume <checkpoint_name>

Results

Here are some results from the test set after the training of 500,000 iterations and fine-tuning (freezing BN in encoder) of 500,000 iterations. The model is available here, but I don't ensure the quality. (Top to bottom: input, mask, image generated by the network, image which is combined with the original non-masked region of image, ground truth) Results

References

About

Unofficial pytorch implementation of 'Image Inpainting for Irregular Holes Using Partial Convolutions' [Liu+, arXiv2018]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%