Fast-COCO-Eval
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 1500 images that contains up to 2000 instances per image we saw up to a 100x faster evaluation using fast-coco-eval (FCE) compared to the original pycocotools code.
Seg eval pycocotools 4 hours
Seg eval FCE: 2.5 min
BBox eval pycocotools: 4 hours
BBox eval FCE: 2 min
Getting started
Install
pip install fast-coco-eval
If you clone the repo and install it locally, the following command is recommended
pip install -e .
given that you are in the fast-coco-eval directory. There seem to be an issue with loading the C++ extensions when installing it from the root directory without the -e flag.
Usage
This package contains a faster implementation of the
pycocotools COCOEval class.
Due to torch being used to compile and access the C++ code, it needs to be imported before using the package.
To import and use COCOeval_fast type:
import torch
from fast_coco_eval import COCOeval_fast
For usage, look at the original COCOEval class documentation.
Dependencies
- pytorch>=1.5
- pycocotools
- pybind11
- numpy
It would be nice to decouple it from the pytorch build tool for the c++ compilation.
TODOs
- Wrap c++ code
- Get it to compile
- Add COCOEval class wraper
- Remove detectron2 dependencies
- Check if it works on windows
- Remove torch dependencies
License
Distributed under the apache version 2.0 license, see license for more information. © 2021 Sartorius AG
Metadata
Release files for fast-coco-eval 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fast-coco-eval-1.0.tar.gz | 11.7 kB | Without provenance | Details |
Release files / fast-coco-eval-1.0.tar.gz
| Download URL | fast-coco-eval-1.0.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1477c22baf0a92642b54edb1fc1bf0c3f0bb7017e69f377a29db842eeefe2f45
|
|
BLAKE2b-256 checksum How to use checksums |
ff549e1304e731b47353c80290a5fb5d05e855b3693ad804bdaf3de98d9f26c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
|
Security for fast-coco-eval 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.