Demos 示例

环境配置

sudo apt update -y
sudo apt install -y pip python3-numpy git python3-setuptools cmake python3.13-venv \
    python3-torch python3-torchvision python3-tqdm python3-wget
python3 -m venv .venv
source .venv/bin/activate
pip3 install requests qai-hub opencv-python-headless
cd
wget https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.37.1.250807/v2.37.1.250807.zip
unzip v2.37.1.250807.zip
cd qairt/2.37.1.250807/
export PRODUCT_SOC=6490 DSP_ARCH=68
source bin/envsetup.sh
export ADSP_LIBRARY_PATH=$QNN_SDK_ROOT/lib/hexagon-v${DSP_ARCH}/unsigned
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QNN_SDK_ROOT/lib/aarch64-oe-linux-gcc11.2
cd

下载 ai-engine-direct-helper.tar

tar xf ai-engine-direct-helper.tar
cd ai-engine-direct-helper
python3 setup.py bdist_wheel
cd dist
pip3 install ./qai_appbuilder-2.38.0-cp313-cp313-linux_aarch64.whl
cd
ln -sf qairt/2.37.1.250807/lib/aarch64-oe-linux-gcc11.2/ \
    ai-engine-direct-helper/samples/python/qai_libs

运行DEMO

YOLOv8-det 示例

cd ~/ai-engine-direct-helper/samples/linux/python
pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision
python3 yolov8_det/yolov8_det.py --output_image_path ./output.jpg

输入图像

输出图像

XLSR 示例

cd ~/ai-engine-direct-helper/samples/linux/python
pip3 install matplotlib easyocr qai_hub_models transformers openai-clip
python3 xlsr/xlsr.py

输入图像

输出图像

WideResNet50 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 wideresnet50/wideresnet50.py

输入图像

程序输出日志

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

   146.7ms [WARNING] Time: Read model file to memory. 30.54

     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

   179.0ms [WARNING] Time: contextCreateFromBinary. 32.18

   179.0ms [WARNING] Time: UnmapViewOfFile. 0.00

   179.5ms [WARNING] Time: model_initialize wideresnet50 179.49

   243.2ms [WARNING] Time: model_inference wideresnet50 9.66

Top 5 predictions for image:

Samoyed 0.8442133665
keeshond 0.0415370725
Pomeranian 0.0302517358
white wolf 0.0258170888
chow 0.0072637959
     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
   258.1ms [WARNING] Time: model_destroy wideresnet50 11.75

VIT 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 vit/vit.py

输入图像

程序输出日志

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

   148.6ms [WARNING] Time: Read model file to memory. 32.50

     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

   351.2ms [WARNING] Time: contextCreateFromBinary. 202.52

   351.2ms [WARNING] Time: UnmapViewOfFile. 0.00

   351.9ms [WARNING] Time: model_initialize vit 351.87

   560.6ms [WARNING] Time: model_inference vit 159.35

Top 5 predictions for image:

Samoyed 0.7157644629
Pomeranian 0.0566752702
keeshond 0.0083217919
Eskimo dog 0.0057556415
Japanese spaniel 0.003955483
     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
   585.7ms [WARNING] Time: model_destroy vit 20.11

SqueezeNet-1.1 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 squeezenet1_1/squeezenet1_1.py

程序输出日志

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

   120.9ms [WARNING] Time: Read model file to memory. 2.75

     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

   132.8ms [WARNING] Time: contextCreateFromBinary. 11.81

   133.0ms [WARNING] Time: UnmapViewOfFile. 0.00

   133.2ms [WARNING] Time: model_initialize squeezenet1_1 133.16

   225.5ms [WARNING] Time: model_inference squeezenet1_1 2.50

Top 5 predictions for image:

Samoyed 0.8289067745
wallaby 0.0915796161
Pomeranian 0.0265247617
Great Pyrenees 0.0101179369
hare 0.0050830133
     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
   249.2ms [WARNING] Time: model_destroy squeezenet1_1 20.91

Shufflenet-v2 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 shufflenet_v2/shufflenet_v2.py

