Skip to content
derekallmanPublic

About

Perception evaluation toolkit in Rust with Python bindings. Drop-in pycocotools replacement, bit-identical and up to 113× faster, plus panoptic and semantic segmentation, TIDE error analysis, confusion matrices, calibration, model comparison, and a dataset browser.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

17 stars

Watchers

0 watching

Forks

Latest commit

 

History

350 Commits

Folders and files

Repository files navigation

hotcoco

CI PyPI Crates.io License: MIT

A drop-in replacement for pycocotools, written in Rust. Same numbers, bit for bit. Up to 113× faster. No compiler to install.

pip install hotcoco
from hotcoco import init_as_pycocotools
init_as_pycocotools()

# Every pycocotools import now resolves to hotcoco. Nothing else changes.
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval

Or import it directly; the API is the same:

from hotcoco import COCO, COCOeval

coco_gt = COCO("instances_val2017.json")
coco_dt = coco_gt.load_res("detections.json")

ev = COCOeval(coco_gt, coco_dt, "bbox")
ev.run()

Documentation | Changelog | Roadmap

Why switch

  • The numbers do not change. The precision, recall, and scores arrays and every summary metric are bit-identical to pycocotools' on COCO val2017, for bbox, segm, and keypoints. Parity is a hard requirement for every change; CONTRIBUTING.md describes how it is verified.
  • It is fast. The benchmarks compare hotcoco, pycocotools, and three other evaluators on time and peak memory for bbox, segm, and keypoints on COCO val2017, with the hardware and the method.
  • It installs anywhere. Prebuilt wheels for Linux, macOS, and Windows. No Cython, no C compiler, no Microsoft Build Tools.

Beyond pycocotools

The same engine covers more than COCO detection. Each item links to its guide.

The full list is on the documentation site.

Contributing

Contributions are welcome. See CONTRIBUTING.md for the architecture overview, build and test workflow, and pre-commit checks.

License

MIT

About

Perception evaluation toolkit in Rust with Python bindings. Drop-in pycocotools replacement, bit-identical and up to 113× faster, plus panoptic and semantic segmentation, TIDE error analysis, confusion matrices, calibration, model comparison, and a dataset browser.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages