Initialization
Initialize Tier4 class
Tier4 class expects both following dataset directly structure with or without <VERSION> directory:
- With
<VERSION>directory:
data/tier4/
└── <VERSION> ...version number
├── annotation ...contains `*.json` files
├── data
│ ├── CAM_BACK
│ ├── CAM_BACK_LEFT
│ ├── CAM_BACK_RIGHT
│ ├── CAM_FRONT
│ ├── CAM_FRONT_LEFT
│ ├── CAM_FRONT_RIGHT
│ ├── LIDAR_CONCAT
│ └── ...Other sensor channels
...
- Without
<VERSION>directory:
data/tier4/
├── annotation ...contains `*.json` files
├── data
│ ├── CAM_BACK
│ ├── CAM_BACK_LEFT
│ ├── CAM_BACK_RIGHT
│ ├── CAM_FRONT
│ ├── CAM_FRONT_LEFT
│ ├── CAM_FRONT_RIGHT
│ ├── LIDAR_CONCAT
│ └── ...Other sensor channels
...
You can initialize a Tier4 instance as follows:
>>> from t4_devkit import Tier4
>>> t4 = Tier4("data/tier4/", verbose=True)
======
Loading T4 tables in `annotation`...
Reverse indexing...
Done reverse indexing in 0.007 seconds.
======
13 attribute
7 calibrated_sensor
8 category
2524 ego_pose
106 instance
1 log
1 map
72 sample
2390 sample_annotation
2524 sample_data
4 visibility
7 sensor
1 scene
1326 object_ann
0 surface_ann
0 keypoint
Done loading in 0.061 seconds.
======
Note that if you doesn't specify revision parameter in construction, it searches the latest version of the dataset.
By specifying revision=<VERSION>, you can load the specific version of the dataset.
Access to Schema Fields
scene
sample
sample is an annotated keyframe of a scene at a given timestamp.
>>> first_sample_token = my_scene.first_sample_token
>>> my_sample = t4.get("sample", first_sample_token)
You can access the sample_data associated with this sample.
sample.data returns a dict object consists of {str: <SAMPLE_DATA_TOKEN (str)>}.
sample_data
sample_data is references to a family of data that is collected from specific sensors.
sample_annotation
sample_annotation refers to any 3D bounding box in a corresponding sample.
All location data is given with respect to the global coordinate system.
You can access the list of sample_annotation tokens with sample.ann_3ds: list[str].
instance
Each annotated object is instanced to be tracked.
category
A category is the object assignment of an annotation.
attribute
An attribute is a property of an instance that may change throughout different parts of a scene while category remains the same.
visibility
visibility is defined as the fraction of pixels of a particular annotation that are visible over the 6 camera feeds.
Warning
Expected level values in visibility are as below:
- full : No occlusion for the object.
- most : Object is occluded, but by less than 50%.
- partial : Object is occluded, but by more than 50%.
- none : Object is 90-100% occluded and no points/pixels are visible.
Following old formats are also supported but deprecated:
If input level does not satisfy any above cases, VisibilityLevel.UNAVAILABLE will be assigned.
sensor
T4 dataset consists of several type of sensors.
The supported sensor modalities and channels are defined in t4_devkit/schema/tables/sensor.py.
calibrated_sensor
calibrated_sensor consists of the definition of a calibration of a particular sensor based on a vehicle.
Note that the translation and rotation parameters are given with respect to the ego vehicle body frame.
ego_pose
ego_pose contains information about the translation and rotation of the ego vehicle, with respect to the global coordinate system.