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
|`enum[X,Y,...]`| Enumerated type with possible values X, Y, ... |
12
+
|`[T;N]`| Array of N elements of type T |
13
+
|`option[T]`| Optional value of type T |
14
+
|`RLE`| Run-length encoding given as `{"size": <[int;2]>, "counts": <str>}`, where `size` represents `(width, height)`|
15
+
|`AutolabelModel`| Autolabel model information given as `{"name": <str>, "score": <float>, "uncertainty": <option[float]>}`|
15
16
16
17
## Mandatory Tables
17
18
@@ -68,6 +69,8 @@ category {
68
69
"name": <str> -- Name of the category.
69
70
"description": <str> -- Description of the category.
70
71
"index": <option[int]> -- Category index, this is added to support `lidarseg`, or `None` when it doesn't support `lidarseg`.
72
+
"has_orientation": <bool> -- Indicates whether annotations for this category may include an `orientation` field (e.g., traffic light arrows). If omitted, it is treated as `false`.
73
+
"has_number": <bool> -- Indicates whether annotations for this category may include a `number` field (e.g., numeric traffic lights). If omitted, it is treated as `false`.
71
74
}
72
75
```
73
76
@@ -178,6 +181,7 @@ sample_annotation {
178
181
"next": <str> -- Foreign key to the `SampleAnnotation` table associated with the next annotation in the sequence. Empty string `""` if this is the last annotation.
179
182
"prev": <str> -- Foreign key to the `SampleAnnotation` table associated with the previous annotation in the sequence. Empty string `""` if this is the first annotation.
180
183
"automatic_annotation": <bool> -- Indicates whether the annotation was automatically generated. Defaults to `false`.
184
+
"autolabel_metadata": <option[[AutolabelModel;N]]> -- List of models used for autolabeling. Required if `automatic_annotation` is `true`.
181
185
}
182
186
```
183
187
@@ -204,6 +208,7 @@ sample_data {
204
208
"prev": <str> -- Foreign key to the `SampleData` table associated with the previous data in the sequence. Empty string `""` if this is the first data.
205
209
"is_valid": <bool> -- Indicates whether this data is valid. Defaults to `true`.
206
210
"info_filename": <option[str]> -- Relative path to metadata-blob file.
211
+
"autolabel_metadata": <option[[AutolabelModel;N]]> -- List of models used for autolabeling applied to this entire sample_data item (e.g., image or scan).
207
212
}
208
213
```
209
214
@@ -295,7 +300,10 @@ object_ann {
295
300
"attribute_tokens": <[str;N]> -- Foreign keys to the `Attribute` table associated with the attributes of the object.
296
301
"bbox": <[int;4]> -- Bounding box coordinates in the format (xmin, ymin, xmax, ymax).
297
302
"mask": <RLE> -- Run length encoding of instance mask.
303
+
"orientation": <option[float]> -- Orientation of the arrow shape within the bounding box, in radians. Present only for categories where `has_orientation` is true (e.g., traffic light arrows).
304
+
"number": <option[int]> -- The digit displayed within the bounding box. Present only for categories where `has_number` is true (e.g., numeric traffic lights).
298
305
"automatic_annotation": <bool> -- Whether the annotation was automatically generated. Defaults to `false`.
306
+
"autolabel_metadata": <option[[AutolabelModel;N]]> -- List of models used for autolabeling. Required if `automatic_annotation` is `true`.
299
307
}
300
308
```
301
309
@@ -312,6 +320,7 @@ surface_ann {
312
320
"category_token": <str> -- Foreign key to the `Category` table associated with the category of the surface.
313
321
"mask": <RLE> -- Run length encoding of instance mask.
314
322
"automatic_annotation": <bool> -- Whether the annotation was automatically generated. Defaults to `false`.
323
+
"autolabel_metadata": <option[[AutolabelModel;N]]> -- List of models used for autolabeling. Required if `automatic_annotation` is `true`.
315
324
}
316
325
```
317
326
@@ -343,3 +352,15 @@ vehicle_state {
343
352
"additional_info": <option[AdditionalInfo]> -- Additional information about the vehicle state.
344
353
}
345
354
```
355
+
356
+
## AutolabelModel Definition
357
+
358
+
The `AutolabelModel` type used in `autolabel_metadata` fields has the following structure:
359
+
360
+
```json
361
+
AutolabelModel {
362
+
"name": <str> -- Name of the model used for annotation. Can include version information.
363
+
"score": <float> -- Label score for the annotation from this model (range: 0.0–1.0).
364
+
"uncertainty": <option[float]> -- Model-reported uncertainty for the annotation (range: 0.0–1.0). Lower values imply higher confidence.
Copy file name to clipboardExpand all lines: t4_devkit/schema/tables/category.py
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,14 @@ class Category(SchemaBase):
19
19
name (str): Category name.
20
20
description (str): Category description.
21
21
index (int | None, optional): Category index for lidar segmentation.
22
+
has_orientation (bool | None, optional): Indicates whether annotations for this category may include an `orientation` field (e.g., traffic light arrows). If omitted, it is treated as `false`.
23
+
has_number (bool | None, optional): Indicates whether annotations for this category may include a `number` field (e.g., numeric traffic lights). If omitted, it is treated as `false`.
Copy file name to clipboardExpand all lines: t4_devkit/schema/tables/object_ann.py
+13-2Lines changed: 13 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
fromt4_devkit.typingimportRoi
10
10
11
11
from ..nameimportSchemaName
12
+
from .autolabel_metadataimportAutolabelMixin
12
13
from .baseimportSchemaBase
13
14
from .registryimportSCHEMAS
14
15
@@ -51,7 +52,7 @@ def decode(self) -> NDArrayU8:
51
52
52
53
@define(slots=False)
53
54
@SCHEMAS.register(SchemaName.OBJECT_ANN)
54
-
classObjectAnn(SchemaBase):
55
+
classObjectAnn(SchemaBase, AutolabelMixin):
55
56
"""A dataclass to represent schema table of `object_ann.json`.
56
57
57
58
Attributes:
@@ -62,8 +63,13 @@ class ObjectAnn(SchemaBase):
62
63
attribute_tokens (list[str]): Foreign keys. List of attributes for this annotation.
63
64
bbox (Roi): Annotated bounding box. Given as [xmin, ymin, xmax, ymax].
64
65
mask (RLEMask): Instance mask using the COCO format compressed by RLE.
66
+
orientation (float | None, optional): Orientation of the arrow shape within the bounding box, in radians. Present only for categories where `has_orientation` is true (e.g., traffic light arrows).
67
+
number (int | None, optional): The digit displayed within the bounding box. Present only for categories where `has_number` is true (e.g., numeric traffic lights).
68
+
69
+
Inherited from AutolabelMixin:
65
70
automatic_annotation (bool, optional): Indicates if the annotation is fully generated by an ML model.
66
71
If any part is manually modified or annotated by human this value is False.
72
+
autolabel_metadata (list[AutolabelModel] | None, optional): List of models used for autolabeling. Required if `automatic_annotation` is `true`.
Copy file name to clipboardExpand all lines: t4_devkit/schema/tables/sample_data.py
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
fromattrsimportdefine, field, validators
7
7
8
8
from ..nameimportSchemaName
9
+
from .autolabel_metadataimportAutolabelModel
9
10
from .baseimportSchemaBase
10
11
from .registryimportSCHEMAS
11
12
@@ -85,6 +86,7 @@ class SampleData(SchemaBase):
85
86
Empty if start of scene.
86
87
is_valid (bool): True if this data is valid, else False. Invalid data should be ignored.
87
88
info_filename (str): Relative path to metainfo data-blob on disk.
89
+
autolabel_metadata (list[AutolabelModel] | None, optional): List of models used for autolabeling applied to this entire sample_data item (e.g., image or scan).
88
90
89
91
Shortcuts:
90
92
---------
@@ -107,6 +109,13 @@ class SampleData(SchemaBase):
0 commit comments