Image Harmonization with Region-wise Contrastive Learning

05/27/2022
by   Jingtang Liang, et al.
0

Image harmonization task aims at harmonizing different composite foreground regions according to specific background image. Previous methods would rather focus on improving the reconstruction ability of the generator by some internal enhancements such as attention, adaptive normalization and light adjustment, etc.. However, they pay less attention to discriminating the foreground and background appearance features within a restricted generator, which becomes a new challenge in image harmonization task. In this paper, we propose a novel image harmonization framework with external style fusion and region-wise contrastive learning scheme. For the external style fusion, we leverage the external background appearance from the encoder as the style reference to generate harmonized foreground in the decoder. This approach enhances the harmonization ability of the decoder by external background guidance. Moreover, for the contrastive learning scheme, we design a region-wise contrastive loss function for image harmonization task. Specifically, we first introduce a straight-forward samples generation method that selects negative samples from the output harmonized foreground region and selects positive samples from the ground-truth background region. Our method attempts to bring together corresponding positive and negative samples by maximizing the mutual information between the foreground and background styles, which desirably makes our harmonization network more robust to discriminate the foreground and background style features when harmonizing composite images. Extensive experiments on the benchmark datasets show that our method can achieve a clear improvement in harmonization quality and demonstrate the good generalization capability in real-scenario applications.

READ FULL TEXT

page 8

page 9

research
04/29/2022

SCS-Co: Self-Consistent Style Contrastive Learning for Image Harmonization

Image harmonization aims to achieve visual consistency in composite imag...
research
06/05/2021

Region-aware Adaptive Instance Normalization for Image Harmonization

Image composition plays a common but important role in photo editing. To...
research
09/19/2020

BargainNet: Background-Guided Domain Translation for Image Harmonization

Image composition is a fundamental operation in image editing field. How...
research
04/10/2022

Image Harmonization by Matching Regional References

To achieve visual consistency in composite images, recent image harmoniz...
research
08/04/2023

Painterly Image Harmonization using Diffusion Model

Painterly image harmonization aims to insert photographic objects into p...
research
10/10/2022

SCAM! Transferring humans between images with Semantic Cross Attention Modulation

A large body of recent work targets semantically conditioned image gener...
research
07/04/2023

Mitigating Bias: Enhancing Image Classification by Improving Model Explanations

Deep learning models have demonstrated remarkable capabilities in learni...

Please sign up or login with your details

Forgot password? Click here to reset