Object Detection metrics.
Project description
A metrics package for Object Detection.
Installation
Install from PyPI
pip install od-metrics
Install from Github
pip install git+https://github.com/EMalagoli92/OD-Metrics
Documentation
For help, usage and API reference, please refer to Documentation
Simple Example
from od_metrics import ODMetrics
# Ground truths
y_true = [
{ # image 1
"boxes": [[25, 16, 38, 56], [129, 123, 41, 62]],
"labels": [0, 0]
},
{ # image 2
"boxes": [[123, 11, 43, 55], [38, 132, 59, 45]],
"labels": [0, 0]
}
]
# Predictions
y_pred = [
{ # image 1
"boxes": [[25, 17, 37, 54], [119, 111, 40, 67], [124, 9, 49, 67]],
"labels": [0, 0, 0],
"scores": [.88, .70, .80]
},
{ # image 2
"boxes": [[64, 111, 64, 58], [26, 140, 60, 47], [19, 18, 43, 35]],
"labels": [0, 0, 0],
"scores": [.71, .54, .74]
}
]
metrics = ODMetrics()
output = metrics.compute(y_true, y_pred)
print(output)
"""
{'mAP@[.5 | all | 100]': 0.2574257425742574,
'mAP@[.5:.95 | all | 100]': 0.23168316831683164,
'mAP@[.5:.95 | large | 100]': -1.0,
'mAP@[.5:.95 | medium | 100]': 0.23168316831683164,
'mAP@[.5:.95 | small | 100]': -1.0,
'mAP@[.75 | all | 100]': 0.2574257425742574,
'mAR@[.5 | all | 100]': 0.25,
'mAR@[.5:.95 | all | 100]': 0.225,
'mAR@[.5:.95 | all | 10]': 0.225,
'mAR@[.5:.95 | all | 1]': 0.225,
'mAR@[.5:.95 | large | 100]': -1.0,
'mAR@[.5:.95 | medium | 100]': 0.225,
'mAR@[.5:.95 | small | 100]': -1.0,
'mAR@[.75 | all | 100]': 0.25,
'classes': [0],
'n_images': 2}
"""
Aknowledgment
License
This work is made available under the MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
od-metrics-0.0.11.tar.gz
(20.8 kB
view hashes)
Built Distribution
Close
Hashes for od_metrics-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2535425b6669a016640e4b9e344ffd739b3c013c1c19f0cccb21377b3ccd80 |
|
MD5 | 56a4c1fad23b4aadda6c01b826d68fe8 |
|
BLAKE2b-256 | cd70c9d71be8340cfe212e40f4a2fc40bbd920d62de7c4ceb1ddd760035d2bd9 |