Detecting Legend Items on Historical Maps Using GPT-4o with In-Context Learning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kirsanova, Sofia, Chiang, Yao-Yi, Duan, Weiwei
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909833154789376
author Kirsanova, Sofia
Chiang, Yao-Yi
Duan, Weiwei
author_facet Kirsanova, Sofia
Chiang, Yao-Yi
Duan, Weiwei
contents Historical map legends are critical for interpreting cartographic symbols. However, their inconsistent layouts and unstructured formats make automatic extraction challenging. Prior work focuses primarily on segmentation or general optical character recognition (OCR), with few methods effectively matching legend symbols to their corresponding descriptions in a structured manner. We present a method that combines LayoutLMv3 for layout detection with GPT-4o using in-context learning to detect and link legend items and their descriptions via bounding box predictions. Our experiments show that GPT-4 with structured JSON prompts outperforms the baseline, achieving 88% F-1 and 85% IoU, and reveal how prompt design, example counts, and layout alignment affect performance. This approach supports scalable, layout-aware legend parsing and improves the indexing and searchability of historical maps across various visual styles.
format Preprint
id arxiv_https___arxiv_org_abs_2510_08385
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Detecting Legend Items on Historical Maps Using GPT-4o with In-Context Learning
Kirsanova, Sofia
Chiang, Yao-Yi
Duan, Weiwei
Computer Vision and Pattern Recognition
Artificial Intelligence
Databases
Information Retrieval
H.2.8; H.3.3; I.2.10; I.4.8
Historical map legends are critical for interpreting cartographic symbols. However, their inconsistent layouts and unstructured formats make automatic extraction challenging. Prior work focuses primarily on segmentation or general optical character recognition (OCR), with few methods effectively matching legend symbols to their corresponding descriptions in a structured manner. We present a method that combines LayoutLMv3 for layout detection with GPT-4o using in-context learning to detect and link legend items and their descriptions via bounding box predictions. Our experiments show that GPT-4 with structured JSON prompts outperforms the baseline, achieving 88% F-1 and 85% IoU, and reveal how prompt design, example counts, and layout alignment affect performance. This approach supports scalable, layout-aware legend parsing and improves the indexing and searchability of historical maps across various visual styles.
title Detecting Legend Items on Historical Maps Using GPT-4o with In-Context Learning
topic Computer Vision and Pattern Recognition
Artificial Intelligence
Databases
Information Retrieval
H.2.8; H.3.3; I.2.10; I.4.8
url https://arxiv.org/abs/2510.08385