bastienp commited on
Commit
0ce0b68
1 Parent(s): d2a0b4d

fix: update json format

Browse files
Files changed (1) hide show
  1. visible-watermark-pita.py +10 -2
visible-watermark-pita.py CHANGED
@@ -101,7 +101,15 @@ class WatermarkPita(datasets.GeneratorBasedBuilder):
101
 
102
  objects = []
103
  for bbox in bboxes:
104
- print(bbox)
 
 
 
 
 
 
 
 
105
  objects.append(bbox)
106
 
107
- yield idx, {"image": image_path, "objects": bboxes}
 
101
 
102
  objects = []
103
  for bbox in bboxes:
104
+ objects.append(
105
+ {
106
+ "x": bbox["x"],
107
+ "y": bbox["y"],
108
+ "w": bbox["width"],
109
+ "h": bbox["height"],
110
+ "label": bbox["label"],
111
+ }
112
+ )
113
  objects.append(bbox)
114
 
115
+ yield idx, {"image": image_path, "objects": objects}