程序输出日志

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

   115.6ms [WARNING] Time: Read model file to memory. 0.91

     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

   125.6ms [WARNING] Time: contextCreateFromBinary. 10.02

   125.7ms [WARNING] Time: UnmapViewOfFile. 0.00

   125.9ms [WARNING] Time: model_initialize shufflenet_v2 125.87

   199.9ms [WARNING] Time: model_inference shufflenet_v2 2.19

Top 5 predictions for image:

Samoyed 0.8289067745
wallaby 0.0915796161
Pomeranian 0.0265247617
Great Pyrenees 0.0101179369
hare 0.0050830133
     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
   219.4ms [WARNING] Time: model_destroy shufflenet_v2 17.56

SESR-M5 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 sesr_m5/sesr_m5.py

输入图像

输出图像

程序输出日志

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

   113.8ms [WARNING] Time: Read model file to memory. 0.39

     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

   119.7ms [WARNING] Time: contextCreateFromBinary. 5.87

   119.8ms [WARNING] Time: UnmapViewOfFile. 0.00

   119.9ms [WARNING] Time: model_initialize sesr_m5 119.89

   152.4ms [WARNING] Time: model_inference sesr_m5 11.00

     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
   330.6ms [WARNING] Time: model_destroy sesr_m5 18.65

/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/tmpxodzub9w.PNG'

RegNet 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 regnet/regnet.py

程序输出日志

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

   123.3ms [WARNING] Time: Read model file to memory. 9.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

   143.9ms [WARNING] Time: contextCreateFromBinary. 20.52

   144.0ms [WARNING] Time: UnmapViewOfFile. 0.00

   144.5ms [WARNING] Time: model_initialize regnet 144.44

   212.3ms [WARNING] Time: model_inference regnet 4.75

Top 5 predictions for image:

Samoyed 0.7615189552
Pomeranian 0.1356044859
keeshond 0.0481537655
white wolf 0.0241472572
Eskimo dog 0.0072157839
     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
   223.8ms [WARNING] Time: model_destroy regnet 8.95

Real-ESRGAN-x4plus 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 real_esrgan_x4plus/real_esrgan_x4plus.py

输入图像

输出图像

Real-ESRGAN-General-x4v3 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 real_esrgan_general_x4v3/real_esrgan_general_x4v3.py

输入图像

输出图像

QuickSRNetMedium 示例

cd ~/ai-engine-direct-helper/samples/linux/python
pip3 install matplotlib easyocr qai_hub_models transformers openai-clip
python3 quicksrnetmedium/quicksrnetmedium.py

输入图像

输出图像

LeViT 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 levit/levit.py

输入图像

程序输出日志

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

   120.8ms [WARNING] Time: Read model file to memory. 4.10

     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

   147.6ms [WARNING] Time: contextCreateFromBinary. 26.69

   147.6ms [WARNING] Time: UnmapViewOfFile. 0.00

   148.5ms [WARNING] Time: model_initialize levit 148.48

   226.3ms [WARNING] Time: model_inference levit 5.23

Top 5 predictions for image:

Samoyed 0.6532489061
Pomeranian 0.0412057079
acorn 0.013004588
wallaby 0.007310994
keeshond 0.0034880731
     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
   239.0ms [WARNING] Time: model_destroy levit 10.01

Inception v3 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 inception_v3/inception_v3.py --image ./inception_v3/input.jpg

输入图像

程序输出日志

$ python3 inception_v3/inception_v3.py --image ./inception_v3/input.jpg
     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

   221.6ms [WARNING] Time: Read model file to memory. 17.28

     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

   258.5ms [WARNING] Time: contextCreateFromBinary. 36.82

   258.5ms [WARNING] Time: UnmapViewOfFile. 0.00

   260.2ms [WARNING] Time: model_initialize inceptionV3 260.14

   332.1ms [WARNING] Time: model_inference inceptionV3 3.50

Top 5 predictions for image:

Samoyed 0.9998983145
Arctic fox 0.000054331
white wolf 0.0000345349
Eskimo dog 0.0000035142
Pomeranian 0.0000030651
     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
   443.3ms [WARNING] Time: model_destroy inceptionV3 105.74

GoogLeNet 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 googlenet/googlenet.py

输入图像

程序输出日志

$ python3 googlenet/googlenet.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

   157.6ms [WARNING] Time: Read model file to memory. 8.91

     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

   180.6ms [WARNING] Time: contextCreateFromBinary. 22.97

   180.7ms [WARNING] Time: UnmapViewOfFile. 0.00

   181.6ms [WARNING] Time: model_initialize googlenet 181.55

   255.7ms [WARNING] Time: model_inference googlenet 2.67

Top 5 predictions for image:

Samoyed 0.948613584
West Highland White Terrier 0.0060515446
Alaskan tundra wolf 0.0052576731
Pomeranian 0.0047871661
Chow Chow 0.0035575195
     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
   353.7ms [WARNING] Time: model_destroy googlenet 93.43

FCN-ResNet50 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 fcn_resnet50/fcn_resnet50.py --image ./input.jpg

输入图像

输出图像

EfficientNet-V2-s 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 efficientnet_v2_s/efficientnet_v2_s.py

输入图像

程序输出日志

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

   129.0ms [WARNING] Time: Read model file to memory. 11.18

     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

   158.9ms [WARNING] Time: contextCreateFromBinary. 29.89

   159.0ms [WARNING] Time: UnmapViewOfFile. 0.00

   159.4ms [WARNING] Time: model_initialize efficientnet_v2_s 159.34

   227.4ms [WARNING] Time: model_inference efficientnet_v2_s 10.06

Top 5 predictions for image:

Samoyed 0.7607400417
keeshond 0.0230328161
Pomeranian 0.0204458293
white wolf 0.0193288065
Arctic fox 0.0062915389
     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
   239.8ms [WARNING] Time: model_destroy efficientnet_v2_s 9.40

EfficientNet-B4 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 efficientnet_b4/efficientnet_b4.py

输入图像

程序输出日志

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

   134.2ms [WARNING] Time: Read model file to memory. 15.52

     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

   197.4ms [WARNING] Time: contextCreateFromBinary. 63.07

   197.4ms [WARNING] Time: UnmapViewOfFile. 0.00

   197.8ms [WARNING] Time: model_initialize efficientnet_b4 197.73

   271.4ms [WARNING] Time: model_inference efficientnet_b4 12.60

Top 5 predictions for image:

Samoyed 0.9568610787
Pomeranian 0.0066686491
keeshond 0.0054634647
chow 0.0010403089
Eskimo dog 0.0007608762
     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
   287.8ms [WARNING] Time: model_destroy efficientnet_b4 13.65

EfficientNet-B0 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 efficientnet_b0/efficientnet_b0.py

输入图像

程序输出日志

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

   122.3ms [WARNING] Time: Read model file to memory. 5.33

     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

   143.3ms [WARNING] Time: contextCreateFromBinary. 20.87

   143.3ms [WARNING] Time: UnmapViewOfFile. 0.00

   143.7ms [WARNING] Time: model_initialize efficientnet_b0 143.64

   214.6ms [WARNING] Time: model_inference efficientnet_b0 6.08

Top 5 predictions for image:

Samoyed 0.6965298057
Pomeranian 0.1052966565
keeshond 0.0131986532
Eskimo dog 0.0075131184
Arctic fox 0.0056676473
     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
   235.9ms [WARNING] Time: model_destroy efficientnet_b0 18.66

ConvNext-Tiny 示例

cd ~/ai-engine-direct-helper/samples/linux/python
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

ConvNext-Base 示例

cd ~/ai-engine-direct-helper/samples/linux/python
python3 convnext_base/convnext_base.py

输入图像

程序输出日志

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

   193.9ms [WARNING] Time: Read model file to memory. 71.69

     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

   269.5ms [WARNING] Time: contextCreateFromBinary. 75.47

   269.5ms [WARNING] Time: UnmapViewOfFile. 0.00

   270.9ms [WARNING] Time: model_initialize convnext_base 270.85

   348.3ms [WARNING] Time: model_inference convnext_base 30.17

Top 5 predictions for image:

Samoyed 0.8726790547
Pomeranian 0.0192712061
keeshond 0.0150661934
Japanese spaniel 0.0032834315
Eskimo dog 0.0020474677
     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
   365.5ms [WARNING] Time: model_destroy convnext_base 14.44