Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 2.31 KB

README.md

File metadata and controls

37 lines (31 loc) · 2.31 KB

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.