Skip to main content

Faster interpretation of the original COCOEval

Project description

Faster-COCO-Eval

PyPI PyPI Downloads

docs license

CI - Test

Disclaimer

I often use this project, but I saw it abandoned and without a public repository on github. Also, part of the project remained unfinished for a long time. I implemented some of the author's ideas and decided to make the results publicly available.

Install

Basic implementation identical to pycocotools

pip install faster-coco-eval

Additional visualization options

Only 1 additional package needed opencv-python-headless

pip install faster-coco-eval[extra]

Basic usage

import faster_coco_eval

# Replace pycocotools with faster_coco_eval
faster_coco_eval.init_as_pycocotools()

from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval

anno = COCO(str(anno_json))  # init annotations api
pred = anno.loadRes(str(pred_json))  # init predictions api (must pass string, not Path)

val = COCOeval(anno, pred, "bbox")
val.evaluate()
val.accumulate()
val.summarize()

Faster-COCO-Eval base

This package wraps a facebook C++ implementation of COCO-eval operations found in the pycocotools package. This implementation greatly speeds up the evaluation time for coco's AP metrics, especially when dealing with a high number of instances in an image.

Comparison

For our use case with a test dataset of 5000 images from the coco val dataset. Testing was carried out using the mmdetection framework and the eval_metric.py script. The indicators are presented below.

Visualization of testing colab_example.ipynb available in directory examples/comparison

Summary for 5000 imgs

Type faster-coco-eval pycocotools Profit
bbox 5.812 22.72 3.909
segm 7.413 24.434 3.296

Feautures

This library provides not only validation functions, but also error visualization functions. Including visualization of errors in the image. You can study in more detail in the examples and Wiki.

Usage

Code examples for using the library are available on the Wiki

Examples

Update history

Available via link history.md

Star History

Star History Chart

License

The original module was licensed with apache 2, I will continue with the same license. Distributed under the apache version 2.0 license, see license for more information.

Citation

If you use this benchmark in your research, please cite this project.

@article{faster-coco-eval,
  title   = {{Faster-COCO-Eval}: Faster interpretation of the original COCOEval},
  author  = {MiXaiLL76},
  year    = {2024}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faster_coco_eval-1.6.5.tar.gz (65.6 kB view hashes)

Uploaded Source

Built Distributions

faster_coco_eval-1.6.5-cp313-cp313-win_arm64.whl (281.6 kB view hashes)

Uploaded CPython 3.13 Windows ARM64

faster_coco_eval-1.6.5-cp313-cp313-win_amd64.whl (303.0 kB view hashes)

Uploaded CPython 3.13 Windows x86-64

faster_coco_eval-1.6.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (472.8 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

faster_coco_eval-1.6.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (452.9 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

faster_coco_eval-1.6.5-cp313-cp313-macosx_11_0_arm64.whl (342.7 kB view hashes)

Uploaded CPython 3.13 macOS 11.0+ ARM64

faster_coco_eval-1.6.5-cp313-cp313-macosx_10_13_x86_64.whl (367.7 kB view hashes)

Uploaded CPython 3.13 macOS 10.13+ x86-64

faster_coco_eval-1.6.5-cp312-cp312-win_arm64.whl (281.7 kB view hashes)

Uploaded CPython 3.12 Windows ARM64

faster_coco_eval-1.6.5-cp312-cp312-win_amd64.whl (303.0 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

faster_coco_eval-1.6.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (472.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

faster_coco_eval-1.6.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (452.5 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

faster_coco_eval-1.6.5-cp312-cp312-macosx_11_0_arm64.whl (342.5 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

faster_coco_eval-1.6.5-cp312-cp312-macosx_10_9_x86_64.whl (367.6 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

faster_coco_eval-1.6.5-cp311-cp311-win_arm64.whl (284.4 kB view hashes)

Uploaded CPython 3.11 Windows ARM64

faster_coco_eval-1.6.5-cp311-cp311-win_amd64.whl (302.5 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

faster_coco_eval-1.6.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (473.8 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

faster_coco_eval-1.6.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (454.2 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

faster_coco_eval-1.6.5-cp311-cp311-macosx_11_0_arm64.whl (343.0 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

faster_coco_eval-1.6.5-cp311-cp311-macosx_10_9_x86_64.whl (366.6 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

faster_coco_eval-1.6.5-cp310-cp310-win_arm64.whl (283.0 kB view hashes)

Uploaded CPython 3.10 Windows ARM64

faster_coco_eval-1.6.5-cp310-cp310-win_amd64.whl (300.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

faster_coco_eval-1.6.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (470.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

faster_coco_eval-1.6.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (451.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

faster_coco_eval-1.6.5-cp310-cp310-macosx_11_0_arm64.whl (339.8 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

faster_coco_eval-1.6.5-cp310-cp310-macosx_10_9_x86_64.whl (364.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

faster_coco_eval-1.6.5-cp39-cp39-win_arm64.whl (280.1 kB view hashes)

Uploaded CPython 3.9 Windows ARM64

faster_coco_eval-1.6.5-cp39-cp39-win_amd64.whl (296.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

faster_coco_eval-1.6.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (471.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

faster_coco_eval-1.6.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (452.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

faster_coco_eval-1.6.5-cp39-cp39-macosx_11_0_arm64.whl (340.1 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

faster_coco_eval-1.6.5-cp39-cp39-macosx_10_9_x86_64.whl (364.5 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

faster_coco_eval-1.6.5-cp38-cp38-win_amd64.whl (300.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

faster_coco_eval-1.6.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (470.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

faster_coco_eval-1.6.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (451.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

faster_coco_eval-1.6.5-cp38-cp38-macosx_11_0_arm64.whl (339.7 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

faster_coco_eval-1.6.5-cp38-cp38-macosx_10_9_x86_64.whl (364.1 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

faster_coco_eval-1.6.5-cp37-cp37m-win_amd64.whl (300.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

faster_coco_eval-1.6.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (476.3 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

faster_coco_eval-1.6.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (462.3 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

faster_coco_eval-1.6.5-cp37-cp37m-macosx_10_9_x86_64.whl (361.2 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page