Skip to content

嵌入门控注意力的二阶段粗精分离图像修复模型

Notifications You must be signed in to change notification settings

cats-food/Coarse-Fine-Separated-Inpainting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Two-Stage Coarse-Fine-Separated Image Inpainting Network with Gated Attention (嵌入门控注意力的二阶段粗精分离图像修复模型 )

Prerequisites

  • Python 3.6
  • PyTorch 1.2
  • NVIDIA GPU + CUDA cuDNN
  • Some other frequently-used python packages, like opencv, numpy, imageio, etc.

Datasets prepration

We use CelebA, Paris Street View datasets. The irregular mask dataset is available from here. After Downloading images and masks, create .filst file containing the dataset path in ./datasets/ (some examples have been given, refer to so).

Pretraiend model

Download pretrained models from my OneDrive, and place .pth files in the ./checkpoints directory.

Training

Please edit the config file ./config.yml for your training setting. The options are all included in this file, see comments for the explanations.

Once you've set up, run the ./train.py script to launch the training.

python train.py

Testing

Download pretrained models as said above, use ./test.py for testing:

python test.py
--G1 <path to generator 1>
--G2 <path to generator 2>
--input <path to input images>
--mask <path to masks>
--output <path to results directory>

Alternatively, you can also edit these options in the config file ./config.yml.

About

嵌入门控注意力的二阶段粗精分离图像修复模型

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages