omoured commited on
Commit
aa4f8b6
1 Parent(s): 76d7feb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -13
README.md CHANGED
@@ -40,18 +40,88 @@ dataset_info:
40
  dataset_size: 17635199.0
41
  ---
42
 
 
43
 
 
44
 
45
- categories:
46
- 0: "Label"
47
- 1: "Legend"
48
- 2: "Line"
49
- 3: "Spine"
50
- 4: "Title"
51
- 5: "ptitle"
52
- 6: "xlabel"
53
- 7: "xspine"
54
- 8: "xtitle"
55
- 9: "ylabel"
56
- 10:"yspine"
57
- 11:"ytitle"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  dataset_size: 17635199.0
41
  ---
42
 
43
+ # Line Graphics (LG) dataset
44
 
45
+ This is the official page for the LG dataset for our paper [Line Graphics Digitization: A Step Towards Full Automation](https://link.springer.com/chapter/10.1007/978-3-031-41734-4_27).
46
 
47
+ By [Omar Moured](https://www.linkedin.com/in/omar-moured/) et al.
48
+
49
+ ## Dataset Summary
50
+
51
+ 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.
52
+ In our paper we studedi two level of segmentations, **coarse-level** where we segment (spines, axis-labels, legend, lines, titles),
53
+ 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.
54
+
55
+ ## Category ID Reference
56
+ ```python
57
+ class_id_mapping = {
58
+ "Label": 0,
59
+ "Legend": 1,
60
+ "Line": 2,
61
+ "Spine": 3,
62
+ "Title": 4,
63
+ "ptitle": 5,
64
+ "xlabel": 6,
65
+ "xspine": 7,
66
+ "xtitle": 8,
67
+ "ylabel": 9,
68
+ "yspine": 10,
69
+ "ytitle": 11
70
+ }
71
+ ```
72
+
73
+ ## Dataset structure (train,validation,test)
74
+ - **images** - contains the PIL image of the chart
75
+ - **image_name** - image name with PNG extension
76
+ - **width** - original image width
77
+ - **height** - original image height
78
+ - **instances** - contains **n** number of labeled instances, each instance dictionary has {category_id, annotations}. **The annotations are in COCO format**.
79
+
80
+ ## Sample Usage
81
+
82
+ ```python
83
+ from datasets import load_dataset
84
+
85
+ # Load the dataset
86
+ dataset = load_dataset("omoured/line-graphics-dataset")
87
+
88
+ # Access the training split
89
+ train_dataset = dataset["train"]
90
+
91
+ # Print sample data
92
+ print(dataset["train"][0])
93
+ ```
94
+
95
+ You can render the masks using `pycocotools` library as follows:
96
+ ```python
97
+ from pycocotools import mask
98
+
99
+ polygon_coords = dataset['train'][0]['instances'][1]['mask']
100
+ image_width = dataset['validation'][0]['width']
101
+ image_height = dataset['validation'][0]['height']
102
+
103
+ mask_binary = mask.frPyObjects(polygon_coords, image_height, image_width)
104
+
105
+ segmentation_mask = mask.decode(mask_binary)
106
+ ```
107
+
108
+ ## Copyrights
109
+ This dataset is published under the CC-BY 4.0 license, which allows for unrestricted usage, but it should be cited when used.
110
+
111
+ ## Citation
112
+ ```bibtex
113
+ @inproceedings{moured2023line,
114
+ title={Line Graphics Digitization: A Step Towards Full Automation},
115
+ author={Moured, Omar and Zhang, Jiaming and Roitberg, Alina and Schwarz, Thorsten and Stiefelhagen, Rainer},
116
+ booktitle={International Conference on Document Analysis and Recognition},
117
+ pages={438--453},
118
+ year={2023},
119
+ organization={Springer}
120
+ }
121
+ ```
122
+
123
+ ## Contact
124
+
125
+ If you have any questions or need further assistance with this dataset, please feel free to contact us:
126
+
127
+ - **Omar Moured**, omar.moured@kit.edu