Exemplar-based image colorization aims to colorize a target grayscale image based on a color reference image, and the key is to establish accurate pixel-level semantic correspondence between these two images. Previous methods search for correspondence across the entire reference image, and this type of global matching is easy to get mismatch. We summarize the difficulties in two aspects: (1) When the reference image only contains a part of objects related to target image, improper correspondence will be established in unrelated regions. (2) It is prone to get mismatch in regions where the shape or texture of the object is easily confused. To overcome these issues, we propose SPColor, a semantic prior guided exemplar-based image colorization framework. Different from previous methods, SPColor first coarsely classifies pixels of the reference and target images to several pseudo-classes under the guidance of semantic prior, then the correspondences are only established locally between the pixels in the same class via the newly designed semantic prior guided correspondence network. In this way, improper correspondence between different semantic classes is explicitly excluded, and the mismatch is obviously alleviated. Besides, to better reserve the color from reference, a similarity masked perceptual loss is designed. Noting that the carefully designed SPColor utilizes the semantic prior provided by an unsupervised segmentation model, which is free for additional manual semantic annotations. Experiments demonstrate that our model outperforms recent state-of-the-art methods both quantitatively and qualitatively on public dataset.
翻译:样例图像上色旨在根据彩色参考图像为目标灰度图像上色,其关键在于建立准确的像素级语义对应关系。先前的方法在整个参考图像中搜索对应关系,这种全局匹配很容易出现不匹配情况。我们将困难总结为两个方面:(1)当参考图像仅包含与目标图像相关的部分对象时,在不相关区域将建立不恰当的对应关系;(2)在形状或纹理容易混淆的区域,很容易出现不匹配情况。为克服这些问题,我们提出了SPColor,一种基于语义先验引导的样例图像上色框架。与以往的方法不同,SPColor先在语义先验的指导下将参考和目标图像的像素粗略分类为几个伪类别,然后仅在相同类别中的像素之间建立局部对应关系,通过新设计的语义先验引导的对应网络。这样可以明确排除不同语义类别之间的不合适对应关系,并明显减轻不匹配情况。此外,为更好地从参考保留颜色,设计了相似度掩蔽感知损失。需注意,精心设计的SPColor利用了无监督分割模型提供的语义先验,并且无需额外手动语义注释。实验证明,我们的模型在公共数据集上在量化和质量方面均优于最近的最先进方法。