Datasets:
fix: update json format
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
objects.append(bbox)
|
106 |
|
107 |
-
yield idx, {"image": image_path, "objects":
|
|
|
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}
|