Contact Us
All Case Studies
Generative AI

Sketch-to-Photo Generation using GANs

Converting face sketches into realistic photos with a pix2pix-style GAN.

2025
OVERVIEW

The Project

A deep-learning pipeline that transforms human face sketches into full-colour, photo-realistic images using a Generative Adversarial Network. The generator maps sketches to RGB photos while the discriminator refines realism, trained on paired sketch-photo datasets in PyTorch.

Objectives

  • Train a GAN to reconstruct photo images from sketch input.
  • Use L1 loss + adversarial feedback for better image fidelity.
  • Generalize across validation images with normalized training data.
  • Tools & Technologies

    PyTorchTorchvisionMatplotlibPILCUDA
    METHODOLOGY

    The Approach

    1

    Pair grayscale sketches with their RGB photos via a custom dataset loader.

    2

    Generator: encoder–decoder CNN (3 conv + 3 deconv, BatchNorm, ReLU, Tanh).

    3

    Discriminator: CNN with LeakyReLU on the 4-channel sketch+photo input.

    4

    Train with BCE adversarial loss + L1 pixel loss (Adam), 100 epochs.

    OUTCOME

    Results & Learnings

  • Generated realistic faces capturing structure, contours and lighting.
  • Side-by-side per-epoch visualization tracked convergence.
  • Key Learnings

    • Combining pixel-based and adversarial objectives sharpens output.
    • Conditioned GAN training and data normalization are key to fidelity.
    CONTACT US

    Let's Discuss YourNext Project

    Ready to build something exceptional? Share your idea and we'll respond with a clear plan, honest timeline, and competitive quote within 24 hours.