forked from traveller59/second.pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_data.py
24 lines (19 loc) · 850 Bytes
/
create_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import copy
from pathlib import Path
import pickle
import fire
import second.data.kitti_dataset as kitti_ds
import second.data.nuscenes_dataset as nu_ds
from second.data.all_dataset import create_groundtruth_database
def kitti_data_prep(root_path):
kitti_ds.create_kitti_info_file(root_path)
kitti_ds.create_reduced_point_cloud(root_path)
create_groundtruth_database("KittiDataset", root_path, Path(root_path) / "kitti_infos_train.pkl")
def nuscenes_data_prep(root_path, version, dataset_name, max_sweeps=10):
nu_ds.create_nuscenes_infos(root_path, version=version, max_sweeps=max_sweeps)
name = "infos_train.pkl"
if version == "v1.0-test":
name = "infos_test.pkl"
create_groundtruth_database(dataset_name, root_path, Path(root_path) / name)
if __name__ == '__main__':
fire.Fire()