sample_object_segmentation sample application detects and segments objects in images using ROS 2 nodes. It uses Qualcommยฎ AI Engine Direct SDK (QNN) for model inference.
The sample application uses the Ultralytics YOLOv8 model to predict bounding boxes, segmentation masks, and classes of objects in an image.
NoteFor more information, see sample_object_segmentation on GitHub.
Figure: Sample effects of sample_object_segmentation
Pipeline flow for sample_object_segmentation
Figure: Pipeline flow for sample_object_segmentation
ROS nodes used in sample_object_segmentation
ROS topics used in sample_object_segmentation
Note
yolo_segment_overlay_node synchronizes two inputs, /yolo_segment_result and /resized_image, using an exact-time policy. Both must be publishing for /yolo_segment_overlay to be produced.Prerequisites
- You have completed the settings in Set up the environment for running sample applications.
- You have generated the YOLOv8 model using QAI-Hub on the host computer with the following steps.
Generate YOLOv8 model
- Set up QAI-Hub on the host computer.
- Sign in to QAI-Hub and get your API token.
- Install QAI-Hub.
- Export the model on the host computer.
SSH Session
Run out-of-the-box sample_object_segmentation
Try me
Try me
1
Run the sample on the development kit
SSH Session
2
Check the results on the host computer
In a terminal of the host computer, check the ROS topics with the name
/yolo_segment_overlay in rqt.Build and run sample_object_segmentation
The following steps build the sample_object_segmentation package using Dragonwing IQ-9075 Evaluation Kit as an example.
Try me
Try me
1
Build and package on the host computer
- Build the sample application project.
- Package and push the sample application to the device.
2
Install and run on the development kit
- Install the sample application.
SSH Session
- Run the sample application with the steps in Run out-of-the-box sample_object_segmentation.

