DiffHarmony: Latent Diffusion Model Meets Image Harmonization

Pengfei Zhou, Fangxiang Feng, Xiaojie Wang
4/9/2024
cs.CV

Official code: nicecv/DiffHarmony (35 stars, last commit 2024-10-29).

Abstract

Image harmonization, which involves adjusting the foreground of a composite image to attain a unified visual consistency with the background, can be conceptualized as an image-to-image translation task. Diffusion models have recently promoted the rapid development of image-to-image translation tasks . However, training diffusion models from scratch is computationally intensive. Fine-tuning pre-trained latent diffusion models entails dealing with the reconstruction error induced by the image compression autoencoder, making it unsuitable for image generation tasks that involve pixel-level evaluation metrics. To deal with these issues, in this paper, we first adapt a pre-trained latent diffusion model to the image harmonization task to generate the harmonious but potentially blurry initial images. Then we implement two strategies: utilizing higher-resolution images during inference and incorporating an additional refinement stage, to further enhance the clarity of the initially harmonized images. Extensive experiments on iHarmony4 datasets demonstrate the superiority of our proposed method. The code and model will be made publicly available at https://github.com/nicecv/DiffHarmony .

View on arXivView PDF

Code Implementations(1)

nicecv/DiffHarmonyOfficial100%

The official pytorch implementation of DiffHarmony and DiffHarmony++.

355Shell, PythonApr 9, 20241 years ago
imageharmonization

Similar Papers

Cite this paper

@article{zhou2024diffharmony,
  title  = {DiffHarmony: Latent Diffusion Model Meets Image Harmonization},
  author = {Pengfei Zhou and Fangxiang Feng and Xiaojie Wang},
  year   = {2024},
  eprint = {2404.06139},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.06139v1}
}

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

Discussion