Skip to main content

hotcoco

CI PyPI Crates.io License: MIT

A drop-in replacement for pycocotools, written in Rust. Same numbers, bit for bit. Up to 133× 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

Metadata

Release files for hotcoco 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hotcoco 1.5.0
File Size Uploaded Provenance Actions
hotcoco-1.5.0.tar.gz 2.0 MB Without provenance Details for hotcoco-1.5.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for hotcoco 1.5.0
File Actions
hotcoco-1.5.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for hotcoco-1.5.0-cp310-abi3-win_amd64.whl
hotcoco-1.5.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for hotcoco-1.5.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
hotcoco-1.5.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for hotcoco-1.5.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
hotcoco-1.5.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for hotcoco-1.5.0-cp310-abi3-macosx_11_0_arm64.whl
hotcoco-1.5.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for hotcoco-1.5.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 18.6 MB

Release files / hotcoco-1.5.0.tar.gz

Download URL hotcoco-1.5.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
f1450e143890881f32b08ee16a2f219a90d3b9a19b4878b733ea4a6dbb5685f0
BLAKE2b-256 checksum
How to use checksums
61f8daf2b35290c0edf17cc35d658d219c7292c149f82d53bb3f426008e9e560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hotcoco-1.5.0-cp310-abi3-win_amd64.whl

Download URL hotcoco-1.5.0-cp310-abi3-win_amd64.whl
Size 3.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1715b78564e663eb69fa2f5b5abb8e50d4de2d64e4914d47166f82ce8b8f88c5
BLAKE2b-256 checksum
How to use checksums
b2ceeadca475428a083a8ecc2f5bac2d9b86830038489ae6e43018ea631dd49e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hotcoco-1.5.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL hotcoco-1.5.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 3.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
99c76eae24c39ef4dcba0019db7fabc3f0186401bf926c08afd6fa69d4d69a33
BLAKE2b-256 checksum
How to use checksums
72691bd2e5c7d5d6bd970845a50e4d5da2709ce0b670e7bfb5951d65ef334e8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hotcoco-1.5.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL hotcoco-1.5.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 3.4 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2f1bba085587dc57e85ad4ec85beccb1220e9a845ff569958a1d3c7cc4d4b201
BLAKE2b-256 checksum
How to use checksums
449e923b8f4fffafd9d1c1150cbb4a41d62f8580fcde798c3b359e936afb4ef2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hotcoco-1.5.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL hotcoco-1.5.0-cp310-abi3-macosx_11_0_arm64.whl
Size 3.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8b1835fe108731d4ab44adf3f1b64ab0d42e2afeaf5c1ebba333a26414eed4e1
BLAKE2b-256 checksum
How to use checksums
b251e6559789304e7d469d99af68cf06db5902c53f7536c9f9ecd06e0724ba19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hotcoco-1.5.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL hotcoco-1.5.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5acd52e7aec3f0d6b792130399e21cd4665e74505aa8b7874d51d494579dd664
BLAKE2b-256 checksum
How to use checksums
3592f37b85e3790e479c4a932e9e1d1af7e601bf9ff5b9e164503917d2fa529e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for hotcoco 1.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page