feat: script
Browse files
race-numbers-detection-and-ocr.py
CHANGED
@@ -52,7 +52,9 @@ class BotoxInjectionsBeforeAndAfter(datasets.GeneratorBasedBuilder):
|
|
52 |
),
|
53 |
"type": datasets.Value("string"),
|
54 |
"points": datasets.Sequence(
|
55 |
-
datasets.
|
|
|
|
|
56 |
),
|
57 |
"rotation": datasets.Value("float"),
|
58 |
"attributes": datasets.Sequence(
|
@@ -136,8 +138,8 @@ class BotoxInjectionsBeforeAndAfter(datasets.GeneratorBasedBuilder):
|
|
136 |
(mask_path, mask),
|
137 |
) in enumerate(zip(images, masks)):
|
138 |
image_name = image_path.split("/")[-1]
|
139 |
-
img = root.find(f"
|
140 |
-
|
141 |
image_id = img.get("id")
|
142 |
name = img.get("name")
|
143 |
width = img.get("width")
|
|
|
52 |
),
|
53 |
"type": datasets.Value("string"),
|
54 |
"points": datasets.Sequence(
|
55 |
+
datasets.Sequence(
|
56 |
+
datasets.Value("float"),
|
57 |
+
),
|
58 |
),
|
59 |
"rotation": datasets.Value("float"),
|
60 |
"attributes": datasets.Sequence(
|
|
|
138 |
(mask_path, mask),
|
139 |
) in enumerate(zip(images, masks)):
|
140 |
image_name = image_path.split("/")[-1]
|
141 |
+
img = root.find(f"./image[@name='{image_name}']")
|
142 |
+
|
143 |
image_id = img.get("id")
|
144 |
name = img.get("name")
|
145 |
width = img.get("width")
|