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利用了无监督分割模型提供的语义先验,这是免费的附加手动语义注释。实验证明,我们的模型在公共数据集上在定量和定性上均优于最近的最新方法。