# ﻿检测对象

在为某个模型运行 pipeline 命令之前，请遵循所需的[先决条件](https://docs.qualcomm.com/doc/80-70018-15BY/topic/ai-hub-qualcomm-im-sdk.html#prerequisites)。

运行以下命令以确保您的结果显示在连接的显示器上。

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

## Yolo-V7 Quantized

YoloV7 是一种机器学习模型，可预测图像中的边界框和对象类别。

此模型使用来自 COCO 数据集的样本并在训练后量化为 int8。

AI Hub 模型基于 [Yolo-v7-Quantized 的实现](https://github.com/WongKinYiu/yolov7/)。

- 模型：[Yolo-v7-Quantized.tflite](https://aihub.qualcomm.com/iot/models/yolov7_quantized)
- 标签：[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-Quantized

Ultralytics Yolov8 是一种机器学习模型，可预测图像中的边界框和对象类别。

此模型使用来自 COCO 数据集的样本并在训练后量化为 int8。

AI Hub 模型基于 [YOLOv8-Detection-Quantized 的实现](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/models/yolo/detect)。

- 模型：[YOLOv8-Detection-Quantized.tflite](https://aihub.qualcomm.com/iot/models/yolov8_det_quantized)
- 标签：[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

在上述命令中的 `external-delegate-options` 中添加 `htp_device_id=(string)0,htp_performance_mode=(string)2,htp_precision=(string)1` 允许模型在 HTP 上以高性能模式运行。

可以用相同方式为所有其他pipeline启用高性能模式。

## Yolo-nas-Quantized

YoloNAS 是一种机器学习模型，可预测图像中的边界框和对象类别。

此模型使用来自 COCO 数据集的样本并在训练后量化为 int8。

AI Hub 模型基于 [Yolo-nas-Quantized 的实现](https://github.com/Deci-AI/super-gradients)。

- 模型：[Yolo-NAS-Quantized.tflite](https://aihub.qualcomm.com/iot/models/yolonas_quantized)
- 标签：[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-NAS-Quantized.tflite ! queue ! \
    qtimlvdetection threshold=50.0 results=10 module=yolov8 labels=/etc/labels/coco_labels.txt constants="yolo-nas,q-offsets=<37.0,0.0, 0.0>,q-scales=<3.416602611541748, 0.00390625, 1.0>;" ! \
    Copy to clipboard

在对模型执行 pipeline 命令之前，请确保遵循所需的[先决条件](https://docs.qualcomm.com/doc/80-70018-15BY/topic/ai-hub-qualcomm-im-sdk.html#prerequisites)。

运行以下命令以确保您的结果显示在连接的显示器上。

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

## Yolo-V7 Quantized

- 模型：[Yolo-v7-Quantized.tflite](https://aihub.qualcomm.com/iot/models/yolov7_quantized)
- 标签：[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=/opt/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! 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=/opt/Yolo-v7-Quantized.tflite ! queue ! \
    qtimlvdetection threshold=50.0 results=10 module=yolov8 labels=/opt/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-Quantized

- 模型：[YOLOv8-Detection-Quantized.tflite](https://aihub.qualcomm.com/iot/models/yolov8_det_quantized)
- 标签：[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=/opt/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! 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=/opt/YOLOv8-Detection-Quantized.tflite ! queue ! \
    qtimlvdetection threshold=50.0 results=10 module=yolov8 labels=/opt/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

在上述命令中的 `external-delegate-options` 中添加 `htp_device_id=(string)0,htp_performance_mode=(string)2,htp_precision=(string)1` 允许模型在 HTP 上以高性能模式运行。

可以用相同方式为所有其他 pipeline 启用高性能模式。

## Yolo-nas-Quantized

- 模型：[Yolo-NAS-Quantized.tflite](https://aihub.qualcomm.com/iot/models/yolonas_quantized)
- 标签：[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=/opt/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! 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=/opt/Yolo-NAS-Quantized.tflite ! queue ! \
>     qtimlvdetection threshold=50.0 results=10 module=yolov8 labels=/opt/coco_labels.txt constants="yolo-nas,q-offsets=<37.0,0.0, 0.0>,q-scales=<3.416602611541748, 0.00390625, 1.0>;" ! \
>     Copy to clipboard

- main
    - video/x-raw,format=BGRA,width=640,height=360 ! queue ! mixer.

Last Published: Oct 23, 2025

[Previous Topic
对图像进行分类](https://docs.qualcomm.com/bundle/publicresource/80-70018-15BY/topics/image-classification.md) [Next Topic
对视频帧应用语义分割](https://docs.qualcomm.com/bundle/publicresource/80-70018-15BY/topics/semantic-segmentation.md)