KumapowerLIU / CSA-inpainting

Coherent Semantic Attention for image inpainting(ICCV 2019)
280 stars 61 forks source link
attention-mechanism generative-adversarial-network iccv2019 image-inpainting jupyter-notebook

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


Installation


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

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