All Projects → researchmm → Pen Net For Inpainting

researchmm / Pen Net For Inpainting

Licence: mit
[CVPR'2019]PEN-Net: Learning Pyramid-Context Encoder Network for High-Quality Image Inpainting

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pen Net For Inpainting

Image Caption Generator
A neural network to generate captions for an image using CNN and RNN with BEAM Search.
Stars: ✭ 126 (-38.83%)
Mutual labels:  attention
Attentionn
All about attention in neural networks. Soft attention, attention maps, local and global attention and multi-head attention.
Stars: ✭ 175 (-15.05%)
Mutual labels:  attention
Self Attentive Tensorflow
Tensorflow implementation of "A Structured Self-Attentive Sentence Embedding"
Stars: ✭ 189 (-8.25%)
Mutual labels:  attention
Prediction Flow
Deep-Learning based CTR models implemented by PyTorch
Stars: ✭ 138 (-33.01%)
Mutual labels:  attention
Multimodal Sentiment Analysis
Attention-based multimodal fusion for sentiment analysis
Stars: ✭ 172 (-16.5%)
Mutual labels:  attention
Pyramid Attention Networks Pytorch
Implementation of Pyramid Attention Networks for Semantic Segmentation.
Stars: ✭ 182 (-11.65%)
Mutual labels:  attention
Asr syllable
基于卷积神经网络的语音识别声学模型的研究
Stars: ✭ 127 (-38.35%)
Mutual labels:  attention
Guided Attention Inference Network
Contains implementation of Guided Attention Inference Network (GAIN) presented in Tell Me Where to Look(CVPR 2018). This repository aims to apply GAIN on fcn8 architecture used for segmentation.
Stars: ✭ 204 (-0.97%)
Mutual labels:  attention
Transformers.jl
Julia Implementation of Transformer models
Stars: ✭ 173 (-16.02%)
Mutual labels:  attention
Graph attention pool
Attention over nodes in Graph Neural Networks using PyTorch (NeurIPS 2019)
Stars: ✭ 186 (-9.71%)
Mutual labels:  attention
Multihead Siamese Nets
Implementation of Siamese Neural Networks built upon multihead attention mechanism for text semantic similarity task.
Stars: ✭ 144 (-30.1%)
Mutual labels:  attention
Hey Jetson
Deep Learning based Automatic Speech Recognition with attention for the Nvidia Jetson.
Stars: ✭ 161 (-21.84%)
Mutual labels:  attention
Deep Time Series Prediction
Seq2Seq, Bert, Transformer, WaveNet for time series prediction.
Stars: ✭ 183 (-11.17%)
Mutual labels:  attention
Vqa regat
Research Code for ICCV 2019 paper "Relation-aware Graph Attention Network for Visual Question Answering"
Stars: ✭ 129 (-37.38%)
Mutual labels:  attention
Hnatt
Train and visualize Hierarchical Attention Networks
Stars: ✭ 192 (-6.8%)
Mutual labels:  attention
Chinese Chatbot
中文聊天机器人,基于10万组对白训练而成,采用注意力机制,对一般问题都会生成一个有意义的答复。已上传模型,可直接运行,跑不起来直播吃键盘。
Stars: ✭ 124 (-39.81%)
Mutual labels:  attention
Rnn For Joint Nlu
Pytorch implementation of "Attention-Based Recurrent Neural Network Models for Joint Intent Detection and Slot Filling" (https://arxiv.org/abs/1609.01454)
Stars: ✭ 176 (-14.56%)
Mutual labels:  attention
Doc Han Att
Hierarchical Attention Networks for Chinese Sentiment Classification
Stars: ✭ 206 (+0%)
Mutual labels:  attention
Graphtransformer
Graph Transformer Architecture. Source code for "A Generalization of Transformer Networks to Graphs", DLG-AAAI'21.
Stars: ✭ 187 (-9.22%)
Mutual labels:  attention
Datastories Semeval2017 Task4
Deep-learning model presented in "DataStories at SemEval-2017 Task 4: Deep LSTM with Attention for Message-level and Topic-based Sentiment Analysis".
Stars: ✭ 184 (-10.68%)
Mutual labels:  attention

PEN-Net for Image Inpainting

PEN-Net

Arxiv Paper | CVPR Paper | Poster | BibTex

Learning Pyramid-Context Encoder Network for High-Quality Image Inpainting
Yanhong Zeng, Jianlong Fu, Hongyang Chao, and Baining Guo.
In CVPR 2019.

Introduction

Existing inpainting works either fill missing regions by copying fine-grained image patches or generating semantically reasonable patches (by CNN) from region context, while neglect the fact that both visual and semantic plausibility are highly-demanded.

Our proposals combine these two mechanisms by,

  1. Cross-Layer Attention Transfer (ATN). We use the learned region affinity from high-lelvel feature maps to guide feature transfer in adjacent low-level layers in an encoder.
  2. Pyramid Filling. We fill holes multiple times (depends on the depth of the encoder) by using ATNs from deep to shallow.

Example Results

We re-implement PEN-Net in Pytorch for faster speed, which is slightly different from the original Tensorflow version used in our paper. Each triad shows original image, masked input and our result.

celebahq dtd facade places2

Run

  1. Requirements:
    • Install python3.6
    • Install pytorch (tested on Release 1.1.0)
  2. Training:
    • Prepare training images filelist [our split]
    • Modify celebahq.json to set path to data, iterations, and other parameters.
    • Our codes are built upon distributed training with Pytorch.
    • Run python train.py -c [config_file] -n [model_name] -m [mask_type] -s [image_size].
    • For example, python train.py -c configs/celebahq.json -n pennet -m square -s 256
  3. Resume training:
    • Run python train.py -n pennet -m square -s 256.
  4. Testing:
    • Run python test.py -c [config_file] -n [model_name] -m [mask_type] -s [image_size].
    • For example, python test.py -c configs/celebahq.json -n pennet -m square -s 256
  5. Evaluating:
    • Run python eval.py -r [result_path]

Pretrained models

Download the models below and put it under release_model/

CELEBA-HQ | DTD | Facade | Places2

We also provide more results of central square below for your comparisons

CELEBA-HQ | DTD | Facade

TensorBoard

Visualization on TensorBoard for training is supported.

Run tensorboard --logdir release_model --port 6006 to view training progress.

Citation

If any part of our paper and code is helpful to your work, please generously cite with:

@inproceedings{yan2019PENnet,
  author = {Zeng, Yanhong and Fu, Jianlong and Chao, Hongyang and Guo, Baining},
  title = {Learning Pyramid-Context Encoder Network for High-Quality Image Inpainting},
  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  pages={1486--1494},
  year = {2019}
}

License

Licensed under an MIT license.

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