dataset info and dataset.py changes.
Browse files
Carla-COCO-Object-Detection-Dataset.py
CHANGED
@@ -59,6 +59,10 @@ class CARLA_COCO(datasets.GeneratorBasedBuilder):
|
|
59 |
"image": datasets.Image(),
|
60 |
"width": datasets.Value("int32"),
|
61 |
"height": datasets.Value("int32"),
|
|
|
|
|
|
|
|
|
62 |
"objects": datasets.Sequence(
|
63 |
{
|
64 |
"id": datasets.Value("int64"),
|
@@ -101,15 +105,14 @@ class CARLA_COCO(datasets.GeneratorBasedBuilder):
|
|
101 |
def _generate_examples(self, annotation_file_path, files):
|
102 |
"""
|
103 |
This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
104 |
-
The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
105 |
"""
|
106 |
-
|
107 |
def process_annot(annot, category_id_to_category):
|
108 |
return {
|
109 |
"id": annot["id"],
|
110 |
"area": annot["area"],
|
111 |
"bbox": annot["bbox"],
|
112 |
-
"category": category_id_to_category[annot["category_id"]],
|
113 |
}
|
114 |
|
115 |
image_id_to_image = {}
|
@@ -135,6 +138,10 @@ class CARLA_COCO(datasets.GeneratorBasedBuilder):
|
|
135 |
"image": {"path": path, "bytes": f.read()},
|
136 |
"width": image["width"],
|
137 |
"height": image["height"],
|
|
|
|
|
|
|
|
|
138 |
"objects": objects,
|
139 |
}
|
140 |
idx += 1
|
|
|
59 |
"image": datasets.Image(),
|
60 |
"width": datasets.Value("int32"),
|
61 |
"height": datasets.Value("int32"),
|
62 |
+
"file_name": datasets.Value("string"),
|
63 |
+
"license": datasets.Value(dtype="int32"),
|
64 |
+
"url": datasets.Value("string"),
|
65 |
+
"date_captured": datasets.Value("string"),
|
66 |
"objects": datasets.Sequence(
|
67 |
{
|
68 |
"id": datasets.Value("int64"),
|
|
|
105 |
def _generate_examples(self, annotation_file_path, files):
|
106 |
"""
|
107 |
This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
|
|
108 |
"""
|
109 |
+
|
110 |
def process_annot(annot, category_id_to_category):
|
111 |
return {
|
112 |
"id": annot["id"],
|
113 |
"area": annot["area"],
|
114 |
"bbox": annot["bbox"],
|
115 |
+
"category": category_id_to_category[annot["category_id"]] + 1,
|
116 |
}
|
117 |
|
118 |
image_id_to_image = {}
|
|
|
138 |
"image": {"path": path, "bytes": f.read()},
|
139 |
"width": image["width"],
|
140 |
"height": image["height"],
|
141 |
+
"file_name": image["file_name"],
|
142 |
+
"license": image["license"],
|
143 |
+
"url": image["url"],
|
144 |
+
"date_captured": image["date_captured"],
|
145 |
"objects": objects,
|
146 |
}
|
147 |
idx += 1
|
Carla-COCO-Object-Detection-Dataset.tar.gz
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:17a6a4d358418aa6ecc69fa1ba66459d7a955589be47797990e08adadb3b55b0
|
3 |
+
size 396708451
|
dataset_info.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"description": "Hugging Face COCO-Style Labelled Dataset for Object Detection in Carla Simulator: This dataset contains 1028 images, each 640x380 pixels, with corresponding publically accessible URLs. The dataset is split into 249 test and 779 training examples. The dataset was collected in Carla Simulator, driving around in autopilot mode in various environments (Town01, Town02, Town03, Town04, Town05) and saving every i-th frame. The labels where then automatically generated using the semantic segmentation information.", "citation": "", "homepage": "https://github.com/yunusskeete/Carla-COCO-Object-Detection-Dataset", "license": "MIT", "features": {"image_id": {"dtype": "int64", "_type": "Value"}, "image": {"_type": "Image"}, "width": {"dtype": "int32", "_type": "Value"}, "height": {"dtype": "int32", "_type": "Value"}, "objects": {"feature": {"id": {"dtype": "int64", "_type": "Value"}, "area": {"dtype": "int64", "_type": "Value"}, "bbox": {"feature": {"dtype": "float32", "_type": "Value"}, "length": 4, "_type": "Sequence"}, "category": {"names": ["automobile", "bike", "motorbike", "traffic_light", "traffic_sign"], "_type": "ClassLabel"}}, "_type": "Sequence"}}, "builder_name": "Carla-COCO-Object-Detection-Dataset", "dataset_name": "Carla-COCO-Object-Detection-Dataset", "config_name": "default", "version": {"version_str": "1.1.0", "major": 1, "minor": 1, "patch": 0}, "download_checksums": {"https://huggingface.co/datasets/yunusskeete/cppe5/resolve/main/cppe5.tar.gz": {"num_bytes": 396704813, "checksum": "
|
|
|
1 |
+
{"description": "Hugging Face COCO-Style Labelled Dataset for Object Detection in Carla Simulator: This dataset contains 1028 images, each 640x380 pixels, with corresponding publically accessible URLs. The dataset is split into 249 test and 779 training examples. The dataset was collected in Carla Simulator, driving around in autopilot mode in various environments (Town01, Town02, Town03, Town04, Town05) and saving every i-th frame. The labels where then automatically generated using the semantic segmentation information.", "citation": "", "homepage": "https://github.com/yunusskeete/Carla-COCO-Object-Detection-Dataset", "license": "MIT", "features": {"image_id": {"dtype": "int64", "_type": "Value"}, "image": {"_type": "Image"}, "width": {"dtype": "int32", "_type": "Value"}, "height": {"dtype": "int32", "_type": "Value"}, "file_name": {"dtype": "string", "_type": "Value"}, "license": {"dtype": "int32", "_type": "Value"}, "url": {"dtype": "string", "_type": "Value"}, "date_captured": {"dtype": "string", "_type": "Value"}, "objects": {"feature": {"id": {"dtype": "int64", "_type": "Value"}, "image_id": {"dtype": "int64", "_type": "Value"}, "area": {"dtype": "int64", "_type": "Value"}, "bbox": {"feature": {"dtype": "float32", "_type": "Value"}, "length": 4, "_type": "Sequence"}, "category": {"names": ["automobile", "bike", "motorbike", "traffic_light", "traffic_sign"], "_type": "ClassLabel"}}, "_type": "Sequence"}}, "builder_name": "Carla-COCO-Object-Detection-Dataset", "dataset_name": "Carla-COCO-Object-Detection-Dataset", "config_name": "default", "version": {"version_str": "1.1.0", "major": 1, "minor": 1, "patch": 0}, "download_checksums": {"https://huggingface.co/datasets/yunusskeete/cppe5/resolve/main/cppe5.tar.gz": {"num_bytes": 396704813, "checksum": "73fd240ba86a82ddb7746b835f28b761fa0f79686f8d03b7c07c1605a79fd06e"}}, "download_size": 396704813, "dataset_size": 396736033, "size_in_bytes": 793440846}
|