[论文解读] 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.
研究动机与目标
- 解决现有图像合成方法在区分和对齐前景与背景外观特征方面的局限性。
- 通过增强生成器将背景风格迁移至前景的能力,同时保持结构或语义内容不退化,从而提升合成质量。
- 提出一种区域级对比损失,显式建模前景与背景图像块之间的风格一致性。
- 利用编码器提取的稳定背景特征作为外部风格引导,以实现解码器中更精确和一致的风格迁移。
- 在保持较低计算开销的同时,提升在真实世界场景中的泛化能力。
提出的方法
- 提出一种区域级对比损失函数 $\mathcal{L}_{HCL}$,将合成的前景图像块视为负样本,将真实背景图像块视为正样本。
- 通过使用编码器主干网络提取的特征作为稳定风格参考,引入外部风格融合机制,利用自适应实例归一化引导解码器的特征变换。
- 采用共享的多层感知机(MLP)将正样本与负样本的图像块特征嵌入到共享潜在空间中,以支持对比优化。
- 采用基于UNet的生成器,并在每个解码器块中应用风格融合,将背景外观特征与前景特征融合,以提升真实感。
- 结合像素级重建损失 ($\mathcal{L}_{pixel}$) 与对比损失,以保持结构与语义的一致性。
- 通过联合优化 $\mathcal{L}_{pixel}$、$\mathcal{L}_{HCL}$ 与标准GAN损失,确保输出具有高质量与真实感。
实验结果
研究问题
- RQ1区域级对比学习方案是否能有效提升图像合成中前景与背景风格特征的区分与对齐能力?
- RQ2使用编码器提取的稳定背景特征作为外部风格参考,是否能带来优于仅依赖解码器内部特征的合成效果?
- RQ3采样图像块的数量如何影响对比损失的性能与训练效率?
- RQ4所提方法在真实世界非合成图像构图中是否具备良好的泛化能力?
- RQ5在定量指标与视觉质量方面,该方法与最先进方法相比表现如何?
主要发现
- 在基准数据集上,该方法实现了最先进性能,当使用256个采样图像块时,PSNR达到37.50,SSIM达到99.04。
- 使用256个图像块进行对比学习在性能与训练复杂度之间实现了最佳平衡;更高的采样数量(如512或1024)反而因特征复杂度与计算成本上升而降低性能。
- 消融实验证实,区域级对比损失显著提升了合成质量,其效果超越仅使用风格融合,体现在前景-背景一致性在视觉与定量指标上的明显改善。
- 使用编码器特征进行外部风格融合,相比依赖解码器重建的特征,能更准确地保留背景细节,该结论通过特征图对比得到验证。
- 该方法在真实场景数据集上展现出强大的泛化能力,表明其在真实应用中的实用性,而不仅限于合成基准测试。
- 若移除对比损失或替换为标准 $\mathcal{L}_1$ 损失,性能出现明显下降,证实了对比损失在风格对齐中的关键作用。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。