sketch-vectorization
Goal
The goal of this project is to implement the following paper: https://www-sop.inria.fr/reves/Basilic/2016/FLB16/fidelity_simplicity.pdf
We also implemented several new ideas, such as a convolutional neural network with synthetic data augmentation for preprocessing.
Demo
Guess what: the entire library can run in your browser !
If you want a guided tour of how the library works, go here:
If you just want to test it for yourself, with your own drawings, go here:
Install
The library is also available as a pip package:
pip install "sketchy-svg[onnx]"
# or use uv: uv add "sketchy-svg[onnx]"
There is no command line interface. You can easily build your own, to get inspiration look at src/sketchy_svg/viz inside the class Demo
Use locally
To install the dependencies, install uv and run:
uv sync --extra onnx
To launch the notebooks, run uv run marimo edit ., it should open the notebooks in your browser.
Train the CNN
The CNN denoiser can be trained from notebooks/cnn.py.
1. Install training dependencies
On a machine with a GPU (Linux, default CUDA torch):
uv sync --group train
On a CPU-only machine (e.g. your local machine):
uv sync --group train --extra cpu
2. Run the notebook
uv run marimo edit notebooks/cnn.py
Set USE_RAY = False to train locally, or USE_RAY = True to offload to a remote Ray cluster (set RAY_ADDRESS accordingly). The trained model is exported to src/sketchy_cnn/model.onnx at the end of the notebook.
How the SVG dataset is downloaded
data/svg_dataset.csv is tracked in git so no download is needed in most cases.
If you need to refresh it, the dataset comes from OmniSVG/MMSVG-Icon on HuggingFace. Create a token at https://huggingface.co/settings/tokens and add it to a .env file at the project root:
HF_TOKEN=hf_...
Then use the download button in notebooks/svg_dataset.py.
Documentation
If you want, you can read the Presentation
Metadata
Release files for sketchy-svg 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sketchy_svg-0.2.7.tar.gz | 270.6 kB | With provenance | Details for sketchy_svg-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sketchy_svg-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for sketchy_svg-0.2.7-py3-none-any.whl |
Total release size: 542.6 kB
Release files / sketchy_svg-0.2.7.tar.gz
| Download URL | sketchy_svg-0.2.7.tar.gz |
|---|---|
| Size | 270.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31bf9c8315fdeb938c70f61cb3e223dc9d1a87a99a0f8834f9d8fe94b6a77361
|
|
BLAKE2b-256 checksum How to use checksums |
b3c2ecb04ac4acfa012b7eaf1973370096544c7a496cd7dfe967c37c11367169
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logRelease files / sketchy_svg-0.2.7-py3-none-any.whl
| Download URL | sketchy_svg-0.2.7-py3-none-any.whl |
|---|---|
| Size | 272.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e79d3977c930bba83c106498d9512cef6dc45ad0513eac49bf66f408753d2948
|
|
BLAKE2b-256 checksum How to use checksums |
44299515aed51a3b3761c1a991c3bd2e517f0bba0388aef2b313592d93631c72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logSecurity for sketchy-svg 0.2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sketchy_svg-0.2.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.