bastienp commited on
Commit
99ad669
1 Parent(s): 6e2ddb7

fix: change json format

Browse files
Files changed (1) hide show
  1. visible-watermark-pita.py +16 -16
visible-watermark-pita.py CHANGED
@@ -99,19 +99,19 @@ class WatermarkPita(datasets.GeneratorBasedBuilder):
99
  with open(label_path, "r") as f:
100
  bboxes = json.load(f)
101
 
102
- print(bboxes)
103
-
104
- objects = []
105
- for bbox in bboxes:
106
- objects.append(
107
- {
108
- "x": bbox["x"],
109
- "y": bbox["y"],
110
- "w": bbox["width"],
111
- "h": bbox["height"],
112
- "label": bbox["label"],
113
- }
114
- )
115
- objects.append(bbox)
116
-
117
- yield idx, {"image": image_path, "objects": objects}
 
99
  with open(label_path, "r") as f:
100
  bboxes = json.load(f)
101
 
102
+ # print(bboxes)
103
+
104
+ # objects = []
105
+ # for bbox in bboxes:
106
+ # objects.append(
107
+ # {
108
+ # "x": bbox["x"],
109
+ # "y": bbox["y"],
110
+ # "w": bbox["width"],
111
+ # "h": bbox["height"],
112
+ # "label": bbox["label"],
113
+ # }
114
+ # )
115
+ # objects.append(bbox)
116
+
117
+ yield idx, {"image": image_path, "objects": bboxes}