# Object detection and display
The **gst-ai-object-detection.py** application allows you to detect objects in the camera stream or a file stream and display the results or save the output to a file.
Note
This application isn't supported in the QLI 2.0 RC2 release because the Python bindings aren't enabled.
**Figure : Pipeline for object detection and preview**
For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-80021-50/topic/camera-detection-display.html#section-jbz-cbk-bdc).
## Run the application on the target device
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80021-50/topic/prerequisites-for-python-sample-applications.html).
2. Run any of the following use cases:
- Display with the primary and secondary cameras respectively:
- gst-ai-object-detection.py -c 0 -f 2 -m /etc/models/yolox_quantized.tflite -l /etc/labels/yolox.json -ml "yolov8"
Copy to clipboard
- gst-ai-object-detection.py -c 1 -f 2 -m /etc/models/yolox_quantized.tflite -l /etc/labels/yolox.json -ml "yolov8"
Copy to clipboard
- Display with input from a video file:
gst-ai-object-detection.py -s /etc/media/video.mp4 -f 2 -m /etc/models/yolox_quantized.tflite -l /etc/labels/yolox.json -ml "yolov8"
Copy to clipboard
- YOLO-NAS with Qualcomm Neural Processing SDK runtime:
gst-ai-object-detection.py -f 1 -m /etc/models/yolonas.dlc -l /etc/labels/yolonas.json -ml "yolo-nas" --tensors="885,877"
Copy to clipboard
- YOLOv8 with LiteRT:
gst-ai-object-detection.py -f 2 -m /etc/models/yolov8_det_quantized.tflite -l /etc/labels/yolov8.json -ml "yolov8"
Copy to clipboard
- Note
Both `yolox_quantized.tflite` and `yolov8_det_quantized.tflite` model files use the Yolov8 module.
Table : Sample model and label files for object detection and display python application
| Runtime | Models | Labels |
| --- | --- | --- |
| LiteRT |
yolov8_det_quantized.tflite
yolox_quantized.tflite
|
yolov8.json
yolox.json
|
| Qualcomm Neural Processing SDK | *yolonas.dlc* | *yolonas.json* |
1. To display the available help options, run the following command:
gst-ai-object-detection.py -h
Copy to clipboard
## Expected output

**Figure : Expected output for object detection and display using RTSP stream–Preview**
## Pipeline flow
| **Process** | **Description** |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-80021-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-80021-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-80021-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.
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. |
## Related information
[Object detection](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-ai-object-detection.html)
Last Published: Mar 26, 2026
[Previous Topic
Multi-camera streaming using Python](https://docs.qualcomm.com/bundle/publicresource/80-80021-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-80021-50/topics/rts-decode-ai-detection-yolo-v8-overlay-display.md)
Source: [https://docs.qualcomm.com/doc/80-80021-50/topic/camera-detection-display.html](https://docs.qualcomm.com/doc/80-80021-50/topic/camera-detection-display.html)