MCPcopy Create free account
hub / github.com/AutonomousVehicleLaboratory/SemVecNet / kitti_data_prep

Function kitti_data_prep

SemVecNet/tools/create_data.py:17–49  ·  view source on GitHub ↗

Prepare data related to Kitti dataset. Related data consists of '.pkl' files recording basic infos, 2D annotations and groundtruth database. Args: root_path (str): Path of dataset root. info_prefix (str): The prefix of info filenames. version (str): Dataset vers

(root_path, info_prefix, version, out_dir)

Source from the content-addressed store, hash-verified

15
16
17def kitti_data_prep(root_path, info_prefix, version, out_dir):
18 """Prepare data related to Kitti dataset.
19
20 Related data consists of '.pkl' files recording basic infos,
21 2D annotations and groundtruth database.
22
23 Args:
24 root_path (str): Path of dataset root.
25 info_prefix (str): The prefix of info filenames.
26 version (str): Dataset version.
27 out_dir (str): Output directory of the groundtruth database info.
28 """
29 kitti.create_kitti_info_file(root_path, info_prefix)
30 kitti.create_reduced_point_cloud(root_path, info_prefix)
31
32 info_train_path = osp.join(root_path, f'{info_prefix}_infos_train.pkl')
33 info_val_path = osp.join(root_path, f'{info_prefix}_infos_val.pkl')
34 info_trainval_path = osp.join(root_path,
35 f'{info_prefix}_infos_trainval.pkl')
36 info_test_path = osp.join(root_path, f'{info_prefix}_infos_test.pkl')
37 kitti.export_2d_annotation(root_path, info_train_path)
38 kitti.export_2d_annotation(root_path, info_val_path)
39 kitti.export_2d_annotation(root_path, info_trainval_path)
40 kitti.export_2d_annotation(root_path, info_test_path)
41
42 create_groundtruth_database(
43 'KittiDataset',
44 root_path,
45 info_prefix,
46 f'{out_dir}/{info_prefix}_infos_train.pkl',
47 relative_path=False,
48 mask_anno_path='instances_train.json',
49 with_mask=(version == 'mask'))
50
51
52def nuscenes_data_prep(root_path,

Callers 1

create_data.pyFile · 0.70

Calls 1

Tested by

no test coverage detected