d3d.dataset.kitti360
- class d3d.dataset.kitti360.KITTI360Loader(base_path, phase='training', inzip=False, trainval_split=1, trainval_random=False, trainval_byseq=False, nframes=0, interpolate_pose=True, compression=0)[source]
Bases:
d3d.dataset.base.TrackingDatasetBase
Load KITTI-360 dataset into a usable format. The dataset structure should follow the official documents.
Zip Files:
- calibration.zip - data_3d_bboxes.zip - data_3d_semantics.zip - data_poses.zip - data_timestamps_sick.zip - data_timestamps_velodyne.zip - 2013_05_28_drive_0000_sync_sick.zip - 2013_05_28_drive_0000_sync_velodyne.zip - ...
Unzipped Structure:
- <base_path directory> - calibration - data_2d_raw - 2013_05_28_drive_0000_sync - ... - data_2d_semantics - 2013_05_28_drive_0000_sync - ... - data_3d_raw - 2013_05_28_drive_0000_sync - ... - data_3d_semantics - 2013_05_28_drive_0000_sync - ...
For description of constructor parameters, please refer to
d3d.dataset.base.TrackingDatasetBase
- Parameters
interpolate_pose (bool) – Not all frames contain pose data in KITTI-360. The loader returns interpolated pose if this param is set as True, otherwise returns None
compression (int) – The compression type of the created zip for semantic files. It should be one of the compression types specified in
zipfile
module.base_path – directory containing the zip files, or the required data
inzip – whether the dataset is store in original zip archives or unzipped
phase – training, validation or testing
trainval_split – the ratio to split training dataset. See documentation of
split_trainval_seq()
for detail.trainval_random – whether select the train/val split randomly. See documentation of
split_trainval_seq()
for detail.nframes –
number of consecutive frames returned from the accessors
If it’s a positive number, then it returns adjacent frames with total number reduced
If it’s a negative number, absolute value of it is consumed
If it’s zero, then it act like object detection dataset, which means the methods will return unpacked data
trainval_byseq – Whether split trainval partitions by sequences instead of frames
- VALID_OBJ_CLASSES
- annotation_3dobject(idx, raw=False, visible_range=80)[source]
- Parameters
visible_range – range for visible objects. Objects beyond that distance will be removed when reporting
- calibration_data(idx)[source]
Return the calibration data. Notices that we assume the calibration is fixed among one squence, so it always return a single object.
- Parameters
idx – index of requested lidar frames
raw – If false, converted
d3d.abstraction.TransformSet
will be returned, otherwise raw data will be returned in original format
- camera_data(idx, names='cam1')[source]
Return the camera image data
- Parameters
names – name of requested camera sensors. The default sensor is the first element in
VALID_CAM_NAMES
.idx – index of requested image frames, see description in
lidar_data()
method.
- intermediate_data(idx, names='sick', ninter_frames=None, report_semantic=True)[source]
Return the intermediate data (and annotations) between keyframes. For key frames data, please use corresponding function to load them
- Parameters
idx – index of requested data frames
names – name of requested sensors.
ninter_frames – number of intermediate frames. If set to None, then all frames will be returned.
- lidar_data(idx, names='velo', formatted=False)[source]
If multiple frames are requested, the results will be a list of list. Outer list corresponds to frame names and inner list corresponds to time sequence. So len(names) × len(frames) data objects will be returned
- Parameters
names – name of requested lidar sensors. The default frame is the first element in
VALID_LIDAR_NAMES
.idx – index of requested lidar frames
formatted –
if true, the point cloud wrapped in a numpy record array will be returned
If single index is given, then the frame indexing is done on the whole dataset with trainval split
If a tuple is given, it’s considered to be a unique id of the frame (from
identity()
method), trainval split is ignored in this way and nframes offset is not added
- pose(idx)[source]
Return (relative) pose of the vehicle for the frame. The base frame should be ground attached which means the base frame will follow a East-North-Up axis order.
- Parameters
idx – index of requested frame
names – specify the sensor whose pose is requested. This option only make sense when the dataset contains separate timestamps for data from each sensor. In this case, the pose either comes from dataset, or from interpolation.
raw – if false, targets will be converted to d3d
d3d.abstraction.EgoPose
format, otherwise raw data will be returned in original format.
- property pose_name
Return the sensor frame name whose coordinate the pose is reported in. This frame can be different from the default frame in the calibration TransformSet.
- property sequence_ids
Return the list of sequence ids
- property sequence_sizes
Return the mapping from sequence id to sequence sizes
- timestamp(idx, names='velo')[source]
Return the timestamp of frame specified by the index, represented by Unix timestamp in macroseconds (usually 16 digits integer)
- Parameters
idx – index of requested frame
names – specify the sensor whose pose is requested. This option only make sense when the dataset contains separate timestamps for data from each sensor.
- class d3d.dataset.kitti360.Kitti360Class(value)[source]
Bases:
enum.IntFlag
Categories and attributes of an annotation in KITTI-360 dataset.
The ids are encoded into 2bytes integer:
0xFF │└: category └─: label
- bicycle = 135
- box = 144
- bridge = 82
- building = 18
- bus = 55
- car = 23
- caravan = 71
- construction = 2
- dynamic = 96
- ego_vehicle = 32
- fence = 50
- flat = 1
- garage = 112
- gate = 128
- ground = 112
- guard_rail = 66
- human = 6
- lamp = 96
- license_plate = 151
- motorcycle = 119
- nature = 4
- object_ = 3
- out_of_roi = 64
- parking = 49
- person = 22
- pole = 19
- polegroup = 35
- rail_track = 65
- rectification_border = 48
- rider = 38
- road = 17
- sidewalk = 33
- sky = 5
- smallpole = 80
- static = 80
- stop = 144
- terrain = 36
- traffic_light = 51
- traffic_sign = 67
- trailer = 87
- train = 103
- trash_bin = 112
- truck = 39
- tunnel = 98
- unknown_construction = 128
- unknown_object = 160
- unknown_vehicle = 144
- unlabeled = 16
- vegetation = 20
- vehicle = 7
- vending_machine = 128
- void = 0
- wall = 34