diff --git a/.github/workflows/docker-ros.yml b/.github/workflows/docker-ros.yml
index 299fa75..6b82bd6 100644
--- a/.github/workflows/docker-ros.yml
+++ b/.github/workflows/docker-ros.yml
@@ -42,6 +42,7 @@ jobs:
rmw-implementation: rmw_zenoh_cpp
command: ros2 launch image_instance_segmentation image_instance_segmentation.launch.py
enable-recursive-vcs-import: "false"
+ enable-build-required-packages-only: "true"
enable-industrial-ci: true
enable-slim: "true"
# Retain optional runtime binaries and plugin dependencies.
@@ -51,6 +52,7 @@ jobs:
--target-compose-svc image-instance-segmentation
--dep-exclude-compose-svc-all
--include-bin /opt/tritonclient/lib/libgrpcclient.so
+ --include-path /docker-ros/ws/install/perception_msgs
--include-bin /opt/ros/jazzy/lib/libcompressed_image_transport.so
--include-bin /opt/ros/jazzy/lib/librcl_interfaces__rosidl_generator_py.so
--include-exe lttng
diff --git a/.repos b/.repos
index 3de1ac8..5a35fd6 100644
--- a/.repos
+++ b/.repos
@@ -3,3 +3,7 @@ repositories:
type: git
url: https://github.com/openads-project/triton_cpp.git
version: v1.2.1
+ perception_interfaces:
+ type: git
+ url: https://github.com/ika-rwth-aachen/perception_interfaces.git
+ version: d908af198393c3b26bedea259080b5d7b1060716
diff --git a/README.md b/README.md
index 98da622..88eae1b 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@
This OpenADS service performs image instance segmentation through Triton Inference Server.
It supports multiple cameras, optional tracking, segmentation masks, 2D detections,
-and debug overlays. Model weights and datasets are supplied separately.
+and image-only perception object lists. Model weights and datasets are supplied separately.
🚀 Quick Start • 💻 Development • 📝 Documentation
@@ -32,7 +32,7 @@ and debug overlays. Model weights and datasets are supplied separately.
## 🚀 Quick Start
-Run the demo with Triton, recorded camera images, and a segmentation overlay viewer:
+Run the demo with Triton, recorded camera images, and an RViz view of the detected objects:
```bash
cd demo
diff --git a/demo/README.md b/demo/README.md
index d72f993..f969258 100644
--- a/demo/README.md
+++ b/demo/README.md
@@ -1,7 +1,7 @@
# RF-DETR-Seg Demo
Four services run RF-DETR-Seg inference on a recorded camera stream: Triton,
-rosbag playback, image instance segmentation, and `rqt_image_view`.
+rosbag playback, image instance segmentation, and RViz.
Requires Docker Compose 2.35 or newer, NVIDIA Container Toolkit with a compatible
GPU/driver, and an X11 or XWayland display.
@@ -28,10 +28,15 @@ To customize the demo, copy `.env.example` to `.env` and edit the settings.
the Triton model image. Model and node settings are in
[config/params.yml](config/params.yml).
-The viewer opens `/demo/overlay/instance`; select `/demo/overlay/class` in its
-topic dropdown for class colors. Masks and boxes are published on
-`/demo/class_mask`, `/demo/instance_mask`, and `/demo/detections`.
-No calibration or TF is needed for these image-coordinate outputs.
+RViz shows the image-only object lists `/demo/perception/road_users`,
+`/demo/perception/traffic_signs`, and `/demo/perception/traffic_lights` in
+separate panels: road users with boxes, masks, and track IDs on the matching
+camera image, traffic signs and lights as their image crops. Panels can be
+rearranged or floated as windows; the layout is in
+[visualization/demo.rviz](visualization/demo.rviz). Full-frame masks and boxes
+are published on `/demo/class_mask`, `/demo/instance_mask`, and
+`/demo/detections`. No calibration or TF is needed for these image-coordinate
+outputs.
The first start can take several minutes while TensorRT prepares the model.
Its cache is retained in a Docker volume for subsequent runs.
diff --git a/demo/config/params.yml b/demo/config/params.yml
index 25d2591..fd6754f 100644
--- a/demo/config/params.yml
+++ b/demo/config/params.yml
@@ -48,10 +48,14 @@
tracking.max_lost_frames: 30
tracking.min_box_area_px: 25.0
- debug.publish_overlay: true
+ # Image-only object lists with boxes, masks, and crops, shown by the RViz demo view.
+ perception.publish_road_users: true
+ perception.publish_traffic_lights: true
+ perception.publish_traffic_signs: true
+ perception.include_crops: true
+ perception.include_masks: true
+
debug.print_timing: false
- debug.overlay_alpha: 0.45
- debug.overlay_draw_boxes: true
cameras: [camera]
camera.camera.image_topic: "~/image"
diff --git a/demo/docker-compose.yml b/demo/docker-compose.yml
index ae4d21a..ebbd785 100644
--- a/demo/docker-compose.yml
+++ b/demo/docker-compose.yml
@@ -58,8 +58,9 @@ services:
- class_mask_topic:=/demo/class_mask
- instance_mask_topic:=/demo/instance_mask
- detections_topic:=/demo/detections
- - class_overlay_topic:=/demo/overlay/class
- - instance_overlay_topic:=/demo/overlay/instance
+ - road_users_topic:=/demo/perception/road_users
+ - traffic_lights_topic:=/demo/perception/traffic_lights
+ - traffic_signs_topic:=/demo/perception/traffic_signs
bag-play:
image: ghcr.io/openads-project/monitoring:v1.0.0
@@ -94,7 +95,7 @@ services:
- --disable-keyboard-controls
visualization:
- image: ghcr.io/openads-project/monitoring:v1.0.0
+ image: ${VISUALIZATION_IMAGE:-ghcr.io/openads-project/monitoring:v1.0.0}
depends_on:
image-instance-segmentation:
condition: service_started
@@ -105,8 +106,8 @@ services:
QT_X11_NO_MITSHM: "1"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- - ./visualization/open_image_view.py:/demo/open_image_view.py:ro
- command: [python3, /demo/open_image_view.py]
+ - ./visualization/demo.rviz:/demo/demo.rviz:ro
+ command: [ros2, run, rviz2, rviz2, -d, /demo/demo.rviz]
volumes:
triton-cache:
diff --git a/demo/visualization/demo.rviz b/demo/visualization/demo.rviz
new file mode 100644
index 0000000..e1b2883
--- /dev/null
+++ b/demo/visualization/demo.rviz
@@ -0,0 +1,86 @@
+Panels:
+ - Class: rviz_common/Displays
+ Name: Displays
+Visualization Manager:
+ Class: ""
+ Displays:
+ - Class: perception_msgs/ImageEvidence
+ Enabled: true
+ Name: Road users
+ Topic:
+ Value: /demo/perception/road_users
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Best Effort
+ Image Source:
+ Value: Image topic
+ Image Topic: /demo/image
+ Transport: compressed
+ Synchronization: Synchronized
+ Tolerance [ms]: 5
+ Image Buffer: 60
+ Mask:
+ Value: true
+ Mode: Filled + contour
+ Alpha: 0.35
+ Label:
+ Value: true
+ Format: "{id} {class} {class_prob}"
+ Font Size: 14
+ - Class: perception_msgs/ImageEvidence
+ Enabled: true
+ Name: Traffic signs
+ Topic:
+ Value: /demo/perception/traffic_signs
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Best Effort
+ Image Source:
+ Value: Crop mosaic
+ Mask:
+ Value: true
+ Mode: Contour
+ Color: Fixed
+ Label:
+ Value: true
+ Format: "{id} sign {exist}"
+ - Class: perception_msgs/ImageEvidence
+ Enabled: true
+ Name: Traffic lights
+ Topic:
+ Value: /demo/perception/traffic_lights
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Best Effort
+ Image Source:
+ Value: Crop mosaic
+ Mask:
+ Value: true
+ Mode: Contour
+ Color: By object ID
+ Label:
+ Value: true
+ Format: "{id} light {exist}"
+ Global Options:
+ Fixed Frame: map
+ Views:
+ Current:
+ Class: rviz_default_plugins/Orbit
+ Distance: 15
+Window Geometry:
+ Displays:
+ collapsed: false
+ Road users:
+ collapsed: false
+ Traffic signs:
+ collapsed: false
+ Traffic lights:
+ collapsed: false
+ Hide Left Dock: false
+ Hide Right Dock: true
+ QMainWindow State: 000000ff00000000fd000000010000000000000638000003e8fc0200000001fc00000000000003e80000002c00fffffffc0100000002fb000000100044006900730070006c0061007900730100000000000001040000003a00fffffffc0000010a0000052e0000007a00fffffffc0200000002fb000000140052006f006100640020007500730065007200730100000000000002730000001300fffffffc000002790000016f0000001300fffffffc0100000002fb0000001a00540072006100660066006900630020007300690067006e0073010000010a000002940000003a00fffffffb0000001c00540072006100660066006900630020006c0069006700680074007301000003a4000002940000003a00ffffff00000002000003e800000004000000040000000800000008fc00000000
+ Width: 1600
+ Height: 1000
diff --git a/demo/visualization/open_image_view.py b/demo/visualization/open_image_view.py
deleted file mode 100644
index ce4b418..0000000
--- a/demo/visualization/open_image_view.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python3
-# Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
-# SPDX-License-Identifier: Apache-2.0
-
-"""Open the demo image viewer maximized."""
-
-import sys
-
-from rqt_gui.main import Main
-
-
-class MaximizedImageView(Main):
- """Use the standard rqt image viewer with a maximized main window."""
-
- def create_application(self, argv):
- """Maximize the window after rqt finishes creating it."""
- app = super().create_application(argv)
- from python_qt_binding.QtCore import QTimer
- from python_qt_binding.QtWidgets import QMainWindow
-
- def maximize_window():
- """Adapt the viewer size to the current screen."""
- for widget in app.topLevelWidgets():
- if isinstance(widget, QMainWindow):
- widget.showMaximized()
-
- QTimer.singleShot(0, maximize_window)
- return app
-
-
-if __name__ == "__main__":
- sys.exit(
- MaximizedImageView().main(
- argv=[sys.argv[0], "--standalone", "rqt_image_view/ImageView", "--args", "/demo/overlay/instance"]
- )
- )
diff --git a/deployment/compose/docker-compose.yml b/deployment/compose/docker-compose.yml
index 583d544..681816d 100644
--- a/deployment/compose/docker-compose.yml
+++ b/deployment/compose/docker-compose.yml
@@ -1,7 +1,7 @@
services:
image-instance-segmentation:
- image: ghcr.io/openads-project/image_instance_segmentation:v1.1.0
+ image: ghcr.io/openads-project/image_instance_segmentation:v1.2.0
environment:
# --- name ------
NAMESPACE: /
@@ -12,8 +12,9 @@ services:
CLASS_MASK_TOPIC: ~/segmentation/class_mask
INSTANCE_MASK_TOPIC: ~/segmentation/instance_mask
DETECTIONS_TOPIC: ~/segmentation/detections
- CLASS_OVERLAY_TOPIC: ~/debug/overlay/class
- INSTANCE_OVERLAY_TOPIC: ~/debug/overlay/instance
+ ROAD_USERS_TOPIC: ~/perception/road_users
+ TRAFFIC_LIGHTS_TOPIC: ~/perception/traffic_lights
+ TRAFFIC_SIGNS_TOPIC: ~/perception/traffic_signs
LOG_LEVEL: ${LOG_LEVEL:-info}
USE_SIM_TIME: ${USE_SIM_TIME:-false}
PARAMS: /docker-ros/ws/install/image_instance_segmentation/share/image_instance_segmentation/config/params.yml
@@ -36,7 +37,8 @@ services:
class_mask_topic:=$${CLASS_MASK_TOPIC} \
instance_mask_topic:=$${INSTANCE_MASK_TOPIC} \
detections_topic:=$${DETECTIONS_TOPIC} \
- class_overlay_topic:=$${CLASS_OVERLAY_TOPIC} \
- instance_overlay_topic:=$${INSTANCE_OVERLAY_TOPIC}
+ road_users_topic:=$${ROAD_USERS_TOPIC} \
+ traffic_lights_topic:=$${TRAFFIC_LIGHTS_TOPIC} \
+ traffic_signs_topic:=$${TRAFFIC_SIGNS_TOPIC}
# volumes:
# - ./params.yml:/docker-ros/ws/install/image_instance_segmentation/share/image_instance_segmentation/config/params.yml
diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml
index b15ff6f..31c6080 100644
--- a/deployment/helm/Chart.yaml
+++ b/deployment/helm/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v2
name: image-instance-segmentation
-version: 1.1.0
-appVersion: 1.1.0
+version: 1.2.0
+appVersion: 1.2.0
description: ROS 2 Image Instance Segmentation for Automated Driving
dependencies:
- repository: oci://ghcr.io/openads-project/openads-helm
diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml
index d258313..8e829b8 100644
--- a/deployment/helm/values.yaml
+++ b/deployment/helm/values.yaml
@@ -1,6 +1,6 @@
openadservice:
name: image-instance-segmentation
- image: ghcr.io/openads-project/image_instance_segmentation:v1.1.0
+ image: ghcr.io/openads-project/image_instance_segmentation:v1.2.0
env:
# --- name ------
NAMESPACE: /
@@ -11,8 +11,9 @@ openadservice:
CLASS_MASK_TOPIC: ~/segmentation/class_mask
INSTANCE_MASK_TOPIC: ~/segmentation/instance_mask
DETECTIONS_TOPIC: ~/segmentation/detections
- CLASS_OVERLAY_TOPIC: ~/debug/overlay/class
- INSTANCE_OVERLAY_TOPIC: ~/debug/overlay/instance
+ ROAD_USERS_TOPIC: ~/perception/road_users
+ TRAFFIC_LIGHTS_TOPIC: ~/perception/traffic_lights
+ TRAFFIC_SIGNS_TOPIC: ~/perception/traffic_signs
LOG_LEVEL: info
USE_SIM_TIME: false
PARAMS: /docker-ros/ws/install/image_instance_segmentation/share/image_instance_segmentation/config/params.yml
@@ -35,7 +36,8 @@ openadservice:
class_mask_topic:=${CLASS_MASK_TOPIC} \
instance_mask_topic:=${INSTANCE_MASK_TOPIC} \
detections_topic:=${DETECTIONS_TOPIC} \
- class_overlay_topic:=${CLASS_OVERLAY_TOPIC} \
- instance_overlay_topic:=${INSTANCE_OVERLAY_TOPIC}
+ road_users_topic:=${ROAD_USERS_TOPIC} \
+ traffic_lights_topic:=${TRAFFIC_LIGHTS_TOPIC} \
+ traffic_signs_topic:=${TRAFFIC_SIGNS_TOPIC}
rosParamFileMountPath: /docker-ros/ws/install/image_instance_segmentation/share/image_instance_segmentation/config/params.yml
rosParamFileData: null
diff --git a/docs/IMPLEMENTATION.md b/docs/IMPLEMENTATION.md
index ac72a98..d58d39e 100644
--- a/docs/IMPLEMENTATION.md
+++ b/docs/IMPLEMENTATION.md
@@ -10,9 +10,10 @@ List camera names in `cameras` and configure each under `camera.`:
| Parameter | Meaning |
| --- | --- |
+| `camera..sensor_id` | Unique camera ID for perception evidence; defaults to its 1-based position in `cameras` |
| `camera..image_topic` | Base image topic |
| `camera..transport` | `raw` or `compressed`; omit `/compressed` from the base topic |
-| `camera..output_prefix` | Prefix for segmentation and overlay outputs |
+| `camera..output_prefix` | Prefix for camera output topics |
The supplied parameter file configures one camera with raw transport, enables
tracking, and selects RF-DETR-Seg decoding.
@@ -36,7 +37,34 @@ reused after a track ends.
In the topic tables, `config.image_topic` is the configured input and `joinTopic`
places outputs under the camera's prefix. Parameter names `image_topic`,
-`transport`, and `output_prefix` are per-camera suffixes.
+`sensor_id`, `transport`, and `output_prefix` are per-camera suffixes.
+
+## Perception objects
+
+Enable each object-list output independently at startup:
+
+```yaml
+perception.publish_road_users: true
+perception.publish_traffic_lights: true
+perception.publish_traffic_signs: true
+```
+
+Topics are `perception/road_users`, `perception/traffic_lights` and
+`perception/traffic_signs` under each camera's output prefix. They carry
+`perception_msgs/msg/ObjectListWithEvidence` with `HEXAMOTION`, `TRAFFICLIGHT` and `TRAFFICSIGN`
+states respectively. Metric components remain unmeasured; light state, sign type
+and road-user light states remain unknown.
+
+The standard `model.class_names` select the category and road-user classification,
+independently of `model.class_ids`. Unmapped names remain in segmentation outputs.
+Object IDs persist for a tracked object's lifetime and are not recycled when
+mask IDs are reused. Without tracking, each published detection gets a
+fresh ID. IDs are scoped to a camera stream and node lifetime.
+
+Image evidence retains source coordinates and headers. `perception.include_crops`
+and `perception.include_masks` independently include BGR crops and binary `mono8`
+ROI masks. Pixels are prepared only for subscribed outputs; empty lists are
+published for processed frames without matching detections.
## Triton model
@@ -77,8 +105,10 @@ Cameras run concurrently with one Triton client each. Busy cameras drop frames
at the admission limit. Set `prediction.max_in_flight_per_camera: 1` for low
latency; tracking enforces this limit to preserve frame order.
-Enable `debug.publish_overlay` for overlays and `debug.print_timing` for
-processing times.
+Enable `debug.print_timing` for processing times. To inspect results, enable
+the `perception.publish_*` object lists and view their image evidence with
+the `perception_msgs/ImageEvidence` RViz display from
+[perception_interfaces](https://github.com/ika-rwth-aachen/perception_interfaces).
Use `ros_tracing:=true` to enable OpenADS dual-session tracing. Service images
include the `jazzy-ika` tracing fork.
@@ -123,8 +153,8 @@ All settings below have the prefix `diagnostic_updater.` and are read-only.
| `.