Metadata-Version: 2.4
Name: hotcoco
Version: 1.4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Dist: numpy>=1.22
Requires-Dist: fastapi>=0.100 ; extra == 'browse'
Requires-Dist: uvicorn>=0.20 ; extra == 'browse'
Requires-Dist: jinja2>=3.1 ; extra == 'browse'
Requires-Dist: pillow>=8.0 ; extra == 'browse'
Requires-Dist: plotly>=5.0 ; extra == 'browse'
Requires-Dist: argcomplete>=3.0 ; extra == 'completions'
Requires-Dist: maturin>=1.12.6 ; extra == 'dev'
Requires-Dist: pycocotools ; extra == 'dev'
Requires-Dist: faster-coco-eval ; extra == 'dev'
Requires-Dist: ultrafast-pycocotools ; extra == 'dev'
Requires-Dist: vernier ; extra == 'dev'
Requires-Dist: hypothesis ; extra == 'dev'
Requires-Dist: lvis>=0.5.3 ; extra == 'dev'
Requires-Dist: pre-commit>=4 ; extra == 'dev'
Requires-Dist: psutil ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: shapely>=2.0 ; extra == 'dev'
Requires-Dist: tidecv>=1.0.1 ; extra == 'dev'
Requires-Dist: matplotlib>=3.5 ; extra == 'plot'
Requires-Dist: torch>=1.9 ; extra == 'torch'
Requires-Dist: pillow>=8.0 ; extra == 'torch'
Provides-Extra: browse
Provides-Extra: completions
Provides-Extra: dev
Provides-Extra: plot
Provides-Extra: torch
License-File: LICENSE
Summary: Perception evaluation toolkit — pycocotools-compatible detection metrics and panoptic quality in pure Rust, up to 113× faster
Keywords: coco,pycocotools,object-detection,evaluation,computer-vision,segmentation,keypoints,instance-segmentation,panoptic-segmentation,perception,model-evaluation
Home-Page: https://derekallman.github.io/hotcoco/
Author-email: Derek Allman <derek.allman@yahoo.com>
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/derekallman/hotcoco/releases
Project-URL: Documentation, https://derekallman.github.io/hotcoco/
Project-URL: Homepage, https://derekallman.github.io/hotcoco/
Project-URL: Repository, https://github.com/derekallman/hotcoco

# hotcoco

[![CI](https://github.com/derekallman/hotcoco/actions/workflows/ci.yml/badge.svg)](https://github.com/derekallman/hotcoco/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/hotcoco)](https://pypi.org/project/hotcoco/)
[![Crates.io](https://img.shields.io/crates/v/hotcoco)](https://crates.io/crates/hotcoco)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

**A drop-in replacement for [pycocotools](https://github.com/ppwwyyxx/cocoapi), written in Rust.** Same numbers, bit for bit. Up to 113× faster. No compiler to install.

```bash
pip install hotcoco
```

```python
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:

```python
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](https://derekallman.github.io/hotcoco/)** | **[Changelog](CHANGELOG.md)** | **[Roadmap](ROADMAP.md)**

## 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](CONTRIBUTING.md) describes how it is verified.
- **It is fast.** The [benchmarks](https://derekallman.github.io/hotcoco/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.

- [LVIS and Open Images](https://derekallman.github.io/hotcoco/guide/lvis-open-images/) protocols, and [oriented boxes](https://derekallman.github.io/hotcoco/guide/evaluation/).
- [Panoptic quality](https://derekallman.github.io/hotcoco/guide/panoptic/), matching panopticapi on val2017, and [semantic segmentation](https://derekallman.github.io/hotcoco/guide/semantic/), matching mmsegmentation.
- [Streaming evaluation](https://derekallman.github.io/hotcoco/guide/evaluation/#streaming-evaluation) inside a validation loop, straight from the detector's prediction array, with shards that merge across ranks.
- [TIDE error analysis](https://derekallman.github.io/hotcoco/guide/diagnostics/#tide-error-analysis), [confusion matrices](https://derekallman.github.io/hotcoco/guide/diagnostics/#confusion-matrix), [calibration](https://derekallman.github.io/hotcoco/guide/diagnostics/#confidence-calibration), [label-error detection](https://derekallman.github.io/hotcoco/guide/diagnostics/#per-image-diagnostics-and-label-error-detection), and [model comparison](https://derekallman.github.io/hotcoco/guide/diagnostics/#model-comparison) with bootstrap confidence intervals.
- [Metric functions on plain arrays](https://derekallman.github.io/hotcoco/api/metrics/), the way `sklearn.metrics` works, for [building your own metric](https://derekallman.github.io/hotcoco/guide/custom-metrics/).
- A [dataset browser](https://derekallman.github.io/hotcoco/guide/browse/), a [healthcheck](https://derekallman.github.io/hotcoco/guide/datasets/#healthcheck), and [format conversion](https://derekallman.github.io/hotcoco/guide/datasets/#convert) to and from YOLO, Pascal VOC, CVAT, DOTA, and Open Images CSV.
- [PyTorch integration](https://derekallman.github.io/hotcoco/guide/pytorch/), [plotting](https://derekallman.github.io/hotcoco/guide/plotting/), a [CLI](https://derekallman.github.io/hotcoco/cli/), type stubs, and a [Rust library](https://docs.rs/hotcoco).

The full list is on the [documentation site](https://derekallman.github.io/hotcoco/).

## Contributing

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

## License

MIT

