# Object detection
Source: [https://docs.qualcomm.com/doc/80-70015-50/topic/gst-ai-object-detection.html](https://docs.qualcomm.com/doc/80-70015-50/topic/gst-ai-object-detection.html)
The **gst-ai-object-detection** application enables you to detect objects within
images and videos. The use cases show the execution of [YOLOv5](https://github.com/ultralytics/yolov5), [YOLOv8](https://github.com/ultralytics/ultralytics), and [YOLO-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) using the Qualcomm Neural Processing SDK runtime, and
YOLOv5 and YOLOv8 using TFLite runtime.
The figure shows the pipeline, which receives the input from a live camera feed, file, or
an RTSP stream, performs preprocessing, runs inferences on AI hardware, and displays the
results on the screen. For information on the plugins used in the pipeline flow, see
[Pipeline flow](https://docs.qualcomm.com/doc/80-70015-50/topic/gst-ai-object-detection.html#gst-ai-object-detection__section_p2w_33y_kbc).
Figure : gst-ai-object-detection pipeline

This video guides you through setting up a live camera feed, implementing preprocessing
steps, executing AI inferences on dedicated hardware, and displaying the detection
results live.
## Prerequisites
- To run the application, push the model and label files to the device. For
information on downloading the models, see the following:
- [Download model and label files for Qualcomm Neural Processing SDK](https://docs.qualcomm.com/doc/80-70015-50/topic/ai-ml-sample-applications.html#ai-ml-sample-applications__section_chl_dgz_scc)
- [Download model and label files for TFLite from AI Hub](https://docs.qualcomm.com/doc/80-70015-50/topic/ai-ml-sample-applications.html#ai-ml-sample-applications__section_fsl_lgz_scc)
The application supports both the Qualcomm Neural Processing SDK and
TFLite models.
- To access your host device, enable SSH. For instructions, see [Use SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh).
- Enter the SSH shell and run the use cases:
ssh root@Copy to clipboard
- Enable the
display:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
- Push the files from the host
machine:
scp root@:/opt/Copy to clipboard
## Use cases
Note: For QCS9075, the camera use cases are not supported. Use
file or RTSP as input sources.
Run the object detection models using the Qualcomm Neural Processing SDK runtime. By
default, the system runs YOLO-NAS.
Note: The following commands provide the default model and label
paths. If you have a different folder structure, replace the default paths in the
command-line parameters accordingly.
- YOLO-NAS using Qualcomm Neural Processing SDK runtime with input from the file.
Push the video.mp4 file in opt folder
before executing the
command:
gst-ai-object-detection --file-path=/opt/video.mp4 --ml-framework=1 --yolo-model-type=3 --model=/opt/yolonas.dlc --labels=/opt/yolonas.labelsCopy to clipboard
- Object detection models using Qualcomm Neural Processing SDK runtime (with
camera
source):
gst-ai-object-detection --yolo-model-type=3 --model=/opt/yolonas.dlc --labels=/opt/yolonas.labelsCopy to clipboard
- Object detection models using TFLite
runtime:
cp /opt/yolonas.labels /opt/yolov8.labelsCopy to clipboard
gst-ai-object-detection -t 2 -f 2 --model=/opt/yolov8_det_quantized.tflite --labels=/opt/yolov8.labels -k "YOLOv8,q-offsets=<-107.0, -128.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>;"Copy to clipboard
gst-ai-object-detection -t 2 -f 2 --model=/opt/Yolo-NAS-Quantized.tflite -k "YOLO-NAS,q-offsets=<37.0, 0.0, 0.0>,q-scales=<3.416602611541748, 0.00390625, 1.0>;"Copy to clipboard
For
YOLO-NAS TFLite model, use `-t 2`.
- Object detection using different runtimes with input from
RTSP:
gst-ai-object-detection --rtsp-ip-port=rtsp:///30fps.mkv --ml-framework=2 --yolo-model-type=2 --use_cpuCopy to clipboard
gst-ai-object-detection --rtsp-ip-port=rtsp:///30fps.mkv --ml-framework=2 --yolo-model-type=2 --use_gpuCopy to clipboard
gst-ai-object-detection --rtsp-ip-port=rtsp:///30fps.mkv --ml-framework=2 --yolo-model-type=2 --use_dspCopy to clipboard
Display the available help
options:
gst-ai-object-detection -hCopy to clipboard
To
stop the use case, press CTRL + C.
## Expected output
The detected objects are displayed.
Figure : Expected output for gst-ai-object-detection application

## Pipeline flow
The table lists the plugins used in the object detection pipeline:| Plugin | Description |
| --- | --- |
| Camera source:[qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70015-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-70015-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70015-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. |
| [qtimlsnpe](https://docs.qualcomm.com/doc/80-70015-50/topic/qtimlsnpe.html) | The qtimlsnpe ML inferencing plugin is used with the Qualcomm Neural Processing SDK runtime. It does the following:
Uses the model for object detection. Any of the YOLO models can be run from the command-line parameter.
After the inference runtime receives the tensor stream on its sink pad, it runs the inference.
Produces a tensor stream with the inference results on its source pad.
|
| [qtimlvdetection](https://docs.qualcomm.com/doc/80-70015-50/topic/qtimlvdetection.html) | Handles inference results from any object detection model.
Applies a threshold to the chosen number of results.
Loads the YOLO (YOLOv5, YOLOv8, or YOLO-NAS) module.
Produces video frames with only bounding boxes that can be overlaid on objects.
Sends these processed frames to the sink pad of qtivcomposer.
Waylandsink submits the video stream received on its sink pad to Weston.
Weston renders the video stream on a local display.
|
## Known issues
An accuracy drop has been observed in far away objects due to the model in use.
**Parent Topic:** [AI/ML sample applications](https://docs.qualcomm.com/doc/80-70015-50/topic/ai-ml-sample-applications.html)
Last Published: Oct 27, 2025
[Previous Topic
Classification](https://docs.qualcomm.com/bundle/publicresource/80-70015-50/topics/gst-ai-classification.md) [Next Topic
Pose detection](https://docs.qualcomm.com/bundle/publicresource/80-70015-50/topics/gst-ai-pose-detection.md)