← all repositories
fzliu/style-transfer

Turn your vacation photos into Van Gogh paintings, circa 2015

A faithful Caffe implementation of the original neural style transfer paper, back when this still required compiling a deep learning framework by hand.

1.5k stars Python Image · Video · Audio
style-transfer
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does

This repo implements the 2015 Gatys et al. paper that kicked off neural style transfer: you provide a content image and a style image, and it produces a new image that keeps the content of one while borrowing the artistic texture of the other. The actual neural network operations run through Caffe, with numpy and scipy handling the loss minimization via L-BFGS.

The interesting bit

The author did the unglamorous work of fixing Caffe’s prototxts so they actually work with this code, and bundled a model downloader that pulls VGG, GoogLeNet, or CaffeNet weights from the BVLC Model Zoo. It’s a time capsule of early deep learning tooling — Python 2.7, manual CUDA setup, and a single style.py file that does the whole job.

Key highlights

  • Single-file implementation (style.py) with minimal abstraction layers
  • Includes corrected Caffe network definitions that ship with the repo
  • Supports four pretrained architectures: VGG16, VGG19, GoogLeNet, CaffeNet
  • GPU acceleration via CUDA 6.5+ (described as “highly recommended,” not optional in practice)
  • Sample results show San Francisco, Nanjing, and Johannesburg reimagined through Starry Night

Caveats

  • Requires Caffe installation with proper Python bindings in PYTHONPATH; the README links to Caffe’s notoriously finicky build instructions
  • Python 2.7 requirement dates the project significantly
  • 500 L-BFGS iterations per sample suggests this is not fast, even on GPU

Verdict

Worth a look if you’re studying the history of generative deep learning or need a minimal, hackable reference implementation of the original paper. Skip it if you want modern speed — current tools run this in a browser tab.

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