# Object detection and display
Source: [https://docs.qualcomm.com/doc/80-70017-50/topic/camera-detection-display.html](https://docs.qualcomm.com/doc/80-70017-50/topic/camera-detection-display.html)
The **gst-ai-object-detection.py** application enables you to detect objects in
the camera stream or a file stream and display the results or save the output to a
file.
Figure : Pipeline for object detection and preview

For information on the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70017-50/topic/camera-detection-display.html#camera-detection-display__section_jbz_cbk_bdc).
## Run the application
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70017-50/topic/python-sample-applications.html#python-sample-applications__section_gm5_s5j_bdc).
2. Run various use cases:
Table : Sample model and label files for object detection and display python
application
| Runtime | Models | Labels |
| :--- | :--- | :--- |
| LiteRT |
- yolonas.tflite
- yolov8.tflite
|
- yolonas.labels
- yolov8.labels
|
| Qualcomm Neural Processing SDK | yolonas.dlc | yolonas.labels |
- Display with the primary and secondary cameras respectively:
- python3 /usr/bin/gst-ai-object-detection.py -c 0 -f 2 -m /opt/yolov8.tflite -l /opt/yolov8.labels -ml "yolov8" -k "YOLOv8,q-offsets=<-107.0, -128.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>"Copy to clipboard
- python3 /usr/bin/gst-ai-object-detection.py -c 1 -f 2 -m /opt/yolov8.tflite -l /opt/yolov8.labels -ml "yolov8" -k "YOLOv8,q-offsets=<-107.0, -128.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>"Copy to clipboard
- Display with input from a video
file:
python3 /usr/bin/gst-ai-object-detection.py -s /path/to/input/video.mp4 -f 2 -m /opt/yolov8.tflite -l /opt/yolov8.labels -ml "yolov8" -k "YOLOv8,q-offsets=<-107.0, -128.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>"Copy to clipboard
- YOLO-NAS with
LiteRT:
python3 /usr/bin/gst-ai-object-detection.py -f 2 -m /opt/yolonas.tflite -l /opt/yolonas.labels -ml "yolo-nas" -k "YOLO-NAS,q-offsets=<37.0, 0.0, 0.0>,q-scales=<3.416602611541748, 0.00390625, 1.0>"Copy to clipboard
- YOLO-NAS with Qualcomm Neural Processing SDK
runtime:
python3 /usr/bin/gst-ai-object-detection.py -f 1 -m /opt/yolonas.dlc -l /opt/yolonas.labels -ml "yolo-nas" --layers="/heads/Mul,/heads/Sigmoid"Copy to clipboard
- YOLOv8 with
LiteRT:
python3 /usr/bin/gst-ai-object-detection.py -f 2 -m /opt/yolov8.tflite -l /opt/yolov8.labels -ml "yolov8" -k "YOLOv8,q-offsets=<-107.0, -128.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>"Copy to clipboard
To display the available help options, run the following command:
python3 gst-ai-object-detection.py --helpCopy to clipboard
## Expected output
Figure : Expected output for object detection and display application –
Preview

## Pipeline flow
| Process | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70017-50/topic/qtiqmmfsrc.html) |
- Collects the video stream (source) and creates two copies of
the source:
- One stream is sent to the qtimetamux plugin to retain the
video stream.
- The other stream is sent to an ML inferencing
pipeline.
|
| filesrc | Reads the video data. |
| **Preprocessing** | **Preprocessing** |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70017-50/topic/qtimlvconverter.html) |
- Receives the video stream on its sinkpad.
- Performs preprocessing:
- Color conversion
- Scaling down/up
- Normalization on the stream data when the model
expects the floating point values as input
- Converts the video stream to a tensor stream on its source
pad.The object detection model uses this tensor
stream for inferencing.
|
| **Inferencing** | **Inferencing** |
| [qtimltflite](https://docs.qualcomm.com/doc/80-70017-50/topic/qtimltflite.html) |
- Loads the object detection model.
- Modifies the graph for the chosen delegate.
- Receives the tensor stream on its sinkpad.
- Runs the inference and produces a tensor stream with the
object detection results on its source pad.
|
| **Postprocessing** | **Postprocessing** |
| [qtimlvdetection](https://docs.qualcomm.com/doc/80-70017-50/topic/qtimlvdetection.html) |
- Receives the inference tensors from object detection.
- Converts the inference tensors on its sinkpad into formats
such as video or text that the multimedia plugins can
process later.
- Applies the threshold to the chosen number of results.
- Loads the corresponding modules for detection models.
In
this use case, qtimlvdetection does the following:
- Loads the YOLOv8 submodule.
- Produces results as structures of text.
- Sends them to the sinkpad of qtimetamux.
|
| [qtimetamux](https://docs.qualcomm.com/doc/80-70017-50/topic/qtimetamux.html) |
- Receives video stream and text stream with bounding box
results corresponding to the video stream on its
sinkpads.
- Produces GST buffers with contents of video stream from its
sink pad.
- Adds bounding boxes as GstVideoRegionOfInterest from data
sinkpad to GST buffers meta (meta multiplexing) on its
source pad.
|
| [qtioverlay](https://docs.qualcomm.com/doc/80-70017-50/topic/qtioverlay.html) |
- Receives the multiplexed stream.
- Overlays the bounding boxes on the VideoFrame using CL.
- Produces GST buffers with overlays in its source pad.
|
| **Output** | **Output** |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70017-50/topic/waylandsink.html) |
- Receives the video stream on its sinkpad.
- Submits the video stream to Weston.
- Weston renders the video stream and bounding boxes generated
for the objects in that scene on a local display
device.
|
| Filesink | Writes the video to a file. |
**Parent Topic:** [Python applications](https://docs.qualcomm.com/doc/80-70017-50/topic/python-sample-applications.html)
**Related Resources**
- [Object detection](https://docs.qualcomm.com/doc/80-70017-50/topic/gst-ai-object-detection.html)
Last Published: Oct 01, 2026
[Previous Topic
Multi-camera streaming using Python](https://docs.qualcomm.com/bundle/publicresource/80-70017-50/topics/multi-camera-streaming-python-sample-app.md) [Next Topic
Decode and object detection using RTSP stream](https://docs.qualcomm.com/bundle/publicresource/80-70017-50/topics/rts-decode-ai-detection-yolo-v8-overlay-display.md)