From 9f72a5116cf750ea3b8bb537cae640ca609b0ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Zeren?= Date: Mon, 9 Dec 2024 13:46:28 +0300 Subject: [PATCH 1/2] feat: add instance segmentation msg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Barış Zeren --- autoware_perception_msgs/CMakeLists.txt | 2 ++ autoware_perception_msgs/msg/SegmentationMask.msg | 11 +++++++++++ autoware_perception_msgs/package.xml | 1 + 3 files changed, 14 insertions(+) create mode 100644 autoware_perception_msgs/msg/SegmentationMask.msg diff --git a/autoware_perception_msgs/CMakeLists.txt b/autoware_perception_msgs/CMakeLists.txt index 2f20869..c4d840c 100644 --- a/autoware_perception_msgs/CMakeLists.txt +++ b/autoware_perception_msgs/CMakeLists.txt @@ -13,6 +13,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} "msg/PredictedObjectKinematics.msg" "msg/PredictedObjects.msg" "msg/PredictedPath.msg" + "msg/SegmentationMask.msg" "msg/Shape.msg" "msg/TrackedObject.msg" "msg/TrackedObjectKinematics.msg" @@ -27,6 +28,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} DEPENDENCIES std_msgs + sensor_msgs geometry_msgs builtin_interfaces unique_identifier_msgs diff --git a/autoware_perception_msgs/msg/SegmentationMask.msg b/autoware_perception_msgs/msg/SegmentationMask.msg new file mode 100644 index 0000000..50353bb --- /dev/null +++ b/autoware_perception_msgs/msg/SegmentationMask.msg @@ -0,0 +1,11 @@ +std_msgs/Header header + +# It represent map between instance segmentation mask and labels +# The pixel intensities in mask's starts with 1 (pixel value 0 represent pixel is not belong any object) +# `classification[0]` returns the `label_id` for pixels with an intensity value of `1` in the mask. +# `classification[1]` returns the `label_id` for pixels with an intensity value of `2` in the mask. +# ... +# The relationship between pixels and label IDs continues in this way. +ObjectClassification[] classification + +sensor_msgs/Image image # Mask image \ No newline at end of file diff --git a/autoware_perception_msgs/package.xml b/autoware_perception_msgs/package.xml index 80d5912..7f7b59b 100644 --- a/autoware_perception_msgs/package.xml +++ b/autoware_perception_msgs/package.xml @@ -14,6 +14,7 @@ builtin_interfaces geometry_msgs std_msgs + sensor_msgs unique_identifier_msgs rosidl_default_runtime From a27f1e821ed3e31593bfe19c68dd5f944afe4362 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:25:29 +0000 Subject: [PATCH 2/2] style(pre-commit): autofix --- autoware_perception_msgs/msg/SegmentationMask.msg | 2 +- autoware_perception_msgs/package.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoware_perception_msgs/msg/SegmentationMask.msg b/autoware_perception_msgs/msg/SegmentationMask.msg index 50353bb..649b6f5 100644 --- a/autoware_perception_msgs/msg/SegmentationMask.msg +++ b/autoware_perception_msgs/msg/SegmentationMask.msg @@ -8,4 +8,4 @@ std_msgs/Header header # The relationship between pixels and label IDs continues in this way. ObjectClassification[] classification -sensor_msgs/Image image # Mask image \ No newline at end of file +sensor_msgs/Image image # Mask image diff --git a/autoware_perception_msgs/package.xml b/autoware_perception_msgs/package.xml index 7f7b59b..cd24779 100644 --- a/autoware_perception_msgs/package.xml +++ b/autoware_perception_msgs/package.xml @@ -13,8 +13,8 @@ builtin_interfaces geometry_msgs - std_msgs sensor_msgs + std_msgs unique_identifier_msgs rosidl_default_runtime