高级检索
    李媛, 陈昭炯, 叶东毅. 基于参考图语义匹配的花卉线稿工笔效果上色算法[J]. 计算机研究与发展, 2022, 59(6): 1271-1285. DOI: 10.7544/issn1000-1239.20201035
    引用本文: 李媛, 陈昭炯, 叶东毅. 基于参考图语义匹配的花卉线稿工笔效果上色算法[J]. 计算机研究与发展, 2022, 59(6): 1271-1285. DOI: 10.7544/issn1000-1239.20201035
    Li Yuan, Chen Zhaojiong, Ye Dongyi. A Coloring Algorithm for Flower Line Drawings with Meticulous Effect Based on Semantic Matching of Reference Images[J]. Journal of Computer Research and Development, 2022, 59(6): 1271-1285. DOI: 10.7544/issn1000-1239.20201035
    Citation: Li Yuan, Chen Zhaojiong, Ye Dongyi. A Coloring Algorithm for Flower Line Drawings with Meticulous Effect Based on Semantic Matching of Reference Images[J]. Journal of Computer Research and Development, 2022, 59(6): 1271-1285. DOI: 10.7544/issn1000-1239.20201035

    基于参考图语义匹配的花卉线稿工笔效果上色算法

    A Coloring Algorithm for Flower Line Drawings with Meticulous Effect Based on Semantic Matching of Reference Images

    • 摘要: 研究基于参考图像的花卉线稿图的工笔效果上色问题.现有的基于参考图像的线稿图上色算法对工笔花卉画特有的色彩渐变的特点难以学习和模拟;此外通常还要求参考图像与线稿图具有相似的几何布局结构,这也限制了算法的适用性,故而直接采用现有算法难以实现线稿图的工笔效果上色.基于条件生成对抗网(conditional generative adversarial network, CGAN)框架,提出了一种将参考图像与线稿图进行语义匹配的花卉线稿图工笔效果上色算法RBSM-CGAN.该算法在网络结构设计方面,以U型网络(简称U-Net)为生成器基础,设计了2个附加子模块:1)语义定位子模块.该模块预训练了一个语义分割网络,以生成花卉线稿图的语义标签图,该标签图编码后作为自适应实例归一化的仿射参数引入到上色模型中,提升对不同语义区域的识别能力,进而提高颜色定位的准确性.2)颜色编码子模块.该模块提取参考图像的颜色特征,而后将该特征拼接到生成网络解码层的前3层,利用这种方式将颜色信息注入上色模型,与语义定位模块相配合加强算法对渐变色的学习和模拟.另外,算法在网络训练方面改变传统的“工笔花卉原作-花卉线稿图”数据对的训练方式,通过打乱原作的几何结构等摄动操作生成原作摄动图,采用“原作摄动图-花卉线稿图”数据对进行网络训练,降低了模型对原作空间几何结构的依赖性,提升了算法的适用性.实验结果表明:该算法对用户选择的参考图像的颜色语义具有正确的响应,所引入的“语义定位+颜色编码”的结构设计提升了对渐变色的模拟效果,实现了在不同参考图像指导下的花卉线稿图的工笔效果上色,可快速生成多样化的上色结果.

       

      Abstract: The problem of coloring flower line drawings with meticulous effect based on a reference image is addressed. Existing reference-based coloring algorithms for line drawing are difficult to learn and simulate the unique color gradient effect of meticulous flower paintings. Moreover, the reference image in these algorithms is usually required to have similar geometric layout structure to the line drawing, which limits the applicability of the algorithms. Therefore, it is difficult to directly apply existing algorithms to accomplish coloring of line drawings with meticulous effect. On the basis of conditional generative adversarial network(CGAN) framework, a coloring algorithm for flower line drawings with meticulous effect is proposed by means of semantic matching between the reference image and the line drawing. In terms of network structure design, the proposed algorithm uses U-Net as the basis of the generator and designs two additional sub-modules. One is the semantic positioning sub-module. This module pre-trains a semantic segmentation network to generate a semantic label map of the flower line drawing. The label map is encoded as an adaptive instance normalization affine parameter and then introduced into the coloring model to improve the recognition ability of different semantic regions and the accuracy of color positioning. The other is the color coding sub-module. This module extracts the color features of the reference image, and then splices to the first three decoding layers of the generator, in which way, the color information is injected into the color model. Combining this module with semantic location module, our algorithm enhances the learning and simulation of gradient color pattern. In network training stage, the algorithm does not train the model on “original meticulous flower work-flower line drawing” data pairs. Instead, a perturbed version of the original work via such perturbation operations as disturbing the original geometric structure is generated and then “perturbed version-flower line drawing” data pairs are used to train our model, which turns out to reduce the model’s dependence on the spatial geometry layout of the original work and to then improve the applicability of the proposed algorithm. The experimental results show that the proposed algorithm has a correct response to the color semantics of the reference image selected by the user. It is also shown that the introduced structure of semantic positioning module and color coding module could improve the simulation effect of gradient colors and realize the colorization of the flower line drawing under the guidance of different reference images, as well as diversified coloring results.

       

    /

    返回文章
    返回