Teaching neural nets to draw vector art, not just scribble
A PyTorch library and generative model that treats SVG paths as structured data rather than flattened pixels.

What it does DeepSVG is a NeurIPS 2020 research project that learns to generate and interpolate vector graphics—icons, fonts, simple drawings—using a hierarchical transformer-based VAE. It ships with a full PyTorch library for parsing, simplifying, augmenting, and tensorizing SVGs, plus pretrained models and a small experimental GUI built in Kivy.
The interesting bit
The real workhorse is the SVG-to-tensor pipeline. The library converts messy SVG commands down to a minimal subset (m/l/c/z), runs Ramer-Douglas-Peucker path simplification, and exports to differentiable SVGTensor objects. That means you can run gradient descent directly on Bézier control points to deform a circle into a dolphin, with fewer commands yielding surprisingly artistic approximations.
Key highlights
- Hierarchical generative model with pretrained checkpoints for icons and fonts
- Full SVG preprocessing pipeline: parsing, simplification, augmentation, tensorization
- Differentiable shape optimization via gradient descent on control points
- Jupyter notebooks covering interpolation, latent space arithmetic, animation, and font generation
- Experimental Figma-styled GUI for keyframe animation (export to GIF)
- 100k preprocessed icon dataset (SVG-Icons8) plus dataloader for custom SVG folders
Caveats
- The GUI is explicitly marked experimental and lacks basic editor features like rescaling; the authors recommend scripting animations instead
- Tested only on Ubuntu 18.04 / CUDA 10.1 and an older macOS/PyTorch-from-source setup, so modern environments may need coaxing
- Full dataset flexibility requires a paid Icons8 plan; the “coming soon” source-download instructions have been pending since 2020
Verdict Grab this if you’re doing research on structured generative models, neural vector graphics, or need a solid PyTorch SVG preprocessing toolkit. Skip if you want a polished, production-ready animation tool—the GUI is a demo, not a product.