All Projects → lyndonzheng → Pluralistic Inpainting

lyndonzheng / Pluralistic Inpainting

CVPR 2019: "Pluralistic Image Completion"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pluralistic Inpainting

Semi-Supervised-Learning-GAN
Semi-supervised Learning GAN
Stars: ✭ 72 (-84.38%)
Mutual labels:  generative-adversarial-networks
fusion gan
Codes for the paper 'Learning to Fuse Music Genres with Generative Adversarial Dual Learning' ICDM 17
Stars: ✭ 18 (-96.1%)
Mutual labels:  generative-adversarial-networks
Adversarial Examples Pytorch
Implementation of Papers on Adversarial Examples
Stars: ✭ 293 (-36.44%)
Mutual labels:  generative-adversarial-networks
edge2view
This is a pix2pix demo that learns from edge and translates this into view. A interactive application is also provided that translates edge to view.
Stars: ✭ 22 (-95.23%)
Mutual labels:  generative-adversarial-networks
Diverse-Structure-Inpainting
CVPR 2021: "Generating Diverse Structure for Image Inpainting With Hierarchical VQ-VAE"
Stars: ✭ 131 (-71.58%)
Mutual labels:  generative-adversarial-networks
transganformer
Implementation of TransGanFormer, an all-attention GAN that combines the finding from the recent GanFormer and TransGan paper
Stars: ✭ 137 (-70.28%)
Mutual labels:  generative-adversarial-networks
stylegan-v
[CVPR 2022] StyleGAN-V: A Continuous Video Generator with the Price, Image Quality and Perks of StyleGAN2
Stars: ✭ 136 (-70.5%)
Mutual labels:  generative-adversarial-networks
Enlightengan
[IEEE TIP'2021] "EnlightenGAN: Deep Light Enhancement without Paired Supervision" by Yifan Jiang, Xinyu Gong, Ding Liu, Yu Cheng, Chen Fang, Xiaohui Shen, Jianchao Yang, Pan Zhou, Zhangyang Wang
Stars: ✭ 434 (-5.86%)
Mutual labels:  generative-adversarial-networks
mSRGAN-A-GAN-for-single-image-super-resolution-on-high-content-screening-microscopy-images.
Generative Adversarial Network for single image super-resolution in high content screening microscopy images
Stars: ✭ 52 (-88.72%)
Mutual labels:  generative-adversarial-networks
Pytorch Gans
My implementation of various GAN (generative adversarial networks) architectures like vanilla GAN (Goodfellow et al.), cGAN (Mirza et al.), DCGAN (Radford et al.), etc.
Stars: ✭ 271 (-41.21%)
Mutual labels:  generative-adversarial-networks
awesome-GAN-papers
papers and codes about GAN
Stars: ✭ 55 (-88.07%)
Mutual labels:  generative-adversarial-networks
GAN-Project-2018
GAN in Tensorflow to be run via Linux command line
Stars: ✭ 21 (-95.44%)
Mutual labels:  generative-adversarial-networks
Multi-Agent-Diverse-Generative-Adversarial-Networks
Easy-to-follow Pytorch tutorial Notebook for Multi-Agent-Diverse-Generative-Adversarial-Networks
Stars: ✭ 23 (-95.01%)
Mutual labels:  generative-adversarial-networks
shoe-design-using-generative-adversarial-networks
No description or website provided.
Stars: ✭ 18 (-96.1%)
Mutual labels:  generative-adversarial-networks
Tensorflow Generative Model Collections
Collection of generative models in Tensorflow
Stars: ✭ 3,785 (+721.04%)
Mutual labels:  generative-adversarial-networks
cfg-gan
CFG-GAN: Composite functional gradient learning of generative adversarial models
Stars: ✭ 15 (-96.75%)
Mutual labels:  generative-adversarial-networks
MNIST-invert-color
Invert the color of MNIST images with PyTorch
Stars: ✭ 13 (-97.18%)
Mutual labels:  generative-adversarial-networks
Mimicry
[CVPR 2020 Workshop] A PyTorch GAN library that reproduces research results for popular GANs.
Stars: ✭ 458 (-0.65%)
Mutual labels:  generative-adversarial-networks
Gansformer
Generative Adversarial Transformers
Stars: ✭ 421 (-8.68%)
Mutual labels:  generative-adversarial-networks
3d Sdn
[NeurIPS 2018] 3D-Aware Scene Manipulation via Inverse Graphics
Stars: ✭ 256 (-44.47%)
Mutual labels:  generative-adversarial-networks

Pluralistic Image Completion

ArXiv | Project Page | Online Demo | Video(demo)

This repository implements the training, testing and editing tools for "Pluralistic Image Completion" by Chuanxia Zheng, Tat-Jen Cham and Jianfei Cai at NTU. Given one masked image, the proposed Pluralistic model is able to generate multiple and diverse plausible results with various structure, color and texture.

Editing example

Example results

Example completion results of our method on images of face (CelebA), building (Paris), and natural scenes (Places2) with center masks (masks shown in gray). For each group, the masked input image is shown left, followed by sampled results from our model without any post-processing. The results are diverse and plusible.

More results on project page

Getting started

Installation

This code was tested with Pytoch 0.4.0, CUDA 9.0, Python 3.6 and Ubuntu 16.04

pip install visdom dominate
  • Clone this repo:
git clone https://github.com/lyndonzheng/Pluralistic
cd Pluralistic

Datasets

  • face dataset: 24183 training images and 2824 test images from CelebA and use the algorithm of Growing GANs to get the high-resolution CelebA-HQ dataset
  • building dataset: 14900 training images and 100 test images from Paris
  • natural scenery: original training and val images from Places2
  • object original training images from ImageNet.

Training

  • Train a model (default: random irregular and irregular holes):
python train.py --name celeba_random --img_file your_image_path
  • Set --mask_type in options/base_options.py for different training masks. --mask_file path is needed for external irregular mask, such as the irregular mask dataset provided by Liu et al. and Karim lskakov .
  • To view training results and loss plots, run python -m visdom.server and copy the URL http://localhost:8097.
  • Training models will be saved under the checkpoints folder.
  • The more training options can be found in options folder.

Testing

  • Test the model
python test.py  --name celeba_random --img_file your_image_path
  • Set --mask_type in options/base_options.py to test various masks. --mask_file path is needed for 3. external irregular mask,
  • The default results will be saved under the results folder. Set --results_dir for a new path to save the result.

Pretrained Models

Download the pre-trained models using the following links and put them undercheckpoints/ directory.

Our main novelty of this project is the multiple and diverse plausible results for one given masked image. The center_mask models are trained with images of resolution 256*256 with center holes 128x128, which have large diversity for the large missing information. The random_mask models are trained with random regular and irregular holes, which have different diversity for different mask sizes and image backgrounds.

GUI

Download the pre-trained models from Google drive and put them undercheckpoints/ directory.

  • Install the PyQt5 for GUI operation
pip install PyQt5

Basic usage is:

python -m visdom.server
python ui_main.py

The buttons in GUI:

  • Options: Select the model and corresponding dataset for editing.
  • Bush Width: Modify the width of bush for free_form mask.
  • draw/clear: Draw a free_form or rectangle mask for random_model. Clear all mask region for a new input.
  • load: Choose the image from the directory.
  • random: Random load the editing image from the datasets.
  • fill: Fill the holes ranges and show it on the right.
  • save: Save the inputs and outputs to the directory.
  • Original/Output: Switch to show the original or output image.

The steps are as follows:

1. Select a model from 'options'
2. Click the 'random' or 'load' button to get an input image.
3. If you choose a random model, click the 'draw/clear' button to input free_form mask.
4. If you choose a center model, the center mask has been given.
5. click 'fill' button to get multiple results.
6. click 'save' button to save the results.

Editing Example Results

  • Results (original, input, output) for object removing
  • Results (input, output) for face playing. When mask half or right face, the diversity will be small for the short+long term attention layer will copy information from other side. When mask top or down face, the diversity will be large.

Next

  • Free form mask for various Datasets
  • Higher resolution image completion

License


This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

This software is for educational and academic research purpose only. If you wish to obtain a commercial royalty bearing license to this software, please contact us at [email protected].

Citation

If you use this code for your research, please cite our paper.

@inproceedings{zheng2019pluralistic,
  title={Pluralistic Image Completion},
  author={Zheng, Chuanxia and Cham, Tat-Jen and Cai, Jianfei},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={1438--1447},
  year={2019}
}
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].