Generating simpson faces using Deep Convolutional Generative Adversarial Networks, written in PyTorch.
GANs are a framework for teaching a DL model to capture the training data’s distribution so we can generate new data from that same distribution. I trained deep convolutional generative adversarial networks on a dataset of simpson faces to generate new faces based on the training samples.
https://www.kaggle.com/kostastokis/simpsons-faces
9877 Simpsons faces, extracted from seasons 25-28, all in 200x200 resolution and each centered on a single face.
The model includes a disciminator model which is made of convolution stages (Conv2d, BatchNorm, LeakyRelu) and a generator model with transpose convolution stages (TransposeConv2d, BatchNorm, LeakyRelu). The disciminator has 5 of such stages each with different number of convlayers and a fully connected layer at the end, and the generator is made up of 4 such transpose convolution stages and a convolution stage at the end. The negative slope of LeakyRelu is 0.2.
There were a lot of tricky details for getting the DCGAN generate some sharp looking pictures. Some of the hacks I used:
Find out more about the hacks here:
The one on the left looks like the chicken version of the simposons :)
2 Mouths one on the neck :)
Pre-historic look !
Father+Son (Punk homer)