Skip to content

Commit 88d24e8

Browse files
committed
updated docs
1 parent 0b12b41 commit 88d24e8

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

luxonis_ml/data/README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ Luxonis Data Format supports **annotations optionally structured into different
153153

154154
The content of the `"annotation"` field depends on the task type and follows the [Annotation Format](#annotation-format) described later in this document.
155155

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+
156167
#### Adding Data with a Generator Function
157168

158169
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(
451462
dataset_name="my_dataset",
452463
dataset_type=DatasetType.COCO,
453464
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"
457471
},
458472
```
459473

@@ -489,6 +503,9 @@ A single class label for the entire image.
489503
}
490504
```
491505

506+
> \[!NOTE\]
507+
> The `classification` task is always added to the dataset.
508+
492509
### Bounding Box
493510

494511
A single bounding box in the `"xywh"` format.

0 commit comments

Comments
 (0)