Skip to content

Commit cb19d15

Browse files
authored
Merge pull request #890 from tier4/fix/centerpoint_model_path
2 parents 2266110 + b77a29f commit cb19d15

File tree

17 files changed

+54
-39
lines changed

17 files changed

+54
-39
lines changed

launch/tier4_perception_launch/launch/object_recognition/detection/lidar_based_detection.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<arg name="use_validator" default="true" description="use obstacle_pointcloud based validator"/>
1111
<arg name="lidar_detection_score_threshold" default="0.35"/>
1212
<arg name="centerpoint_model_name" default="centerpoint_tiny"/>
13-
<arg name="centerpoint_model_path" default="$(find-pkg-share lidar_centerpoint)/data"/>
13+
<arg name="centerpoint_model_path" default="$(var data_path)/lidar_centerpoint"/>
1414
<arg name="lidar_model_param_path" default="$(find-pkg-share lidar_centerpoint)/config"/>
1515
<arg name="objects_validation_method" default="obstacle_pointcloud"/>
1616
<arg name="objects_filter_method" default="lanelet_filter"/>

launch/tier4_perception_launch/launch/perception.launch.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525

2626
<!-- CenterPoint model parameters -->
2727
<arg name="centerpoint_model_name" default="centerpoint_tiny" description="options: `centerpoint` or `centerpoint_tiny`"/>
28-
<arg name="centerpoint_model_path" default="$(find-pkg-share lidar_centerpoint)/data"/>
28+
<arg name="centerpoint_model_path" default="$(var data_path)/lidar_centerpoint"/>
2929

3030
<!-- Common parameters -->
3131
<arg name="input/pointcloud" default="/sensing/lidar/concatenated/pointcloud" description="The topic will be used in the detection module"/>
3232
<arg name="mode" default="camera_lidar_fusion" description="options: `camera_lidar_radar_fusion`, `camera_lidar_fusion`, `lidar_radar_fusion`, `lidar` or `radar`"/>
33+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
3334
<arg name="lidar_detection_model" default="centerpoint" description="options: `centerpoint`, `apollo`, `pointpainting`, `clustering`"/>
3435
<arg name="image_raw0" default="/sensing/camera/camera0/image_rect_color" description="image raw topic name"/>
3536
<arg name="camera_info0" default="/sensing/camera/camera0/camera_info" description="camera info topic name"/>
@@ -78,11 +79,11 @@
7879
<arg name="traffic_light_image_number" default="1" description="choose traffic light image raw number(1-2)"/>
7980
<arg
8081
name="traffic_light_fine_detector_model_path"
81-
default="$(find-pkg-share traffic_light_fine_detector)/data"
82+
default="$(var data_path)/traffic_light_fine_detector"
8283
description="options: `tlr_yolox_s_batch_**`. The batch number must be either one of 1, 4, 6"
8384
/>
8485
<arg name="traffic_light_fine_detector_model_name" default="tlr_yolox_s_batch_6" description="options: `tlr_yolox_s_batch_**`. The batch number must be either one of 1, 4, 6"/>
85-
<arg name="traffic_light_classifier_model_path" default="$(find-pkg-share traffic_light_classifier)/data" description="classifier onnx model path"/>
86+
<arg name="traffic_light_classifier_model_path" default="$(var data_path)/traffic_light_classifier" description="classifier onnx model path"/>
8687
<arg
8788
name="traffic_light_classifier_model_name"
8889
default="traffic_light_classifier_mobilenetv2_batch_6"

perception/image_projection_based_fusion/launch/pointpainting_fusion.launch.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
<arg name="input/camera_info7" default="/camera_info7"/>
1919
<arg name="input/pointcloud" default="/sensing/lidar/top/rectified/pointcloud"/>
2020
<arg name="output/objects" default="objects"/>
21+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
2122
<arg name="model_name" default="pointpainting" description="options: `pointpainting`"/>
22-
<arg name="model_path" default="$(find-pkg-share image_projection_based_fusion)/data"/>
23+
<arg name="model_path" default="$(var data_path)/image_projection_based_fusion"/>
2324
<arg name="model_param_path" default="$(find-pkg-share image_projection_based_fusion)/config/$(var model_name).param.yaml"/>
2425
<arg name="class_remapper_param_path" default="$(find-pkg-share lidar_centerpoint)/config/detection_class_remapper.param.yaml"/>
2526
<arg name="sync_param_path" default="$(find-pkg-share image_projection_based_fusion)/config/roi_sync.param.yaml"/>

