referring-image-segmentation-eval
Latent Expression Generation for Referring Image Segmentation and Grounding — Yu et al. (2025) (arXiv:2508.05123, 2025)
What this evaluates
Evaluates visual grounding capabilities by measuring how well a model segments or localizes objects in images based on natural language descriptions. It probes the model's ability to handle ambiguous references, diverse textual forms, and generalized referring expressions without task-specific decoders.
Datasets
- RefCOCO — total ?; splits: val (-1), testA (-1), testB (-1)
- RefCOCO+ — total ?; splits: val (-1), testA (-1), testB (-1)
- RefCOCOg — total ?; splits: val (-1), test (-1)
- gRefCOCO — total ?; splits: test (-1)
Metrics
mIoU (primary) — range: [0, 1]
- Mean Intersection over Union; computed as the average IoU across all samples.
oIoU — range: [0, 1]
- Overall IoU; computed by dividing the total intersection by the total union over all samples.
Prec@X — range: [0, 1]
- Percentage of samples where the predicted mask IoU exceeds a given threshold X (e.g., 0.5, 0.7, 0.9).
N-acc — range: [0, 1]
- No-target accuracy for GRES; defined as TP / (TP + FN), where TP correctly predicts no target and FN incorrectly predicts a target.
Input / output format
Input: RGB image (resized to 480×480) paired with a natural language referring expression.
Output: Binary segmentation mask (generated by thresholding model output at 0.35).
Scoring recipe
def compute_metrics(pred_masks, gt_masks, no_target_idx=None):
ious = [iou(p, g) for p, g in zip(pred_masks, gt_masks)]
mIoU = sum(ious) / len(ious)
oIoU = sum(inter(p, g) for p, g in zip(pred_masks, gt_masks)) / sum(union(p, g) for p, g in zip(pred_masks, gt_masks))
prec_50 = sum(1 for i in ious if i > 0.5) / len(ious)
prec_70 = sum(1 for i in ious if i > 0.7) / len(ious)
prec_90 = sum(1 for i in ious if i > 0.9) / len(ious)
n_acc = 0.0
if no_target_idx is not None:
tp = sum(1 for i in no_target_idx if ious[i] == 0)
fn = sum(1 for i in no_target_idx if ious[i] > 0)
n_acc = tp / (tp + fn) if (tp + fn) > 0 else 0.0
return mIoU, oIoU, prec_50, prec_70, prec_90, n_acc
Common pitfalls
- Confusing mIoU (per-sample average) with oIoU (global intersection over global union), which yield different values on imbalanced datasets.
- N-acc inverts standard detection logic: a True Positive means the model correctly predicts the absence of a target (IoU=0), not a successful localization.
- Prec@X thresholds are applied independently per sample, not as a global ranking cutoff.
Evidence (verbatim from paper)
For RIS, we use the standard metrics: mIoU, oIoU, and prec@X; mIoU (mean IoU) is the average IoU across all samples, while oIoU (overall IoU) divides the total intersection by the total union over all samples. Prec@X is the percentage of samples with IoU above threshold X. For REC, we employ Prec@50 (Acc.), which is an accuracy only when IoU is over 0.5. For GRES, in addition to mIoU and oIoU, we also compute N-acc (No-target accuracy) to evaluate the accuracy on no-target samples. N-acc is defined as $\frac{TP}{TP+FN}$, where a true positive (TP) indicates correctly predicting no target, otherwise a false negative (FN).
Citation
@misc{yu2025latent,
title={Latent Expression Generation for Referring Image Segmentation and Grounding},
author={Yu et al. (2025)},
year={2025},
note={arXiv:2508.05123}
}
1---2name: referring-image-segmentation-eval3description: Evaluates visual grounding capabilities by measuring how well a model segments or localizes objects in images based on natural language descriptions. It probes the model's ability to handle ambiguous references, diverse textual forms, and generalized referring expressions without task-specific decoders. Use when the user wants to benchmark on RefCOCO, RefCOCO+, RefCOCOg, gRefCOCO, or asks about evaluating this task. Reports mIoU.4---56# referring-image-segmentation-eval78> Latent Expression Generation for Referring Image Segmentation and Grounding — Yu et al. (2025) (arXiv:2508.05123, 2025)910## What this evaluates1112Evaluates visual grounding capabilities by measuring how well a model segments or localizes objects in images based on natural language descriptions. It probes the model's ability to handle ambiguous references, diverse textual forms, and generalized referring expressions without task-specific decoders.1314## Datasets1516- **RefCOCO** — total ?; splits: val (-1), testA (-1), testB (-1)17- **RefCOCO+** — total ?; splits: val (-1), testA (-1), testB (-1)18- **RefCOCOg** — total ?; splits: val (-1), test (-1)19- **gRefCOCO** — total ?; splits: test (-1)2021## Metrics2223- `mIoU` **(primary)** — range: [0, 1]24 - Mean Intersection over Union; computed as the average IoU across all samples.25- `oIoU` — range: [0, 1]26 - Overall IoU; computed by dividing the total intersection by the total union over all samples.27- `Prec@X` — range: [0, 1]28 - Percentage of samples where the predicted mask IoU exceeds a given threshold X (e.g., 0.5, 0.7, 0.9).29- `N-acc` — range: [0, 1]30 - No-target accuracy for GRES; defined as TP / (TP + FN), where TP correctly predicts no target and FN incorrectly predicts a target.3132## Input / output format3334**Input**: RGB image (resized to 480×480) paired with a natural language referring expression.3536**Output**: Binary segmentation mask (generated by thresholding model output at 0.35).3738## Scoring recipe3940```python41def compute_metrics(pred_masks, gt_masks, no_target_idx=None):42 ious = [iou(p, g) for p, g in zip(pred_masks, gt_masks)]43 mIoU = sum(ious) / len(ious)44 oIoU = sum(inter(p, g) for p, g in zip(pred_masks, gt_masks)) / sum(union(p, g) for p, g in zip(pred_masks, gt_masks))45 prec_50 = sum(1 for i in ious if i > 0.5) / len(ious)46 prec_70 = sum(1 for i in ious if i > 0.7) / len(ious)47 prec_90 = sum(1 for i in ious if i > 0.9) / len(ious)48 n_acc = 0.049 if no_target_idx is not None:50 tp = sum(1 for i in no_target_idx if ious[i] == 0)51 fn = sum(1 for i in no_target_idx if ious[i] > 0)52 n_acc = tp / (tp + fn) if (tp + fn) > 0 else 0.053 return mIoU, oIoU, prec_50, prec_70, prec_90, n_acc54```5556## Common pitfalls5758- Confusing mIoU (per-sample average) with oIoU (global intersection over global union), which yield different values on imbalanced datasets.59- N-acc inverts standard detection logic: a True Positive means the model correctly predicts the absence of a target (IoU=0), not a successful localization.60- Prec@X thresholds are applied independently per sample, not as a global ranking cutoff.6162## Evidence (verbatim from paper)6364> For RIS, we use the standard metrics: mIoU, oIoU, and prec@X; mIoU (mean IoU) is the average IoU across all samples, while oIoU (overall IoU) divides the total intersection by the total union over all samples. Prec@X is the percentage of samples with IoU above threshold X. For REC, we employ Prec@50 (Acc.), which is an accuracy only when IoU is over 0.5. For GRES, in addition to mIoU and oIoU, we also compute N-acc (No-target accuracy) to evaluate the accuracy on no-target samples. N-acc is defined as $\frac{TP}{TP+FN}$, where a true positive (TP) indicates correctly predicting no target, otherwise a false negative (FN).6566## Citation6768```bibtex69@misc{yu2025latent,70 title={Latent Expression Generation for Referring Image Segmentation and Grounding},71 author={Yu et al. (2025)},72 year={2025},73 note={arXiv:2508.05123}74}75```7677- arXiv: 2508.05123