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.
翻译:图像统一任务旨在根据具体背景图像统一不同的复合地表区域。 以往的方法将侧重于通过关注、 适应性正常化和灯光调整等一些内部增强,提高发电机的重建能力, 美元。 但是,它们较少注意在有限的生成器中区分地表和背景外观特征,这在图像统一任务中已成为新的挑战。 在本文件中,我们提出一个新的图像统一框架,由外部风格聚合和地区反向对比学习计划组成。 在外部风格融合方面,我们利用编码器的外部背景外观作为风格参考,在解码器中生成统一的地表层应用。 这一方法增强了脱色器在外部背景指导下的协调能力。 此外,对于对比性学习计划,我们设计了一种适合区域的图像差异损失功能。 具体而言,我们首先采用直向前的样本生成方法,从统一的地面区域输出负面样本,并从地面背景区域选择积极的样本。 我们的方法试图将正反向和负向的样本汇集在一起,通过最大限度地利用外部背景指导,通过外部背景指导,使图像解析的解析、背景的模型显示我们更稳性、更清晰的视野背景背景的模型,从而展示了我们更精确的精确的系统化的对比背景上,从而展示了更精确的精确的模型的对比背景,从而展示了我们更精确的模型化的模型化的模型化、更精确的精确的模型化,从而展示了我们更精确的模型化,从而展示了更精确地基底基底的模型显示了我们。 。