Skip to main content
This section covers Python-based AI sample applications that demonstrate vision and multi-model inference on Qualcomm platforms.

Prerequisites

Some of the steps in the pre-requisties will be removed from future releases once the necessary fixes are mainlined.
1

Set up Wi-Fi

Connect to the Wireless Access Point (Wi-Fi Router):
Check the connection and device status:
Login to the target deviceLocate the IP address of the device according to the type of network connection, using the UART console on the Linux host:For Ethernet:
For Wi-Fi:
Use the IP address from the Linux host to establish an SSH connection to the device:
Example:
Connect to the SSH shell using the following password:
2

Download Models and Artifacts

On the target device, obtain the download_artifacts.sh script, set executable permissions, and run it to download the model, media, and label files:
3

Enable qticamsrc

In the terminal of the target device, run the following command to enable the qticamsrc on Config #2:
4

Enable Audio and GPU Delegate

In the terminal of the target device, run the following command to enable audio:
To set the default devices for sink and source, get the device numbers from wpctl status and run the following command:
In the terminal of the target device, run the following command to enable the GPU delegate and backend:

AI Applications

Object detection and display

The gst-ai-object-detection.py script receives an RTSP stream as a source, decodes it, uses YOLOv8 LiteRT model to identify the object in a scene from the camera stream and overlay the bounding boxes over the detected objects. The results are shown on the display. For information about the plugins used in this pipeline, see Pipeline flow.
This application isn’t supported in the Config #1 of the QLI 2.0 GA release.
Application: gst-ai-object-detection.py Pipeline Diagram

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

Run any of the following use cases:
  • Display with the primary and secondary cameras respectively:
  • Display with input from a video file:
  • YOLO-NAS with Qualcomm Neural Processing SDK runtime:
  • YOLOv8 with LiteRT:
Both yolox_quantized.tflite and yolov8_det_w8a8.tflite model files use the Yolov8 module.
To display all available options:
To stop the use case, press CTRL + C.

Expected Output

Detected objects with bounding boxes and labels are overlaid on the video and displayed on the local display.Output Diagram

Pipeline Flow

The following table lists the plugins used in the object detection pipeline:

Decode and object detection using RTSP stream

The gst-rtspsrc-detection-display.py script receives an RTSP stream as a source, decodes it, uses YOLOv8 LiteRT model to identify the object in a scene from the camera stream and overlay the bounding boxes over the detected objects. The results are shown on the display. For information about the plugins used in this pipeline, see Pipeline flow.
This application isn’t supported in the Config #1 of the QLI 2.0 GA release.
Application: gst-rtspsrc-detection-display.py Pipeline Diagram

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

Run the object detection script on the target device:Console 1 — start the RTSP server:
Console 2 — run the detection script:
To display all available options:
To stop the use case, press CTRL + C.

Expected Output

Output Diagram

Pipeline Flow


Object detection and classification

The gst-camera-two-stream-detection-and-classification-side-by-side.py application uses a YOLOX LiteRT model to detect and inception_v3 to classify objects in the scene displayed by the AI overlay composer. For information about the plugins used in this pipeline, see Pipeline flow.
This application isn’t supported in the Config #1 of the QLI 2.0 GA release.
Application: gst-camera-two-stream-detection-and-classification-side-by-side.py Pipeline Diagram

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

To display all available options:
To stop the use case, press CTRL + C.

Expected Output

Detection and classification display are shown side-by-side.Pipeline Diagram

Pipeline Flow

Known Issues

Output labels are blurred.

Object detection, classification, and segmentation

The gst-filesrc-2detection-classification-segmentation-side-by-side.py script identifies objects, classifies scenes, and produces semantic segmentation from a video file. The output is displayed side by side. For information about the plugins used in this pipeline, see Pipeline flow.
This application isn’t supported in the Config #1 of the QLI 2.0 GA release.
Application: gst-filesrc-2detection-classification-segmentation-side-by-side.py Pipeline Diagram

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

The default input video for classification, segmentation, and detection is at /etc/media/video.mp4.
To display all available options:
To stop the use case, press CTRL + C.

Expected Output

The four streams are previewed side by side on a local display.

Pipeline Flow


Camera encode, object detection, and display

The gst-camera-two-stream-encode-file-detection-display.py application encodes the camera stream to a file while simultaneously running YOLOX object detection and displaying results. For information about the plugins used in this pipeline, see Pipeline flow.
This application isn’t supported in the Config #1 of the QLI 2.0 GA release.
Application: gst-camera-two-stream-encode-file-detection-display.py Pipeline Diagram

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

To display all available options:
To stop the use case, press CTRL + C.

Expected Output

The camera encode output is saved at /etc/media/test.mp4.The object detection output is rendered on the display.Pipeline Diagram

Pipeline Flow


Parallel inference using Python

The gst-parallel-inference.py application receives a video input from a camera, file, or RTSP stream and runs four-channel parallel AI inference (classification, object detection, pose detection, and segmentation). For information about the plugins used in this pipeline, see Pipeline flow.
This application isn’t supported in the Config #1 of the QLI 2.0 GA release.
Application: gst-parallel-inference.py Pipeline Diagram

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

  • Input from the camera:
  • Input from a file:
  • Input from an RTSP stream:
To display all available options:
To stop the use case, press CTRL + C.

Expected Output

The four inference results are displayed side by side on the screen.Expected Output

Pipeline Flow


Daisy chain detection and pose detection using Python

The gst-ai-daisychain-detection-pose.py application performs cascaded object detection and pose detection with input from a camera, file, or RTSP stream. For information about the plugins used in this pipeline, see Pipeline flow.
This application isn’t supported in the Config #1 of the QLI 2.0 GA release.
Application: gst-ai-daisychain-detection-pose.py Pipeline Diagram

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

  • Input from the camera:
  • Input from a file:
  • Input from an RTSP stream:
To display all available options:
To stop the use case, press CTRL + C.

Expected Output

Expected Output

Pipeline Flow


Troubleshooting

If any model isn’t available after downloading the script file, you can download the model manually from IoT — Qualcomm AI Hub and push it to the target device:
For example:
Remount the file system with read/write permissions:For Qualcomm Linux:
If you cannot locate the qticamsrc plugin, ensure that the camera server is running and clear the GStreamer cache using the following commands:
To enable basic GStreamer logging, run the following before launching the application:
To increase verbosity for specific plugins, use a comma-separated list with log levels (1–7):
To redirect logs to a file for offline analysis: