[TVCG'2023] AOT-GAN for High-Resolution Image Inpainting (codebase for image inpainting)
AOT-GAN: Aggregated Contextual Transformations for High-Resolution Image Inpainting
Yanhong Zeng, Jianlong Fu, Hongyang Chao, and Baining Guo.
If any part of our paper and code is helpful to your work, please generously cite and star us :kissing_heart: :kissing_heart: :kissing_heart: !
@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}
}
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,
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
--dir_image
and --dir_mask
.cd src
python train.py
cd src
python train.py --resume
cd src
python test.py --pre_train [path to pretrained model]
cd src
python eval.py --real_dir [ground truths] --fake_dir [inpainting results] --metric mae psnr ssim fid
Download the model dirs and put it under experiments/
experiments/
cd src
python demo.py --dir_image [folder to images] --pre_train [path to pre_trained model] --painter [bbox|freeform]
Visualization on TensorBoard for training is supported.
Run tensorboard --logdir [log_folder] --bind_all
and open browser to view training progress.
We would like to thank edge-connect, EDSR_PyTorch.