np-map
A simple tool for calculating object detection map .
Usage:
from npmap import ConfusionMatrix
matrix = ConfusionMatrix(num_classes=80) # coco 80 classes
# cleanup first
matrix.clean()
for (pred, gt) in (preds, gts): # for loop for every images
# pred format x0, y0, x1, y1, scores, labels
# gt format x0, y0, x1, y1, labels
# if there is no gt or pred, please set pred=None or gt=None
matrix.add(pred, gt)
# calculate map, map50, etc.
res = matrix.calculate()
# print map
print(res['map'])
# print map50
print(res['map50'])
# print mar
print(res['mean_recall'])
# print mp
print(res['mean_precision'])
... # so on
Metadata
Release files for npmap 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| npmap-0.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / npmap-0.0.0-py3-none-any.whl
| Download URL | npmap-0.0.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82663f5ebe2c93bb14d8eb48f0c3eb9e33e3b3b2904575da182ff5abea870798
|
|
BLAKE2b-256 checksum How to use checksums |
30363acfff5900281c8a0639842247beb44bd6e8af7adae8e6fe70ddb639ab7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.13
|