Skip to main content

A simple tool for calculating object detection map

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

npmap-0.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file npmap-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: npmap-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for npmap-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82663f5ebe2c93bb14d8eb48f0c3eb9e33e3b3b2904575da182ff5abea870798
MD5 39e41b75dc839a9ae0d9ddb4526145b3
BLAKE2b-256 30363acfff5900281c8a0639842247beb44bd6e8af7adae8e6fe70ddb639ab7a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page