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 import COCO
from faster_coco_eval.extra import Curves
cocoGt = COCO(....)
cocoDt = cocoGt.loadRes(....)
cur = Curves(cocoGt, cocoDt, iou_tresh=0.5, iouType='segm')
cur.plot_pre_rec()
Setup dependencies
- numpy
- plotly (optional if extra.Curve usage)
history
v1.4.0
- fix issue https://github.com/MiXaiLL76/faster_coco_eval/issues/12
- Updated pre-rec calculation method
- Updated required libraries
- Moved all matplotlib dependencies to plotly
- Append new examples & mmeval test file
v1.3.3
- fix by ViTrox https://github.com/vitrox-technologies/faster_coco_eval
- missing file issue
- issue discovered by torchmetric
- fstring for python3.7
- Windows compilation
v1.3.2
- rework math_matches function. moved to faster_eval_api
- Moved calculations from python to c++
- Separated extra classes
- Added new sample data
- append mIoU based on TP pred.
- append mAUC based on Coco pre/rec.
v1.3.1
- rework mask code
- change np.float to float (numpy deprecations)
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
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.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3871abd8ba4fcecfe277facc84cbae8ba7db0b2535168eb62bc8c58b5305fa27 |
|
MD5 | b3cd961b0110069c5922b4f4e108632c |
|
BLAKE2b-256 | b643eed2028d6929318a9188c161d23dc841c6c074f3c9ee7dcaa50fa9cd4a18 |
Hashes for faster_coco_eval-1.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 177e5af462a50018f55557e007766cfee90b3fa17a05c333f5adabf54b029bd3 |
|
MD5 | fd8411567c98fcdd29bc27eaa9620710 |
|
BLAKE2b-256 | 83279b282a7abe5e9c2d886d92d603daefe5dd26a2e3d7be6a53e9d961d0ce73 |
Hashes for faster_coco_eval-1.4.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | addbc191e50c314632161d09906b2889101058aa0eb4b8c2ca0935b005e4ed3e |
|
MD5 | 53376324744a22c60974c77021280f1a |
|
BLAKE2b-256 | 8fa3f636c26a35a7f2163103bcbd94f63253d20ae4e7388b93fcc42732ee11b2 |
Hashes for faster_coco_eval-1.4.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adb04939a8c5922a729e470170d48ae61c747dd821a6fd8de1194f20bd0884bf |
|
MD5 | 3a174e7158aa31a03e6d78cb48885c93 |
|
BLAKE2b-256 | a2780852703bb0c9bd9ac3b6578f6e6fc15b28baf583f031067278eb85a70226 |
Hashes for faster_coco_eval-1.4.0-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 627a1583861b12b0abbade4828e1b872d097e3ba67198f06245b77c3b36a7e4c |
|
MD5 | d1422f4460e94834f752f2630ea92efa |
|
BLAKE2b-256 | 3d7c2e7a83c553e811f1ec9340014d400c37fcca1f6fe5b7908b9ffe1d34e168 |