Update mini_car_bikes_detection.py
Browse files
mini_car_bikes_detection.py
CHANGED
@@ -74,10 +74,12 @@ class MiniCarBikesDetection(datasets.GeneratorBasedBuilder):
|
|
74 |
annotations = json.load(jf)
|
75 |
for image_file in image_files:
|
76 |
image_name = image_file[0].split("/")[1]
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
81 |
|
82 |
|
83 |
|
|
|
74 |
annotations = json.load(jf)
|
75 |
for image_file in image_files:
|
76 |
image_name = image_file[0].split("/")[1]
|
77 |
+
for annotation in annotations:
|
78 |
+
if image_name == annotation["image"]:
|
79 |
+
yield image_file, {
|
80 |
+
"image": {"path": image_file[0], "bytes": image_file[1].read()},
|
81 |
+
"image_name": image_name,
|
82 |
+
}
|
83 |
|
84 |
|
85 |
|