# Pascal Voc Detection Eval

> Evaluates an object detection model's ability to localize and classify objects within images. It measures how well the system predicts bounding boxes and assigns correct class labels across multiple object categories. Use when the user wants to benchmark on PASCAL VOC 2007, or asks about evaluating this task. Reports mAP.

- Skill: `qhjqhj00/pascal-voc-detection-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/pascal-voc-detection-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/pascal-voc-detection-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/pascal-voc-detection-eval

---


# pascal-voc-detection-eval

> Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks — Ren et al. (2015) (arXiv:1506.01497, 2015)

## What this evaluates

Evaluates an object detection model's ability to localize and classify objects within images. It measures how well the system predicts bounding boxes and assigns correct class labels across multiple object categories.

## Datasets

- **PASCAL VOC 2007** — total 10000; splits: trainval (5000), test (5000)

## Metrics

- `mAP` **(primary)** — range: percent
  - Mean Average Precision averaged over 20 object categories. For each class, Average Precision (AP) is computed as the area under the precision-recall curve at a fixed IoU threshold (typically 0.5 for VOC). mAP is the arithmetic mean of these AP values across all classes.

## Input / output format

**Input**: Single RGB image

**Output**: List of predicted bounding boxes with associated class labels and confidence scores

## Scoring recipe

```python
def compute_mAP(predictions, ground_truth, iou_thresh=0.5):
    ap_scores = []
    for class_id in classes:
        preds_cls = sorted([p for p in predictions if p['class'] == class_id], key=lambda x: x['score'], reverse=True)
        gts_cls = [g for g in ground_truth if g['class'] == class_id]
        tp, fp, matched = 0, 0, set()
        for pred in preds_cls:
            best_iou, best_idx = 0, -1
            for i, gt in enumerate(gts_cls):
                if i not in matched:
                    iou = calculate_iou(pred['box'], gt['box'])
                    if iou > best_iou: best_iou, best_idx = iou, i
            if best_iou >= iou_thresh:
                tp += 1; matched.add(best_idx)
            else: fp += 1
        prec = tp / (tp + fp) if (tp + fp) > 0 else 0
        rec = tp / len(gts_cls) if len(gts_cls) > 0 else 0
        ap_scores.append(trapezoidal_rule(prec, rec))
    return sum(ap_scores) / len(ap_scores) * 100
```

## Common pitfalls

- Using proposal recall-to-IoU as the primary evaluation metric instead of final detection mAP, as the paper explicitly notes recall is only for diagnosing proposals.
- Failing to fix the number of proposals (e.g., 300 vs 2000) during testing, which significantly impacts mAP and breaks fair comparison.
- Not specifying whether the RPN and detector share convolutional features, as unshared variants yield lower mAP (~1-2% drop).

## Evidence (verbatim from paper)

> We primarily evaluate detection mean Average Precision (mAP), because this is the actual metric for object detection (rather than focusing on object proposal proxy metrics).

## Citation

```bibtex
@misc{ren2015fasterrcnn,
  title={Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks},
  author={Ren et al. (2015)},
  year={2015},
  note={arXiv:1506.01497}
}
```

- arXiv: 1506.01497

