Souvik3333 commited on
Commit
96c6379
·
verified ·
1 Parent(s): 3b09f69

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -3
README.md CHANGED
@@ -1,3 +1,39 @@
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
+ size_categories:
12
+ - n<1K
13
+ ---
14
+
15
+ This dataset is generated syhthetically to create tables with following characteristics:
16
+ 1. Empty cell percentage in following range [40,70] (Sparse)
17
+ 2. There is no seperator between rows and columns (un-structured).
18
+ 3. 4 <= num rows <= 10, 2 <= num columns <= 6 (Small)
19
+
20
+ ### Load the dataset
21
+
22
+ ```python
23
+ import io
24
+ import pandas as pd
25
+ from PIL import Image
26
+
27
+ def bytes_to_image(self, image_bytes: bytes):
28
+ return Image.open(io.BytesIO(image_bytes))
29
+
30
+ def parse_annotations(self, annotations: str) -> pd.DataFrame:
31
+ return pd.read_json(StringIO(annotations), orient="records")
32
+
33
+ test_data = load_dataset('nanonets/small_sparse_unstructured_table', split='test')
34
+ data_point = test_data[0]
35
+ image, gt_table = (
36
+ bytes_to_image(data_point["images"]),
37
+ parse_annotations(data_point["annotation"]),
38
+ )
39
+ ```