Update funsd.py
Browse files
funsd.py
CHANGED
|
@@ -10,20 +10,6 @@ import numpy as np
|
|
| 10 |
logger = datasets.logging.get_logger(__name__)
|
| 11 |
|
| 12 |
|
| 13 |
-
_CITATION = """\
|
| 14 |
-
@article{Jaume2019FUNSDAD,
|
| 15 |
-
title={FUNSD: A Dataset for Form Understanding in Noisy Scanned Documents},
|
| 16 |
-
author={Guillaume Jaume and H. K. Ekenel and J. Thiran},
|
| 17 |
-
journal={2019 International Conference on Document Analysis and Recognition Workshops (ICDARW)},
|
| 18 |
-
year={2019},
|
| 19 |
-
volume={2},
|
| 20 |
-
pages={1-6}
|
| 21 |
-
}
|
| 22 |
-
"""
|
| 23 |
-
_DESCRIPTION = """\
|
| 24 |
-
https://guillaumejaume.github.io/FUNSD/
|
| 25 |
-
"""
|
| 26 |
-
|
| 27 |
def load_image(image_path):
|
| 28 |
image = Image.open(image_path).convert("RGB")
|
| 29 |
w, h = image.size
|
|
@@ -57,7 +43,6 @@ class Funsd(datasets.GeneratorBasedBuilder):
|
|
| 57 |
|
| 58 |
def _info(self):
|
| 59 |
return datasets.DatasetInfo(
|
| 60 |
-
description=_DESCRIPTION,
|
| 61 |
features=datasets.Features(
|
| 62 |
{
|
| 63 |
"id": datasets.Value("string"),
|
|
@@ -71,9 +56,7 @@ class Funsd(datasets.GeneratorBasedBuilder):
|
|
| 71 |
"image_path": datasets.Value("string"),
|
| 72 |
}
|
| 73 |
),
|
| 74 |
-
supervised_keys=None
|
| 75 |
-
homepage="https://guillaumejaume.github.io/FUNSD/",
|
| 76 |
-
citation=_CITATION,
|
| 77 |
)
|
| 78 |
|
| 79 |
def _split_generators(self, dl_manager):
|
|
|
|
| 10 |
logger = datasets.logging.get_logger(__name__)
|
| 11 |
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
def load_image(image_path):
|
| 14 |
image = Image.open(image_path).convert("RGB")
|
| 15 |
w, h = image.size
|
|
|
|
| 43 |
|
| 44 |
def _info(self):
|
| 45 |
return datasets.DatasetInfo(
|
|
|
|
| 46 |
features=datasets.Features(
|
| 47 |
{
|
| 48 |
"id": datasets.Value("string"),
|
|
|
|
| 56 |
"image_path": datasets.Value("string"),
|
| 57 |
}
|
| 58 |
),
|
| 59 |
+
supervised_keys=None
|
|
|
|
|
|
|
| 60 |
)
|
| 61 |
|
| 62 |
def _split_generators(self, dl_manager):
|