https://github.com/zuruoke/race-cyclegan
Using the Powerful CycleGAN to translate image of different races from one race to another
https://github.com/zuruoke/race-cyclegan
Last synced: about 1 year ago
JSON representation
Using the Powerful CycleGAN to translate image of different races from one race to another
- Host: GitHub
- URL: https://github.com/zuruoke/race-cyclegan
- Owner: zuruoke
- Created: 2020-05-25T08:47:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-05T19:34:06.000Z (about 6 years ago)
- Last Synced: 2025-05-17T18:07:35.978Z (about 1 year ago)
- Language: Python
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Race-CycleGAN
This Project involves using the Powerful CycleGAN to translate image of different races from one race to another
Generative Adversarial Network (GAN) is the most interesting idea in the last 10 years quoted by Yann LeCun, regarded as the father of Convolutional Network
There are many variants of GANs including: Pix2PixGAN, InfoGAN, CycleGAN, StarGAN, Nvidia-backed StyleGAN etc.
I will adopt the CycleGAN.
So let's talk a little about the CycleGAN
CycleGAN performs image translation, that is, it transforms an image in a given domain to another domain.
The CycleGAN performs this image translation in absence of training pairs - it just learns the mappings between each domain and creates resemblence of the image relative to the domains
The ability to perform image translation with unpaired data makes it so powerful, unique and robust as most conditional GANs deal with paired data, e.g Pix2Pix
In order to accomplish image translation in absence of training pairs, CycleGAN introduces two (2) Discriminators & two (2) Generators with three losses losses associated with each of them:
- Forward Cycle Consistency Loss
- Backward Cycle Consistency Loss
- Identity Loss

In this project I'll adopt a powerful variant of GAN called [CycleGAN](https://arxiv.org/pdf/1703.10593.pdf) to build a model that can translate an image of a Negroid to a Mongoloid resemblance and vice-versa
- Mongoloid: includes people of Asian descent, especially Eastern Asian
- Negroid: includes people of African descent or black Americans
All 30,254 images was aggregated from [LFW](http://vis-www.cs.umass.edu/lfw/) and [Flickr](https://www.flickr.com/)
The Workflow for this kernel:
- Build an Input Data Pipeline for the Image preprocessing
- Build the two (2) Discriminator Model which introduces a PatchGAN
- Build the two (2) Generator Model inclusive of a bottleneck (Transformer)
- Configure the various Loss functions and set equitable hyperparameters λ
- Train the Model - first train the disriminators, freeze it and then train the generators
- Create an Inference Graph to test the model
# RESULTS



# CONCLUSION
The Resultant Images are kind of distorted because of the amount of training images used, hence I'll recommend [Nvidia StyleGAN](https://arxiv.org/pdf/1812.04948.pdf) for this kind of task with large amount of Images