perception/lidar_centerpoint/launch/centerpoint_vs_centerpoint-tiny/centerpoint_vs_centerpoint-tiny.launch.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<arg name="score_threshold" default="0.35"/>
66
<arg name="rviz_config1" default="$(var rviz_path)/centerpoint_tiny.rviz" description="rviz config"/>
77
<arg name="rviz_config2" default="$(var rviz_path)/centerpoint.rviz" description="rviz config"/>
8+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
89

910
<set_parameter name="use_sim_time" value="true"/>
1011
<group>
@@ -21,7 +22,7 @@
2122
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
2223
<arg name="score_threshold" value="$(var score_threshold)"/>
2324
<arg name="model_name" value="centerpoint"/>
24-
<arg name="model_path" value="$(find-pkg-share lidar_centerpoint)/data"/>
25+
<arg name="model_path" value="$(var data_path)/lidar_centerpoint"/>
2526
<arg name="model_param_path" value="$(find-pkg-share lidar_centerpoint)/config/$(var model_name).param.yaml"/>
2627
</include>
2728
</group>
@@ -35,7 +36,7 @@
3536
<arg name="input/pointcloud" value="$(var input/pointcloud)"/>
3637
<arg name="score_threshold" value="$(var score_threshold)"/>
3738
<arg name="model_name" value="centerpoint_tiny"/>
38-
<arg name="model_path" value="$(find-pkg-share lidar_centerpoint)/data"/>
39+
<arg name="model_path" value="$(var data_path)/lidar_centerpoint"/>
3940
<arg name="model_param_path" value="$(find-pkg-share lidar_centerpoint)/config/$(var model_name).param.yaml"/>
4041
</include>
4142
</group>

perception/lidar_centerpoint/launch/lidar_centerpoint.launch.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<launch>
33
<arg name="input/pointcloud" default="/sensing/lidar/pointcloud"/>
44
<arg name="output/objects" default="objects"/>
5+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
56
<arg name="model_name" default="centerpoint_tiny" description="options: `centerpoint` or `centerpoint_tiny`"/>
6-
<arg name="model_path" default="$(find-pkg-share lidar_centerpoint)/data"/>
7+
<arg name="model_path" default="$(var data_path)/lidar_centerpoint"/>
78
<arg name="model_param_path" default="$(find-pkg-share lidar_centerpoint)/config/$(var model_name).param.yaml"/>
89
<arg name="class_remapper_param_path" default="$(find-pkg-share lidar_centerpoint)/config/detection_class_remapper.param.yaml"/>
910
<arg name="score_threshold" default="0.35"/>

perception/lidar_centerpoint/launch/single_inference_lidar_centerpoint.launch.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
22
<launch>
3+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
34
<arg name="model_name" default="centerpoint_tiny" description="options: `centerpoint` or `centerpoint_tiny`"/>
4-
<arg name="model_path" default="$(find-pkg-share lidar_centerpoint)/data"/>
5+
<arg name="model_path" default="$(var data_path)/lidar_centerpoint"/>
56
<arg name="model_param_path" default="$(find-pkg-share lidar_centerpoint)/config/$(var model_name).param.yaml"/>
67
<arg name="class_remapper_param_path" default="$(find-pkg-share lidar_centerpoint)/config/detection_class_remapper.param.yaml"/>
78
<arg name="score_threshold" default="0.35"/>

perception/tensorrt_yolo/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Jocher, G., et al. (2021). ultralytics/yolov5: v6.0 - YOLOv5n 'Nano' models, Rob
5555

5656
| Name | Type | Default Value | Description |
5757
| ----------------------- | ------ | ------------- | ------------------------------------------------------------------ |
58+
| `data_path` | string | "" | Packages data and artifacts directory path |
5859
| `onnx_file` | string | "" | The onnx file name for yolo model |
5960
| `engine_file` | string | "" | The tensorrt engine file name for yolo model |
6061
| `label_file` | string | "" | The label file with label names for detected objects written on it |
@@ -71,7 +72,7 @@ This package includes multiple licenses.
7172

7273
All YOLO ONNX models are converted from the officially trained model. If you need information about training datasets and conditions, please refer to the official repositories.
7374

