All models

ArtLine

A U-Net generator with self-attention that converts a portrait photo into a line art drawing.

Diffusion and generative · 292 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (453 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
41.4M
Operations
292
Framework
PyTorch
Recurrent
No
Published
2020, GitHub
Authors
Vijish Madhavan
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14721
Graph hash
1235c9427be975f414b3f3c73c744b777b3c9d0a002a89724e0d439ed9a5e6d2
Skeleton hash
f6baf3566939b51b6c71ad3c68e5baa84d67b84362ec58e71a90358038bb5d43
Architecture hash
fa01e47b0ccb64c40ca2d9d8123f83b8c32375a9140ad2e6f5a5078f6df5d470
Diagram SHA-256
eadf739d1ee7cf4de2cbfba3c30185fa88ad45a93aa7150c4b31c4cd412e6117
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

ArtLine converts a portrait photo into a line art drawing. The author set out to handle any pose, where the earlier APDrawingGAN was limited to frontal face photos similar to ID photos.

The generator is a pretrained U-Net with spectral normalization and self-attention, a combination the author took from Jason Antic's DeOldify. Its loss is a perceptual (feature) loss based on VGG16. Training used progressive resizing, in which the image size was gradually increased and the learning rates adjusted. There is no critic and no GAN stage: the author reports that a GAN did not make much of a difference.

The training data combined the APDrawing dataset with selected photos from the Anime sketch colorization pair dataset, because the APDrawing dataset alone was not enough to learn the lines. The author lists limitations of the released model: it confuses shadows with hair and does badly with low quality images below 500px.

Key idea. ArtLine is a U-Net generator with spectral normalization and self-attention, trained with a VGG16 perceptual loss and no GAN critic, that converts portrait photos into line art.

  • artline
  • line art
  • line art portraits
  • photo to line art
  • portrait line drawing
  • sketch generation
  • nogan
  • image-to-image translation

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{artline2020,
  title = {ArtLine},
  author = {Vijish Madhavan},
  year = {2020},
  journal = {GitHub}
}