Update mini_car_bikes_detection.py
Browse files
mini_car_bikes_detection.py
CHANGED
@@ -40,7 +40,7 @@ class MiniCarBikesDetection(datasets.GeneratorBasedBuilder):
|
|
40 |
"height": datasets.Value("int32"),
|
41 |
"objects": datasets.Sequence(
|
42 |
{
|
43 |
-
"id": datasets.Sequence(datasets.Value("int32")),
|
44 |
"category": datasets.ClassLabel(names=_CATEGORIES),
|
45 |
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
46 |
}
|
@@ -98,7 +98,7 @@ class MiniCarBikesDetection(datasets.GeneratorBasedBuilder):
|
|
98 |
image_name = image_file[0].split("/")[1]
|
99 |
for annotation in annotations:
|
100 |
if image_name == annotation["image"]:
|
101 |
-
objects["
|
102 |
yield image_file, {
|
103 |
"image": {"path": image_file[0], "bytes": image_file[1].read()},
|
104 |
"image_name": image_name,
|
|
|
40 |
"height": datasets.Value("int32"),
|
41 |
"objects": datasets.Sequence(
|
42 |
{
|
43 |
+
# "id": datasets.Sequence(datasets.Value("int32")),
|
44 |
"category": datasets.ClassLabel(names=_CATEGORIES),
|
45 |
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
46 |
}
|
|
|
98 |
image_name = image_file[0].split("/")[1]
|
99 |
for annotation in annotations:
|
100 |
if image_name == annotation["image"]:
|
101 |
+
objects["category"].append(annotation["name"])
|
102 |
yield image_file, {
|
103 |
"image": {"path": image_file[0], "bytes": image_file[1].read()},
|
104 |
"image_name": image_name,
|