High-performance, parity-preserving COCO-style evaluation
Project description
vernier
Fast, parity-preserving evaluation for object detection, instance / panoptic / semantic segmentation, boundary IoU, OKS keypoints, and LVIS federated. Rust core, Python frontend, optional CLI.
pycocotools==2.0.11 is the de-facto reference for COCO evaluation —
slow, unmaintained, and full of edge-case quirks. Faster
reimplementations exist, but each silently fixes some quirks and not
others, so you discover the divergences empirically. vernier takes a
third path:
- Auditable parity. Every divergence from pycocotools is filed in
the quirks survey under
ADR-0002 as either
strict(bit-equal output, even when vernier's implementation is structurally different) orcorrected(opt-in opinionated fix). Strict is the default; corrected fixes are itemized so you always know when your numbers diverge from a reference run. A drop-in shim (vernier.patch_pycocotools()) keeps existing pycocotools-based scripts working with one line. - One toolkit instead of five. bbox / segm / boundary / keypoints
AP, panoptic PQ, semantic mIoU, and LVIS federated all live behind
one Python API and one CLI. Per-paradigm migration guides under
docs/migrate/show how to replacepycocotools,faster-coco-eval,panopticapi,lvis-api, andmmsegmentationone at a time. - Rust core, Python frontend. The matching kernel is pure Rust with runtime SIMD dispatch; the FFI layer is data conversion only. The CLI ships as a static binary, so CI pipelines call vernier without provisioning a Python interpreter.
Status & validation
Pre-1.0; public API is unstable. See docs/adr/ for the
design decisions shaping it. Per-paradigm parity status:
| Paradigm / metric | Oracle | Parity tier | Open caveat |
|---|---|---|---|
| Instance bbox / segm / keypoints AP | pycocotools==2.0.11 |
strict bit-equal | none |
| Instance boundary IoU | boundary-iou-api |
strict bit-equal | none |
Segm + boundary TIDE thresholds (t_b) |
none yet | corrected-only | ADR-0022 still proposed; defaults extrapolated, not measured |
| Panoptic PQ | panopticapi (single-core path) |
strict bit-equal | boundary=True raises NotImplementedError (ADR-0025 §Q3) |
| Semantic mIoU / FWIoU / pAcc / mAcc | mmseg.IoUMetric vendored at v1.2.2 (ADR-0036, still proposed); cityscapesScripts + ADE20K cross-impl bench externally blocked |
strict bit-equal on the four per-class u64 marginals at val2017 scale | ADR-0028; ADE20K-scale bench gated on license-cleared cache |
| LVIS federated AP | lvis-api (vendored at 031ac21f, ORACLE_LVIS_COMMIT_SHA) |
strict bit-equal on the (T, R, K, A) precision tensor at full LVIS v1 val |
bench paradigm wired; segm cell waits on evaluate_segm_grid_with_dataset |
Three-tier parity model: ADR-0002;
per-library comparison: docs/comparison.md.
Benchmarks
| Workload | vernier median | Speedup vs alternatives |
|---|---|---|
| Instance — bbox AP (val2017) | 360 ms | 5.9× faster-coco-eval · 16.2× pycocotools |
| Instance — segm AP (val2017) | 968 ms | 3.7× faster-coco-eval · 7.1× pycocotools |
| Instance — boundary AP (val2017) | 3.1 s | 5.7× faster-coco-eval · 19.9× boundary-iou-api |
| Instance — keypoints AP (val2017, OKS) | 136 ms | 12.5× faster-coco-eval · 17.1× pycocotools |
| Panoptic — PQ (val2017) | 11.6 s | 3.04× panopticapi |
| Semantic — mIoU (val2017) | 5.1 s | 4.2× mmsegmentation |
| Instance — LVIS bbox AP (v1 val, perfect-DT) | 3.7 s | 56.9× lvis-api · 10× lower peak RSS (1.49 GiB vs 15.01 GiB) |
Median total-stage wall time on a KVM VPS (AMD EPYC-Milan, 4 cores ×
2 threads = 8 logical CPUs, x86_64 — not a bare-metal Milan box),
harness mode release (N=10 measurement reps + 2 warmup, randomised
impl order, 5% relative-IQR gate per impl), build profile = cargo
release defaults (opt-level=3, lto=thin, codegen-units=1, no
target-cpu) — same as the PyPI wheel. Full per-cell breakdown
(including IQRs), RSS, and methodology in
docs/benchmarks.md; per-library comparison of
when to pick which in docs/comparison.md.
Baselines pinned for these numbers —
pycocotools==2.0.11,
faster-coco-eval==1.7.2,
panopticapi @ 7bb4655,
boundary-iou-api @ 37d2558,
mmsegmentation @ c685fe6 (vendored),
lvis-api @ 031ac21
(PyPI lvis==0.5.3).
COCO and panoptic / semantic numbers were measured at HEAD 1fd5720bf56c;
the LVIS row was added at HEAD e9d9c4d71303 after the bench
paradigm landed. Each baseline is locked in its own uv-managed venv per
ADR-0017.
Install
pip install vernier # Python wheel
cargo add vernier-core # Rust library
cargo install vernier-cli # `vernier` CLI binary
Wheels ship for linux x86_64 / aarch64 (glibc + musl), macOS
x86_64 / arm64, and windows x64. The umbrella vernier crate name on
crates.io is held as a 0.0.0 placeholder; vernier-core is the real
Rust entry point — see
docs/engineering/registry-reservations.md.
60-second example
One-shot — predictions already serialized to JSON (end-of-epoch checkpoint, CI gate, post-training inspection):
from pathlib import Path
from vernier.instance import Bbox, CocoDataset, Evaluator
gt_bytes = Path("instances_val2017.json").read_bytes()
dt_bytes = Path("detections.json").read_bytes()
dataset = CocoDataset.from_json(gt_bytes)
summary = Evaluator(iou=Bbox()).evaluate(dataset, dt_bytes)
for line in summary.pretty_lines():
print(line)
In a training loop — overlap eval with the next training step. The
matching kernel runs on a worker thread, so submit(...) returns
immediately and the training thread keeps moving. Passing a
CocoDataset reuses the parsed-once GT and its per-kernel
derivation cache across every epoch (ADR-0020):
import json
from pathlib import Path
from vernier.instance import Bbox, CocoDataset, Evaluator
gt = CocoDataset.from_json(Path("instances_val2017.json").read_bytes())
evaluator = Evaluator(iou=Bbox())
with evaluator.background(gt) as bg:
for images, _ in val_loader:
detections = model(images) # list[{image_id, category_id, bbox, score}]
bg.submit(json.dumps(detections).encode())
summary = bg.finalize()
print("AP =", summary.stats[0])
Both end in the same 12-line pycocotools-shaped Summary;
docs/tutorials/first-evaluation.md
walks each end-to-end.
Three evaluation paradigms
Pick the submodule whose input shape matches your model's output — they have different data models, different matching rules, and different parity oracles:
vernier.instance— detections with scores → bbox / segm / boundary / keypoints AP.vernier.panoptic— RGB-encoded panoptic PNGs +segments_infoJSON → PQ.vernier.semantic— single-channel class-id label maps → mIoU / FWIoU / pAcc / mAcc.
See Three paradigms for when to use which.
Documentation
- Tutorials —
docs/tutorials/ - Migration guides (from pycocotools, faster-coco-eval,
panopticapi, lvis-api, mmsegmentation) —
docs/migrate/ - How-to —
docs/how-to/ - Reference —
docs/reference/ - Design / ADRs —
docs/adr/ - Comparison vs pycocotools / faster-coco-eval / panopticapi /
boundary-iou-api / lvis-api / mmsegmentation —
docs/comparison.md
Contributing
Local checks: just lint && just test && just audit. The full
contributor workflow (ADR lifecycle, vendoring policy, code style) is
in CONTRIBUTING.md. Repository layout and
common just recipes are in CLAUDE.md.
License
Dual-licensed under Apache-2.0 or MIT at your option.
Third-party code
vernier vendors a small number of test-only reference implementations
to support parity testing. None of this code is included in published
wheels or linked into the Rust binary. See
THIRD_PARTY_NOTICES.md for the full
inventory and license attributions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vernier-0.0.2.tar.gz.
File metadata
- Download URL: vernier-0.0.2.tar.gz
- Upload date:
- Size: 497.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03e21adad5d4c1f45333cb82b43ac5c94b2f8593487574db9965e4a5393d27d1
|
|
| MD5 |
8954711f7a3322ea69c797c1a2a91775
|
|
| BLAKE2b-256 |
2f78789368661e3af24eadfd19dd3dd69a4666bc37aa81c88b7ebdf675223df0
|
Provenance
The following attestation bundles were made for vernier-0.0.2.tar.gz:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2.tar.gz -
Subject digest:
03e21adad5d4c1f45333cb82b43ac5c94b2f8593487574db9965e4a5393d27d1 - Sigstore transparency entry: 1514257348
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file vernier-0.0.2-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: vernier-0.0.2-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ebb55e2902e79dbfe8c8c00bff79cf1538259d9f476dd4509b688104578dc44
|
|
| MD5 |
992f9a8ef308d0f1a9df783ae9b85fba
|
|
| BLAKE2b-256 |
7ed7cac5ab3fcc5107a9b7ae2b97c0ecf970601dfbdaf399dcc06722f86a479b
|
Provenance
The following attestation bundles were made for vernier-0.0.2-cp310-abi3-win_amd64.whl:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2-cp310-abi3-win_amd64.whl -
Subject digest:
1ebb55e2902e79dbfe8c8c00bff79cf1538259d9f476dd4509b688104578dc44 - Sigstore transparency entry: 1514258617
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file vernier-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: vernier-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b4a6378a0acb81472c19f84e7f16f434ef0ad38a66b296ed95512dd0e5be602
|
|
| MD5 |
00c452cda3c7f5b9bf00b09d2052acd0
|
|
| BLAKE2b-256 |
d1363d6dba6054c7b513c094d5ac5e2d2aca0d92827667b3a6540f077b72a033
|
Provenance
The following attestation bundles were made for vernier-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2-cp310-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
6b4a6378a0acb81472c19f84e7f16f434ef0ad38a66b296ed95512dd0e5be602 - Sigstore transparency entry: 1514258223
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file vernier-0.0.2-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: vernier-0.0.2-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd414e420e682192a4d5268e91f51e8296faefc50fcece1bacd3d703d66af6a7
|
|
| MD5 |
43beeb118ab80dcdda536d2516b05db0
|
|
| BLAKE2b-256 |
db9991be0c89bd01eddafe714f0fcd9fbd0167a6607c5454e6c494316158709f
|
Provenance
The following attestation bundles were made for vernier-0.0.2-cp310-abi3-musllinux_1_2_aarch64.whl:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2-cp310-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
fd414e420e682192a4d5268e91f51e8296faefc50fcece1bacd3d703d66af6a7 - Sigstore transparency entry: 1514259133
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file vernier-0.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: vernier-0.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8962943c5edfb38df27354e5527421dba3595a8697214c6d1a8bccd8f7f9efdb
|
|
| MD5 |
838d36ba3a6d9be93d54468fb26c1ff6
|
|
| BLAKE2b-256 |
635ff1e9029309342b6e3f96db5fd9ae882cded42f773f26129648c6a7808554
|
Provenance
The following attestation bundles were made for vernier-0.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
8962943c5edfb38df27354e5527421dba3595a8697214c6d1a8bccd8f7f9efdb - Sigstore transparency entry: 1514258563
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file vernier-0.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: vernier-0.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5e39132bfaa079614432d61fbb95c193b8b16006786f58a7ab1cb4703b41d68
|
|
| MD5 |
9e37e1315bf3a74812ee0b98f661423c
|
|
| BLAKE2b-256 |
693d7a6b10b983246bbb9111110c2121ea6b8a17b84e038f8abaaa3c9a43200e
|
Provenance
The following attestation bundles were made for vernier-0.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
c5e39132bfaa079614432d61fbb95c193b8b16006786f58a7ab1cb4703b41d68 - Sigstore transparency entry: 1514258671
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file vernier-0.0.2-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: vernier-0.0.2-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e38d4b6987bb49a5343dfbe308edfcf57b09732a55d74446479c500d7e8012dd
|
|
| MD5 |
c2ac4a865a49b7b3fcd67295d65d93ed
|
|
| BLAKE2b-256 |
e49ebabe2a947bf69532a18be2e16ba1885df37817709fe8e97cd91102c64bf5
|
Provenance
The following attestation bundles were made for vernier-0.0.2-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
e38d4b6987bb49a5343dfbe308edfcf57b09732a55d74446479c500d7e8012dd - Sigstore transparency entry: 1514257506
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file vernier-0.0.2-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: vernier-0.0.2-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa50bb710daff805ccfdb605f4c709de4127b3508e77c0cce566abae4e52379
|
|
| MD5 |
346f1966ef5fb6c787f90f5b1854bd3a
|
|
| BLAKE2b-256 |
831eff1dca32c0c883fedee306dc843ecfafe9893ae93fb1fb9a4a1100bdcbeb
|
Provenance
The following attestation bundles were made for vernier-0.0.2-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
wheels.yml on NoeFontana/vernier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vernier-0.0.2-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
0aa50bb710daff805ccfdb605f4c709de4127b3508e77c0cce566abae4e52379 - Sigstore transparency entry: 1514257876
- Sigstore integration time:
-
Permalink:
NoeFontana/vernier@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NoeFontana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@39950ab3e4ea5f334bf22b9d25c8f84909d3b6ce -
Trigger Event:
push
-
Statement type: