Skip to main content

ConvNext-Tiny Example

This document describes using the QAI AppBuilder Python API to perform inference with the ConvNext-Tiny target recognition model using Qualcomm® Hexagon™ Processor (NPU).

Supported Devices

DeviceSoC
Dragon Q6AQCS6490
Dragon Q8BSC8280XP

Install QAI AppBuilder

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

  2. Please configure QAIRT environment variables according to Configure QAIRT Environment Variables.

Run Example

Install Dependencies

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

Run Script

  • Navigate to the example directory

    Device
    cd ai-engine-direct-helper/samples/linux/python
  • Prepare input image, using the following image as input example

    input image

  • Execute inference

    Device
    python3 convnext_tiny/convnext_tiny.py
    $ python3 convnext_tiny/convnext_tiny.py
    Current file directory: /mnt/ssd/qualcomm/701/zzf_fork/ai-engine-direct-helper/samples/linux/python/convnext_tiny
    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.4.0/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

    132.1ms [WARNING] Time: Read model file to memory. 15.88

    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

    176.1ms [WARNING] Time: contextCreateFromBinary. 44.01

    176.2ms [WARNING] Time: UnmapViewOfFile. 0.00

    176.6ms [WARNING] Time: model_initialize convnext_tiny 176.53

    245.2ms [WARNING] Time: model_inference convnext_tiny 11.95

    Top 5 predictions for image:

    Samoyed 0.637629509
    Pomeranian 0.1382825226
    keeshond 0.0217001885
    Arctic fox 0.0138142202
    white wolf 0.0115938596
    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.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
    263.1ms [WARNING] Time: model_destroy convnext_tiny 15.29

    The printed results show that Samoyed has the highest confidence, which matches the input image content.


    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