-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.py
53 lines (44 loc) · 2.59 KB
/
options.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from __future__ import absolute_import, division, print_function
import os
import argparse
file_dir = os.path.dirname(__file__) # the directory that options.py resides in
class Image2PCLOptions:
def __init__(self):
self.parser = argparse.ArgumentParser(description="Image2PCL options")
# INPUT DATA options
self.parser.add_argument("--image_path",
type=str,
help="path to the image data. Can be folder or file",
default=os.path.join(file_dir, "data/kitti_test_images/"))
self.parser.add_argument("--model_path",
type=str,
help="path to the trained model",
default=os.path.join(file_dir, "models/kitti_mono_640x192/"))
self.parser.add_argument("--nusc_camera_parameters",
type=str,
help="path to nuscenes camera parameters json file",
default=os.path.join(__file__, "data/nusc_cam_params.json"))
# DEPTH PREDICTION options
self.parser.add_argument("--data_type",
type=str,
help="dataset to test on",
default="kitti_raw",
choices=["kitti_raw", "nuscenes"])
self.parser.add_argument("--ext",
type=str,
help="set the image extension",
default="jpg",
choices=["jpg", "png"])
self.parser.add_argument("--compare_gt",
help="if set, compares predicted point cloud with lidar gt for kitti data",
action="store_true")
# SEGMENTATION options
self.parser.add_argument("--segmentor_config_path",
help="path to the segmentation model config file",
default=os.path.join(file_dir, "mmsegmentation/configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py"))
self.parser.add_argument("--segmentor_ckpt_path",
help="path to the trained segementation model checkpoint",
default=os.path.join(file_dir, "mmsegmentation/checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth"))
def parse(self):
self.options = self.parser.parse_args()
return self.options