Portrait-to-line-art without the GAN drama
A deep-learning sketch generator that ditches adversarial training and still draws a decent Keanu.

What it does ArtLine turns portrait photos into line-art sketches. Feed it a face and it spits out something that looks like a pen-and-ink illustration. There’s also a newer ControlNet variant that takes a text prompt to nudge the style.
The interesting bit The author tried a GAN, found it didn’t help much, and simply… stopped using one. The model runs on a plain U-Net with self-attention and VGG16 perceptual loss, trained with progressive resizing. It also blends the APDrawing dataset with anime sketch pairs to handle poses beyond frontal ID-photo faces.
Key highlights
- No GAN, no critic — just perceptual loss and a U-Net generator
- Self-attention borrowed from DeOldify to sharpen facial details
- Progressive resizing during training for better generalisation
- Two Colab notebooks: a “Smooth” model and a higher-quality “AR” variant
- Fast.ai-based, pinned to fastai 1.0.61 and PyTorch 1.6.0
Caveats
- The author warns the code and docs are rough: “I’m not a coder, bear with me”
- Struggles with shadows (often misread as hair), busy backgrounds, and low-res inputs under 500px
- Pinned to fairly old dependencies; don’t expect to drop this into a modern PyTorch stack without friction
Verdict Worth a spin for artists, designers, or generative-art tinkerers who want quick line-art drafts. Skip it if you need production-grade reliability or a well-maintained dependency tree.
Frequently asked
- What is vijishmadhavan/ArtLine?
- A deep-learning sketch generator that ditches adversarial training and still draws a decent Keanu.
- Is ArtLine open source?
- Yes — vijishmadhavan/ArtLine is open source, released under the MIT license.
- What language is ArtLine written in?
- vijishmadhavan/ArtLine is primarily written in Jupyter Notebook.
- How popular is ArtLine?
- vijishmadhavan/ArtLine has 3.6k stars on GitHub.
- Where can I find ArtLine?
- vijishmadhavan/ArtLine is on GitHub at https://github.com/vijishmadhavan/ArtLine.