added image path
#5
by
skrn
- opened
- funsd-layoutlmv3.py +2 -1
funsd-layoutlmv3.py
CHANGED
|
@@ -74,6 +74,7 @@ class Funsd(datasets.GeneratorBasedBuilder):
|
|
| 74 |
)
|
| 75 |
),
|
| 76 |
"image": datasets.features.Image(),
|
|
|
|
| 77 |
}
|
| 78 |
),
|
| 79 |
supervised_keys=None,
|
|
@@ -140,4 +141,4 @@ class Funsd(datasets.GeneratorBasedBuilder):
|
|
| 140 |
cur_line_bboxes = self.get_line_bbox(cur_line_bboxes)
|
| 141 |
bboxes.extend(cur_line_bboxes)
|
| 142 |
yield guid, {"id": str(guid), "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags,
|
| 143 |
-
"image": image}
|
|
|
|
| 74 |
)
|
| 75 |
),
|
| 76 |
"image": datasets.features.Image(),
|
| 77 |
+
"image_path": image_path
|
| 78 |
}
|
| 79 |
),
|
| 80 |
supervised_keys=None,
|
|
|
|
| 141 |
cur_line_bboxes = self.get_line_bbox(cur_line_bboxes)
|
| 142 |
bboxes.extend(cur_line_bboxes)
|
| 143 |
yield guid, {"id": str(guid), "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags,
|
| 144 |
+
"image": image, "image_path": image_path}
|