{"id":19760447,"url":"https://github.com/inventwithdean/pix2pixhd","last_synced_at":"2026-02-02T12:41:06.880Z","repository":{"id":258080491,"uuid":"867976339","full_name":"inventwithdean/Pix2PixHD","owner":"inventwithdean","description":"A PyTorch implementation of Pix2PixHD to generate 1024x1024 HD images of Celebrities using sketches.","archived":false,"fork":false,"pushed_at":"2024-10-16T02:31:32.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T02:16:46.300Z","etag":null,"topics":["celeba-hq","imagegeneration","pix2pix-pytorch","pix2pixhd","pytorch"],"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/inventwithdean.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":"2024-10-05T06:28:42.000Z","updated_at":"2025-02-19T15:48:28.000Z","dependencies_parsed_at":"2024-10-18T04:50:29.696Z","dependency_job_id":null,"html_url":"https://github.com/inventwithdean/Pix2PixHD","commit_stats":null,"previous_names":["inventwithdean/pix2pixhd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/inventwithdean/Pix2PixHD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventwithdean%2FPix2PixHD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventwithdean%2FPix2PixHD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventwithdean%2FPix2PixHD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventwithdean%2FPix2PixHD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inventwithdean","download_url":"https://codeload.github.com/inventwithdean/Pix2PixHD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventwithdean%2FPix2PixHD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T10:37:29.253Z","status":"ssl_error","status_checked_at":"2026-02-02T10:37:28.644Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["celeba-hq","imagegeneration","pix2pix-pytorch","pix2pixhd","pytorch"],"created_at":"2024-11-12T03:37:20.480Z","updated_at":"2026-02-02T12:41:06.853Z","avatar_url":"https://github.com/inventwithdean.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pix2PixHD: Edges to Faces - CelebA-HQ\n\n(![Header image](https://github.com/user-attachments/assets/e69ff018-13cc-4cc1-b2a9-4b07e0037632)  \n\u003e *Generating photorealistic faces from edge maps using Conditional GANs (Pix2PixHD)*\n\n## 🌟 Overview\nWelcome to the **Pix2PixHD: Edges to Faces** project! In this repository, I’ve implemented and trained a modified **Pix2PixHD** model to generate high-resolution (1024x1024) photorealistic face images from edge maps using the **CelebA-HQ** dataset. This project extends the groundbreaking work presented in [“High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs”](https://arxiv.org/abs/1711.11585), providing an exciting tool for tasks such as sketch-based image synthesis and image editing.\n\n## 🚀 Results\nThe model takes edge maps as input and generates stunning, realistic face images. Below are some results from Phase 1 of training:\n\n| Input (Edge Map) | Output (Generated Image) |\n|:----------------:|:-----------------------:|\n| ![epoch_3_step_95800_img_1_sketch](https://github.com/user-attachments/assets/076678db-3f47-4e2a-a194-756126ff2df8) | ![epoch_3_step_95800_img_1_generated](https://github.com/user-attachments/assets/035fbd57-36a8-493c-a667-52b83ef3c9f5) |\n| ![epoch_3_step_97000_img_1_sketch](https://github.com/user-attachments/assets/89f19ea0-bfd9-4e58-b49d-2284c05e58fb) |  ![epoch_3_step_97000_img_1_generated](https://github.com/user-attachments/assets/c5e6d2e1-ff9b-461d-b275-56e08edbaaef) |\n| ![epoch_3_step_98000_img_1_sketch](https://github.com/user-attachments/assets/a21e2777-9034-4588-a6a8-eb9b66a82e02) | ![epoch_3_step_98000_img_1_generated](https://github.com/user-attachments/assets/a7bbf40b-7f1f-4e70-9cb8-13bbcd886831) |\n\n\n\n\nThese outputs are produced using Global Generator with **512x512** resolution, giving exceptional detail and realism!\n\n## 📄 Original Paper\nThis implementation is based on the paper [“High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs”](https://arxiv.org/abs/1711.11585) by Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, and others. Pix2PixHD builds on the standard Pix2Pix architecture to produce images with higher resolutions and fidelity, especially useful for tasks such as semantic image synthesis.\n\n## 📂 Project Structure\n- **`/data`**: Contains the dataset preprocessing scripts and edge map generation using Canny edge detection.\n- **`./`**: The core PyTorch implementation of Pix2PixHD, including Global Generator, Local Enhancer, and the multi-scale Discriminators.\n- **`/output`**: The generated outputs from the model.\n- **`train.py`**: Script for training the model on edge-to-image task.\n\n## ⚙️ How to Run\n\n### Prerequisites\nTo get started, make sure you have the following installed:\n- Python 3.12.x\n- PyTorch 2.4.x with CUDA\n\n### Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/inventwithdean/pix2pixhd.git\n    cd pix2pixhd\n    ```\n2. Download the **CelebA-HQ** dataset and place it in the `/data` folder. You can find it [here](https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html).\n3. Make sure you have all the faces inside `data/faces` folder. And create a directory `data/sketches`.\n4. Generating edge maps:\n    ```bash\n    python create_dataset.py\n    ```\n\n### Training\n\nTo train the model on the edge-to-face task, run:\n```bash\npython train.py\n```\nCreate directories `enhanced_checkpoints` and `global_checkpoints` for checkpointing.\n\n## 📊 Features\n- **High-Resolution Synthesis**: Generates 1024x1024 images from edge maps.\n- **Conditional GAN Architecture**: Uses multi-scale discriminators for improved realism.\n- **Instance-Level Control (WIP)**: Planned updates for fine-tuning specific features in generated images.\n  \n## 📝 Future Work\n- Instance-wise control for fine-grained editing of facial features.\n- Further improvements to training strategies for faster convergence.\n- Integration of new datasets for generalization beyond CelebA-HQ.\n\n## 🛠️ Contributing\nFeel free to fork this repo, submit issues, or make pull requests. Contributions are always welcome to improve the codebase!\n\n## 📬 Contact\nIf you have any questions or feedback, feel free to reach out to me via [LinkedIn](https://www.linkedin.com/in/inventwithdean) or open an issue on GitHub.\n\n## 💡 Acknowledgements\nThis work is inspired by the original **Pix2PixHD** implementation by [NVIDIA](https://github.com/NVIDIA/pix2pixHD) and the creators of the **CelebA-HQ** dataset.\n\n---\n\nEnjoy experimenting! If you like the project, don’t forget to give it a ⭐ on GitHub!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finventwithdean%2Fpix2pixhd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finventwithdean%2Fpix2pixhd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finventwithdean%2Fpix2pixhd/lists"}