← all repositories
alexjc/neural-doodle

Style transfer that obeys your semantic doodles

It turns annotated doodles into paintings by matching semantically labeled patches from a style image onto your rough sketch.

neural-doodle
Not currently ranked — collecting fresh signals.
star history

What it does

doodle.py generates images by extracting patches from a source artwork and transferring them onto a target—typically your crude doodle—guided by semantic annotations. You provide a style image and a matching mask, plus optionally a content image and its own mask, and the algorithm iteratively rebuilds the target by finding compatible patches. It also works for plain style transfer or texture synthesis if you leave the masks behind.

The interesting bit

The twist is the semantic layer: instead of smearing style blindly across the canvas, it uses *_sem.png masks to keep sky patches in sky regions and trees in trees. This is an implementation of Champandard’s 2016 Semantic Style Transfer paper, built on the Neural Patches algorithm, which preserves coherent composition even when the source and target layouts differ.

Key highlights

  • Supports semantic style transfer, image analogies, and texture synthesis from a single script.
  • Runs on CPU by default, though the README warns this can take up to 12 hours on older hardware versus minutes on a CUDA GPU.
  • Exposes low-level controls like style-layers, semantic-weight, and smoothness for users willing to iterate.
  • Ships with a Docker image to avoid manually installing Theano and Lasagne.
  • Requires an 80 MB pre-trained VGG19 network to operate.

Caveats

  • The README is explicit that this is not a one-click toy: getting good results requires practice, manual parameter tuning, and careful preparation of input data and masks.
  • The underlying stack—Theano, Lasagne, and Python 3.4—is largely unmaintained today.
  • GPU memory requirements climb quickly with resolution; the README suggests 8–12 GB for larger outputs.

Verdict

Worth a look if you want granular control over style transfer and don’t mind babysitting masks and hyperparameters. Everyone else should probably use a modern diffusion-based tool and save the afternoon.

Frequently asked

What is alexjc/neural-doodle?
It turns annotated doodles into paintings by matching semantically labeled patches from a style image onto your rough sketch.
Is neural-doodle open source?
Yes — alexjc/neural-doodle is open source, released under the AGPL-3.0 license.
What language is neural-doodle written in?
alexjc/neural-doodle is primarily written in Python.
How popular is neural-doodle?
alexjc/neural-doodle has 9.8k stars on GitHub.
Where can I find neural-doodle?
alexjc/neural-doodle is on GitHub at https://github.com/alexjc/neural-doodle.

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