sample_object_detection sample application detects and classifies objects in images using ROS 2 nodes. It uses Qualcommยฎ AI Engine Direct SDK (QNN) for model inference.
The sample uses the Ultralytics YOLOv8 model to predict bounding boxes and classes of objects in an image.
NoteFor more information, see sample_object_detection on GitHub.
Figure: Sample effects of sample_object_detection
Pipeline flow for sample_object_detection
Figure: Pipeline flow for sample_object_detection
ROS nodes used in sample_object_detection
ROS topics used in sample_object_detection
Note
yolo_detection_overlay_node synchronizes two inputs, /yolo_detect_result and /resized_image, using an exact-time policy. Both must be publishing for /yolo_detect_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_detection
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_detect_overlay in rqt.Build and run sample_object_detection
The following steps build the sample_object_detection 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_detection.

