Retrieval Augmented Image Harmonization

Haolin Wang, Ming Liu, Zifei Yan, Chao Zhou, Longan Xiao +1 more
12/18/2024
cs.CV

No official code found. Best implementation: SSRheart/Raiha (5 stars, MIT, last commit 2025-10-11).

Abstract

When embedding objects (foreground) into images (background), considering the influence of photography conditions like illumination, it is usually necessary to perform image harmonization to make the foreground object coordinate with the background image in terms of brightness, color, and etc. Although existing image harmonization methods have made continuous efforts toward visually pleasing results, they are still plagued by two main issues. Firstly, the image harmonization becomes highly ill-posed when there are no contents similar to the foreground object in the background, making the harmonization results unreliable. Secondly, even when similar contents are available, the harmonization process is often interfered with by irrelevant areas, mainly attributed to an insufficient understanding of image contents and inaccurate attention. As a remedy, we present a retrieval-augmented image harmonization (Raiha) framework, which seeks proper reference images to reduce the ill-posedness and restricts the attention to better utilize the useful information. Specifically, an efficient retrieval method is designed to find reference images that contain similar objects as the foreground while the illumination is consistent with the background. For training the Raiha framework to effectively utilize the reference information, a data augmentation strategy is delicately designed by leveraging existing non-reference image harmonization datasets. Besides, the image content priors are introduced to ensure reasonable attention. With the presented Raiha framework, the image harmonization performance is greatly boosted under both non-reference and retrieval-augmented settings. The source code and pre-trained models will be publicly available.

View on arXivView PDF

Code Implementations(1)

SSRheart/RaihaCommunity64%
MIT

Codes for Retrieval augmented image harmonization

50Shell, PythonDec 20, 20241 years agoMIT

Similar Papers

Cite this paper

@article{wang2024retrieval,
  title  = {Retrieval Augmented Image Harmonization},
  author = {Haolin Wang and Ming Liu and Zifei Yan and Chao Zhou and Longan Xiao and Wangmeng Zuo},
  year   = {2024},
  eprint = {2412.13916},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.13916v1}
}

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

Discussion