license: cc-by-4.0
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
- split: test
path: data/test-*
dataset_info:
features:
- name: image
dtype: image
- name: image_name
dtype: string
- name: width
dtype: int64
- name: height
dtype: int64
- name: instances
list:
- name: category_id
dtype: int64
- name: mask
sequence:
sequence: float64
splits:
- name: train
num_bytes: 8927542
num_examples: 200
- name: validation
num_bytes: 4722935
num_examples: 100
- name: test
num_bytes: 3984722
num_examples: 100
download_size: 16709320
dataset_size: 17635199
Line Graphics (LG) dataset
This is the official page for the LG dataset for our paper Line Graphics Digitization: A Step Towards Full Automation.
By Omar Moured et al.
Dataset Summary
The dataset features instance segmentation masks for 400 real line chart images manually labeled 11 categories by professionals. Images are collected from 5 different prfessions to increase the richfullness. In our paper we studedi two level of segmentations, coarse-level where we segment (spines, axis-labels, legend, lines, titles), and fine-level where we have for each category an x and y subclasses (except legend and lines) and also each line is segmented seperatly.
Category ID Reference
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
}
Dataset structure (train,validation,test)
- images - contains the PIL image of the chart
- image_name - image name with PNG extension
- width - original image width
- height - original image height
- instances - contains n number of labeled instances, each instance dictionary has {category_id, annotations}. The annotations are in COCO format.
Sample Usage
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("omoured/line-graphics-dataset")
# Access the training split
train_dataset = dataset["train"]
# Print sample data
print(dataset["train"][0])
You can render the masks using pycocotools
library as follows:
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)
Copyrights
This dataset is published under the CC-BY 4.0 license, which allows for unrestricted usage, but it should be cited when used.
Citation
@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}
}
Contact
If you have any questions or need further assistance with this dataset, please feel free to contact us:
- Omar Moured, omar.moured@kit.edu