RePaint: Inpainting using Denoising Diffusion Probabilistic Models

Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte +1 more
1/24/2022
cs.CV

Official code: andreas128/RePaint (2,272 stars, last commit 2022-08-20).

Abstract

Free-form inpainting is the task of adding new content to an image in the regions specified by an arbitrary binary mask. Most existing approaches train for a certain distribution of masks, which limits their generalization capabilities to unseen mask types. Furthermore, training with pixel-wise and perceptual losses often leads to simple textural extensions towards the missing areas instead of semantically meaningful generation. In this work, we propose RePaint: A Denoising Diffusion Probabilistic Model (DDPM) based inpainting approach that is applicable to even extreme masks. We employ a pretrained unconditional DDPM as the generative prior. To condition the generation process, we only alter the reverse diffusion iterations by sampling the unmasked regions using the given image information. Since this technique does not modify or condition the original DDPM network itself, the model produces high-quality and diverse output images for any inpainting form. We validate our method for both faces and general-purpose image inpainting using standard and extreme masks. RePaint outperforms state-of-the-art Autoregressive, and GAN approaches for at least five out of six mask distributions. Github Repository: git.io/RePaint

View on arXivView PDF

Code Implementations(1)

andreas128/RePaintOfficial100%

Official PyTorch Code and Models of "RePaint: Inpainting using Denoising Diffusion Probabilistic Models", CVPR 2022

2,272197Shell, PythonNov 29, 20214 years ago
cvpr2022diffusion-modelsinpainting

Similar Papers

Cite this paper

@article{lugmayr2022repaint,
  title  = {RePaint: Inpainting using Denoising Diffusion Probabilistic Models},
  author = {Andreas Lugmayr and Martin Danelljan and Andres Romero and Fisher Yu and Radu Timofte and Luc Van Gool},
  year   = {2022},
  eprint = {2201.09865},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.09865}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.09865.svg)](https://codeofpaper.com/paper/2201.09865)

Discussion