# Object detection and display Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/camera-detection-display.html](https://docs.qualcomm.com/doc/80-70020-50/topic/camera-detection-display.html) 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: For Ubuntu Server, this sample application isn't supported on Dragonwing IQ-8275. 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-70020-50/topic/camera-detection-display.html#camera-detection-display__section_jbz_cbk_bdc). ## Run the application on the target device 1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70020-50/topic/prerequisites-for-python-sample-applications.html). 2. Export the YOLOv8 model and update the model name in the commands with the appropriate model name as downloaded through AI Hub. 3. 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/yolov8_det_quantized.tflite -l /etc/labels/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 - gst-ai-object-detection.py -c 1 -f 2 -m /etc/models/yolov8_det_quantized.tflite -l /etc/labels/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: gst-ai-object-detection.py -s /etc/media/video.mp4 -f 2 -m /etc/models/yolov8_det_quantized.tflite -l /etc/labels/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: gst-ai-object-detection.py -f 2 -m /etc/models/yolonas.tflite -l /etc/labels/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 - YOLOv8 with LiteRT: gst-ai-object-detection.py -f 2 -m /etc/models/yolov8.tflite -l /etc/labels/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 Note: Update the `q_offset` and `q_scale` constants of the quantized LiteRT model in the command. For instructions, see [get model constants](https://docs.qualcomm.com/bundle/publicresource/topics/80-90441-15/integrate-ai-hub-models.html#get-model-constants). Table : Sample model and label files for object detection and display python application | Runtime | Models | Labels | | :--- | :--- | :--- | | LiteRT | yolov8_det_quantized.tflite | yolonas.labels | | Qualcomm Neural Processing SDK | yolonas.dlc | yolonas.labels | 4. To display the available help options, run the following command: gst-ai-object-detection.py -hCopy 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-70020-50/topic/qtiqmmfsrc.html) |
The object detection model uses this tensor
stream for inferencing.
In
this use case, qtimlvdetection does the following: