Skip to content

dkshah25/PRODIGY_GA_04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pix2Pix Image-to-Image Translation using cGAN

This project implements a Pix2Pix model using Conditional GANs (cGAN) for image-to-image translation. The task was completed as part of my internship with Prodigy InfoTech. The dataset used is the CMP Facade dataset, where the model learns to translate building facade labels into realistic building images.


πŸ“Œ Project Objective

  • Implement Pix2Pix using a Conditional GAN (cGAN).
  • Perform paired image-to-image translation using a pre-trained dataset.
  • Visualize results: input image, ground truth, and predicted image.

🧠 Technologies Used

  • Python
  • TensorFlow
  • Google Colab
  • Matplotlib
  • CMP Facades Dataset

πŸ“ Dataset

  • Dataset: CMP Facades
  • Format: Paired images (labels and facades)
  • Structure:
    facades/
    β”œβ”€β”€ train/
    β”œβ”€β”€ test/
    └── val/
    

βš™οΈ Steps Performed

  1. βœ… Set up environment (TensorFlow, image utils)
  2. βœ… Downloaded and extracted the CMP Facades dataset
  3. βœ… Preprocessed paired images: resizing, normalization
  4. βœ… Built Generator and Discriminator models
  5. βœ… Trained model using cGAN loss and generator loss
  6. βœ… Visualized predictions (input vs ground truth vs generated)
  7. βœ… Saved sample result to results/epoch_20_sample.png

πŸ–ΌοΈ Sample Output

Input Image Ground Truth Predicted Image
input gt pred

(Note: All 3 images in a row are included in the single output image)


πŸ“¦ How to Run

  1. Clone this repository:

    git clone https://github.com/your-username/pix2pix-facades.git
    cd pix2pix-facades
  2. Upload to Google Colab or run locally with GPU.

  3. Install dependencies (if running locally):

    pip install tensorflow matplotlib
  4. Run pix2pix_facades.ipynb step by step.


πŸ“ Folder Structure

pix2pix-facades/
β”œβ”€β”€ facades/                   # Dataset folder
β”‚   β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ test/
β”‚   └── val/
β”œβ”€β”€ results/
β”‚   └── epoch_20_sample.png    # Output image
β”œβ”€β”€ pix2pix_facades.ipynb      # Main notebook
└── README.md

βœ… Internship Task Completed

This repository was created for the "Image-to-Image Translation with cGANs" task of my Generative AI Internship at Prodigy InfoTech.


πŸ™‹β€β™‚οΈ Author

Dharmit Shah
LinkedIn β€’ GitHub


πŸ“ƒ License

This project is open-source and free to use for educational purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published