Faster interpretation of the original COCOEval
Project description
Faster-COCO-Eval
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
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
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
Hashes for faster_coco_eval-1.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1bb3c4f4e14de9bcfcccf7e1c23da0de6b44dd4f7a87b0fc98354f4f9a431ce |
|
MD5 | 7a2fb0ff6573793b169da4dedac287c4 |
|
BLAKE2b-256 | 0c02d1adaa7d912d8e7f34ff5823da93534c9d180bad3d3683d17492c07bfa05 |
Hashes for faster_coco_eval-1.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8179404a76cd6daef3f4f19744737ecbfe978a4aa92a51f9a58db468fd9d5bb |
|
MD5 | e8cda548f70b49b77bc7f702880e9042 |
|
BLAKE2b-256 | 0035aa54c419cf95d5e296e270e3df347ea670fe70613fee8ee84d613dee3a50 |
Hashes for faster_coco_eval-1.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c12016702c36beb7d0680d2ab56cd3fb9150c1f520ab826ecdb98e3b6971e278 |
|
MD5 | fedc16906878f7305408545dd5121b53 |
|
BLAKE2b-256 | 3c5f3a090d8916a146861809a1b24b3b5f855e81e60fd6c8442257d95ccd0095 |
Hashes for faster_coco_eval-1.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9677cc74e2c851bd14bd3c16f91f397b77b05657bf8f9ee5f3c0c41e86aab5c |
|
MD5 | 4b49a1848b081b6bbbb97769d0c860c1 |
|
BLAKE2b-256 | ee3d538ca7ffc8478cf237ea962fe41497565f1a9de31582584ce5b63ffe3746 |
Hashes for faster_coco_eval-1.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1ee122713dc9cb3e64e21daa3a7529073cab857550c898c959816f38591e2b |
|
MD5 | 4586c7284bc5ce817f3afbbc9a5c6d19 |
|
BLAKE2b-256 | 4ff1e5076a3433a0e62f8ba44dee8b1385d96984338da6b878ffbb15014e0c13 |
Hashes for faster_coco_eval-1.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afbfe45e233c9ea290dda9111935c691b77e239b9a0488fa967f99f1962d5169 |
|
MD5 | dcf651cd3f1675e032fe050e58d24b9e |
|
BLAKE2b-256 | 97549c5dd90ad2fdb34f02bca4adefdfe2717ac88371d75fefbe67ea56ea8d74 |