• Stars
    star
    212
  • Rank 186,122 (Top 4 %)
  • Language
    Python
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The PyTorch implementation of ICCV 2019 oral paper: free-form inpainting (deepfillv2), especially Gated Conv

deepfillv2

The PyTorch implementations and guideline for Gated Convolution based on ICCV 2019 oral paper: free-form inpainting (deepfillv2).

We are focusing on Gated Conv so do not implement original paper completely, and implement it as a coarse-to-fine manner.

1 Implementations

Before running it, please ensure the environment is Python 3.6 and PyTorch 1.0.1.

1.1 Train

If you train it from scratch, please specify following hyper-parameters. For other parameters, we recommend the default settings.

python train.py     --epochs 40
                    --lr_g 0.0001
                    --batch_size 4
                    --perceptual_param 10
                    --gan_param 0.01
                    --baseroot [the path of training set, like Place365]
                    --mask_type 'free_form' [or 'single_bbox' or 'bbox']
                    --imgsize 256
if you have more than one GPU, please change following codes:
python train.py     --multi_gpu True
                    --gpu_ids [the ids of your multi-GPUs]

1.2 Test

At testing phase, please download the pre-trained model first. (including deepfillv2 network for RGB images and grayscale images)

For small image patches, make sure that all the dataset settings are the same as training part:

python test.py 	    --load_name '*.pth' (please ensure the pre-trained model is in same path)
                    --baseroot [the path of testing set]
                    --mask_type 'free_form' [or 'single_bbox' or 'bbox']
                    --imgsize 256

There are some examples:

The corresponding ground truth is:

1.3 PSNR experiment on 15 images

item 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
mask region 13.23 18.23 17.06 13.16 19.41 11.47 29.58 15.51 14.71 25.99 20.54 19.21 15.86 11.79 10.73
full image 26.50 45.01 32.35 29.59 31.65 24.57 48.44 30.27 32.24 51.18 35.15 36.75 30.56 27.21 29.13

2 Acknowledgement

@inproceedings{yu2019free,
  title={Free-form image inpainting with gated convolution},
  author={Yu, Jiahui and Lin, Zhe and Yang, Jimei and Shen, Xiaohui and Lu, Xin and Huang, Thomas S},
  booktitle={Proceedings of the IEEE International Conference on Computer Vision},
  pages={4471--4480},
  year={2019}
}

More Repositories

1

Hierarchical-Regression-Network-for-Spectral-Reconstruction-from-RGB-Images

CVPR NTIRE 2020 Spectral Reconstruction Challenge 1st Place Paper
Jupyter Notebook
61
star
2

D2HNet

D2HNet: Joint Denoising and Deblurring with Hierarchical Network for Robust Night Image Restoration. ECCV, 2022
Python
58
star
3

Semantic-Colorization-GAN

SCGAN: Saliency-map Guided Colorization with Generative Adversarial Network. IEEE TCSVT, 2020
Python
51
star
4

Self-Guided-Network-for-Fast-Image-Denoising

The PyTorch implementation of ICCV 2019 paper SGN
Python
40
star
5

Deep-Convolutional-Network-Cascade-for-Facial-Point-Detection

TensorFlow implementation of cascade CNN, trained level-by-level
Python
38
star
6

A-New-Convolutional-Neural-Network-Based-Data-Driven-Fault-Diagnosis-Method

TensorFlow implementation of a CNN based mechanical science paper
Python
37
star
7

PyTorch-Special-Pre-trained-Models

Special pre-trained VGG-16 / ResNet-50 network on CIE Lab and Grayscale images
Python
30
star
8

ChildPredictor

ChildPredictor: A Child Face Prediction Framework with Disentangled Learning. IEEE TMM, 2022
Python
29
star
9

VCGAN

VCGAN: Video Colorization with Hybrid Generative Adversarial Network. IEEE TMM, 2022
Python
23
star
10

RAW2RGB-GAN

PyTorch implementation of saliency map-aided GAN for Auto-demosaic+denosing
Python
21
star
11

PyTorch-Sobel

Sobel operator-based loss functions and operation
Python
20
star
12

PyTorch-Useful-Codes

Some Blocks and Networks implemented by PyTorch
Python
17
star
13

PyTorch-MobileNet-v123

Provide implementations and pre-trained models of MobileNet-v1, v2, and v3
Python
15
star
14

DeblurGANv2-MobileNetv123-PyTorch

Provide pre-trained MobileNetv123 and MobileNet-DSC FPN models for DeblurGANv2
Python
14
star
15

Legacy-Photo-Editing-with-Learned-Noise-Prior

The github page for WACV 2021 paper: Legacy Photo Editing with Learned Noise Prior
Python
12
star
16

Reference-Based-Sketch-Image-Colorization-ImageNet

PyTorch implementation of CVPR 2020 paper (Reference-Based Sketch Image Colorization using Augmented-Self Reference and Dense Semantic Correspondence) and pre-trained model on ImageNet dataset
Python
12
star
17

PyTorch-Domain-Transfer-GAN

The re-implementation of diverse domain transfer methods
Python
7
star
18

Non-Local-Block-PyTorch

Self Attention techniques commonly used in GAN based applications
Python
7
star
19

Infrared-Image-Colorization

A research project on infrared image colorization using PyTorch
Python
6
star
20

PyTorch-MobileNet-v123-InstanceNorm

PyTorch-MobileNet-v123-InstanceNorm with pre-trained models
Python
5
star
21

QRNet

source code of QRNet (Joint Image Deblurring and Denoising with Dual-exposure Quad-Bayer Sensors), which is submitted to IEEE Transactions on Image Processing
Python
4
star
22

Visualization-GAN-ability

Different GAN codes working on MNIST database
Python
3
star
23

Camera-Demosaic

Some functions for demosaicking camera RAW files including .raw / .NEF format
Python
3
star
24

Learning-Blind-Video-Temporal-Consistency-with-PWCNet

Re-implementation of ECCV'18 paper to smooth videos
Python
3
star
25

DSWN

Implementation of our sRGB denoising method in CVPR 2020 NTIRE Workshop
Python
3
star
26

Animal-Face-Detectors

The face detectors for human, cat, dog using dlib and opencv
Python
3
star
27

KPN-Single-Image

kernel prediction network works for single image denoising
Python
3
star
28

Edge-Aware-Multi-Scale-Progressive-Colorization

Python
2
star
29

SVCNet

supplementary material for paper "SVCNet: Scribble-based Video Colorization Network with Temporal Aggregation", under review of IEEE Transactions on Image Processing
Python
2
star
30

SIDD-benchmark

Users can freely try their models on the SIDD dataset based on this code
Python
2
star
31

Auto-Crop-Videos-and-Blur-Modelling

Automatic crop videos and produce static, interpolation, and averaged frames or new videos for making blur dataset
Python
2
star
32

warp-pytorch-pwc

Warping operation using PWC-Net
Python
1
star
33

AttGAN

self-implemented AttGAN
Python
1
star
34

HSGAN

HSGAN supplementary material for IEEE Transactions on Neural Networks and Learning Systems (TNNLS'21 Submission)
Python
1
star
35

Context-Encoder

Modified context encoder PyTorch implementation
Python
1
star
36

MSGAN-Pix2Pix-Colorization

Pix2Pix framework for colorization; MSGAN is utilized to build multiple results
Python
1
star
37

DeblurGANv1

PyTorch implementation of CVPR 2018 paper: DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks
Python
1
star
38

Convolution-DWT-IDWT

implement DWT and IDWT using convolutional layer
Python
1
star