MCPcopy Create free account
hub / github.com/Tsinghua-MARS-Lab/GeoMAE / lyft_data_prep

Function lyft_data_prep

tools/create_data.py:115–152  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

113
114
115def 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
155def scannet_data_prep(root_path, info_prefix, out_dir, workers):

Callers 1

create_data.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected