Souvik3333 commited on
Commit
4603184
·
verified ·
1 Parent(s): 3c01314

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -3
README.md CHANGED
@@ -1,3 +1,37 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - table-question-answering
5
+ language:
6
+ - en
7
+ tags:
8
+ - OCR
9
+ - Tables
10
+ - IDP
11
+ ---
12
+
13
+ This dataset is generated syhthetically to create tables with following characteristics:
14
+ 1. Empty cell percentage in following range [0,30] (Dense)
15
+ 2. There is clear seperator between rows and columns (Structured).
16
+ 3. 4 <= num rows <= 10, 2 <= num columns <= 6 (Small)
17
+
18
+ ### Load the dataset
19
+
20
+ ```python
21
+ import io
22
+ import pandas as pd
23
+ from PIL import Image
24
+
25
+ def bytes_to_image(self, image_bytes: bytes):
26
+ return Image.open(io.BytesIO(image_bytes))
27
+
28
+ def parse_annotations(self, annotations: str) -> pd.DataFrame:
29
+ return pd.read_json(StringIO(annotations), orient="records")
30
+
31
+ test_data = load_dataset('nanonets/small_dense_structured_table', split='test')
32
+ data_point = test_data[0]
33
+ image, gt_table = (
34
+ bytes_to_image(data_point["images"]),
35
+ parse_annotations(data_point["annotation"]),
36
+ )
37
+ ```