Skip to main content

YOLOv8-det Example

This document explains how to use the QAI AppBuilder Python API to perform inference with the YOLOv8-det object detection model using the Qualcomm® Hexagon™ Processor (NPU).

Supported Devices

DeviceSoC
Dragon Q6AQCS6490
Dragon Q8BSC8280XP
Fogwise® AIRbox Q900QCS9075

Install QAI AppBuilder

tip
  1. Please install QAI AppBuilder according to the QAI AppBuilder Installation Guide.

  2. Please configure the ADSP environment variables according to Configuring ADSP Environment Variables.

Run Example

Install Dependencies

Device
pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision

Run the Script

  • Navigate to the example directory
Device
cd ai-engine-direct-helper/samples/linux/python
  • Prepare the input image. The following image is used as an example:

    input image

  • Execute inference

    Device
    python3 yolov8_det/yolov8_det.py
    $ python3 yolov8_det/yolov8_det.py
    0.0ms [WARNING] <W> Initializing HtpProvider

    /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    121.1ms [WARNING] Time: Read model file to memory. 6.22

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    151.3ms [WARNING] Time: contextCreateFromBinary. 30.09

    151.4ms [WARNING] Time: UnmapViewOfFile. 0.00

    152.3ms [WARNING] Time: model_initialize yolov8 152.21

    230.4ms [WARNING] Time: model_inference yolov8 10.35

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    0.0ms [WARNING] <W> This META does not have Alloc2 Support

    /prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
    650.0ms [WARNING] Time: model_destroy yolov8 61.01

    /usr/bin/xdg-open: 882: www-browser: not found
    /usr/bin/xdg-open: 882: links2: not found
    /usr/bin/xdg-open: 882: elinks: not found
    /usr/bin/xdg-open: 882: links: not found
    /usr/bin/xdg-open: 882: lynx: not found
    /usr/bin/xdg-open: 882: w3m: not found
    xdg-open: no method available for opening '/tmp/tmpqk93qmdb.PNG'

    output image

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0