{"id":15700283,"url":"https://github.com/soumik12345/pix2pix","last_synced_at":"2025-10-14T18:10:34.796Z","repository":{"id":106256890,"uuid":"221079763","full_name":"soumik12345/Pix2Pix","owner":"soumik12345","description":"Image to Image Translation using Conditional GANs (Pix2Pix) implemented using Tensorflow 2.0","archived":false,"fork":false,"pushed_at":"2020-01-24T10:46:01.000Z","size":81740,"stargazers_count":29,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-12T13:12:03.840Z","etag":null,"topics":["activation-functions","cityscapes","conditional-gan","gan","google-maps","image-translation","keras","mish","pix2pix","tensorflow","tensorflow-pix2pix"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1611.07004","language":"Jupyter Notebook","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/soumik12345.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":"2019-11-11T22:14:17.000Z","updated_at":"2022-04-29T16:07:06.000Z","dependencies_parsed_at":"2023-06-26T00:31:08.831Z","dependency_job_id":null,"html_url":"https://github.com/soumik12345/Pix2Pix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soumik12345/Pix2Pix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2FPix2Pix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2FPix2Pix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2FPix2Pix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2FPix2Pix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soumik12345","download_url":"https://codeload.github.com/soumik12345/Pix2Pix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2FPix2Pix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020321,"owners_count":26086864,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["activation-functions","cityscapes","conditional-gan","gan","google-maps","image-translation","keras","mish","pix2pix","tensorflow","tensorflow-pix2pix"],"created_at":"2024-10-03T19:47:41.447Z","updated_at":"2025-10-14T18:10:34.759Z","avatar_url":"https://github.com/soumik12345.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pix2Pix\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/soumik12345/Pix2Pix/master)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/image-to-image-translation-with-conditional/image-to-image-translation-on-aerial-to-map)](https://paperswithcode.com/sota/image-to-image-translation-on-aerial-to-map?p=image-to-image-translation-with-conditional)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/image-to-image-translation-with-conditional/image-to-image-translation-on-cityscapes)](https://paperswithcode.com/sota/image-to-image-translation-on-cityscapes?p=image-to-image-translation-with-conditional)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/image-to-image-translation-with-conditional/image-to-image-translation-on-cityscapes-1)](https://paperswithcode.com/sota/image-to-image-translation-on-cityscapes-1?p=image-to-image-translation-with-conditional)\n[![HitCount](http://hits.dwyl.io/soumik12345/Pix2Pix.svg)](http://hits.dwyl.io/soumik12345/Pix2Pix)\n\n\nTensorflow 2.0 Implementation of the paper [Image-to-Image Translation using Conditional GANs](https://arxiv.org/abs/1611.07004) by [Philip Isola](https://arxiv.org/search/cs?searchtype=author\u0026query=Isola%2C+P), [Jun-Yan Zhu](https://arxiv.org/search/cs?searchtype=author\u0026query=Zhu%2C+J), [Tinghui Zhou](https://arxiv.org/search/cs?searchtype=author\u0026query=Zhou%2C+T) and [Alexei A. Efros](https://arxiv.org/search/cs?searchtype=author\u0026query=Efros%2C+A+A).\n\n\n## Architecture\n\n### Generator\n\n- The Generator is a Unet-Like model with skip connections between encoder and decoder.\n- Encoder Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (LeakyReLU)```\n- Decode Blocks is ```Conv2DTranspose -\u003e BatchNormalization -\u003e Dropout (optional) -\u003e Activation (ReLU)```\n\n![Generator Architecture](./assets/unet_like_generator.png)\n\n### Discriminator\n\n- PatchGAN Discriminator\n- Discriminator Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (LeakyReLU)```\n\n![Discriminator Architecture](./assets/patchgan_discriminator.png)\n\n## Loss Functions\n\n### Generator Loss\n\n![Generator Loss Equation](./assets/gen_loss.gif)\n\nThe Loss function can also be boiled down to\n\n```Loss = GAN_Loss + Lambda * L1_Loss```, where GAN_Loss is Sigmoid Cross Entropy Loss and Lambda = 100 (determined by the authors)\n\n### Discriminator Loss\n\nThe Discriminator Loss function can be written as\n\n```Loss = disc_loss(real_images, array of ones) + disc_loss(generated_images, array of zeros)```\n\nwhere `disc_loss` is Sigmoid Cross Entropy Loss.\n\n## Experiments with Standard Architecture\n\n### [Experiment 1](./Pix2Pix_Facades.ipynb)\n\n**Resource Credits:** Trained on Nvidia Quadro M4000 provided by [Paperspace Gradient](https://gradient.paperspace.com/).\n\n**Dataset:** [Facades](https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/facades.tar.gz)\n\n**Result:**\n\n![Experiment 1 Result](./assets/exp_1_gif.gif)\n\n### [Experiment 2](./Pix2Pix_Maps.ipynb)\n\n**Resource Credits:** Trained on Nvidia Quadro P5000 provided by [Paperspace Gradient](https://gradient.paperspace.com/).\n\n**Dataset:** [Maps](https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/maps.tar.gz)\n\n**Result:**\n\n![Experiment 2 Result](./assets/exp_2_gif.gif)\n\n### [Experiment 3](./Pix2Pix_Cityscapes.ipynb)\n\n**Resource Credits:** Trained on Nvidia Tesla V100 provided by [DeepWrex Technologies](https://deepwrex.com/).\n\n**Dataset:** [Cityscapes](https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/cityscapes.tar.gz)\n\n**Result:**\n\n![Experiment 3 Result](./assets/exp_3_gif.gif)\n\n## Experiments with Mish Activation Function\n\n### [Experiment 1 Mish](./Pix2Pix_Facades_Mish.ipynb)\n\n**Resource Credits:** Trained on Nvidia Quadro P5000 provided by [Paperspace Gradient](https://gradient.paperspace.com/).\n\n**Dataset:** [Facades](https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/facades.tar.gz)\n\n**Generator Architecture:**\n\n- The Generator is a Unet-Like model with skip connections between encoder and decoder.\n- Encoder Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (Mish)```\n- Decode Blocks is ```Conv2DTranspose -\u003e BatchNormalization -\u003e Dropout (optional) -\u003e Activation (Mish)```\n\n**Discriminator:**\n\n- PatchGAN Discriminator\n- Discriminator Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (Mish)```\n\n**Result:**\n\n![Experiment 1 Mish Result](./assets/mish_exp_1.gif)\n\n### [Experiment 2 Mish](./Pix2Pix_Maps_Mish.ipynb)\n\n**Resource Credits:** Trained on Nvidia Tesla P100 provided by [Google Colab](https://colab.research.google.com/).\n\n**Dataset:** [Facades](https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/maps.tar.gz)\n\n**Generator Architecture:**\n\n- The Generator is a Unet-Like model with skip connections between encoder and decoder.\n- Encoder Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (Mish)```\n- Decode Blocks is ```Conv2DTranspose -\u003e BatchNormalization -\u003e Dropout (optional) -\u003e Activation (Mish)```\n\n**Discriminator:**\n\n- PatchGAN Discriminator\n- Discriminator Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (ReLU)```\n\n**Result:**\n\n![Experiment 2 Mish Result](./assets/mish_exp_2.gif)\n\n### [Experiment 3 Mish](./Pix2Pix_Maps_Mish.ipynb)\n\n**Resource Credits:** Trained on Nvidia Quadro P5000 provided by [Paperspace Gradient](https://gradient.paperspace.com/).\n\n**Dataset:** [Facades](https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/maps.tar.gz)\n\n**Generator Architecture:**\n\n- The Generator is a Unet-Like model with skip connections between encoder and decoder.\n- Encoder Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (Mish)```\n- Decode Blocks is ```Conv2DTranspose -\u003e BatchNormalization -\u003e Dropout (optional) -\u003e Activation (Mish)``` for the first three blocks are ```Conv2DTranspose -\u003e BatchNormalization -\u003e Dropout (optional) -\u003e Activation (ReLU)```\n\n**Discriminator:**\n\n- PatchGAN Discriminator\n- Discriminator Block is ```Convolution -\u003e BatchNormalization -\u003e Activation (ReLU)```\n\n**Result:**\n\n![Experiment 3 Mish Result](./assets/mish_exp_3.gif)\n\n## References\n\nAll the sources cited during building this codebase are mentioned below:\n\n- [Image-to-Image Translation with Conditional Adversarial Networks](https://arxiv.org/pdf/1611.07004.pdf)\n- [https://github.com/phillipi/pix2pix](https://github.com/phillipi/pix2pix)\n- [Precomputed Real-Time Texture Synthesis with Markovian Generative Adversarial Networks](https://arxiv.org/abs/1604.04382)\n- [Mish: A Self Regularized Non-Monotonic Neural Activation Function](https://arxiv.org/abs/1908.08681)\n- [Tensorflow Pix2Pix](https://github.com/tensorflow/docs/blob/master/site/en/tutorials/generative/pix2pix.ipynb)\n- [Keras Pix2Pix](https://github.com/eriklindernoren/Keras-GAN/blob/master/pix2pix/pix2pix.py)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumik12345%2Fpix2pix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoumik12345%2Fpix2pix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumik12345%2Fpix2pix/lists"}