Skip to content
CAI
Software that uses CAICheck a score

visioncortex/vtracer

43.8

Weak · 29 September 2026

7.3k

lines of production code

Rust

with JavaScript

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

VTracer is a modular raster-to-vector image conversion library that transforms pixel data into SVG graphics using configurable segmentation, color fitting, and curve fitting stages. It supports multiple output modes, including traditional stacked layers and a new mosaic mode for seamless tessellation, while offering adaptive thresholding and hierarchical watershed clustering for precise control. The system is distributed as a Rust core with bindings for Python and Node.js, alongside a CLI tool and a web application for interactive use.

How it got here

2020 — Web application initial release

4 changes.

This period focused on the initial release of the VTracer web application, establishing the core Rust-based webapp module and its integration with WebAssembly. It introduced the primary image-to-SVG conversion engine, featuring support for binary and color modes, cutout transparency, and various curve-fitting algorithms. The work also included updating the Rust dependency ecosystem to support the new web interface and WASM bindings.

2026 — modular framework and multi-language bindings

12 changes.

VTracer was refactored into a modular vectorization framework featuring mosaic compositing, adaptive thresholding, and hierarchical watershed segmentation. This core rewrite was accompanied by the release of Python and Node.js WebAssembly bindings, alongside new CLI controls and automated publishing infrastructure.

Features

Added automated release publishing script

A new \scripts/publish.sh\ script has been added to automate the release process for vtracer. This tool handles publishing the library to crates.io (including vtracer-cli and vtracer-bench), the npm registry (@visioncortex/vtracer), and creating a GitHub release. It is designed to be idempotent, skipping steps that have already been completed, and supports a dry-run mode for verification before actual publication.

scripts · high confidence

Added local-publish script for Node package

A new \nodejs/scripts/publish.mjs\ script has been added to streamline the publishing process for the Node.js package. This tool automates the workflow by first building the WebAssembly package using \wasm-pack\, running a sanity check via \test.js\, and then publishing to an npm registry. By default, it targets a local Verdaccio instance at \http://localhost:4873\, but users can override the registry via the \--registry\ argument or the \NPM\_REGISTRY\ environment variable. The script also supports a \--dry-run\ mode to build and pack the package without actually publishing it.

nodejs/scripts · high confidence

Initial release of the VTracer web application

The VTracer web app is now available, allowing users to drag-and-drop or paste raster images to convert them into scalable vector graphics (SVG). The interface provides controls for clustering modes (Binary, Color, Cutout, Stacked), speckle filtering, color precision, and curve-fitting algorithms (Pixel, Polygon, Spline) with adjustable thresholds. Users can download the resulting SVG files and explore preset sample images. The application is built using Webpack with async WebAssembly support and relies on the 'vtracer' library for the core conversion logic.

webapp, webapp/app · high confidence

Initial release of the webapp source module

This change introduces the initial source code for the webapp module, establishing the core structure for the Rust-based web application. It includes a canvas module for interacting with the HTML5 Canvas API to retrieve image data, an SVG module for rendering compound paths with specific color and precision attributes, and utility modules for common DOM access and panic handling. The library entry point initializes the WASM environment and sets up logging.

webapp/src · high confidence

Introduce Node.js WebAssembly package for raster-to-vector conversion

Users can now install the \@visioncortex/vtracer\ npm package to convert raster images (PNG, JPEG, GIF, BMP) and raw RGBA buffers into SVG vector graphics directly in Node.js. The package uses a WebAssembly build with no native dependencies, exposing \convertBuffer\, \convertPixels\, \convertFile\, and \convertFileSync\ methods. It supports configurable presets (bw, poster, photo), clustering modes (color-cluster, bw, watershed), hierarchical output styles, and advanced binary thresholding options like Bradley–Roth adaptive thresholding.

nodejs · high confidence

Introduce Python bindings for VTracer

Added a new Python package (\vtracer\) that provides a Pythonic API for raster-to-vector image conversion. Users can now install the library via pip and use high-level functions like \convert\_file\, \convert\_bytes\, and \convert\_pixels\ to generate SVG output. The bindings expose a \Config\ object allowing fine-grained control over tracing parameters such as clustering mode, color palette, simplification tolerance, and hierarchical cutout settings, along with presets for black-and-white, poster, and photo styles.

crates/vtracer-py · high confidence

Introduce Python bindings for the vtracer vectorization library

