Image harmonization aims to achieve visual consistency in composite images by adapting a foreground to make it compatible with a background. However, existing methods always only use the real image as the positive sample to guide the training, and at most introduce the corresponding composite image as a single negative sample for an auxiliary constraint, which leads to limited distortion knowledge, and further causes a too large solution space, making the generated harmonized image distorted. Besides, none of them jointly constrain from the foreground self-style and foreground-background style consistency, which exacerbates this problem. Moreover, recent region-aware adaptive instance normalization achieves great success but only considers the global background feature distribution, making the aligned foreground feature distribution biased. To address these issues, we propose a self-consistent style contrastive learning scheme (SCS-Co). By dynamically generating multiple negative samples, our SCS-Co can learn more distortion knowledge and well regularize the generated harmonized image in the style representation space from two aspects of the foreground self-style and foreground-background style consistency, leading to a more photorealistic visual result. In addition, we propose a background-attentional adaptive instance normalization (BAIN) to achieve an attention-weighted background feature distribution according to the foreground-background feature similarity. Experiments demonstrate the superiority of our method over other state-of-the-art methods in both quantitative comparison and visual analysis.
翻译:图像统一的目的是通过对前景进行调整,使复合图像与背景相容,从而实现复合图像的视觉一致性。然而,现有方法总是只使用真实图像作为积极的样本来指导培训,而最多只是将相应的合成图像作为单一的负面样本作为辅助制约的单一负面样本,从而导致有限的扭曲知识,并进一步造成一个过于庞大的解决方案空间,使生成的统一图像被扭曲。此外,这些方法中没有一个能共同限制地表自我风格和地表背景风格的一致性,从而加剧这一问题。此外,最近的区域适应性正常化实例取得了巨大成功,但只考虑到全球背景特征分布,使前地特征分布出现偏差。为了解决这些问题,我们提出了一种自相一致的风格对比学习方案(SCS-Co ) 。通过动态生成多个负面样本,我们的SCS-C公司可以学到更多的扭曲知识,并且从前地自我风格代表空间的两个方面对生成的统一图像进行规范。此外,最近的区域-觉自制和前地背景风格一致性实例的一致性,导致更具有摄影真实的视觉效果。此外,我们还提议了一种自平面图像比级分析方法,在地面上进行背景上的自我偏向地面上对地分析。