{"id":39336931,"url":"https://github.com/vahid0001/tiny-pix2pix","last_synced_at":"2026-01-18T02:13:07.034Z","repository":{"id":191858497,"uuid":"204555791","full_name":"vahid0001/tiny-pix2pix","owner":"vahid0001","description":"Redesigning the Pix2Pix model for small datasets with fewer parameters and different PatchGAN architecture","archived":false,"fork":false,"pushed_at":"2025-10-18T14:34:14.000Z","size":1244,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-19T08:48:59.587Z","etag":null,"topics":["gan","generative-adversarial-network","patchgan","pix2pix","pix2pix-model","tinypix2pix","unet"],"latest_commit_sha":null,"homepage":"","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/vahid0001.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}},"created_at":"2019-08-26T20:27:30.000Z","updated_at":"2025-10-18T14:34:18.000Z","dependencies_parsed_at":"2023-09-01T06:28:32.426Z","dependency_job_id":null,"html_url":"https://github.com/vahid0001/tiny-pix2pix","commit_stats":null,"previous_names":["vrkh1996/tiny-pix2pix","vahid0001/tiny-pix2pix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vahid0001/tiny-pix2pix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahid0001%2Ftiny-pix2pix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahid0001%2Ftiny-pix2pix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahid0001%2Ftiny-pix2pix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahid0001%2Ftiny-pix2pix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vahid0001","download_url":"https://codeload.github.com/vahid0001/tiny-pix2pix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahid0001%2Ftiny-pix2pix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["gan","generative-adversarial-network","patchgan","pix2pix","pix2pix-model","tinypix2pix","unet"],"created_at":"2026-01-18T02:13:06.965Z","updated_at":"2026-01-18T02:13:07.025Z","avatar_url":"https://github.com/vahid0001.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tiny-pix2pix\n\nTiny Pix2Pix is a compact PyTorch re-implementation of the pix2pix image-to-image translation model designed for small images such as CIFAR-10. The project provides a lightweight U-Net generator, a PatchGAN discriminator, and a training pipeline that follows modern PyTorch best practices.\n\n## Getting started\n\n### Installation\n\nCreate and activate a virtual environment, then install the project dependencies:\n\n```\npip install -r requirements.txt\n```\n\nIf you already have PyTorch and torchvision installed, you can skip reinstalling them by running:\n\n```\npip install -r requirements.txt --no-deps\n```\n\n### Training\n\nThe training script downloads CIFAR-10 automatically and trains the Tiny Pix2Pix model by pairing each image with itself, replicating the behaviour of the original demonstration script:\n\n```\npython train.py --epochs 5 --batch-size 8 --dataset-root ./data --device cuda\n```\n\nModel checkpoints are stored in the `models/` directory by default. Use `python train.py --help` to inspect all available options.\n\n## Important links\n\n- [Original paper](https://arxiv.org/abs/1611.07004)\n- [Project page](https://phillipi.github.io/pix2pix/)\n\n## Model Architecture\n\n### Generator\n\nU-Net: The generator in pix2pix resembles an auto-encoder. The Skip Connections in the U-Net differentiate it from a standard Encoder-decoder architecture. The generator takes in the Image to be translated and compresses it into a low-dimensional, “Bottleneck”, vector representation. The generator then learns how to upsample this into the output image. The U-Net is similar to ResNets in the way that information from earlier layers are integrated into later layers. The U-Net skip connections are also interesting because they do not require any resizing, projections etc. since the spatial resolution of the layers being connected already match each other.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"U-Net.png\"\u003e\n\u003c/p\u003e\n\n### Discriminator\n\nPatchGAN: The discriminator used in pix2pix is another unique component to this design. The PatchGAN works by classifying individual (N x N) patches in the image as “real vs. fake”, opposed to classifying the entire image as “real vs. fake”. The authors reason that this enforces more constraints that encourage sharp high-frequency detail. Additionally, the PatchGAN has fewer parameters and runs faster than classifying the entire image.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"PatchNet.png\"\u003e\n\u003c/p\u003e\n\n### tiny-pix2pix\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"tiny_pix2pix.png\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahid0001%2Ftiny-pix2pix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvahid0001%2Ftiny-pix2pix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahid0001%2Ftiny-pix2pix/lists"}