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)
| 15 | |
| 16 | |
| 17 | def 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 | |
| 52 | def nuscenes_data_prep(root_path, |
no test coverage detected