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)
| 33 | |
| 34 | |
| 35 | def nuscenes_data_prep(root_path, |
| 36 | info_prefix, |
| 37 | version, |
| 38 | dataset_name, |
| 39 | out_dir, |
| 40 | max_sweeps=10): |
| 41 | """Prepare data related to nuScenes dataset. |
| 42 | |
| 43 | Related data consists of '.pkl' files recording basic infos, |
| 44 | 2D annotations and groundtruth database. |
| 45 | |
| 46 | Args: |
| 47 | root_path (str): Path of dataset root. |
| 48 | info_prefix (str): The prefix of info filenames. |
| 49 | version (str): Dataset version. |
| 50 | dataset_name (str): The dataset class name. |
| 51 | out_dir (str): Output directory of the groundtruth database info. |
| 52 | max_sweeps (int): Number of input consecutive frames. Default: 10 |
| 53 | """ |
| 54 | nuscenes_converter.create_nuscenes_infos( |
| 55 | root_path, info_prefix, version=version, max_sweeps=max_sweeps) |
| 56 | |
| 57 | if version == 'v1.0-test': |
| 58 | return |
| 59 | |
| 60 | info_train_path = osp.join(root_path, f'{info_prefix}_infos_train.pkl') |
| 61 | info_val_path = osp.join(root_path, f'{info_prefix}_infos_val.pkl') |
| 62 | nuscenes_converter.export_2d_annotation( |
| 63 | root_path, info_train_path, version=version) |
| 64 | nuscenes_converter.export_2d_annotation( |
| 65 | root_path, info_val_path, version=version) |
| 66 | create_groundtruth_database(dataset_name, root_path, info_prefix, |
| 67 | f'{out_dir}/{info_prefix}_infos_train.pkl') |
| 68 | |
| 69 | |
| 70 | def lyft_data_prep(root_path, |
no test coverage detected