/GANArt-Using-AI-to-create-Portraits

This project aims to mimic the artist's painting style and make a portrait on its own, this project uses Nvida's StyleGAN2( Style Generative Adversarial network) model.

Primary LanguageJupyter NotebookMIT LicenseMIT

GANArt: Using AI to create Portraits

Sample_gif

GAN(Generative Adversarial Network) is no wonder an amazing discovery in the field of Deep Learning. From generating fake human faces to an entirely new virtual world, if there is room for creativity, one can indeed implement GAN. This fascination of mine towards Generative Modelling, and in particular GAN, led me towards this creative project.

There are many works already where people have applied GAN in the field of Arts, from abstract arts to genre-specific paintings(using Conditional GANs), and some of these works inspired me to dig deeper into the field of GAN.

For this project, I have used Nvidia's StyleGAN2 ADA model, StyleGAN2 is an upgraded version of its earlier model StyleGAN, as we know training a GAN using too little data typically leads to discriminator overfitting, causing training to diverge, and therefore, Nvidia came up with the idea of adaptive discriminator augmentation (ADA) and solved the issue of discriminator overfitting.

Steps to generate Portraits

  • Firstly download the pre-trained models:

  • Once you'd download the trained models, follow the generate portrait notebook(NOTE: You will need a access to GPU to generate the portraits.)

Dataset

I have scrapped data from Wikiart. It is an online, user-editable visual art encyclopedia. I have scrapped only those paintings which are available in the public domain to avoid copyright infringement.

Scrapped data is uploaded on Kaggle website(link)

Training

I have used Google Colab Pro to train the model, it took 2-3 days to train the model.

Sample Portraits

Image1

Image2

Image3

Using Transfer Learning

Image4

Image4

Image4