Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (7): 229-236.DOI: 10.3778/j.issn.1002-8331.2009-0420

• Graphics and Image Processing • Previous Articles     Next Articles

Automatic Coloring Method for Gray Image Based on Convolutional Network

ZHANG Meiyu, LIU Yuehui, HOU Xianghui, QIN Xujia   

  1. College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China
  • Online:2022-04-01 Published:2022-04-01

基于卷积网络的灰度图像自动上色方法

张美玉,刘跃辉,侯向辉,秦绪佳   

  1. 浙江工业大学 计算机科学与技术学院,杭州 310023

Abstract: With the emergence of deep learning, gray image automatic coloring has been developed rapidly, and one-hot coding method with excellent color effect has emerged to avoid the problem of dull color effect based on L2 loss function. This paper uses the basic idea of one-hot coding method, and proposes a convolution network based gray image automatic coloring method. In this method, the encoder and decoder are improved and redesigned, and the neural network structure is redesigned. By using the traditional convolution of Gaussian function and reducing the number of adjacent categories selected by each pixel, the process of one-hot decoding and coding is simplified, the frequent selection of parameters is avoided, and the speed of image processing is improved. By stacking dilated convolution of different sizes, and adding Dropout method, a relatively small and fast gray image automatic coloring network based on deep learning is constructed. Experimental results show that the proposed method has good image coloring effect, and has great advantages in network volume and performance.

Key words: deep learning, image colorization, one-hot coding, Gaussian convolution

摘要: 随着深度学习的出现,灰度图像自动上色得到了快速的发展,出现了上色效果优秀的基于one-hot编码(独热编码)的方法,避免基于[L2]损失函数上色效果平淡的问题。沿用one-hot编码方法的基础思路,提出了一种卷积网络的灰度图像自动上色方法。该方法对编码器与解码器进行了改进和重新设计,重新设计了神经网络结构。通过使用高斯函数的传统卷积,减少每一个像素点选取邻近分类的数量,简化了one-hot解码与编码的流程,避免了频繁选取参数,提升了处理图片的速度。通过堆叠不同尺寸的空洞卷积以及添加Dropout等方法,构建了一个体积相对较小、速度较快的基于深度学习的灰度图自动上色网络。实验证明了提出的方法图像上色效果良好,且在网络体积、上色效果上有较大的优势。

关键词: 深度学习, 图像上色, 独热编码, 高斯卷积