74-
All models are downloaded automatically when building. When launching the node with a model for the first time, the model is automatically converted to TensorRT, although this may take some time.
75+
All models are downloaded during env preparation by ansible (as mention in [installation](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/)). It is also possible to download them manually, see [Manual downloading of artifacts](https://github.com/autowarefoundation/autoware/tree/main/ansible/roles/artifacts) . When launching the node with a model for the first time, the model is automatically converted to TensorRT, although this may take some time.
7576

7677
### YOLOv3
7778

perception/tensorrt_yolo/launch/tensorrt_yolo.launch.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@
33
<arg name="label_file" default="coco.names"/>
44
<arg name="input_topic" default="/image_raw"/>
55
<arg name="output_topic" default="rois"/>
6-
<arg name="engine_file" default="$(find-pkg-share tensorrt_yolo)/data/$(var yolo_type).engine"/>
6+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
7+
<arg name="engine_file" default="$(var data_path)/tensorrt_yolo/$(var yolo_type).engine"/>
78
<arg name="calib_image_directory" default="$(find-pkg-share tensorrt_yolo)/calib_image/"/>
89
<arg name="mode" default="FP32"/>
910
<arg name="gpu_id" default="0"/>
1011
<node pkg="tensorrt_yolo" exec="tensorrt_yolo_node" name="$(anon tensorrt_yolo)" output="screen">
1112
<remap from="in/image" to="$(var input_topic)"/>
1213
<remap from="out/objects" to="$(var output_topic)"/>
1314
<remap from="out/image" to="$(var output_topic)/debug/image"/>
14-
<param name="onnx_file" type="str" value="$(find-pkg-share tensorrt_yolo)/data/$(var yolo_type).onnx"/>
15+
<param name="onnx_file" type="str" value="$(var data_path)/tensorrt_yolo/$(var yolo_type).onnx"/>
1516
<param name="engine_file" type="str" value="$(var engine_file)"/>
16-
<param name="label_file" type="str" value="$(find-pkg-share tensorrt_yolo)/data/$(var label_file)"/>
17+
<param name="label_file" type="str" value="$(var data_path)/tensorrt_yolo/$(var label_file)"/>
1718
<param name="calib_image_directory" type="str" value="$(var calib_image_directory)"/>
18-
<param name="calib_cache_file" type="str" value="$(find-pkg-share tensorrt_yolo)/data/$(var yolo_type).cache"/>
19+
<param name="calib_cache_file" type="str" value="$(var data_path)/tensorrt_yolo/$(var yolo_type).cache"/>
1920
<param name="mode" type="str" value="$(var mode)"/>
2021
<param name="gpu_id" type="int" value="$(var gpu_id)"/>
2122
<param from="$(find-pkg-share tensorrt_yolo)/config/$(var yolo_type).param.yaml"/>

perception/tensorrt_yolox/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ those are labeled as `UNKNOWN`, while detected rectangles are drawn in the visua
7171

7272
## Onnx model
7373

74-
A sample model (named `yolox-tiny.onnx`) is downloaded automatically during the build process.
74+
A sample model (named `yolox-tiny.onnx`) is downloaded by ansible script on env preparation stage, if not, please, follow [Manual downloading of artifacts](https://github.com/autowarefoundation/autoware/tree/main/ansible/roles/artifacts).
7575
To accelerate Non-maximum-suppression (NMS), which is one of the common post-process after object detection inference,
7676
`EfficientNMS_TRT` module is attached after the ordinal YOLOX (tiny) network.
7777
The `EfficientNMS_TRT` module contains fixed values for `score_threshold` and `nms_threshold` in it,
@@ -146,7 +146,7 @@ Please refer [the official document](https://github.com/Megvii-BaseDetection/YOL
146146

147147
## Label file
148148

149-
A sample label file (named `label.txt`)is also downloaded automatically during the build process
149+
A sample label file (named `label.txt`)is also downloaded automatically during env preparation process
150150
(**NOTE:** This file is incompatible with models that output labels for the COCO dataset (e.g., models from the official YOLOX repository)).
151151

152152
This file represents the correspondence between class index (integer outputted from YOLOX network) and

perception/tensorrt_yolox/launch/yolox_s_plus_opt.launch.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<arg name="input/image" default="/sensing/camera/camera0/image_rect_color"/>
55
<arg name="output/objects" default="/perception/object_recognition/detection/rois0"/>
66
<arg name="model_name" default="yolox-sPlus-T4-960x960-pseudo-finetune"/>
7-
<arg name="model_path" default="$(find-pkg-share tensorrt_yolox)/data"/>
7+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
8+
<arg name="model_path" default="$(var data_path)/tensorrt_yolox"/>
89
<arg name="score_threshold" default="0.35"/>
910
<arg name="nms_threshold" default="0.7"/>
1011
<arg name="precision" default="int8" description="operation precision to be used on inference. Valid value is one of: [fp32, fp16, int8]"/>

perception/tensorrt_yolox/launch/yolox_tiny.launch.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<arg name="input/image" default="/sensing/camera/camera0/image_rect_color"/>
44
<arg name="output/objects" default="/perception/object_recognition/detection/rois0"/>
55
<arg name="model_name" default="yolox-tiny"/>
6-
<arg name="model_path" default="$(find-pkg-share tensorrt_yolox)/data"/>
6+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
7+
<arg name="model_path" default="$(var data_path)/tensorrt_yolox"/>
78
<arg name="score_threshold" default="0.35"/>
89
<arg name="nms_threshold" default="0.7"/>
910
<arg name="precision" default="fp16" description="operation precision to be used on inference. Valid value is one of: [fp32, fp16, int8]"/>

perception/traffic_light_classifier/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ These colors and shapes are assigned to the message as follows:
5555
| Name | Type | Description |
5656
| ----------------- | ---- | ------------------------------------------- |
5757
| `classifier_type` | int | if the value is `1`, cnn_classifier is used |
58+
| `data_path` | str | packages data and artifacts directory path |
5859

5960
### Core Parameters
6061

perception/traffic_light_classifier/launch/traffic_light_classifier.launch.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<arg name="input/image" default="~/image_raw"/>
33
<arg name="input/rois" default="~/rois"/>
44
<arg name="output/traffic_signals" default="classified/traffic_signals"/>
5-
<arg name="classifier_label_path" default="$(find-pkg-share traffic_light_classifier)/data/lamp_labels.txt" description="classifier label path"/>
6-
<arg name="classifier_model_path" default="$(find-pkg-share traffic_light_classifier)/data/traffic_light_classifier_mobilenetv2_batch_6.onnx" description="classifier onnx model path"/>
5+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
6+
<arg name="classifier_label_path" default="$(var data_path)/traffic_light_classifier/lamp_labels.txt" description="classifier label path"/>
7+
<arg name="classifier_model_path" default="$(var data_path)/traffic_light_classifier/traffic_light_classifier_mobilenetv2_batch_6.onnx" description="classifier onnx model path"/>
78
<arg name="classifier_precision" default="fp16"/>
89

910
<arg name="use_gpu" default="true"/>

perception/traffic_light_fine_detector/README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ Based on the camera image and the global ROI array detected by `map_based_detect
5050

5151
### Node Parameters
5252

53-
| Name | Type | Default Value | Description |
54-
| -------------------------- | ------ | ------------- | ------------------------------------------------------------------ |
55-
| `fine_detector_model_path` | string | "" | The onnx file name for yolo model |
56-
| `fine_detector_label_path` | string | "" | The label file with label names for detected objects written on it |
57-
| `fine_detector_precision` | string | "fp32" | The inference mode: "fp32", "fp16" |
58-
| `approximate_sync` | bool | false | Flag for whether to ues approximate sync policy |
53+
| Name | Type | Default Value | Description |
54+
| -------------------------- | ------ | --------------------------- | ------------------------------------------------------------------ |
55+
| `data_path` | string | "$(env HOME)/autoware_data" | packages data and artifacts directory path |
56+
| `fine_detector_model_path` | string | "" | The onnx file name for yolo model |
57+
| `fine_detector_label_path` | string | "" | The label file with label names for detected objects written on it |
58+
| `fine_detector_precision` | string | "fp32" | The inference mode: "fp32", "fp16" |
59+
| `approximate_sync` | bool | false | Flag for whether to ues approximate sync policy |
5960

6061
## Assumptions / Known limits
6162

perception/traffic_light_fine_detector/launch/traffic_light_fine_detector.launch.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<launch>
2-
<arg name="fine_detector_label_path" default="$(find-pkg-share traffic_light_fine_detector)/data/tlr_labels.txt" description="fine detector label path"/>
3-
<arg name="fine_detector_model_path" default="$(find-pkg-share traffic_light_fine_detector)/data/tlr_yolox_s_batch_6.onnx" description="fine detector onnx model path"/>
2+
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
3+
<arg name="fine_detector_label_path" default="$(var data_path)/traffic_light_fine_detector/tlr_labels.txt" description="fine detector label path"/>
4+
<arg name="fine_detector_model_path" default="$(var data_path)/traffic_light_fine_detector/tlr_yolox_s_batch_6.onnx" description="fine detector onnx model path"/>
45
<arg name="fine_detector_precision" default="fp16"/>
56
<arg name="fine_detector_score_thresh" default="0.3"/>
67
<arg name="fine_detector_nms_thresh" default="0.65"/>

0 commit comments

Comments
 (0)