# BachiLi/diffvg

Differentiable Vector Graphics Rasterization

Repository: https://github.com/BachiLi/diffvg
Canonical: https://ross.abutalabs.com/products/diffvg
Homepage: https://people.csail.mit.edu/tzumao/diffvg/
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2025-05-17T06:47:01+00:00

## Health v2 (maintenance only)
Score: 42/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 22, release rhythm 35, longevity 100
- inputs: {"age_days": 2190, "days_push": 473, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1268, forks 210 (observed 2026-08-28T04:04:11.444322+00:00)

## What it is
diffvg is a differentiable rasterizer for 2D vector graphics that bridges the raster and vector domains via backpropagation. It computes pixel gradients with respect to curve parameters, enabling optimization and machine learning on vector content.

## Use cases
- fit vector shapes to a target image with gradient descent
- painterly rendering by fitting bezier curves to a photo
- optimize svg parameters against raster image losses
- train neural networks that generate vector graphics
- interactive vector editing guided by image metrics
- vectorize images with differentiable optimization

## When to choose
- you need gradients of rasterized images with respect to vector shape parameters
- you are doing research in differentiable rendering or vector graphics generation
- you want to fit svg primitives to images using perceptual losses

## When to avoid
- you just need fast non-differentiable svg rendering
- you need a production vector graphics editor
- you are not working in a PyTorch-based workflow

## Facets
- artifact type: library
- maturity: active
- function: graphics, image-processing, machine-learning, parser
- domain: graphics, machine-learning, computer-vision
- platform: python, cpp, cross-platform
- tags: differentiable-rendering, vector-graphics, svg, pytorch, rasterization, computer-graphics, research, gpu

## Member repositories
- BachiLi/diffvg (main) score 42

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:11.444322+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:03:35.071272+00:00, confidence not recorded.
  - readme: https://github.com/BachiLi/diffvg (fetched 2026-08-28T04:04:11.444322+00:00, sha ebb7f9eb4e61)
  - homepage: https://people.csail.mit.edu/tzumao/diffvg/ (fetched 2026-08-29T12:15:28.030832+00:00, sha c31b3fb58c73)
- Data as of 2026-08-30T08:39:29.467469+00:00.
