SWHL commited on
Commit
9f0e4d5
·
verified ·
1 Parent(s): 0b44a0b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +180 -3
README.md CHANGED
@@ -1,3 +1,180 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - zh
5
+ size_categories:
6
+ - 1K<n<10K
7
+ ---
8
+
9
+ # CDLA: A Chinese document layout analysis (CDLA) dataset
10
+
11
+ ### 介绍
12
+
13
+ CDLA是一个中文文档版面分析数据集,面向中文文献类(论文)场景。包含以下10个label:
14
+
15
+ |正文|标题|图片|图片标题|表格|表格标题|页眉|页脚|注释|公式|
16
+ |---|---|---|---|---|---|---|---|---|---|
17
+ |Text|Title|Figure|Figure caption|Table|Table caption|Header|Footer|Reference|Equation|
18
+
19
+ 共包含5000张训练集和1000张验证集,分别在train和val目录下。
20
+
21
+ 整理自:[CDLA](https://github.com/buptlihang/CDLA)
22
+
23
+ 样例展示:
24
+
25
+ ![](https://github.com/buptlihang/CDLA/blob/master/imgs/show.png)
26
+
27
+ ### 下载链接
28
+
29
+ - 百度云下载:https://pan.baidu.com/s/1449mhds2ze5JLk-88yKVAA, 提取码: tp0d
30
+ - Google Drive Download:https://drive.google.com/file/d/14SUsp_TG8OPdK0VthRXBcAbYzIBjSNLm/view?usp=sharing
31
+
32
+
33
+ ### 标注格式
34
+
35
+ 我们的标注工具是labelme,所以标注格式和labelme格式一致。这里说明一下比较重要的字段。
36
+
37
+ "shapes": shapes字段是一个list,里面有多个dict,每个dict代表一个标注实例。
38
+
39
+ "labels": 类别。
40
+
41
+ "points": 实例标注。因为我们的标注是Polygon形式,所以points里的坐标数量可能大于4。
42
+
43
+ "shape_type": "polygon"
44
+
45
+ "imagePath": 图片路径/名
46
+
47
+ "imageHeight": 高
48
+
49
+ "imageWidth": 宽
50
+
51
+ 展示一个完整的标注样例:
52
+
53
+ ```json
54
+ {
55
+ "version":"4.5.6",
56
+ "flags":{},
57
+ "shapes":[
58
+ {
59
+ "label":"Title",
60
+ "points":[
61
+ [
62
+ 553.1111111111111,
63
+ 166.59259259259258
64
+ ],
65
+ [
66
+ 553.1111111111111,
67
+ 198.59259259259258
68
+ ],
69
+ [
70
+ 686.1111111111111,
71
+ 198.59259259259258
72
+ ],
73
+ [
74
+ 686.1111111111111,
75
+ 166.59259259259258
76
+ ]
77
+ ],
78
+ "group_id":null,
79
+ "shape_type":"polygon",
80
+ "flags":{}
81
+ },
82
+ {
83
+ "label":"Text",
84
+ "points":[
85
+ [
86
+ 250.5925925925925,
87
+ 298.0740740740741
88
+ ],
89
+ [
90
+ 250.5925925925925,
91
+ 345.0740740740741
92
+ ],
93
+ [
94
+ 188.5925925925925,
95
+ 345.0740740740741
96
+ ],
97
+ [
98
+ 188.5925925925925,
99
+ 410.0740740740741
100
+ ],
101
+ [
102
+ 188.5925925925925,
103
+ 456.0740740740741
104
+ ],
105
+ [
106
+ 324.5925925925925,
107
+ 456.0740740740741
108
+ ],
109
+ [
110
+ 324.5925925925925,
111
+ 410.0740740740741
112
+ ],
113
+ [
114
+ 1051.5925925925926,
115
+ 410.0740740740741
116
+ ],
117
+ [
118
+ 1051.5925925925926,
119
+ 345.0740740740741
120
+ ],
121
+ [
122
+ 1052.5925925925926,
123
+ 345.0740740740741
124
+ ],
125
+ [
126
+ 1052.5925925925926,
127
+ 298.0740740740741
128
+ ]
129
+ ],
130
+ "group_id":null,
131
+ "shape_type":"polygon",
132
+ "flags":{}
133
+ },
134
+ {
135
+ "label":"Footer",
136
+ "points":[
137
+ [
138
+ 1033.7407407407406,
139
+ 1634.5185185185185
140
+ ],
141
+ [
142
+ 1033.7407407407406,
143
+ 1646.5185185185185
144
+ ],
145
+ [
146
+ 1052.7407407407406,
147
+ 1646.5185185185185
148
+ ],
149
+ [
150
+ 1052.7407407407406,
151
+ 1634.5185185185185
152
+ ]
153
+ ],
154
+ "group_id":null,
155
+ "shape_type":"polygon",
156
+ "flags":{}
157
+ }
158
+ ],
159
+ "imagePath":"val_0031.jpg",
160
+ "imageData":null,
161
+ "imageHeight":1754,
162
+ "imageWidth":1240
163
+ }
164
+ ```
165
+
166
+ ### 转coco格式
167
+
168
+ 执行命令:
169
+
170
+ ```
171
+ # train
172
+ python3 labelme2coco.py CDLA_dir/train train_save_path --labels labels.txt
173
+
174
+ # val
175
+ python3 labelme2coco.py CDLA_dir/val val_save_path --labels labels.txt
176
+ ```
177
+
178
+ 转换结果保存在train_save_path/val_save_path目录下。
179
+
180
+ labelme2coco.py取自labelme,更多信息请参考[labelme官方项目](https://github.com/wkentaro/labelme/tree/master/examples/instance_segmentation)