journal article·2023-09-16Open access

Novel Paintings from the Latent Diffusion Model through Transfer Learning

Dayin Wang, Chong Ma, Siwen Sun

Applied Sciences· Volume 13· Issue 18

Abstract

With the development of deep learning, image synthesis has achieved unprecedented achievements in the past few years. Image synthesis models, represented by diffusion models, demonstrated stable and high-fidelity image generation. However, the traditional diffusion model computes in pixel space, which is memory-heavy and computing-heavy. Therefore, to ease the expensive computing and improve the accessibility of diffusion models, we train the diffusion model in latent space. In this paper, we are devoted to creating novel paintings from existing paintings based on powerful diffusion models. Because the cross-attention layer is adopted in the latent diffusion model, we can create novel paintings with conditional text prompts. However, direct training of the diffusion model on the limited dataset is non-trivial. Therefore, inspired by the transfer learning, we train the diffusion model with the pre-trained weights, which eases the training process and enhances the image synthesis results. Additionally, we introduce the GPT-2 model to expand text prompts for detailed image generation. To validate the performance of our model, we train the model on paintings of the specific artist from the dataset WikiArt. To make up for missing image context descriptions of the WikiArt dataset, we adopt a pre-trained language model to generate corresponding context descriptions automatically and clean wrong descriptions manually, and we will make it available to the public. Experimental results demonstrate the capacity and effectiveness of the model.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Generative Adversarial Networks and Image Synthesis · Image Retrieval and Classification Techniques · Advanced Image and Video Retrieval Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Space Star Technology Co., Ltd., Beijing 100086, China

Space Innovation Technology Co., Ltd., Beijing 100070, China

Institute of Intelligent Manufacturing, Heilongjiang Academy of Sciences, Harbin 150090, China

Funding

Natural Science Foundation of Heilongjiang Province, China

References (34)

Show source-provided references
1. Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014, January 8–13). Generative Adversarial Nets. Proceedings of the Advances in Neural Information Processing Systems, Montreal, QC, USA.
2. Kingma, D.P., and Welling, M. (2013). Auto-encoding variational bayes. arXiv.
3. Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., and Ganguli, S. (2015, January 6–11). Deep unsupervised learning using nonequilibrium thermodynamics. Proceedings of the International Conference on Machine Learning, PMLR, Lille, France.
4. Ho, J., Jain, A., and Abbeel, P. (2020, January 6–12). Denoising diffusion probabilistic models. Proceedings of the Advances in Neural Information Processing Systems, Virtual.
5. Song, J., Meng, C., and Ermon, S. (2020). Denoising diffusion implicit models. arXiv.
6. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and Ommer, B. (2022, January 18–24). High-resolution image synthesis with latent diffusion models. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA.10.1109/CVPR52688.2022.01042 ↗
7. Dhariwal, P., and Nichol, A. (2021, January 6–14). Diffusion models beat gans on image synthesis. Proceedings of the Advances in Neural Information Processing Systems, Virtual.
8. (2023, March 05). WIKIART. Available online: https://www.wikiart.org/.
9. Language models are unsupervised multitask learners
10. Karras, T., Laine, S., and Aila, T. (2019, January 15–20). A style-based generator architecture for generative adversarial networks. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA.10.1109/CVPR.2019.00453 ↗
11. Karras, T., Laine, S., Aittala, M., Hellsten, J., Lehtinen, J., and Aila, T. (2020, January 13–19). Analyzing and improving the image quality of stylegan. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.10.1109/CVPR42600.2020.00813 ↗
12. Karras, T., Aittala, M., Laine, S., Härkönen, E., Hellsten, J., Lehtinen, J., and Aila, T. (2021, January 6–14). Alias-free generative adversarial networks. Proceedings of the Advances in Neural Information Processing Systems, Virtual.
13. Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V., Radford, A., and Chen, X. (2016, January 5–10). Improved techniques for training gans. Proceedings of the Advances in Neural Information Processing Systems, Barcelona, Spain.
14. Radford, A., Metz, L., and Chintala, S. (2015). Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv.
15. Arjovsky, M., and Bottou, L. (2017). Towards principled methods for training generative adversarial networks. arXiv.
16. Arjovsky, M., Chintala, S., and Bottou, L. (2017, January 6–11). Wasserstein GAN. Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia.
17. Higgins, I., Matthey, L., Pal, A., Burgess, C., Glorot, X., Botvinick, M., Mohamed, S., and Lerchner, A. (2017, January 24–26). beta-vae: Learning basic visual concepts with a constrained variational framework. Proceedings of the International Conference on Learning Representations, Toulon, France.
18. Van Den Oord, A., and Vinyals, O. (2017, January 4–9). Neural discrete representation learning. Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA.
19. Razavi, A., Van den Oord, A., and Vinyals, O. (2019, January 8–14). Generating diverse high-fidelity images with vq-vae-2. Proceedings of the Advances in Neural Information Processing Systems, Vancouver, BC, Canada.
20. Ramesh, A., Pavlov, M., Goh, G., Gray, S., Voss, C., Radford, A., Chen, M., and Sutskever, I. (2021, January 18–24). Zero-shot text-to-image generation. Proceedings of the International Conference on Machine Learning, PMLR, Virtual.
21. Rombach, R., Esser, P., and Ommer, B. (2020, January 6–12). Network-to-network translation with conditional invertible neural networks. Proceedings of the Advances in Neural Information Processing Systems, Virtual.
22. Gregor, K., Papamakarios, G., Besse, F., Buesing, L., and Weber, T. (2018). Temporal difference variational auto-encoder. arXiv.
23. Rezende, D., and Mohamed, S. (2015, January 6–11). Variational inference with normalizing flows. Proceedings of the International Conference on Machine Learning, PMLR, Lille, France.
24. Su, J., and Wu, G. (2018). f-VAEs: Improve VAEs with conditional flows. arXiv.
25. Zhang, L., and Agrawala, M. (2023). Adding conditional control to text-to-image diffusion models. arXiv.10.1109/ICCV51070.2023.00355 ↗
26. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017, January 4–9). Attention is all you need. Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA.
27. (2023, March 05). Hugging Face. Available online: https://huggingface.co/datasets/bartman081523/stable-diffusion-discord-prompts.
28. (2023, March 05). Hugging Face. Available online: https://huggingface.co/runwayml/stable-diffusion-v1-5.
29. (2023, March 05). Hugging Face. Available online: https://huggingface.co/gpt2.
30. Zhang, Y., Huang, X., Ma, J., Li, Z., Luo, Z., Xie, Y., Qin, Y., Luo, T., Li, Y., and Liu, S. (2023). Recognize Anything: A Strong Image Tagging Model. arXiv.
31. Huang, X., Zhang, Y., Ma, J., Tian, W., Feng, R., Zhang, Y., Li, Y., Guo, Y., and Zhang, L. (2023). Tag2text: Guiding vision-language model via image tagging. arXiv.
32. Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., and Clark, J. (2021, January 18–24). Learning transferable visual models from natural language supervision. Proceedings of the International Conference on Machine Learning, PMLR, Virtual.
33. A survey of transfer learning10.1186/s40537-016-0043-6 ↗
34. (2023, March 05). LAION. Available online: https://laion.ai/blog/laion-5b/.