Turning street numbers into MNIST digits, no labels required
A clean TensorFlow reimplementation of a 2016 paper that learns to map images across visual domains without paired training examples.

What it does
This repo implements Domain Transfer Network (DTN), a GAN-based method that converts images from one visual domain to another—like SVHN (real-world house numbers) to MNIST-style digits—using only unlabeled data from each domain. You pretrain a feature extractor, then jointly train a generator and discriminator to perform the cross-domain translation.
The interesting bit
The trick is the “f-constancy” loss: the generator must preserve the high-level features extracted by a pretrained classifier, so a “3” stays a “3” even as its style changes. It’s an early example of what later became the cycle-consistency and style-transfer boom, but with a simpler, more direct constraint.
Key highlights
- Straightforward pipeline: pretrain → train → eval, with a single
main.pyentrypoint - Includes working SVHN→MNIST demo with animated and static results
- References the paper’s photo→emoji results (though emoji dataset isn’t provided)
- Clean, minimal codebase—easy to dissect if you’re studying the paper
- ~860 stars suggests it was a popular reference implementation in the 2016–2017 era
Caveats
- Locked to Python 2.7 and TensorFlow 0.12, both long past end-of-life
- The
download.shdataset script and emoji data aren’t verifiable from the README alone - No mention of training time, GPU requirements, or reproducibility notes
Verdict
Worth a look if you’re studying the history of unsupervised image translation or need a minimal, readable DTN reference. Skip it if you want something production-ready or modern—this is a 2016 paper implementation that hasn’t aged gracefully in its dependencies.