omoured/line-graphics-dataset
收藏Line Graphics (LG) 数据集
数据集概述
该数据集包含 400 张真实线图图像的实例分割掩码,这些图像由专业人员手动标记为 11 个类别。这些图像来自 5 种不同的职业,以增强多样性。在论文中,我们研究了两种级别的分割:粗略级别(包括脊柱、轴标签、图例、线条、标题)和精细级别,其中我们进一步将每个类别细分为 x 和 y 子类别(图例和线条除外),并单独分割每条线。
类别 ID 参考
python class_id_mapping = { "Label": 0, "Legend": 1, "Line": 2, "Spine": 3, "Title": 4, "ptitle": 5, "xlabel": 6, "xspine": 7, "xtitle": 8, "ylabel": 9, "yspine": 10, "ytitle": 11 }
数据集结构(训练、验证、测试)
- image - 包含图表的 PIL 图像
- image_name - 带有 PNG 扩展名的图像名称
- width - 原始图像宽度
- height - 原始图像高度
- instances - 包含 n 个标记实例,每个实例字典包含 {category_id, annotations}。注释采用 COCO 格式。
示例用法
python from datasets import load_dataset
加载数据集
dataset = load_dataset("omoured/line-graphics-dataset")
访问训练分割
train_dataset = dataset["train"]
打印示例数据
print(dataset["train"][0])
可以使用 pycocotools 库渲染掩码,如下所示:
python
from pycocotools import mask
polygon_coords = dataset[train][0][instances][1][mask] image_width = dataset[validation][0][width] image_height = dataset[validation][0][height]
mask_binary = mask.frPyObjects(polygon_coords, image_height, image_width)
segmentation_mask = mask.decode(mask_binary)
版权
该数据集在 CC-BY 4.0 许可下发布,允许无限制使用,但使用时应引用。
引用
bibtex @inproceedings{moured2023line, title={Line Graphics Digitization: A Step Towards Full Automation}, author={Moured, Omar and Zhang, Jiaming and Roitberg, Alina and Schwarz, Thorsten and Stiefelhagen, Rainer}, booktitle={International Conference on Document Analysis and Recognition}, pages={438--453}, year={2023}, organization={Springer} }



