vernier-core
Pure-Rust core for the vernier evaluation library.
This crate is the source of truth for vernier's instance-paradigm evaluation semantics — bounding-box AP, segmentation AP, boundary-IoU AP, and OKS keypoints. It links no Python and is usable directly from Rust binaries, CLI tools, or embedded contexts.
It also covers two cross-paradigm surfaces:
- Streaming — fold per-image evals incrementally and finalize on demand (ADR-0013).
- Distributed partials — encode/decode the rkyv wire format for sharding evaluation across ranks (ADR-0031, ADR-0032).
Why a separate crate
The Python wheel (pip install vernier) is a thin PyO3 shim over this crate.
By design, every evaluation decision lives here. vernier-ffi is a
data-conversion layer; vernier-cli orchestrates eval invocations; both depend
on vernier-core and never the other way around.
If your project is pure-Rust — a robotics replay pipeline, a Rust-side training
benchmark, a custom evaluation tool — vernier-core is the entry point.
Installation
[]
= "0.0.1"
Stable Rust only (MSRV in rust-toolchain.toml, currently 1.83).
Minimal usage
use ;
let gt: CocoDataset = from_slice?;
let dt: CocoDetections = from_slice?;
let params = default
.with_parity_mode
.with_max_dets;
let summary = evaluate_bbox?;
println!;
A worked example is in examples/cache_speedup_val2017.rs.
Parity contract
vernier-core reproduces pycocotools==2.0.11 semantics under the parity
model in
ADR-0002.
Each documented quirk is dispositioned as strict (bit-equal output) or
corrected (opt-in opinionated fix). The full disposition table lives in
docs/engineering/pycocotools-quirks.md.
License
Dual-licensed under MIT or Apache-2.0, at your option. See
LICENSE-MIT and
LICENSE-APACHE
in the workspace root.