Apollo 9.0
自动驾驶开放平台
perception_gflags.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
18
19#include <limits>
20
21namespace apollo {
22namespace perception {
23
24// sensor_manager
25DEFINE_string(obs_sensor_intrinsic_path,
26 "/apollo/modules/perception/data/params",
27 "The intrinsics/extrinsics dir.");
28
29DEFINE_string(obs_sensor_meta_file, "sensor_meta.pb.txt",
30 "The SensorManager config file.");
31
32DEFINE_bool(enable_base_object_pool, false, "Enable base object pool.");
33
34// config_manager
35DEFINE_string(config_manager_path, "./", "The ModelConfig config paths.");
36DEFINE_string(work_root, "/apollo/modules/perception",
37 "Project work root direcotry.");
38
39// emergency detection onnx
40DEFINE_string(onnx_obstacle_detector_model,
41 "/apollo/modules/perception/camera"
42 "/lib/obstacle/detector/yolov4/model/yolov4_1_3_416_416.onnx",
43 "The onnx model file for emergency detection");
44DEFINE_string(onnx_test_input_path,
45 "/apollo/modules/perception/inference"
46 "/onnx/testdata/dog.jpg",
47 "The test input image file for onnx inference");
48DEFINE_string(onnx_test_input_name_file,
49 "/apollo/modules/perception/inference"
50 "/onnx/testdata/coco.names",
51 "The test input coco name file for onnx inference");
52DEFINE_string(onnx_prediction_image_path,
53 "/apollo/modules/perception/inference"
54 "/onnx/testdata/prediction.jpg",
55 "The prediction output image file for onnx inference");
56DEFINE_int32(num_classes, 80, "number of classes for onnx inference");
57
58// emergency detection libtorch
59DEFINE_string(torch_detector_model,
60 "/apollo/modules/perception/camera"
61 "/lib/obstacle/detector/yolov4/model/yolov4.pt",
62 "The torch model file for emergency detection");
63
64// lidar sensor name
65DEFINE_string(lidar_sensor_name, "velodyne128", "lidar sensor name");
66
67DEFINE_string(object_template_file, "object_template.pb.txt",
68 "object template config file");
69
70DEFINE_int32(hdmap_sample_step, 1, "hdmap sample step");
71
72// lidar_center_point
73DEFINE_bool(use_trt, false, "True if preprocess in CPU mode.");
74DEFINE_int32(trt_precision, 1,
75 "Precision type of tensorrt, 0: kFloat32, 1: kInt8, 2: kHalf");
77 trt_use_static, 1,
78 "Whether to load the tensorrt graph optimization from a disk path");
79DEFINE_bool(use_calibration, true, "Whether to use calibration table");
80DEFINE_bool(collect_shape_info, false,
81 "Whether to collect dynamic shape before using tensorrt");
82DEFINE_bool(use_dynamicshape, true,
83 "Whether to use dynamic shape when using tensorrt");
84DEFINE_string(dynamic_shape_file,
85 "/apollo/modules/perception/data/models/"
86 "center_point_paddle/collect_shape_info_3lidar_20.pbtxt",
87 "Path of a dynamic shape file for tensorrt");
88
89// scene manager
90DEFINE_string(scene_manager_file, "scene_manager.conf",
91 "scene manager config file");
92DEFINE_string(roi_service_file, "roi_service.conf", "roi service config file");
93DEFINE_string(ground_service_file, "ground_service.conf",
94 "ground service config file");
95
96// front critical judgement (in NOVATEL system)
97DEFINE_bool(need_judge_front_critical, false,
98 "True if should short-miss-detection-but-track-output");
99DEFINE_double(x_front, 3.0, "reserve range smaller than X");
100DEFINE_double(x_back, -3.0, "reserve range bigger than X");
101DEFINE_double(y_front, 8.0, "reserve range smaller than Y");
102DEFINE_double(y_back, 0.0, "reserve range bigger than Y");
103
104// blind TrafficCone (in NOVATEL system)
105DEFINE_bool(need_reserve_blind_cone, false,
106 "True if reserve trafficCone when in host-car-blind-zone");
107DEFINE_double(cone_x_front, 2.0, "cone reserve range smaller than X");
108DEFINE_double(cone_x_back, -2.0, "cone reserve range bigger than X");
109DEFINE_double(cone_y_front, 5.0, "cone reserve range smaller than Y");
110DEFINE_double(cone_y_back, 0.0, "cone reserve range bigger than Y");
111DEFINE_double(cone_reserve_time, 10000.0, "cone reserve time");
112
113} // namespace perception
114} // namespace apollo
DEFINE_double(x_front, 3.0, "reserve range smaller than X")
DEFINE_int32(num_classes, 80, "number of classes for onnx inference")
DEFINE_bool(enable_base_object_pool, false, "Enable base object pool.")
DEFINE_string(obs_sensor_intrinsic_path, "/apollo/modules/perception/data/params", "The intrinsics/extrinsics dir.")
class register implement