Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Open compass VLMEvalKit Spotting Metric

From Leeroopedia
Revision as of 13:32, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Open_compass_VLMEvalKit_Spotting_Metric.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Field Value
source VLMEvalKit
domain Vision, Evaluation, OCR, Text Spotting

Overview

Implements text spotting evaluation metrics for OCRBench v2, including bounding box extraction and text detection scoring.

Description

This module provides robust parsing of model predictions containing bounding box coordinates and text content for OCR text spotting tasks. The `extract_bounding_boxes_robust` function handles multiple formats (list/tuple parsing, regex extraction) to reliably extract [x1, y1, x2, y2, text] tuples from model output. It integrates with the RRC evaluation framework for standardized text spotting assessment using `rrc_evaluation_funcs`.

Usage

Called internally by the corresponding dataset class during evaluation.

Code Reference

  • Source: vlmeval/dataset/utils/Ocrbench_v2/spotting_metric.py, Lines: L1-185
  • Import: from vlmeval.dataset.utils.Ocrbench_v2.spotting_metric import extract_bounding_boxes_robust

Key Functions:

def extract_bounding_boxes_robust(predict_str): ...

I/O Contract

Direction Description
Inputs Model prediction string containing bounding box coordinates and text content
Outputs List of extracted data in the format [[x1, y1, x2, y2, text_content], ...] or None if no valid data

Usage Examples

from vlmeval.dataset.utils.Ocrbench_v2.spotting_metric import extract_bounding_boxes_robust

results = extract_bounding_boxes_robust("[[100, 200, 300, 400, 'hello']]")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment