sheikh commited on
Commit
2c5027f
·
1 Parent(s): ce47719

Update SLR.py

Browse files
Files changed (1) hide show
  1. SLR.py +2 -2
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}