Prepare data related to nuScenes 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 v
(root_path,
info_prefix,
version,
dataset_name,
out_dir,
max_sweeps=10)
| 7 | from dataset_converters.update_infos_to_v2 import update_pkl_infos |
| 8 | |
| 9 | def nuscenes_data_prep(root_path, |
| 10 | info_prefix, |
| 11 | version, |
| 12 | dataset_name, |
| 13 | out_dir, |
| 14 | max_sweeps=10): |
| 15 | """Prepare data related to nuScenes dataset. |
| 16 | |
| 17 | Related data consists of '.pkl' files recording basic infos, |
| 18 | 2D annotations and groundtruth database. |
| 19 | |
| 20 | Args: |
| 21 | root_path (str): Path of dataset root. |
| 22 | info_prefix (str): The prefix of info filenames. |
| 23 | version (str): Dataset version. |
| 24 | dataset_name (str): The dataset class name. |
| 25 | out_dir (str): Output directory of the groundtruth database info. |
| 26 | max_sweeps (int, optional): Number of input consecutive frames. |
| 27 | Default: 10 |
| 28 | """ |
| 29 | nuscenes_converter.create_nuscenes_infos( |
| 30 | root_path, info_prefix, version=version, max_sweeps=max_sweeps) |
| 31 | |
| 32 | if version == 'v1.0-test': |
| 33 | info_test_path = osp.join(out_dir, f'{info_prefix}_infos_test.pkl') |
| 34 | update_pkl_infos('nuscenes', out_dir=out_dir, pkl_path=info_test_path) |
| 35 | return |
| 36 | |
| 37 | info_train_path = osp.join(out_dir, f'{info_prefix}_infos_train.pkl') |
| 38 | info_val_path = osp.join(out_dir, f'{info_prefix}_infos_val.pkl') |
| 39 | update_pkl_infos('nuscenes', out_dir=out_dir, pkl_path=info_train_path) |
| 40 | update_pkl_infos('nuscenes', out_dir=out_dir, pkl_path=info_val_path) |
| 41 | |
| 42 | def semantickitti_data_prep(info_prefix, out_dir): |
| 43 | """Prepare the info file for SemanticKITTI dataset. |
no test coverage detected