Datasets:
fix: update file supervised key
Browse files- visible-watermark-pita.py +13 -12
visible-watermark-pita.py
CHANGED
@@ -67,6 +67,7 @@ class WatermarkPita(datasets.GeneratorBasedBuilder):
|
|
67 |
),
|
68 |
}
|
69 |
),
|
|
|
70 |
description=_DESCRIPTION,
|
71 |
)
|
72 |
|
@@ -97,17 +98,17 @@ class WatermarkPita(datasets.GeneratorBasedBuilder):
|
|
97 |
with open(label_path, "r") as f:
|
98 |
bbox = json.load(f)
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
|
113 |
yield idx, {"image": image_path, "objects": objects}
|
|
|
67 |
),
|
68 |
}
|
69 |
),
|
70 |
+
supervised_keys=None,
|
71 |
description=_DESCRIPTION,
|
72 |
)
|
73 |
|
|
|
98 |
with open(label_path, "r") as f:
|
99 |
bbox = json.load(f)
|
100 |
|
101 |
+
objects = []
|
102 |
+
objects.append(
|
103 |
+
{
|
104 |
+
"label": bbox["label"],
|
105 |
+
"bbox": [
|
106 |
+
bbox["x"],
|
107 |
+
bbox["y"],
|
108 |
+
bbox["width"],
|
109 |
+
bbox["height"],
|
110 |
+
],
|
111 |
+
}
|
112 |
+
)
|
113 |
|
114 |
yield idx, {"image": image_path, "objects": objects}
|