All Projects → researchmm → AOT-GAN-for-Inpainting

researchmm / AOT-GAN-for-Inpainting

Licence: other
[TVCG] AOT-GAN for High-Resolution Image Inpainting (codebase for image inpainting)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to AOT-GAN-for-Inpainting

PanoDR
Code and models for "PanoDR: Spherical Panorama Diminished Reality for Indoor Scenes" presented at the OmniCV workshop of CVPR21.
Stars: ✭ 22 (-85.03%)
Mutual labels:  image-inpainting
Color-Image-Inpainting
Image inpainting based on OMP and KSVD algorithm
Stars: ✭ 66 (-55.1%)
Mutual labels:  image-inpainting
jmockit2
The evolution of JMockit APIs: smaller, simpler, safer, and still powerful
Stars: ✭ 33 (-77.55%)
Mutual labels:  codebase
CSA pytorch
Pytorch implementation of Coherent Semantic Attention Image Inpainting
Stars: ✭ 25 (-82.99%)
Mutual labels:  image-inpainting
CodeBaseManager
Multi-langage CLI tool to manage your code base
Stars: ✭ 11 (-92.52%)
Mutual labels:  codebase
pyGRETA
python Generator of REnewable Time series and mAps
Stars: ✭ 27 (-81.63%)
Mutual labels:  high-resolution
flow1d
[ICCV 2021 Oral] High-Resolution Optical Flow from 1D Attention and Correlation
Stars: ✭ 91 (-38.1%)
Mutual labels:  high-resolution
The-HTML-and-CSS-Workshop
A New, Interactive Approach to Learning HTML and CSS
Stars: ✭ 65 (-55.78%)
Mutual labels:  codebase
PhotographicImageSynthesiswithCascadedRefinementNetworks-Pytorch
Photographic Image Synthesis with Cascaded Refinement Networks - Pytorch Implementation
Stars: ✭ 63 (-57.14%)
Mutual labels:  high-resolution
ffhqr-dataset
FFHQR -- the first large-scale retouching dataset for computer vision research.
Stars: ✭ 85 (-42.18%)
Mutual labels:  high-resolution
block-shuffle
A method for high-resolution Fast Style Transfer with limited memory
Stars: ✭ 37 (-74.83%)
Mutual labels:  high-resolution
ICON
(TPAMI2022) Salient Object Detection via Integrity Learning.
Stars: ✭ 125 (-14.97%)
Mutual labels:  codebase
Implicit-Internal-Video-Inpainting
[ICCV 2021]: IIVI: Internal Video Inpainting by Implicit Long-range Propagation
Stars: ✭ 190 (+29.25%)
Mutual labels:  image-inpainting
deepfillv2-pylightning
Clean minimal implementation of Free-Form Image Inpainting with Gated Convolutions in pytorch lightning. Inspired from pytorch implementation by @avalonstrel.
Stars: ✭ 13 (-91.16%)
Mutual labels:  image-inpainting
Exemplar-GAN-Eye-Inpainting-Tensorflow
Tensorflow implement of "Eye In-Painting with Exemplar Generative Adversarial Networks"
Stars: ✭ 98 (-33.33%)
Mutual labels:  image-inpainting
pkg
🥼 personal Go codebase
Stars: ✭ 34 (-76.87%)
Mutual labels:  codebase
Ensemble-of-Multi-Scale-CNN-for-Dermatoscopy-Classification
Fully supervised binary classification of skin lesions from dermatoscopic images using an ensemble of diverse CNN architectures (EfficientNet-B6, Inception-V3, SEResNeXt-101, SENet-154, DenseNet-169) with multi-scale input.
Stars: ✭ 25 (-82.99%)
Mutual labels:  multi-scale
Restormer
[CVPR 2022--Oral] Restormer: Efficient Transformer for High-Resolution Image Restoration. SOTA for motion deblurring, image deraining, denoising (Gaussian/real data), and defocus deblurring.
Stars: ✭ 586 (+298.64%)
Mutual labels:  high-resolution
CodeBase-for-DBF
CodeBase is a C-based library to read, write and manage DBF type tables and indexes.
Stars: ✭ 38 (-74.15%)
Mutual labels:  codebase
THREE.Highres
High resolution and depth rendering to PNG for Three.js
Stars: ✭ 28 (-80.95%)
Mutual labels:  high-resolution

AOT-GAN for High-Resolution Image Inpainting

aotgan

Arxiv Paper |

AOT-GAN: Aggregated Contextual Transformations for High-Resolution Image Inpainting
Yanhong Zeng, Jianlong Fu, Hongyang Chao, and Baining Guo.

Citation

If any part of our paper and code is helpful to your work, please generously cite and star us 😘 😘 😘 !

@inproceedings{yan2021agg,
  author = {Zeng, Yanhong and Fu, Jianlong and Chao, Hongyang and Guo, Baining},
  title = {Aggregated Contextual Transformations for High-Resolution Image Inpainting},
  booktitle = {Arxiv},
  pages={-},
  year = {2020}
}

Introduction

Despite some promising results, it remains challenging for existing image inpainting approaches to fill in large missing regions in high resolution images (e.g., 512x512). We analyze that the difficulties mainly drive from simultaneously inferring missing contents and synthesizing fine-grained textures for a extremely large missing region. We propose a GAN-based model that improves performance by,

  1. Enhancing context reasoning by AOT Block in the generator. The AOT blocks aggregate contextual transformations with different receptive fields, allowing to capture both informative distant contexts and rich patterns of interest for context reasoning.
  2. Enhancing texture synthesis by SoftGAN in the discriminator. We improve the training of the discriminator by a tailored mask-prediction task. The enhanced discriminator is optimized to distinguish the detailed appearance of real and synthesized patches, which can in turn facilitate the generator to synthesize more realistic textures.

Results

face_object logo

Prerequisites

  • python 3.8.8
  • pytorch (tested on Release 1.8.1)

Installation

Clone this repo.

git clone [email protected]:researchmm/AOT-GAN-for-Inpainting.git
cd AOT-GAN-for-Inpainting/

For the full set of required Python packages, we suggest create a Conda environment from the provided YAML, e.g.

conda env create -f environment.yml 
conda activate inpainting

Datasets

  1. download images and masks
  2. specify the path to training data by --dir_image and --dir_mask.

Getting Started

  1. Training:
    • Our codes are built upon distributed training with Pytorch.
    • Run
    cd src 
    python train.py  
    
  2. Resume training:
    cd src
    python train.py --resume 
    
  3. Testing:
    cd src 
    python test.py --pre_train [path to pretrained model] 
    
  4. Evaluating:
    cd src 
    python eval.py --real_dir [ground truths] --fake_dir [inpainting results] --metric mae psnr ssim fid
    

Pretrained models

CELEBA-HQ | Places2

Download the model dirs and put it under experiments/

Demo

  1. Download the pre-trained model parameters and put it under experiments/
  2. Run by
cd src
python demo.py --dir_image [folder to images]  --pre_train [path to pre_trained model] --painter [bbox|freeform]
  1. Press '+' or '-' to control the thickness of painter.
  2. Press 'r' to reset mask; 'k' to keep existing modifications; 's' to save results.
  3. Press space to perform inpainting; 'n' to move to next image; 'Esc' to quit demo.

face logo

TensorBoard

Visualization on TensorBoard for training is supported.

Run tensorboard --logdir [log_folder] --bind_all and open browser to view training progress.

Acknowledgements

We would like to thank edge-connect, EDSR_PyTorch.

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