← all repositories
yunjey/domain-transfer-network

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.

861 stars Python Image · Video · Audio
domain-transfer-network
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

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.py entrypoint
  • 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.sh dataset 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.

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