POPE Answer Evaluator
Use this skill after an LVLM or deterministic answer source has answered POPE polling questions. It converts raw answer text into binary yes/no predictions and computes the paper's standard metrics.
Do not use this skill to generate POPE questions or choose absent objects. It assumes labels already come from a POPE question file.
Inputs
- Ordered answer records with an
answerstring. - Ordered label/question records with
labelequal toyesorno. - Optional output path for metrics JSON.
Outputs
- Normalized predictions.
- TP, FP, TN, FN.
- Accuracy, precision, recall, F1 score, and yes ratio.
- Per-example records for auditing answer normalization.
Workflow
- Pair answer and label records by order.
- Keep only the first sentence-like segment of each raw answer.
- Strip commas and split words.
- Mark the prediction as
noif the first segment containsno,No, ornot; otherwise mark it asyes. - Convert labels to binary values and compute confusion counts.
- Compute metrics with safe zero-division handling.
- Save the metrics and normalized prediction log.
Validation
Run:
python scripts/pope_answer_evaluator.py --self-test
python tests/test_answer_evaluator.py
The tests cover sentence-form answers, negation, confusion counts, F1, and yes ratio.
Limitations
This is repository-compatible normalization and may classify unusual answers conservatively as yes unless explicit negation is present. If a project needs stricter invalid-answer handling, record that policy separately.