# Image classification
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-classification.html](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-classification.html)
The **gst-ai-classification** application allows you to identify the subject in an
image. The use cases are implemented using the Qualcomm Neural Processing SDK, LiteRT, or
Qualcomm AI Engine direct models.
The following figure shows the pipeline, which receives a video stream from a camera,
file source, or Real-Time Streaming Protocol (RTSP), preprocesses it, runs the inference
on AI hardware, and displays the results on the screen.
For information about the plugins used for classification, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-classification.html#gst-ai-classification__section_j5t_2jq_nbc).
Figure : gst-ai-classification pipeline
## Sample model and label files
| Runtime | Model files | Label files |
| --- | --- | --- |
| Qualcomm Neural Processing SDK | inceptionv3.dlc | classification.labels |
| LiteRT | inception_v3_quantized.tflite | classification.labels |
| Qualcomm AI Engine direct | inception_v3_quantized.bin | classification.labels |
| | | |
| | | |
## Run the application on the target device
The sample application uses the
/etc/configs/config\_classification.json file to read the
input parameters.
To create your own config JSON file, use [config_classification.json](https://git.codelinaro.org/clo/le/platform/vendor/qcom-opensource/gst-plugins-qti-oss/-/blob/imsdk.lnx.2.0.0.r2-rel/gst-sample-apps/gst-ai-classification/config_classification.json?ref_type=heads) as a
reference.
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70020-50/topic/download-model-and-label-files.html).
2. Update the config JSON file based on the model, input stream, and other
properties. For more information, see [Config JSON field description](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-classification.html#gst-ai-classification__section_lcw_2zj_32c).
3. Use the following format of the config\_classification.json
file.
{
"file-path": "",
"ml-framework": "",
"model": "",
"labels": "",
"threshold": ,
"constants": "",
"runtime": ""
}Copy to clipboard
For example, run the application using input from a file, LiteRT
model, DSP runtime, custom constants, and custom threshold
value:
{
"file-path": "/etc/media/video.mp4",
"ml-framework": "tflite",
"model": "/etc/models/inception_v3_quantized.tflite",
"labels": "/etc/labels/classification.labels",
"threshold": 40,
"runtime": "dsp",
"constants": "Inceptionv3,q-offsets=<38.0>,q-scales=<0.17039915919303894>;"
}Copy to clipboard
4. Run the gst-ai-classification
application:
gst-ai-classification --config-file=/etc/configs/config_classification.jsonCopy to clipboard
5. To display the available help options, run the following command in the SSH
shell:
gst-ai-classification -hCopy to clipboard
6. To stop the use case, use CTRL +
C.
## Expected output
The classified object is displayed on the local display.
Figure : Expected output for gst-ai-classification application

## Pipeline flow
The following table lists the plugins used in the object classification
pipeline:
| Plugin | Description |
| --- | --- |
| Camera source:[qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70020-50/topic/qtiqmmfsrc.html) |
Captures the live stream from camera.
Uses tee to split the stream for inferencing.
|
| File source: filesrc |
Captures the video stream using filesrc, followed by qtdemux, which demultiplexes the stream.
Uses tee to split the stream for inferencing.
|
| RTSP source: rtspsrc |
Captures the RTSP stream using rtspsrc, followed by rtph264depay for video extraction.
Uses tee to split the stream for inferencing.
|
| h264parse | Parses the H.264 video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimlvconverter.html) |
Receives the video stream on its sink pad.
Performs the following preprocessing on the stream data. This preprocessing is done when the model expects floating-point values as input.
Color conversion
Scaling (up or down)
Normalization
Converts the preprocessed video stream to a tensor stream on its source pad.
The tensor stream is used for inferencing in the later stages of the pipeline. |
| Inferencing plugins:
Waylandsink submits the video stream received on its sink pad to Weston.
Weston renders the video stream on a local display.
|
## Config JSON field description
The different parameters available to configure the JSON file and run the use case
are as follows:
| Field | Values/description |
| :--- | :--- |
| **ml-framework** | Use one of the following models:
snpe: Qualcomm Neural Processing SDK
tflite: LiteRT
qnn: Qualcomm AI Engine direct
|
| **runtime** | Use one of the following runtimes:
cpu
gpu
dsp
|
| **Input source** | Use one of the following input sources:
camera: Primary (0) or secondary (1).
file-path: The directory path to the video file.
rtsp-ip-port: The address of the RTSP stream: rtsp://<ip>:<port>/<stream>
|
## Related information
- [Image classification and display with LiteRT](https://docs.qualcomm.com/doc/80-70020-50/topic/single-camera-stream-with-image-classification-and-display-with-litert.html)
- [Image classification and encode with LiteRT](https://docs.qualcomm.com/doc/80-70020-50/topic/single-camera-stream-with-image-classification-and-encode.html)
- [Image classification and display with Neural Processing SDK](https://docs.qualcomm.com/doc/80-70020-50/topic/single-camera-stream-with-image-classification-and-display-with-mobilenet-v1.html)
- [Image classification and encode with Neural Processing SDK](https://docs.qualcomm.com/doc/80-70020-50/topic/single-camera-stream-with-image-classification-and-encode-with-mobilenet-v1.html)
**Parent Topic:** [Run AI/ML sample applications](https://docs.qualcomm.com/doc/80-70020-50/topic/ai-ml-sample-applications.html)
Last Published: Jan 30, 2026
[Previous Topic
Prerequisites](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/download-model-and-label-files.md) [Next Topic
Object detection](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/gst-ai-object-detection.md)