gst-ai-classification sample application demonstrates hardware-accelerated image classification on a video stream. The pipeline receives input from a camera, file source, Real-Time Streaming Protocol (RTSP) stream or USB camera, performs preprocessing, runs inference on the AI hardware, and displays the results on screen.
gst-ai-classification application is part of the Qualcomm Intelligent Multimedia (QIM) SDK and is available on the device after flashing. You must push the model and label files to the device before running the application.
Download model and label files
- Enable Wi-Fi and SSH on the device. The device requires an internet connection to download the artifacts needed to run sample applications. If SSH and Wi-Fi are already configured, skip this step. Follow Setup an SSH connection to enable Wi-Fi and SSH on the device.
-
On the host computer, set the user environment variable:
-
Sign in to the target device using SSH:
-
On the target device, download and run the
download_artifacts.shscript to download the model and label files: -
(Optional) Download the YOLOv8 model, which is not included in the default download.
Use one of the following methods:
- Download with a script
- Export with AI Hub APIs
- Generate a batch model
- Create a Qualcomm AI Hub account.
- Go to Settings in the upper right corner and copy your API key.
-
Run the following commands on the host computer:
Replace
<API_KEY>with your API key:The models are downloaded to theexport_assetsdirectory. -
Copy the model to the
/etc/models/directory on the device:
Run the sample application
-
On the host computer, set the user environment variable:
-
Sign in to the device using SSH:
-
Run the sample application:
For more information about the configuration fields or available options, use the help command:
Ctrl+C.
Configure the application
This section uses the following default file locations:
/etc/models/— model files/etc/labels/— label files/etc/media/— video files/etc/configs/— configuration files
/etc/configs/config_classification.json file to specify your model, input source, and output preferences.
Configuration template:
| Field | Description |
|---|---|
ml-framework |
|
runtime |
|
output-ip-address | Output server IP address |
port | Output server port |
video-format | USB camera format: nv12, yuy2, or mjpeg, with width, height, and framerate parameters |
output-file | Name of the output file. Default: output_classification.mp4 |
output-type |
|
file-path | Path to the input video file |
rtsp-ip-port | RTSP input stream in the format rtsp://<ip>:<port>/<stream> |
camera | Camera index: primary (0) or secondary (1) |
Notes
-
To stop the application, press
Ctrl+C. -
To enable GStreamer debug logging, set the
GST_DEBUGenvironment variable. For example, to log all warnings:For more troubleshooting options, see Troubleshooting.