This change adds a new Python package (\vtracer\) that exposes the core vectorization engine to Python users. It provides a \Config\ class for tuning parameters such as clustering mode, hierarchical style, color palette, and simplification thresholds, along with convenience functions like \convert\_file\ and \convert\_bytes\ to generate SVG output from image inputs.

crates/vtracer-py/src · high confidence

Introduce vtracer-bench for blind raster-to-vector fidelity assessment

A new benchmarking tool, vtracer-bench, is available to evaluate the visual fidelity of raster-to-vector tracing results. It compares an original raster image against a rendered reconstruction (e.g., from an SVG) to produce a single composite fidelity score in the range \[0, 1\]. This score is derived from a weighted geometric mean of three metrics: PSNR (pixel-level accuracy), SSIM (perceptual structure), and a 'patch' metric that detects coherent missing regions often missed by global averages. The tool provides both a CLI for quick comparisons and a Rust library API for integration into automated testing pipelines.

crates/vtracer-bench · high confidence

New image-to-SVG conversion engine with cutout mode and key transparency

The webapp now includes a new conversion module (binary\_image.rs, color\_image.rs) that transforms canvas images into SVG paths using the visioncortex library. Users can convert binary (black-and-white) images or full-color images, with options to control path simplification (polygon, spline, none), corner/length thresholds, and path precision. A key new capability is 'cutout' mode for color images, which preserves transparent areas by treating them as cutouts rather than discarding them, enabled via the 'hierarchical' parameter. The converter processes images in stages (clustering, optional reclustering for cutouts, vectorization) and exposes progress tracking.

webapp/src/conversion · high confidence

New mosaic mode for seam-free tessellation

A new mosaic rendering mode has been added to vtracer, enabling the generation of seamless, gap-free vector tessellations from pixel or polygon inputs. This feature introduces a multi-stage pipeline that extracts a boundary graph from the segmentation, assembles connected region patches into faces, and fits shared boundary segments using configurable fitters (pixel-accurate, polygonal, or cubic Bézier splines). By fitting each shared boundary exactly once and caching the result for adjacent faces, the output ensures bitwise identical geometry on both sides of every seam, eliminating gaps or overlaps. The mode also supports curve simplification passes and handles complex topologies, including disjoint region patches and holes, by assigning each disjoint patch its own face.

crates/vtracer/src/mosaic · high confidence

VTracer rewritten as a modular vectorization framework with mosaic compositing and interactive tuning

VTracer is now a modular framework where the conversion pipeline is composed of swappable stages (frontend, color fitting, curve fitting, compositing, optimization, and SVG writing). Users can now choose between traditional stacked layering and a new mosaic mode that produces seam-free, gapless tessellations by sharing boundary geometry between adjacent regions. The library introduces multiple region-forming algorithms, including hierarchical color clustering, binary thresholding (with tunable fixed and Bradley–Roth adaptive options), and a new hierarchical watershed clustering. Curve fitting supports pixel, polygon, and spline modes, with an additional curve simplification stage for smoother results. To support interactive tuning, the pipeline is split into a cacheable segmentation phase and a re-runnable finish phase, managed by a Session that automatically re-segments only when clustering parameters change. The library also adds progress reporting and cancellation support for long-running conversions.

crates/vtracer/src · high confidence

Behavioural changes

CLI accepts positional input/output arguments and exposes new vectorization controls

The vtracer command-line interface now accepts input and output file paths as positional arguments (in addition to the existing --input and --output flags), streamlining usage. It also introduces several new options for controlling the vectorization process: --simplify for curve simplification with a tolerance parameter, --adaptive for Bradley–Roth adaptive thresholding in binary mode, and --watershed-detail to control the hierarchy cut level for watershed clustering. The --filter-speckle cap has been raised to 128 pixels. Additionally, fine-tuning flags like --corner-threshold, --segment-length, and --splice-threshold are now hidden from the help output to reduce clutter, as they are considered advanced knobs.

crates/vtracer-cli · high confidence

New vectorization frontends with adaptive thresholding and hierarchical watershed segmentation

The binary and color vectorization paths have been rewritten with new configurable frontends. The binary path now supports Bradley–Roth adaptive thresholding (in addition to the existing fixed cutoff) to handle uneven lighting, and includes tunable speckle removal. The color path introduces a hierarchical watershed segmentation frontend that builds a region hierarchy by volume extinction and cuts it at a user-controlled detail level, offering an alternative to the classic color-clustering approach. Both frontends support progress reporting and cancellation during segmentation.

