vtracer-bench: codec-free library, codecs behind a cli feature
Rust / test (push) Has been cancelled
Rust / wasm-safety (core) (push) Has been cancelled
Rust / Node package (push) Has been cancelled

- The library now speaks the image crate's buffer types only:
  fidelity(&RgbImage, &RgbImage, thresh) -> (FidelityReport, GrayImage).
  A tracer embedding the metric pulls no image codec at all.
- New `cli` feature (default on) brings png/jpeg/webp decoding and
  gates the vtracer-bench bin (required-features).
- dssim-core with default features off: drops the rayon thread pool.
- Scores are unchanged: the CLI prints the same value before and after.
This commit is contained in:
Chris Tsang
2026-09-06 18:49:34 +01:00
parent 74c29b1a8c
commit e9fece97b8
4 changed files with 40 additions and 84 deletions
+14 -4
View File
@@ -1,7 +1,7 @@
[package]
name = "vtracer-bench"
description = "Blind fidelity benchmark for raster-to-vector tracers: compare the original raster with a rendered reconstruction and get one 0..1 fidelity score built from PSNR, SSIM and a clustered-diff patch metric."
version.workspace = true
version = "1.0.0-alpha.5"
authors.workspace = true
edition.workspace = true
license.workspace = true
@@ -10,9 +10,19 @@ repository.workspace = true
categories = ["graphics", "development-tools::testing"]
keywords = ["vectorization", "benchmark", "fidelity", "ssim", "psnr"]
[features]
default = ["cli"]
# The CLI decodes originals and rendered candidates from files; the
# library itself only speaks the image crate's buffer types, so a
# tracer embedding the metric pulls no codec at all.
cli = ["image/png", "image/jpeg", "image/webp"]
[[bin]]
name = "vtracer-bench"
required-features = ["cli"]
[dependencies]
visioncortex.workspace = true
dssim-core = "3"
dssim-core = { version = "3", default-features = false }
rgb = "0.8"
# Decode-only: trimmed to real input formats (drops the AV1 encoder + OpenEXR).
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp"] }
image = { version = "0.25", default-features = false }