All projects

04 / Conditional generative vision

Image Colorization using Deep Learning

A cGAN pipeline that predicts vivid, context-aware color for grayscale photography without damaging the original image structure.

LAB
Color space
U-Net
Generator
PatchGAN
Discriminator
PSNR / SSIM
Evaluation

The challenge

Problem & approach

Pixel-wise regression tends to average uncertain colors into dull sepia tones, while deep encoders can let color bleed across object boundaries. Working in LAB space separates structure from color; adversarial training encourages vivid predictions and U-Net skip connections preserve precise edges.

PythonTensorFlowKerasOpenCVU-NetPatchGAN

VISUAL RESULT

Grayscale to context-aware color

Grayscale historic Indian street input demonstration
INPUT / L CHANNELStructure only
Realistically colorized historic Indian street output demonstration
cGAN / AB CHANNELSPredicted color

Generated demonstration example. Replace with a captured model output when final test samples are available.

Vibrant prediction

L1 and adversarial losses balance structural accuracy with plausible, committed color.

Clean boundaries

U-Net skip connections retain spatial detail so colors follow object edges.

System architecture

01

Separate

Convert training images to LAB and isolate the L channel from the target a and b colors.

02

Generate

Map luminance to color channels with a U-Net and high-resolution skip connections.

03

Judge

Use a PatchGAN discriminator to score local realism and discourage washed-out averages.

04

Recombine

Merge predicted color with source luminance and evaluate structural and signal fidelity.

Next case study

LawBot

View project