Skip to main content
The sample_face_detection sample application detects faces and locates facial landmarks from images using the Python-based ROS 2 node sample_face_detection, which uses QualcommÂź AI Engine Direct SDK (QNN) for model inference. The models are sourced from Qualcomm AI-hub. It captures the face_image.jpg as input and publishes the result to the /mediaface_det_image topic.
Note

Figure: Sample effects of sample_face_detection

Pipeline flow for sample_face_detection

Figure: Pipeline flow for sample_face_detection

ROS nodes used in sample_face_detection

ROS topics used in sample_face_detection

Prerequisites

You have completed the settings in Set up the environment for running sample applications.

Run out-of-the-box sample_face_detection

1

Run the sample on the development kit

Select the input source of the pipeline, and then complete the steps in the corresponding tab.
  1. Set up the runtime environment.
    SSH Session
  2. Launch the sample with image_publisher. You can replace image_path with the path to your desired image.
    SSH Session
    NoteThis sample application supports JPG images only. You can test it using one of your own images with a different filename.
2

View the results on the host computer

  1. Start the rqt.
    SSH Session
  2. Select the following buttons in sequence: Plugins —> Visualization —> Image View
  3. Select mediaface_det_image to see the results.

Build and run sample_face_detection

The following steps build the sample_face_detection package using Dragonwing IQ-9075 Evaluation Kit as an example.
1

Build and package on the host computer

  1. Build the sample application project.
  2. Package and push the sample application to the device.
2

Install and run on the development kit

  1. Install the sample application.
    SSH Session
  2. Run the sample application with the steps in Run out-of-the-box sample_face_detection.