You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: luxonis_ml/data/README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,6 +153,17 @@ Luxonis Data Format supports **annotations optionally structured into different
153
153
154
154
The content of the `"annotation"` field depends on the task type and follows the [Annotation Format](#annotation-format) described later in this document.
155
155
156
+
#### Task Names
157
+
158
+
The `task_name` field is used to group specific annotations together. This can be used to effectively store different datasets within a single Luxonis dataset, allowing for better organization and management of annotations.
159
+
160
+
Typical usage of `task_name` includes:
161
+
162
+
- Dataset containing `keypoint` task with multiple classes, where each class contain different number of keypoints. In this case, each class must belong to its own task group, e.g. `instance_keypoints_car`, `instance_keypoints_motorbike`. This is necessary in order for `LuxonisLoader` to be able to stack the keypoints from different classes together to transform them into a single numpy array.
163
+
- Dataset containing `segmentation` task together with other tasks, such as `instance_keypoints` or `boundingbox`. In this case, the `segmentation` task should have its own task group, e.g. `segmentation`. This is necessary because the `LuxonisLoader` automatically adds a special `background` class to the semantic segmentation task, which is not applicable to other tasks.
164
+
165
+
If not `task_name` is specified, a default task name of `""` (empty string) will be used, which means that all annotations will be grouped together.
166
+
156
167
#### Adding Data with a Generator Function
157
168
158
169
The recommended approach for adding data is to create a generator function that yields data entries one by one.
@@ -451,9 +462,12 @@ parser = LuxonisParser(
451
462
dataset_name="my_dataset",
452
463
dataset_type=DatasetType.COCO,
453
464
task_name={
454
-
"semantic_segmentation": "TorsoLimbs",
455
-
"semantic_segmentation": "HeadNeck",
456
-
"instance_keypoints": "FullPersonBody"
465
+
"hand": "TorsoLimbs",
466
+
"leg": "TorsoLimbs",
467
+
"torso": "TorsoLimbs",
468
+
"head": "HeadNeck",
469
+
"neck": "HeadNeck",
470
+
"joint": "FullPersonBody"
457
471
},
458
472
```
459
473
@@ -489,6 +503,9 @@ A single class label for the entire image.
489
503
}
490
504
```
491
505
506
+
> \[!NOTE\]
507
+
> The `classification` task is always added to the dataset.
0 commit comments