Phase 0: Generative AI Foundations · ~75 minutes · Python
Conditional GANs & Pix2Pix
The first big unlock of 2014-2017 was controlling what a GAN makes. Attach a label, or an image, or a sentence. Pix2Pix did the image version and it still beats every generic text-to-image model on narrow image-to-image tasks.
Hiring signal: Understanding of conditional gans & pix2pix internals
What you will learn
- Implement conditional gans & pix2pix from scratch
- Understand the math and intuition behind the algorithm
- Use production libraries for the same task
- Ship a reusable artifact
Introduction
Type: Build Languages: Python Prerequisites: Phase 8 · 03 (GANs), Phase 4 · 06 (U-Net), Phase 3 · 07 (CNNs) Time: ~75 minutes
The Problem
An unconditional GAN samples arbitrary faces. Useful for a demo, useless in production. You want: map a sketch to a photo, map a map to an aerial photo, map a daytime scene to nighttime, colorize a grayscale image. In all of these, you are given an input image x and must output y with some semantic correspondence. There are many plausible ys per x. Mean-squared error flattens them into mush. An adversarial loss doesn't, because "looks real" is sharp.
Conditional GAN (Mirza & Osindero, 2014) adds a condition c as an input to both G and D. Pix2Pix (Isola et al., 2017) specialized this: condition is a full input image, generator is a U-Net, discriminator is a patch-based classifier (PatchGAN), and loss is adversarial + L1. That recipe outperforms from-scratch text-to-image models on narrow image-to-image domains even in 2026 because it is trained on paired data — you have exactly the signal you need.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Concept, CycleGAN — when you don't have pairs, Build It, Pitfalls, Use It, Ship It, Exercises, Key Terms, Production note: Pix2Pix as a latency-bound baseline, Further Reading — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy