# Detect objects

Before running the pipeline command for a model, follow the required Prerequisites.

Run the following command to ensure your result is displayed on the connected display.

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
    Copy to clipboard

## Yolo-V7

YoloV7 is a machine learning model that predicts bounding boxes and classes of objects in an image.

This model is post-training quantized to int8 using samples from the COCO dataset.

The AI Hub model is based on [this implementation of Yolo-v7](https://github.com/WongKinYiu/yolov7/).

- Model: [yolov7](https://github.com/quic/ai-hub-models/tree/main/qai_hub_models/models/yolov7)
- Label: [coco_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/coco_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer ! queue ! waylandsink fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/Yolo-v7-Quantized.tflite ! queue ! \
    qtimlvdetection threshold=50.0 results=10 module=yolov8 labels=/etc/labels/coco_labels.txt constants="YOLOv7,q-offsets=<35.0, 0.0, 0.0>,q-scales=<3.4220554, 0.0023370725102722645, 1.0>;" ! \
    video/x-raw,format=BGRA,width=640,height=360 ! queue ! mixer.
    Copy to clipboard

## Yolov8-Detection

Ultralytics Yolov8 is a machine learning model that predicts bounding boxes and classes of objects in an image.

This model is post-training quantized to int8 using samples from the COCO dataset.

The AI Hub model is based on [this implementation of YOLOv8-Detection-Quantized](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/models/yolo/detect).

- Model: [YOLOv8-Detection](https://github.com/quic/ai-hub-models/tree/main/qai_hub_models/models/yolov8_det)
- Label: [coco_labels.txt](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/coco_labels.txt)

gst-launch-1.0 -e --gst-debug=2 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer ! queue ! waylandsink fullscreen=true \
    split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
    external-delegate-options="QNNExternalDelegate,backend_type=htp,htp_device_id=(string)0,htp_performance_mode=(string)2,htp_precision=(string)1;" model=/etc/models/YOLOv8-Detection-Quantized.tflite ! queue ! \
    qtimlvdetection threshold=50.0 results=10 module=yolov8 labels=/etc/labels/coco_labels.txt constants="YOLOv8,q-offsets=<21.0, 0.0, 0.0>,q-scales=<3.093529462814331, 0.00390625, 1.0>;" ! \
    video/x-raw,format=BGRA,width=640,height=360 ! queue ! mixer.
    Copy to clipboard

Note

Adding `htp_device_id=(string)0,htp_performance_mode=(string)2,htp_precision=(string)1` to the `external-delegate-options` in the above command allows the model to be run in
High Performance mode on HTP.

High Performance mode can be enabled for all other pipelines in the same way.

Last Published: Oct 10, 2025

Previous Topic
 
Classify images Next Topic

Apply semantic segmentation to frames of a video