Prepare data related to Lyft dataset. Related data consists of '.pkl' files recording basic infos, and 2D annotations. Although the ground truth database is not used in Lyft, it can also be generated like nuScenes. Args: root_path (str): Path of dataset root. in
(root_path,
info_prefix,
version,
dataset_name,
out_dir,
max_sweeps=10)
| 113 | |
| 114 | |
| 115 | def lyft_data_prep(root_path, |
| 116 | info_prefix, |
| 117 | version, |
| 118 | dataset_name, |
| 119 | out_dir, |
| 120 | max_sweeps=10): |
| 121 | """Prepare data related to Lyft dataset. |
| 122 | |
| 123 | Related data consists of '.pkl' files recording basic infos, |
| 124 | and 2D annotations. |
| 125 | Although the ground truth database is not used in Lyft, it can also be |
| 126 | generated like nuScenes. |
| 127 | |
| 128 | Args: |
| 129 | root_path (str): Path of dataset root. |
| 130 | info_prefix (str): The prefix of info filenames. |
| 131 | version (str): Dataset version. |
| 132 | dataset_name (str): The dataset class name. |
| 133 | out_dir (str): Output directory of the groundtruth database info. |
| 134 | Not used here if the groundtruth database is not generated. |
| 135 | max_sweeps (int): Number of input consecutive frames. Default: 10 |
| 136 | """ |
| 137 | lyft_converter.create_lyft_infos( |
| 138 | root_path, info_prefix, version=version, max_sweeps=max_sweeps) |
| 139 | |
| 140 | if version == 'v1.01-test': |
| 141 | return |
| 142 | |
| 143 | train_info_name = f'{info_prefix}_infos_train' |
| 144 | val_info_name = f'{info_prefix}_infos_val' |
| 145 | |
| 146 | info_train_path = osp.join(root_path, f'{train_info_name}.pkl') |
| 147 | info_val_path = osp.join(root_path, f'{val_info_name}.pkl') |
| 148 | |
| 149 | lyft_converter.export_2d_annotation( |
| 150 | root_path, info_train_path, version=version) |
| 151 | lyft_converter.export_2d_annotation( |
| 152 | root_path, info_val_path, version=version) |
| 153 | |
| 154 | |
| 155 | def scannet_data_prep(root_path, info_prefix, out_dir, workers): |