PyTorch-SVGRender
WebPage

SVG Differentiable Rendering: Generating vector graphics using neural networks.

PyTorch-SVGRender Logo

SVG Differentiable Rendering

Pytorch-SVGRender is the go-to library for differentiable rendering methods for SVG generation.

Examples

Pytorch-SVGRender supports a variety of vectorization methods. Including: Image-to-SVG, Text-to-SVG, Text-to-Sketch
Bootstrap Themes

LIVE: Towards Layer-wise Image Vectorization
(CVPR 2022)


LIVE to convert raster images to SVGs and simultaneously maintain its image topology.

input raster image
LIVE iteration process
output SVG
online demo
online demo
online demo
online demo
online demo
online demo
input raster image
LIVE iteration process
output SVG
online demo
online demo
online demo
online demo
online demo
online demo

CLIPasso: Semantically-Aware Object Sketching
(SIGGRAPH 2022)


CLIPasso converts an image of an object to a sketch, allowing for varying levels of abstraction, while preserving its key visual features.

input raster image
CLIPasso iteration process
output SVG
online demo
online demo
online demo
input raster image
CLIPasso iteration process
output SVG
online demo
online demo
online demo

CLIPascene: Scene Sketching with Different Types and Levels of Abstraction
(ICCV 2023)


CLIPascene converts an image of scene image into a sketch using different types and multiple levels of abstraction.

online demo
online demo
online demo
online demo
online demo
online demo
ballerina, num_paths = 64.
online demo
online demo
online demo
online demo
online demo
online demo
ballerina, num_paths = 32.

CLIPDraw: Exploring Text-to-Drawing Synthesis through Language-Image Encoders
(NIPS 2022)


CLIPDraw synthesizes SVGs based on text prompts.

online demo
online demo
"A photo of the Mr. Bean"
online demo
online demo
"Astronaut on asteroid, galaxy background"
online demo
online demo
"A photo of a cat"

StyleCLIPDraw: Coupling Content and Style in Text-to-Drawing Synthesis


StyleCLIPDraw synthesizes SVG based on a text prompt and a reference image.

style image
StyleCLIPDraw iteration process
output SVG
online demo
online demo
online demo
Prompt: "Albert Einstein dancing."
style image
StyleCLIPDraw iteration process
output SVG
online demo
online demo
online demo
Prompt: "A sheep wearing a top hat."

CLIPFont: Texture Guided Vector WordArt Generation
(BMVC 2022)


StyleCLIPDraw styles vector fonts according to text prompts.

Input SVG

CLIPFont Rendering Process

Output SVG

online demo
online demo
online demo
Prompt: "Starry Night by Vincent van gogh."

VectorFusion: Text-to-SVG by Abstracting Pixel-Based Diffusion Models
(CVPR 2023)


VectorFusion synthesizes SVGs based on text prompts and supports three primitive styles.

Iconography

SD + LIVE + VectorFusion fine-tuning

Prompt Suffix: "minimal flat 2d vector icon. lineal color. trending on artstation."

panda_icon
panda_icon

Prompt: "A panda rowing a boat in a pond."

online demo
online demo

Prompt: "A drawing of a cat."

online demo
online demo
Prompt: "A chihuahua wearing a tutu."

Iconography

train from scratch via VectorFusion.

Prompt Suffix: "minimal flat 2d vector icon. lineal color. trending on artstation."

panda_icon
panda_icon

Prompt: "A panda rowing a boat in a pond."

panda_icon
panda_icon

"A colored mushroom growing on a log."

online demo
online demo
Prompt: "A fox playing the cello."

Pixel Art

train from scratch via VectorFusion.

Prompt Suffix: "pixel art. trending on artstation."

panda icon
panda icon

Prompt: "A panda rowing a boat in a pond."

starry
starry

Prompt: "A painting of a starry night sky."

3D cat
3D cat

"A cat as 3D rendered in Unreal Engine."


Sketch

train from scratch via VectorFusion.

Prompt Suffix: "minimal 2d line drawing. trending on artstation."

panda sketch
panda sketch

Prompt: "A panda rowing a boat in a pond."

online demo
online demo

Prompt: "The Eiffel Tower."

online demo
online demo

Prompt: "A 3D rendering of a temple."


DiffSketcher: Text Guided Vector Sketch Synthesis through Latent Diffusion Models
(NIPS 2023)


DiffSketcher synthesizes vector sketches based on text prompts.
It supports stroke width and color optimization. And extended additional style input to achieve style transfer.

sketch Sydney opera house
Sketch

Prompt: "A photo of Sydney opera house."

Sketch + stroke width optimization

Prompt: "A photo of Sydney opera house."

online demo
online demo
RGBA

Prompt: "A photo of Sydney opera house."



Word-As-Image for Semantic Typography
(SIGGRAPH 2023)


Word-As-Image follows a text prompt to style a letter in a word.

It injects the meaning of a word into its letter.

online demo
online demo

'Y' in "BUNNY".

online demo
online demo

'G' in "FROG".

online demo
online demo

'j' in "jazz".


SVGDreamer: Text Guided SVG Generation with Diffusion Model
(CVPR 2024)


SVGDreamer generates various styles of SVG based on text prompts.
It supports the use of six vector primitives, including Iconography, Sketch, Pixel Art, Low-Poly, Painting, and Ink and Wash.

Iconography


Prompt: "Sydney opera house. oil painting. by Van Gogh"

Oil Painting


Prompt: "a phoenix coming out of the fire drawing. lineal color. trending on artstation."



Acknowledgements

Thanks to academic research and engineering development in the field of SVG.

Project Authors
Ximing Xing and Juncheng Hu
Author Institution
Beihang University, School of Software
Another term
Contributions to the project are welcome!

PyTorch-SVGRender

We are dedicated to elevating PyTorch-SVGRender to the forefront of academic projects within the SVG community. Our aspiration is that this project will not only excel in academia but also prove beneficial to the industry. We remain steadfast in advancing the project further and invite the community to actively participate and contribute to PyTorch-SVGRender.