The model is trained on the CelebFaces Attributes Dataset (CelebA) which contains about 200000 celebrity images Dataset can be found here
I Defined and trained a DCGAN on a dataset of faces. The Goal of this project is to generate new images of faces that look as realistic as possible.
The project is broken down into a series of tasks from loading in data to defining and training adversarial networks. At the end of the notebook, visualizing the results of your trained Generator to see how it performs; generated samples indeed look like fairly realistic faces with small amounts of noise
- Intro
- Step 0: Import Datasets
- Step 1: Preprocess & Load the Data
- Step 2: Create Dataloader
- Step 3: Define Model (Discriminator & Generator)
- Step 4: Create complete network
- Step 5: Train
- Step 6: Generate Faces
2 Read existing literature to see if you can use padding and normalization techniques to generate higher-resolution images.
3 Implement a learning rate that evolves over time as they did in this CycleGAN Github repo.
4 See if I can extend this model and use a CycleGAN to learn to swap different kinds of faces. For example, learn a mapping between faces that have and do not have eye/lip makeup, as they did in This paper.
Considering the following factors:
- The dataset is biased; it is made of "celebrity" faces that are mostly white
- Model size; larger models have the opportunity to learn more features in a data feature space
- Optimization strategy; optimizers and number of epochs affect your final result
-
The training data does not have the complete face. Features like hairstyle & chins are not visible. As a results, the generated images miss chins and complete hairstyle. Data should preferably have the complete face.
-
Obtaining higher resolution images as a dataset( Maybe 128x128 ) and then training the model on those images. (CelebA has 32x32 images)
-
DCGAN is not a typical network where reduction in loss will point towards a better model. I don't know why it isn't so I'm not sure if higher epochs makes the generaotor generate more accurate and realistic faces.
-
The dataset is biased. It is made of celebrity faces that are mostly white.Faces of people of All races and different countries should be included in the dataset. Also, we need to add more images in the dataset till it has almost equal number of white and non-white celebrity faces.
-
Model size matters. we have to ensure that our models reconginze and generate faces correctly. Deep models allow to catch some more characteristrics of the faces. For face generation task, we need to learn more complex features so we need a bigger network.
-
We can use different optimizers: SGD for the discriminator and keep Adam for the generator. Training for more epochs may also affect quality of final generated faces.
-
The photo angles are different. If all photos were taken from a similar angle it would have been easier for the network to train and to learn that faces are usually more or less symmetrical. (better feature extraction).