alexandre01/deepsvg

[NeurIPS 2020] Official code for the paper "DeepSVG: A Hierarchical Generative Network for Vector Graphics Animation". Includes a PyTorch library for deep learning with SVG data.

What it solves

DeepSVG addresses the difficulty of generating and animating vector graphics (SVG) using deep learning. Unlike raster images (pixels), SVGs are composed of mathematical paths and commands, making them harder for standard neural networks to process and animate smoothly.

How it works

The project implements a Hierarchical Generative Network that can learn the structure of vector graphics. It includes a specialized library that parses SVG files, simplifies paths using algorithms like Ramer-Douglas-Peucker, and converts SVG data into differentiable PyTorch tensors. This allows the model to perform latent space operations, such as interpolating between two different icons to create a smooth animation or optimizing a shape to match a target via gradient descent.

Who it’s for

  • AI researchers focusing on generative models for vector graphics.
  • Developers building tools for 2D animation and graphic design.
  • Data scientists working with SVG datasets and differentiable geometry.

Highlights

  • Hierarchical Generative Network: A model designed specifically for the structured nature of vector graphics animation.
  • SVG Deep Learning Library: Tools for parsing, simplifying, augmenting, and converting SVGs to PyTorch tensors.
  • Differentiable Optimization: Ability to deform shapes to match targets using gradient descent.
  • Experimental GUI: A Figma-inspired interface for visualizing model outputs and creating 2D animations.
  • Pre-processed Datasets: Includes the SVG-Icons8 and Font datasets for immediate reproduction.

Related

  • Project
  • Project
  • Project
  • Project