To compute the metrics of an object detection model, one can use this opensource toolbox for object detection metrics.
This work was published in the Journal Electronics - Special Issue Deep Learning Based Object Detection.
You can download the paper here.
@Article{electronics10030279,
AUTHOR = {Padilla, Rafael and Passos, Wesley L. and Dias, Thadeu L. B. and Netto, Sergio L. and da Silva, Eduardo A. B.},
TITLE = {A Comparative Analysis of Object Detection Metrics with a Companion Open-Source Toolkit},
JOURNAL = {Electronics},
VOLUME = {10},
YEAR = {2021},
NUMBER = {3},
ARTICLE-NUMBER = {279},
URL = {https://www.mdpi.com/2079-9292/10/3/279},
ISSN = {2079-9292},
DOI = {10.3390/electronics10030279}
}
You can find these files in their repo, the code here is slightly adjusted.
An example on how to use is it, is given in pascal_voc_evaluator_example.py.