Geoparsing: Diagram Parsing for Plane and Solid Geometry with a Unified Formal Language
[π Homepage] [π» Github] [π€ Huggingface Dataset]
[π€ Huggingface Model] [π Paper]

GDP-29K Dataset
Overview
GDP-29K is a large-scale geometry diagram parsing dataset comprising both plane geometry and solid geometry. It is designed to advance research in multimodal geometric reasoning and diagram understanding.
| Split |
PGDP (Printed) |
PGDP (Handwritten) |
SGDP |
Total |
| Train |
13,350 |
4,516 |
8,021 |
25,887 |
| Test |
1,599 |
500 |
896 |
2,996 |
| Total |
14,949 |
5,016 |
8,917 |
28,882 |
Dataset Structure
GDP-29K/
βββ PGDP/
β βββ printed/
β β βββ image/
β βββ handwritten/
β β βββ image/
β βββ PGDP_train.json
β βββ PGDP_test.json
βββ SGDP/
β βββ image/
β βββ SGDP_train.json
β βββ SGDP_test.json
βββ GDP_train.json
βββ GDP_test.json
βββ README.md
Annotation Format
Plane Geometry - Printed
{
"diagram": "PGDP/printed/image/xxx.png",
"style": "printed",
"split": "train",
"category": "plane geometry",
"points": ["A", "B", "C"],
"lines": ["line A B C"],
"circles": ["\\odot O lieson A B C"],
"semantics": ["AB \\perp CD on E", "AB = 5", "m \\angle ABC = 60"]
}
Plane Geometry - Handwritten
{
"diagram": "PGDP/handwritten/image/xxx.png",
"style": "handwritten",
"split": "train",
"category": "plane geometry",
"points": ["A", "B", "C"],
"lines": ["line A B C"],
"circles": ["\\odot O lieson A B C"],
"semantics": ["AB \\parallel CD", "AB = 5", "m \\angle ABC = 60"]
}
Solid Geometry
{
"diagram": "SGDP/image/xxx.png",
"split": "train",
"category": "solid geometry",
"structure": ["Pyramid P-ABCD"],
"points": ["P", "A", "B", "C", "D"],
"lines": ["line A B", "line B C", "line P A"],
"planes": ["plane A B C D", "plane P A B", "plane P B C"],
"circles": [],
"semantics": []
}
Field Descriptions
Common Fields
| Field |
Type |
Description |
| diagram |
string |
Relative path to the image file |
| split |
string |
Dataset split: train or test |
| category |
string |
Geometry type: plane geometry or solid geometry |
| points |
list |
Point identifiers |
| lines |
list |
Line definitions |
| circles |
list |
Circle definitions |
| semantics |
list |
Geometric constraints and metric relations |
PGDP-specific Fields
| Field |
Type |
Description |
| style |
string |
Diagram style: printed or handwritten |
SGDP-specific Fields
| Field |
Type |
Description |
| structure |
list |
Top-level solid type |
| planes |
list |
Planar faces of the solid structure |
Formal Language Specification
Primitives
| Syntax |
Description |
line A B C |
A line passing through points A, B, C in order |
line k lieson A B C |
A named line passing through points A, B, C |
\odot O lieson A B C |
Circle centered at O, passing through A, B, C |
plane A B C D |
A plane defined by vertices A, B, C, D |
Pyramid P-ABCD |
A pyramid with apex P and base ABCD |
Cube ABCD-A1B1C1D1 |
A cube defined by bottom and top faces |
Prism ABC-A1B1C1 |
A prism defined by bottom and top faces |
Semantic Relations
| Syntax |
Description |
AB \perp CD on E |
AB is perpendicular to CD, intersecting at E |
AB \parallel CD |
AB is parallel to CD |
AB = 5 |
Length of segment AB is 5 |
m \angle ABC = 60 |
Measure of angle ABC is 60Β° |
m \widehat{AB} = 90 |
Arc measure of AB is 90Β° |
Usage Example
import json
with open("GDP_train.json", "r", encoding="utf-8") as f:
train_data = json.load(f)
with open("GDP_test.json", "r", encoding="utf-8") as f:
test_data = json.load(f)
pgdp_train = [item for item in train_data if item["category"] == "plane geometry"]
sgdp_train = [item for item in train_data if item["category"] == "solid geometry"]
printed_samples = [item for item in pgdp_train if item["style"] == "printed"]
handwritten_samples = [item for item in pgdp_train if item["style"] == "handwritten"]
print(f"Total train: {len(train_data)}")
print(f"Total test: {len(test_data)}")
print(f"PGDP - Printed: {len(printed_samples)}")
print(f"PGDP - Handwritten: {len(handwritten_samples)}")
print(f"SGDP: {len(sgdp_train)}")
Citation
@article{wang2026geoparsing,
title={Geoparsing: Diagram Parsing for Plane and Solid Geometry with a Unified Formal Language},
author={Wang, Peijie and Zhang, Ming-Liang and Cao, Jun and Deng, Chao and Ran, Dekang and Sun, Hongda and Bu, Pi and Zhang, Xuan and Wang, Yingyao and Song, Jun and Zheng, Bo and Yin, Fei and Liu, Cheng-Lin},
journal={https://arxiv.org/abs/2604.11600},
year={2026}
}