Update SLR.py
Browse files
SLR.py
CHANGED
|
@@ -118,7 +118,7 @@ class SLR(datasets.GeneratorBasedBuilder):
|
|
| 118 |
words.append(labels)
|
| 119 |
ner_tags.append(labels)
|
| 120 |
for item in data['annotations']:
|
| 121 |
-
bbox=item['bbox']
|
| 122 |
-
bboxes.append(bbox)
|
| 123 |
|
| 124 |
yield guid, {"id": str(guid), "words": words , "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "image_path": image_path, "image": image}
|
|
|
|
| 118 |
words.append(labels)
|
| 119 |
ner_tags.append(labels)
|
| 120 |
for item in data['annotations']:
|
| 121 |
+
#bbox=item['bbox']
|
| 122 |
+
bboxes.append(normalize_bbox(item['bbox'],size))
|
| 123 |
|
| 124 |
yield guid, {"id": str(guid), "words": words , "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "image_path": image_path, "image": image}
|