CorrFill: Enhancing Faithfulness in Reference-based Inpainting with Correspondence Guidance in Diffusion Models

Kuan-Hung Liu, Cheng-Kun Yang, Min-Hung Chen, Yu-Lun Liu, Yen-Yu Lin
1/4/2025
cs.CV

No official code found. Best implementation: khliu0000/CorrFill (16 stars, last commit 2025-01-14).

Abstract

In the task of reference-based image inpainting, an additional reference image is provided to restore a damaged target image to its original state. The advancement of diffusion models, particularly Stable Diffusion, allows for simple formulations in this task. However, existing diffusion-based methods often lack explicit constraints on the correlation between the reference and damaged images, resulting in lower faithfulness to the reference images in the inpainting results. In this work, we propose CorrFill, a training-free module designed to enhance the awareness of geometric correlations between the reference and target images. This enhancement is achieved by guiding the inpainting process with correspondence constraints estimated during inpainting, utilizing attention masking in self-attention layers and an objective function to update the input tensor according to the constraints. Experimental results demonstrate that CorrFill significantly enhances the performance of multiple baseline diffusion-based methods, including state-of-the-art approaches, by emphasizing faithfulness to the reference images.

View on arXivView PDF

Code Implementations(1)

khliu0000/CorrFillCommunity72%

The Official PyTorch implementation of CorrFill: Enhancing Faithfulness in Reference-based Inpainting with Correspondence Guidance in Diffusion Models (WACV'25).

160PythonJan 14, 20251 years agoNOASSERTION

Similar Papers

Cite this paper

@article{liu2025corrfill,
  title  = {CorrFill: Enhancing Faithfulness in Reference-based Inpainting with Correspondence Guidance in Diffusion Models},
  author = {Kuan-Hung Liu and Cheng-Kun Yang and Min-Hung Chen and Yu-Lun Liu and Yen-Yu Lin},
  year   = {2025},
  eprint = {2501.02355},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.02355v1}
}

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/2501.02355.svg)](https://codeofpaper.com/paper/2501.02355)

Discussion