Skip to main content

Module visual

Module visual 

Source
Expand description

Visual NER evaluation metrics.

§Overview

Visual NER (VisualNER) extracts entities from images and documents, producing entities with both text spans and bounding box locations.

§Evaluation Metrics

From VisualNER benchmarks (FUNSD, SROIE, CORD):

MetricDescription
Text F1Standard NER F1 on extracted text
Box IoUIntersection-over-Union of bounding boxes
End-to-End F1Correct text AND box (>50% IoU)

§Benchmark Datasets

Common benchmarks include FUNSD, SROIE, CORD, and DocVQA.

§Research Alignment

LayoutLMv3 (arXiv:2204.08387) is a representative reference for multimodal document understanding (text + layout + pixels).

Structs§

BoundingBox
A bounding box in normalized coordinates (0.0-1.0).
VisualEvalConfig
Configuration for visual NER evaluation.
VisualGold
A gold standard visual entity with text and bounding box.
VisualNERMetrics
Visual NER evaluation metrics.
VisualPrediction
A predicted visual entity.
VisualTypeMetrics
Per-type visual metrics.

Functions§

evaluate_visual_ner
Evaluate visual NER predictions against gold standard.
synthetic_visual_examples
Generate synthetic visual NER examples for testing.