crates/vtracer/src/frontend · high confidence

Optimized layer merging and perceptual color quantization

The vectorization pipeline now merges consecutive layers with identical colors in a single pass using a new \RegionMask::union\_all\ method, significantly reducing shape count and memory allocations compared to the previous pairwise approach. Additionally, color fitting has been enhanced with OKLab-based distance metrics for more perceptually accurate palette snapping, and a new area-weighted median-cut quantizer (\AutoQuantize\) is available to automatically reduce the color palette to a specified maximum number of representative colors.

crates/vtracer/src/colorfit, crates/vtracer/src/ir · high confidence

Test coverage

Added comprehensive test suite for vtracer pipeline and segmentation

Added a new test suite in \crates/vtracer/tests\ that validates the vectorization pipeline's core behaviors. The tests verify that binary thresholding (both fixed and Bradley–Roth adaptive) correctly selects foreground pixels, and that the pipeline produces valid SVG output across all fit modes (Pixel, Polygon, Spline), clustering strategies (Color, Binary, Watershed), and hierarchical modes (Stacked, Cutout). The suite includes golden-snapshot tests that compare rendered output to ensure visual consistency across architectures, and equivalence tests confirming that stacked and mosaic (cutout) modes produce identical interior pixels. It also covers the new \Session\ caching mechanism, verifying that finish-phase parameter changes reuse the segmentation cache while clustering changes trigger re-segmentation, and validates the new curve-simplification stage's ability to reduce anchor counts.

crates/vtracer/tests · high confidence

Dependencies

Update Rust dependencies and lockfile for vtracer workspace

This change updates the Rust dependency ecosystem for the vtracer project, introducing a new \Cargo.lock\ file to track the workspace's resolved dependencies. Key updates include upgrading \pyo3\ to version 0.26 for the Python bindings, \visioncortex\ to 0.9.3 for the core vectorization logic, and \image\ to 0.25 across the CLI, Python, and Node.js packages. The workspace also adopts the Rust 2024 edition and pins \flo\_curves\ to 0.8, while the Node.js package is scoped to \@visioncortex/vtracer\ and built with \wasm-bindgen\.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 49 → 44 (-5.4)
  • Rubric changed (rubric-2026.09.9 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 90 → 91 (+0.2)
  • Architecture 100 → 97 (-2.6)
  • Maturity 64 → 64 (+0.0)
  • Readiness 63 → 37 (-26.6)
  • Security 68 → 80 (+12.7)
  • Accessibility 26 → 27 (+0.9)
  • Performance 100 (new)

Resolved (8)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • High CVE: [CVE redacted] (webapp/app/package-lock.json)
  • High CVE: [CVE redacted] (webapp/app/package-lock.json)
  • High CVE: [CVE redacted] (webapp/app/package-lock.json)
  • High CVE: [CVE redacted] (webapp/app/package-lock.json)
  • High CVE: [CVE redacted] (webapp/app/package-lock.json)
  • Hotspot: crates/vtracer/src/mosaic/face.rs (crates/vtracer/src/mosaic/face.rs)

New (8)

  • Ambiguous pipeline stages: run and segment appear to perform overlapping or identical high-level operations (processing an image), while finish takes a pre-segmented result. It is unclear if run is a full pipeline execution (segment + fit + compose) or just segmentation, making the distinction between run and segment confusing.
  • Banned license: dssim-core
  • Documentation: no project overview (README.md)
  • Naming inconsistency: render and render_svg are ambiguous. It is unclear if render returns a generic VectorDoc or a specific format, and why render_svg is distinct if the output is inherently SVG. This suggests a lack of clear separation between internal representation and serialization.
  • Off the main sequence: vtracer
  • Outdated: cfg-if
  • Outdated: clap
  • Redundant _with_progress methods: The existence of *_with_progress variants for every stage suggests a lack of a unified context object for progress tracking, or duplicates the functionality of passing a Ctx object (as seen in Compositing.compose_with and Frontend.segment_with).

Changes since last survey

  • 6 commits — 6 feature/other, 0 fixes

By area

  • (root) — 6 commits

Notable commits

  • change: App update
  • change: App update
  • change: App update
  • change: App update
  • change: App update
  • change: VT2 update

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

visioncortex/vtracer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit dfd94865569b9cc0283219bb6309f8568caeea2b — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-c4983f2d4e5c.