All Projects → daa233 → Generative Inpainting Pytorch

daa233 / Generative Inpainting Pytorch

Licence: mit
A PyTorch reimplementation for paper Generative Image Inpainting with Contextual Attention (https://arxiv.org/abs/1801.07892)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Generative Inpainting Pytorch

Generative inpainting
DeepFill v1/v2 with Contextual Attention and Gated Convolution, CVPR 2018, and ICCV 2019 Oral
Stars: ✭ 2,659 (+998.76%)
Mutual labels:  deep-neural-networks, generative-adversarial-network, attention-model
Pix2pixhd
Synthesizing and manipulating 2048x1024 images with conditional GANs
Stars: ✭ 5,553 (+2194.63%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Adversarial video generation
A TensorFlow Implementation of "Deep Multi-Scale Video Prediction Beyond Mean Square Error" by Mathieu, Couprie & LeCun.
Stars: ✭ 662 (+173.55%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Sockeye
Sequence-to-sequence framework with a focus on Neural Machine Translation based on Apache MXNet
Stars: ✭ 990 (+309.09%)
Mutual labels:  deep-neural-networks, attention-model
Mgan
Masking GAN - Image attribute mask generation
Stars: ✭ 120 (-50.41%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Pytorch Attention Guided Cyclegan
Pytorch implementation of Unsupervised Attention-guided Image-to-Image Translation.
Stars: ✭ 67 (-72.31%)
Mutual labels:  deep-neural-networks, attention-model
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (+209.09%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Faceaging By Cyclegan
Stars: ✭ 105 (-56.61%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Gpnd
Generative Probabilistic Novelty Detection with Adversarial Autoencoders
Stars: ✭ 112 (-53.72%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Nice Gan Pytorch
Official PyTorch implementation of NICE-GAN: Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation
Stars: ✭ 140 (-42.15%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
P2pala
Page to PAGE Layout Analysis Tool
Stars: ✭ 147 (-39.26%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Dlwpt Code
Code for the book Deep Learning with PyTorch by Eli Stevens, Luca Antiga, and Thomas Viehmann.
Stars: ✭ 3,054 (+1161.98%)
Mutual labels:  deep-neural-networks
Color Accessibility Neural Network Deeplearnjs
🍃 Using a Neural Network to improve web accessibility in JavaScript.
Stars: ✭ 230 (-4.96%)
Mutual labels:  deep-neural-networks
Octconv.pytorch
PyTorch implementation of Octave Convolution with pre-trained Oct-ResNet and Oct-MobileNet models
Stars: ✭ 229 (-5.37%)
Mutual labels:  deep-neural-networks
Improvedgan Pytorch
Semi-supervised GAN in "Improved Techniques for Training GANs"
Stars: ✭ 228 (-5.79%)
Mutual labels:  generative-adversarial-network
Adgan
The Implementation of paper "Controllable Person Image Synthesis with Attribute-Decomposed GAN"
Stars: ✭ 239 (-1.24%)
Mutual labels:  generative-adversarial-network
Appnp
A PyTorch implementation of "Predict then Propagate: Graph Neural Networks meet Personalized PageRank" (ICLR 2019).
Stars: ✭ 234 (-3.31%)
Mutual labels:  deep-neural-networks
Snap N Eat
Food detection and recommendation with deep learning
Stars: ✭ 229 (-5.37%)
Mutual labels:  deep-neural-networks
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+6708.68%)
Mutual labels:  generative-adversarial-network
Wgan
Tensorflow Implementation of Wasserstein GAN (and Improved version in wgan_v2)
Stars: ✭ 228 (-5.79%)
Mutual labels:  generative-adversarial-network

generative-inpainting-pytorch

A PyTorch reimplementation for the paper Generative Image Inpainting with Contextual Attention according to the author's TensorFlow implementation.

Prerequisites

This code has been tested on Ubuntu 14.04 and the following are the main components that need to be installed:

  • Python3
  • PyTorch 1.0+
  • torchvision 0.2.0+
  • tensorboardX
  • pyyaml

Train the model

python train.py --config configs/config.yaml

The checkpoints and logs will be saved to checkpoints

Test with the trained model

By default, it will load the latest saved model in the checkpoints. You can also use --iter to choose the saved models by iteration.

Trained PyTorch model: [Google Drive] [Baidu Wangpan]

python test_single.py \
	--image examples/imagenet/imagenet_patches_ILSVRC2012_val_00008210_input.png \
	--mask examples/center_mask_256.png \
	--output examples/output.png

Test with the converted TF model:

Converted TF model: [Google Drive]

python test_tf_model.py \
	--image examples/imagenet/imagenet_patches_ILSVRC2012_val_00008210_input.png \
	--mask examples/center_mask_256.png \
	--output examples/output.png \
	--model-path torch_model.p

Test results on ImageNet validation set patches

With PyTorch, the model was trained on ImageNet for 430k iterations to converge (with batch_size 48, about 150h). Here are some test results on the patches from ImageNet validation set.

Input Inpainted
val_00000827_input val_00000827_output
val_00008210_input val_00008210_output
val_00022355_input val_00022355_output
val_00025892_input val_00025892_output
val_00045643_input val_00045643_output
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].