论文标题
图像与区域对比度学习的统一
Image Harmonization with Region-wise Contrastive Learning
论文作者
论文摘要
图像协调任务旨在根据特定的背景图像协调不同的复合前景区域。以前的方法宁愿着重于通过一些内部增强功能(例如注意力,自适应归一化和光调节,$等)来提高发电机的重建能力。但是,他们较少注意区分受限发电机内的前景和背景外观特征,这成为图像协调任务的新挑战。在本文中,我们提出了一个新型的图像协调框架,并具有外部样式融合和区域对比度学习方案。对于外部样式融合,我们利用编码器的外部背景外观作为样式参考,以在解码器中生成统一的前景。这种方法通过外部背景指导增强了解码器的协调能力。此外,对于对比度学习方案,我们为图像协调任务设计了一个区域的对比损失函数。具体而言,我们首先引入了一种直接的样品生成方法,该方法从输出统一的前景区域中选择负样本,并从地面真相背景区域中选择正样品。我们的方法试图通过最大化前景和背景样式之间的相互信息来汇总相应的正和负样本,这可以使我们的协调网络更强大,以在协调复合图像时区分前景和背景样式。基准数据集上的广泛实验表明,我们的方法可以明确提高协调质量,并证明在实季纳里奥应用程序中具有良好的概括能力。
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.