← all repositories
carpedm20/DiscoGAN-pytorch

PyTorch DiscoGAN: teaching two image domains to translate each other, unsupervised

A clean PyTorch reimplementation of cross-domain image translation without paired training data.

1.1k stars Jupyter Notebook Image · Video · Audio
DiscoGAN-pytorch
Velocity · 7d
+0.3
★ / day
Trend
steady
star history

What it does DiscoGAN learns to map images between two visual domains—say, shoes and handbags, or edges and photos—without ever seeing a paired example. Two generators and two discriminators train in a loop: domain A → B → A and B → A → B, with reconstruction loss keeping the translations honest. The repo wraps the paper in straightforward PyTorch training and testing scripts.

The interesting bit The author notes their network structure differs slightly from the original SKTBrain implementation, and they own it upfront. The repetitive-generation chains (A→B→A→B→…) in the README samples are a nice sanity check: watch the image drift as the cycle compounds, which tells you how stable the latent space really is.

Key highlights

  • Supports standard pix2pix datasets (edges2shoes, cityscapes, maps, facades, etc.) plus custom A/B folder layouts
  • Includes a 2D toy Gaussian-mixture notebook for intuition
  • Multi-GPU support via --num_gpu flag
  • Reconstruction and repetitive-cycle visualizations baked into the result logging
  • ~1.1k stars, suggesting it was a popular reference implementation in the 2017 GAN translation wave

Caveats

  • Requires Python 2.7, which is end-of-life and increasingly painful to run
  • The author flags that facades results “look weird” and guesses MSE reconstruction loss may need tuning for dense segmentation tasks
  • Network architecture is explicitly “slightly different” from the paper’s official code; reproducibility purists should diff models.py

Verdict Worth a look if you’re studying classic unsupervised image-to-image translation or need a readable PyTorch reference from the pre-CycleGAN era. Skip it if you want production-ready code or modern Python 3 support out of the box.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.