Image colorization technology has always been an important research topic in computer graphics,and has a wide range of applications in the fields of classic film and television data protection,military detection,medical image processing,and cultural relic restoration.According to the differences in processing methods,image colorization algorithms can be divided into two types: image colorization algorithms based on local color diffusion and image colorization algorithms based on color transfer.The colorization algorithm based on local color diffusion requires a lot of manual annotation.Although the colorization effect is good,it is expensive and impractical.This paper mainly studies the image colorization algorithm based on color transfer.The research contents include the following two aspects:In terms of gray image color transfer,this paper proposes a gray image color transfer algorithm based on a dual-stream convolutional neural network.Traditional gray image color transfer algorithms are easily affected by the brightness of the image,causing more mis-coloration in the resulting image.However,most of the current gray image color transfer algorithms based on deep learning do not understand the image feature information sufficiently,resulting in obvious color mis-transmission in the resulting image.Based on the convolutional neural network,this paper proposes an image color transfer algorithms that considers local information and global information comprehensively.In this model,the SE-Res Net network with feature re-calibration and the improved VGG19 network are used to extract the local and global information of the image respectively.Then the local and global information of the image is fused and the fusion result is taken as the input of the coloring network.Finally,the fused feature is colored by the coloring network combined with the classification information.During the training process,two loss functions,pixel loss and classification loss,are used to train the model.Experimental results show that the algorithm in this paper effectively solves the problem of color mis-transmission in the process of color transfer,and the color distribution of the image is natural and the texture is clear.In terms of colorful image color transfer,this paper proposes an image color transfer algorithm based on cycle generative adversarial network.Most current color transfer algorithms between colorful images require a high semantic consistency between the target image and the reference image to successfully complete the color transfer task.If some areas of the target image do not find the correct matching block in the reference image,the color transfer result of the corresponding area will be wrong.This paper uses the duality of cycle generative adversarial network to realize color transfer between unpaired images,and improves the deficiencies in the original model to make it more suitable for image color transfer tasks.The generator in this paper uses the idea of densely connected networks combined with recursive residuals to improve the utilization of features and suppress the disappearance of gradients.At the same time,based on the original loss function,edge loss is added to suppress the distortion of details in the generated image.The experimental results show that the algorithm in this paper can produce the resulting images with true colors and rich textures. |