Skip to content
/ W-Net Public

W-Net: Structure and Texture Interaction for Image Inpainting

License

Notifications You must be signed in to change notification settings

Evergrow/W-Net

Repository files navigation

W-Net

A source code for paper "W-Net: Structure and Texture Interaction for Image Inpainting"

Compared to previous methods, our method produces perfect structure and symmetrical objects when repairing corrupted regions in the image. (a) The ground truth image with blue shadow as mask. (b) The result of GConv. (c) The result of MEDFE. (d) The result of our W-Net.

Prerequisites

  • Ubuntu 16.04
  • Python 3
  • NVIDIA GPU CUDA + cuDNN
  • TensorFlow 1.12.0

Usage

Set up

  • Clone this repo:
git clone https://github.com/Evergrow/W-Net.git
cd W-Net

Training

  • Modify gpu id, dataset path, mask path, and checkpoint path in the config file. Adjusting some other parameters if you like.
  • Run python train.py and view training progress tensorboard --logdir [path to checkpoints]

Test

Choose the input image, mask and model to test:

python test.py --image [input path] --mask [mask path] --output [output path] --checkpoint_dir [model path]

Pretrained models

Pretrained models are released for quick test. Download the models using Google Drive links and move them into your ./checkpoints directory.

About

W-Net: Structure and Texture Interaction for Image Inpainting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages