Implementation:Open compass VLMEvalKit RRC Evaluation Funcs
| Field | Value |
|---|---|
| source | VLMEvalKit |
| domain | Vision, Evaluation, OCR, Text Spotting |
Overview
Provides utility functions for the Robust Reading Competition (RRC) evaluation framework used in OCRBench v2 text spotting evaluation.
Description
This module implements common evaluation functions for the RRC website evaluation scripts. It includes ZIP file loading and validation (load_zip_file, load_zip_file_keys), file content validation, and parameter handling. These functions serve as the foundation for end-to-end text recognition evaluation, supporting both ground-truth and submission file parsing from ZIP archives with regex-based filename filtering.
Usage
Called internally by the spotting evaluation script during OCRBench v2 evaluation.
Code Reference
- Source:
vlmeval/dataset/utils/Ocrbench_v2/spotting_eval/rrc_evaluation_funcs_1_1.py, Lines: L1-456 - Import:
from vlmeval.dataset.utils.Ocrbench_v2.spotting_eval.rrc_evaluation_funcs_1_1 import load_zip_file, load_zip_file_keys
Key Functions:
def print_help(): ...
def load_zip_file_keys(file, fileNameRegExp=''): ...
def load_zip_file(file, fileNameRegExp='', allEntries=False): ...
def validate_lines_in_file(fileName, fileContents, CRLF, LTRB, withTranscription): ...
I/O Contract
| Direction | Description |
|---|---|
| Inputs | ZIP file paths containing ground-truth and submission text detection results; regex patterns for filename filtering |
| Outputs | Dictionaries mapping filenames to their contents; validated line-by-line entries from detection result files |
Usage Examples
# Internal usage example
from vlmeval.dataset.utils.Ocrbench_v2.spotting_eval.rrc_evaluation_funcs_1_1 import load_zip_file
gt_data = load_zip_file(gt_file_path, 'gt_img_([0-9]+).txt')