← all repositories
Cartucho/mAP

The finicky math of object detection scoring, extracted from Matlab

Cartucho/mAP translates the official PASCAL VOC 2012 Matlab scoring ritual into Python so you can benchmark object detectors without legacy toolboxes.

mAP
Not currently ranked — collecting fresh signals.
star history

What it does

This is a Python re-implementation of the PASCAL VOC 2012 mean Average Precision benchmark. It ingests ground-truth bounding boxes and neural-net detection results, matches them by class label with an intersection-over-union threshold of 0.5, and computes per-class Average Precision by numerically integrating the precision-recall curve. The final mAP score is the mean of those class-level areas, reported from 0 to 100 percent.

The interesting bit

The entire selling point is parity: the authors adapted the official Matlab devkit into Python and claim the outputs match the original. In a field where a single metric tweak can reshuffle leaderboards, having a portable, readable version of the reference evaluator is more useful than it sounds.

Key highlights

  • Faithfully reproduces the PASCAL VOC 2012 AP calculation, including monotonically-decreasing precision interpolation and piecewise-constant numerical integration.
  • Includes helper scripts to convert PASCAL VOC, Darkflow, and YOLO formatted outputs into the expected text-file layout.
  • Can draw precision-recall curves and optional detection animations when Matplotlib and OpenCV are available.
  • Treats each ground-truth object as matchable only once, preventing duplicate detections from inflating the score.

Caveats

  • The documentation focuses on file-format setup and does not clarify how the tool scales to very large datasets or handles edge cases like empty ground-truth images.
  • It strictly follows the PASCAL VOC 2012 rules—IoU ≥ 0.5, no approximations—so if your pipeline expects different overlap thresholds or non-standard matching logic, you will need another evaluator.

Verdict

Useful for computer-vision researchers and practitioners who train YOLO or Darknet models and want a lightweight, trustworthy mAP score without resurrecting Matlab. Less relevant if your workflow already embeds a different evaluation standard.

Frequently asked

What is Cartucho/mAP?
Cartucho/mAP translates the official PASCAL VOC 2012 Matlab scoring ritual into Python so you can benchmark object detectors without legacy toolboxes.
Is mAP open source?
Yes — Cartucho/mAP is open source, released under the Apache-2.0 license.
What language is mAP written in?
Cartucho/mAP is primarily written in Python.
How popular is mAP?
Cartucho/mAP has 3k stars on GitHub.
Where can I find mAP?
Cartucho/mAP is on GitHub at https://github.com/Cartucho/mAP.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.