First attempt with generative adversarial networks!
generator = load_model(os.path.join('models','face_generator.h5'))
discriminator = load_model(os.path.join('models','face_discriminator.h5'))
these lines are made to train the model in different sessions
I've been having some fun with open-source Kaggle dataset recently. You can find it here: https://www.kaggle.com/datasets/jonathanoheix/face-expression-recognition-dataset
some examples:
Although the dataset is ""small"" a gan still made some decent results! Not photorealistic but more like 'WWI black and white' style.
I'm testing different generative architectures, one using keras layer UpSampling2d() and another one using Conv2DTranspose().
Here's the difference:
training progress:
1000 epochs:
many more epochs: (best results)
- both GANSs don't seem to be able to converge even after days of training. This may be due to the size of the dataset
- gan 1 permorms overall better
- try with bigger dataset available at https://drive.google.com/drive/folders/1-5oQoEdAecNTFr8zLk5sUUvrEUN4WHXa
- explore different architectures
- Manage a way to handle bigger size images without buying a new GPU (OOM problem)
After having tried with a different dataset (30 k faces from FFHQ dataset) mentioned above the imporvements were astonishing. I'm happy to share some results below.