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.
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 comparison.ipynb available in directory examples/comparison Tested with yolo3 model (bbox eval) and yoloact model (segm eval)
Type | COCOeval | COCOeval_faster | Profit |
---|---|---|---|
bbox | 18.477 sec. | 7.345 sec. | 2.5x faster |
segm | 29.819 sec. | 15.840 sec. | 2x faster |
Usage
This package contains a faster implementation of the
pycocotools COCOEval
class.
To import and use COCOeval_faster
type:
from faster_coco_eval import COCO, COCOeval_faster
....
For usage, look at the original COCOEval
class documentation.
Usage plot curves
from faster_coco_eval.extra import Curves, COCO
cocoGt = COCO(....)
cocoDt = cocoGt.loadRes(....)
cur = Curves(cocoGt, cocoDt, iou_tresh=0.5, iouType='segm')
cur.plot_pre_rec(plotly_backend=False)
Setup dependencies
- numpy
- plotly (optional if extra.Curve usage)
history
v1.3.0
- remove pycocotools dependencies
- clean c/c++ code
v1.2.3
- Implemented of mean IoU for TP
- set FP-red FN-blue
v1.2.2
- Removed own implementation of pre-rec
- Switched to the implementation of pre-rec calculation from COCO eval
- Lost backward compatibility
- Implemented output fp/fn/tp + gt to pictures
v1.2.1
- bug fix with pre-rec curve
- rework error calc (tp/fp/fn)
- change image plot to plotly
- append docker auto builder
- append native iou calc (slow but accurate)
- rework auc calc with link
v1.1.3-v1.1.4
- rebuild plotly backend
- Segm bug-fix
v1.1.2
- Append fp fn error analysis via curves
- Append confusion matrix
- Append plotly backend support for ROC / AUC
v1.1.1
- Redesigned curves
- Reworked data preload
- Append csrc to setup
- Build sdist Package
v1.1.0
- Wrap c++ code
- Get it to compile
- Add COCOEval class wraper
- Remove detectron2 dependencies
- Remove torch dependencies
- Append unittest
- Append ROC / AUC curves
- Check if it works on windows
TODOs
- Remove pycocotools dependencies
- Remove matplotlib dependencies
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.
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.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3965e4a26cd32077af2e7cfd21cbeb72420d8057d2e3bee91757037d55dfa1ac |
|
MD5 | 30993387d76b193d3300c3d29769c71d |
|
BLAKE2b-256 | e790cddc70c739b003587bd00618c60962852f68b655328dfbf9c900f75376e7 |
Hashes for faster_coco_eval-1.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 848435fb13228f6de492d76acdc94ae3b643994905982d25eabf6205408d302a |
|
MD5 | 322e1976fe183741625a68089540934d |
|
BLAKE2b-256 | 2a7b55a56b25e68ffd748fca0d45877bfa502f9c2d955a3753ae1d71b2e1fa5e |
Hashes for faster_coco_eval-1.3.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 025b3a9577cf837d1e56255597d82c8c8d351f3eb7f46f693cce136889a9e26d |
|
MD5 | d497b860c1c945d9fa5cd02796e4dc78 |
|
BLAKE2b-256 | f204d2cd9810eb2c7e731b0a369753641af0885eaab842b8a31e6e082578d3e7 |
Hashes for faster_coco_eval-1.3.0-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e317f998b842547664ba9bb5c00285876d70c892812a03a7f8c3cc0d9f4bea80 |
|
MD5 | 96996997b9e81b560b95a3efb2ddc7b8 |
|
BLAKE2b-256 | c1c2e41900d0fe8818d857d958c1efb5844b21e0b4da64a0c030fa369d74d834 |