Abstract
The goal of image colorization is to make the generated color images closely approximate the color layout of the real color images. However, most of the existing methods do not consider the semantic and spatial rationality of the generated images, and this could lead to a large difference between the colored image and the real situation. In this research we propose SS-CycleGAN, a novel CycleGAN based solution for automatic image colorization. SS-CycleGAN ensures the rationality of colored images considering three aspects: high-level semantics, detailed semantics, and spatial information of the objects to be colored in the image. We designed a patch discriminator for SS-CycleGAN based on a self-attention mechanism. The self-attention mechanism can guide the patch discriminator to pay attention to spatial structure information and the semantic rationality of colored objects. The loss function of SS-CycleGAN is added with a term for detail loss, which can ensure the consistency of the details of the original image and the generated image. To extract multi-scale features of local areas to capture the spatial information of colored objects, we designed a Multi-scale Cascaded Dilated Convolution (MCDC) module. We trained and tested the proposed SS-CycleGAN on Natura Color Dataset and Flower dataset. The experimental results show that SS-CycleGAN can obtain higher quality colorized images than several state-of-the-art methods.
Similar content being viewed by others
References
Anwar S, Tahir M, Li C, Mian A, Khan FS, Muzaffar AW (2020) Image colorization: A survey and dataset. arXiv preprint arXiv:2008.10774
Bothra D, Shetty R, Bhagat S, Patil M (2021) ColorAI -automatic image Colorization using CycleGAN. Int J Sci Res Eng Manag
Chen L-C, Papandreou G, Kokkinos I, Murphy K, Yuille AL (2018) DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs. IEEE Trans Pattern Anal Mach Intell:834–848
Ci Y, Ma X, Wang Z, Li H, Luo Z (2018) User-guided deep anime line art colorization with conditional adversarial networks, In: 26th ACM international conference on Multimedia, 1536–1544
Goodfellow IJ, Pouget-Abadie J, Mirza M et al. (2014) Generative adversarial networks. International Conference on Neural Information Processing Systems (NIPS), 2672–2680
Huang S, Jin X, Jiang Q, Li J, Lee SJ, Wang P, Yao S (2021) A fully-automatic image colorization scheme using improved CycleGAN with skip connections. Multimed Tools Appl 80:1–28
Iizuka S, Simo-Serra E, Ishikawa H (2016) Let there be color!: joint end-to-end learning of global and local image priors for automatic image colorization with simultaneous classification. ACM Trans Graph 35:1–11
Irony R, Cohen-Or D, Lischinski D (2005) Colorization by example. Rendering Techniques. 201–210
Isola P, Zhu JY, Zhou T et al Image-to-Image Translation with Conditional Adversarial Networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp 1125–1134
Larsson G, Maire M, Shakhnarovich G (2007) Learning Representations for Automatic Colorization. European Conference on Computer Vision (ECCV), 577–593
Lee J, Kim E, Lee Y, Kim D, Chang J, Choo J (2020) Reference-based sketch image Colorization using augmented-self reference and dense semantic correspondence. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 5800–5809
Luan Q, Wen F, Cohen-Or D, Liang L, Xu Y-Q, Shum H-Y (2007) Natural image colorization. In: Proceedings of the 18th Eurographics Conference on Rendering Techniques
Mehri A, Sappa AD (2019) Colorizing near infrared images through a cyclic adversarial approach of unpaired samples, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 971–979
Miyato T, Kataoka T, Koyama M, Yoshida Y (2018) Spectral normalization for generative adversarial networks. International Conference on Learning Representations
Ozbulak G (2019) Image Colorization by capsule networks, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 2150–2158
Qu Y, Wong TT, Heng PA (2006) Manga colorization. ACM Trans Graph (TOG) 25:1214–1220
Ronneberger O, Fischer P, Brox T (2015) U-net: convolutional networks for biomedical image segmentation. International Conference on Medical Image Computing and Computer-Assisted Intervention Springer International Publishing, 234–241
Simonyan K, Zisserman A (2014) Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1555, 1–14.https://doi.org/10.48550/arXiv.1409.1556
Su JW, Chu HK, Huang JB (2020) Instance-aware image Colorization, 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 7965–7974
Suárez PL, Sappa AD, Vintimilla BX (2017) Infrared image Colorization based on a triplet DCGAN architecture, 2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 212–217
Szegedy C, Ioffe S, Vanhoucke V, Alemi AA (2017) Inception-v4, inception-resnet and the impact of residual connections on learning. The National Conference on Artificial Intelligence (AAAI)
Ulyanov D, Vedaldi A, Lempitsky V (2016). Instance normalization: the missing ingredient for fast stylization. arXiv:1607.08022
URL of Flower Dataset (n.d.) https://www.kaggle.com/alxmamaev/flowers-recognition
Wang P, Patel VM (2018) Generating high quality visible images from SAR images using CNNs, 2018 IEEE Radar Conference (RadarConf18), 0570–0575
Wang Z, Bovik AC, Sheikh HR, Simoncelli EP (April 2004) Image quality assessment: from error visibility to structural similarity. IEEE Trans Image Process 13(4):600–612. https://doi.org/10.1109/TIP.2003.819861
Welsh T, Ashikhmin M, Mueller K (2002) Transferring color to greyscale images. ACM Trans Graph 21(3):277–280. https://dl.acm.org/doi/10.1145/566654.566576
Yatziv, Sapiro G (2006) Fast image and video colorization using chrominance blending. IEEE Trans Image Process 15:1120–1129
Zhang R., Isola P., Efros A.A. (2016) Colorful Image Colorization. European Conference Computer Vision (ECCV), 649–666.
Zhang R, Zhu JY, Isola P, Geng X, Lin AS, Yu T, Efros AA (2017) Real-time user-guided image colorization with learned deep priors. ACM Trans Graph (TOG) 36:1–11
Zhu J, Park T, Isola P, Efros AA (2017) Unpaired image-to-image translation using cycle-consistent adversarial networks, 2017 IEEE International Conference on Computer Vision (ICCV), 2242–2251
Acknowledgements
This research is partially supported by Natural Science Foundation Project of science and Technology Department of Jilin Province under Grant no. 20200201165JC.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that there is no potential conflict (financial or non-financial) of interests regarding the publication of this article.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Li, B., Lu, Y., Pang, W. et al. Image Colorization using CycleGAN with semantic and spatial rationality. Multimed Tools Appl 82, 21641–21655 (2023). https://doi.org/10.1007/s11042-023-14675-9
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-023-14675-9