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.