{"id":18644853,"url":"https://github.com/zuruoke/race-cyclegan","last_synced_at":"2025-06-23T02:07:44.803Z","repository":{"id":113055767,"uuid":"266729396","full_name":"zuruoke/Race-CycleGAN","owner":"zuruoke","description":"Using the Powerful CycleGAN to translate image of different races from one race to another","archived":false,"fork":false,"pushed_at":"2020-06-05T19:34:06.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-17T18:07:35.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zuruoke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-25T08:47:47.000Z","updated_at":"2023-11-07T15:47:28.000Z","dependencies_parsed_at":"2023-06-07T14:15:22.100Z","dependency_job_id":null,"html_url":"https://github.com/zuruoke/Race-CycleGAN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zuruoke/Race-CycleGAN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuruoke%2FRace-CycleGAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuruoke%2FRace-CycleGAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuruoke%2FRace-CycleGAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuruoke%2FRace-CycleGAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zuruoke","download_url":"https://codeload.github.com/zuruoke/Race-CycleGAN/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuruoke%2FRace-CycleGAN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261397374,"owners_count":23152490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T06:13:50.117Z","updated_at":"2025-06-23T02:07:39.794Z","avatar_url":"https://github.com/zuruoke.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Race-CycleGAN\nThis Project involves using the Powerful CycleGAN to translate image of different races from one race to another\nGenerative Adversarial Network (GAN) is the most interesting idea in the last 10 years quoted by Yann LeCun, regarded as the father of Convolutional Network\n\nThere are many variants of GANs including: Pix2PixGAN, InfoGAN, CycleGAN, StarGAN, Nvidia-backed StyleGAN etc. \nI will adopt the CycleGAN.\n\n\nSo let's talk a little about the CycleGAN\n\nCycleGAN performs image translation, that is, it transforms an image in a given domain to another domain. \n\nThe 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\n\nThe 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\n\n\n\nIn order to accomplish image translation in absence of training pairs, CycleGAN introduces two (2) Discriminators \u0026 two (2) Generators with three losses losses associated with each of them:\n- Forward Cycle Consistency Loss\n- Backward Cycle Consistency Loss\n- Identity Loss\n\n![cycle_loss](https://user-images.githubusercontent.com/51057490/83192850-056fc500-a12e-11ea-9118-01417ead05ca.png)\n\nIn 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\n\n- Mongoloid: includes people of Asian descent, especially Eastern Asian \n \n- Negroid: includes people of African descent or black Americans\n\nAll 30,254 images was aggregated from [LFW](http://vis-www.cs.umass.edu/lfw/) and [Flickr](https://www.flickr.com/)\n\nThe Workflow for this kernel:\n\n- Build an Input Data Pipeline for the Image preprocessing\n- Build the two (2) Discriminator Model which introduces a PatchGAN\n- Build the two (2) Generator Model inclusive of a bottleneck (Transformer)\n- Configure the various Loss functions and set equitable hyperparameters λ\n- Train the Model - first train the disriminators, freeze it and then train the generators \n- Create an Inference Graph to test the model\n\n# RESULTS\n\n![g11](https://user-images.githubusercontent.com/51057490/83197329-3acbe100-a135-11ea-8192-88963453c751.JPG)\n\n![17](https://user-images.githubusercontent.com/51057490/83197476-723a8d80-a135-11ea-981a-0c3a73f452fa.JPG)\n![zre](https://user-images.githubusercontent.com/51057490/83197429-5e8f2700-a135-11ea-9c7b-b5440dd41ac3.JPG)\n\n# CONCLUSION\n\nThe 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  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuruoke%2Frace-cyclegan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuruoke%2Frace-cyclegan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuruoke%2Frace-cyclegan/lists"}