All Projects → KumapowerLIU → Csa Inpainting

KumapowerLIU / Csa Inpainting

Coherent Semantic Attention for image inpainting(ICCV 2019)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Csa Inpainting

Abstractive Summarization
Implementation of abstractive summarization using LSTM in the encoder-decoder architecture with local attention.
Stars: ✭ 128 (-36.63%)
Mutual labels:  jupyter-notebook, attention-mechanism
Pytorch Question Answering
Important paper implementations for Question Answering using PyTorch
Stars: ✭ 154 (-23.76%)
Mutual labels:  jupyter-notebook, attention-mechanism
Deep Learning With Python
Example projects I completed to understand Deep Learning techniques with Tensorflow. Please note that I do no longer maintain this repository.
Stars: ✭ 134 (-33.66%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Linear Attention Recurrent Neural Network
A recurrent attention module consisting of an LSTM cell which can query its own past cell states by the means of windowed multi-head attention. The formulas are derived from the BN-LSTM and the Transformer Network. The LARNN cell with attention can be easily used inside a loop on the cell state, just like any other RNN. (LARNN)
Stars: ✭ 119 (-41.09%)
Mutual labels:  jupyter-notebook, attention-mechanism
Dragan
A stable algorithm for GAN training
Stars: ✭ 189 (-6.44%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Capsule Gan
Code for my Master thesis on "Capsule Architecture as a Discriminator in Generative Adversarial Networks".
Stars: ✭ 120 (-40.59%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Netgan
Implementation of the paper "NetGAN: Generating Graphs via Random Walks".
Stars: ✭ 152 (-24.75%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Faceaging By Cyclegan
Stars: ✭ 105 (-48.02%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Graph attention pool
Attention over nodes in Graph Neural Networks using PyTorch (NeurIPS 2019)
Stars: ✭ 186 (-7.92%)
Mutual labels:  jupyter-notebook, attention-mechanism
Image generator
DCGAN image generator 🖼️.
Stars: ✭ 173 (-14.36%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
A Nice Mc
Code for "A-NICE-MC: Adversarial Training for MCMC"
Stars: ✭ 115 (-43.07%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Keras Acgan
Auxiliary Classifier Generative Adversarial Networks in Keras
Stars: ✭ 196 (-2.97%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Stylegan2 Projecting Images
Projecting images to latent space with StyleGAN2.
Stars: ✭ 102 (-49.5%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Yolov3 Point
从零开始学习YOLOv3教程解读代码+注意力模块(SE,SPP,RFB etc)
Stars: ✭ 119 (-41.09%)
Mutual labels:  jupyter-notebook, attention-mechanism
Pixel2style2pixel
Official Implementation for "Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation"
Stars: ✭ 1,395 (+590.59%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Generative adversarial networks 101
Keras implementations of Generative Adversarial Networks. GANs, DCGAN, CGAN, CCGAN, WGAN and LSGAN models with MNIST and CIFAR-10 datasets.
Stars: ✭ 138 (-31.68%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Porousmediagan
Reconstruction of three-dimensional porous media using generative adversarial neural networks
Stars: ✭ 94 (-53.47%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Spectralnormalizationkeras
Spectral Normalization for Keras Dense and Convolution Layers
Stars: ✭ 100 (-50.5%)
Mutual labels:  jupyter-notebook, generative-adversarial-network
Poetry Seq2seq
Chinese Poetry Generation
Stars: ✭ 159 (-21.29%)
Mutual labels:  jupyter-notebook, attention-mechanism
Deep Learning With Python
Deep learning codes and projects using Python
Stars: ✭ 195 (-3.47%)
Mutual labels:  jupyter-notebook, generative-adversarial-network

Coherent Semantic Attention for image inpainting (ICCV 2019)

Arxiv |ICCV 2019 paper| BibTex


Introduction

The existing inpainting methods often generate contents with blurry textures and distorted structures due to the discontinuity of the local pixels.From a semantic-level perspective, the local pixel discontinuity is mainly because these methods ignore the semantic relevance and feature continuity of hole regions. To handle this problem, we investigate the human behavior in repairing pictures and propose a fined deep generative model-based approach with a novel coherent semantic attention (CSA) layer, which can not only preserve contextual structure but also make more effective predictions of missing parts by modeling the semantic relevance between the holes features. Meanwhile, we further propose consistency loss and feature patch discriminator to stabilize the network training process and improve the details.


Model Architecture

CSA Architecture

Feature patch discriminator


Prerequisites

  • Windows or Linux
  • Python3
  • Pytorch 1.0
  • NVIDIA GPU + CUDA CuDNN.
  • Jupyter Notebook

Installation

  • Clone this repo:

    git clone https://github.com/KumapowerLIU/CSA-inpainting.git
    cd CSA-inpainting
    
  • Install PyTorch and dependencies from http://pytorch.org

  • Or you can clone the repo and run by conda

    conda env create -f environment.yaml 
    conda activate csa-inpainting
    jupyter notebook
    

    Open the browser and enter the URL http://localhost:8080 to enjoy jupyter notebook


Datasets

We use Places2, CelebA and Paris Street-View datasets. To train a model on the full dataset, download datasets from official websites.

Our model is trained on the irregular mask dataset provided by Liu et al. You can download publically available Irregular Mask Dataset from their website.

Model Training

  • Download your own inpainting datasets.
  • Open train.ipynb in Jupyter Notebook
  • Modify Option Class to set data_root,mask_root,checkpoints_dir, mask_type and other parameters.
  • Run train.ipynb

Model Testing

  • Open test.ipynb in Jupyter Notebook
  • Keep the same parameters as during training
  • Run test.ipynb

License

CC 4.0 Attribution-NonCommercial International. The software is for educaitonal and academic research purpose only.

Citation

@InProceedings{Liu_2019_CSA,
    Author = {Hongyu Liu and Bin Jiang and Yi Xiao and Chao Yang},
    Title = {Coherent Semantic Attention for Image Inpainting},
    booktitle = { IEEE International Conference on Computer Vision (ICCV)},
    month = {July},
    year = {2019}
    
}

Acknowledgments

We benefit a lot from Shift-net

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].