Skip to content

Commit

Permalink
refractored the parameters, build the schema files, updated readme
Browse files Browse the repository at this point in the history
Signed-off-by: Boyang <tby@udel.edu>

style(pre-commit): autofix

Signed-off-by: Boyang <tby@udel.edu>

style(pre-commit): autofix

Rename centerpoint_base.schemal.json to centerpoint_base.schema.json

Delete perception/lidar_centerpoint/schema/centerpoint.schemal.json
  • Loading branch information
tby-udel authored and technolojin committed Jul 5, 2024
1 parent 07a34b7 commit d2514d8
Show file tree
Hide file tree
Showing 10 changed files with 583 additions and 254 deletions.
19 changes: 19 additions & 0 deletions perception/lidar_centerpoint/config/centerpoint_base.param.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**:
ros__parameters:
# weight files
encoder_onnx_path: "$(var model_path)/pts_voxel_encoder_centerpoint.onnx"
encoder_engine_path: "$(var model_path)/pts_voxel_encoder_centerpoint.engine"
head_onnx_path: "$(var model_path)/pts_backbone_neck_head_centerpoint.onnx"
head_engine_path: "$(var model_path)/pts_backbone_neck_head_centerpoint.engine"
trt_precision: fp16
post_process_params:
# post-process params
circle_nms_dist_threshold: 0.5
iou_nms_target_class_names: ["CAR"]
iou_nms_search_distance_2d: 10.0
iou_nms_threshold: 0.1
score_threshold: 0.35
yaw_norm_thresholds: [0.3, 0.3, 0.3, 0.3, 0.0]
densification_params:
world_frame_id: map
num_past_frames: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**:
ros__parameters:
# weight files
encoder_onnx_path: "$(var model_path)/pts_voxel_encoder_$(var model_name).onnx"
encoder_engine_path: "$(var model_path)/pts_voxel_encoder_$(var model_name).engine"
head_onnx_path: "$(var model_path)/pts_backbone_neck_head_$(var model_name).onnx"
head_engine_path: "$(var model_path)/pts_backbone_neck_head_$(var model_name).engine"
trt_precision: fp16
post_process_params:
# post-process params
circle_nms_dist_threshold: 0.5
iou_nms_target_class_names: ["CAR"]
iou_nms_search_distance_2d: 10.0
iou_nms_threshold: 0.1
score_threshold: 0.35
yaw_norm_thresholds: [0.3, 0.3, 0.3, 0.3, 0.0]
densification_params:
world_frame_id: map
num_past_frames: 1
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,29 @@
"title": "Parameters for Lidar Centerpoint Node",
"type": "object",
"definitions": {
"centerpoint": {
"centerpoint_base": {
"type": "object",
"properties": {
"encoder_onnx_path": {
"type": "string",
"description": "Path to VoxelFeatureEncoder ONNX file.",
"default": ""
},
"encoder_engine_path": {
"type": "string",
"description": "Path to VoxelFeatureEncoder TensorRT Engine file.",
"default": ""
},
"head_onnx_path": {
"type": "string",
"description": "Path to DetectionHead ONNX file.",
"default": ""
},
"head_engine_path": {
"type": "string",
"description": "Path to DetectionHead TensorRT Engine file.",
"default": ""
},
"trt_precision": {
"type": "string",
"description": "TensorRT inference precision.",
Expand Down Expand Up @@ -54,11 +74,6 @@
"default": 0.1,
"minimum": 0.0,
"maximum": 1.0
},
"has_twist": {
"type": "boolean",
"description": "Indicates whether the model outputs twist value.",
"default": false
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for Centerpoint Sigma ML model",
"type": "object",
"definitions": {
"centerpoint_sigma_ml_package": {
"type": "object",
"properties": {
"model_params": {
"type": "object",
"description": "Parameters for model configuration.",
"properties": {
"class_names": {
"type": "array",
"description": "An array of class names will be predicted.",
"default": ["CAR", "TRUCK", "BUS", "BICYCLE", "PEDESTRIAN"],
"items": {
"type": "string"
},
"uniqueItems": true
},
"point_feature_size": {
"type": "integer",
"description": "A number of channels of point feature layer.",
"default": 4
},
"max_voxel_size": {
"type": "integer",
"description": "A maximum size of voxel grid.",
"default": 40000
},
"point_cloud_range": {
"type": "array",
"description": "An array of distance ranges of each class, this must have same length with `class_names`.",
"default": [-76.8, -76.8, -4.0, 76.8, 76.8, 6.0],
"items": {
"type": "number"
}
},
"voxel_size": {
"type": "array",
"description": "An array of voxel grid sizes for PointPainting, this must have same length with `paint_class_names`.",
"default": [0.32, 0.32, 10.0],
"items": {
"type": "number"
}
},
"downsample_factor": {
"type": "integer",
"description": "A scale factor of downsampling points.",
"default": 1,
"minimum": 1
},
"encoder_in_feature_size": {
"type": "integer",
"description": "A size of encoder input feature channels.",
"default": 9
},
"has_variance": {
"type": "boolean",
"description": "Flag indicating if the model includes variance estimation.",
"default": false
},
"has_twist": {
"type": "boolean",
"description": "Flag indicating if the model includes twist estimation.",
"default": false
}
},
"required": [
"class_names",
"point_feature_size",
"max_voxel_size",
"point_cloud_range",
"voxel_size",
"downsample_factor",
"encoder_in_feature_size",
"has_variance",
"has_twist"
]
}
},
"required": ["model_params"]
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/centerpoint_sigma_ml_package"
}
},
"required": ["ros__parameters"]
}
},
"required": ["/**"]
}
136 changes: 136 additions & 0 deletions perception/lidar_centerpoint/schema/centerpoint_tiny_base.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for Lidar Centerpoint Tiny Node",
"type": "object",
"definitions": {
"centerpoint_tiny": {
"type": "object",
"properties": {
"encoder_onnx_path": {
"type": "string",
"description": "Path to VoxelFeatureEncoder ONNX file.",
"default": ""
},
"encoder_engine_path": {
"type": "string",
"description": "Path to VoxelFeatureEncoder TensorRT Engine file.",
"default": ""
},
"head_onnx_path": {
"type": "string",
"description": "Path to DetectionHead ONNX file.",
"default": ""
},
"head_engine_path": {
"type": "string",
"description": "Path to DetectionHead TensorRT Engine file.",
"default": ""
},
"trt_precision": {
"type": "string",
"description": "TensorRT inference precision.",
"default": "fp16",
"enum": ["fp32", "fp16"]
},
"post_process_params": {
"type": "object",
"properties": {
"score_threshold": {
"type": "number",
"description": "A threshold value of existence probability score, all of objects with score less than this threshold are ignored.",
"default": 0.35,
"minimum": 0.0,
"maximum": 1.0
},
"yaw_norm_thresholds": {
"type": "array",
"description": "An array of distance threshold values of norm of yaw [rad].",
"default": [0.3, 0.3, 0.3, 0.3, 0.0],
"items": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0
}
},
"circle_nms_dist_threshold": {
"type": "number",
"description": "The distance threshold for circle NMS.",
"default": 0.5,
"minimum": 0.0,
"maximum": 1.0
},
"iou_nms_target_class_names": {
"type": "array",
"description": "An array of class names to be target in NMS.",
"default": ["CAR"],
"items": {
"type": "string"
},
"uniqueItems": true
},
"iou_nms_search_distance_2d": {
"type": "number",
"description": "A maximum distance value to search the nearest objects.",
"default": 10.0,
"minimum": 0.0
},
"iou_nms_threshold": {
"type": "number",
"description": "A threshold value of NMS using IoU score.",
"default": 0.1,
"minimum": 0.0,
"maximum": 1.0
}
},
"required": [
"score_threshold",
"yaw_norm_thresholds",
"circle_nms_dist_threshold",
"iou_nms_target_class_names",
"iou_nms_search_distance_2d",
"iou_nms_threshold"
]
},
"densification_params": {
"type": "object",
"description": "Parameters for pointcloud densification.",
"properties": {
"world_frame_id": {
"type": "string",
"description": "A name of frame id where world coordinates system is defined with respect to.",
"default": "map"
},
"num_past_frames": {
"type": "integer",
"description": "A number of past frames to be considered as same input frame.",
"default": 1,
"minimum": 0
}
},
"required": ["world_frame_id", "num_past_frames"]
}
},
"required": [
"encoder_onnx_path",
"encoder_engine_path",
"head_onnx_path",
"head_engine_path",
"trt_precision",
"post_process_params",
"densification_params"
]
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/centerpoint_tiny"
}
},
"required": ["ros__parameters"]
}
},
"required": ["/**"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for Detection Class Remapper Node",
"type": "object",
"definitions": {
"detection_class_remapper": {
"type": "object",
"properties": {
"allow_remapping_by_area_matrix": {
"type": "array",
"description": "Matrix defining how to remap original classes to new classes based on area.",
"items": {
"type": "integer"
}
},
"min_area_matrix": {
"type": "array",
"description": "Matrix defining the minimum area thresholds for each class.",
"items": {
"type": "number"
}
},
"max_area_matrix": {
"type": "array",
"description": "Matrix defining the maximum area thresholds for each class.",
"items": {
"type": "number"
}
}
},
"required": ["allow_remapping_by_area_matrix", "min_area_matrix", "max_area_matrix"]
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/detection_class_remapper"
}
},
"required": ["ros__parameters"]
}
},
"required": ["/**"]
}
7 changes: 3 additions & 4 deletions perception/multi_object_tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ This multi object tracker consists of data association and EKF.

![multi_object_tracker_overview](image/multi_object_tracker_overview.svg)


### Data association

The data association performs maximum score matching, called min cost max flow problem.
Expand Down Expand Up @@ -58,9 +57,9 @@ Multiple inputs are pre-defined in the input channel parameters (described below

### Output

| Name | Type | Description |
| ---------- | ---------------------------------------------------- | --------------- |
| `~/output` | `autoware_auto_perception_msgs::msg::TrackedObjects` | tracked objects |
| Name | Type | Description |
| ---------- | ----------------------------------------------- | --------------- |
| `~/output` | `autoware_perception_msgs::msg::TrackedObjects` | tracked objects |

## Parameters

Expand Down
Loading

0 comments on commit d2514d8

Please sign in to comment.