OpenPose Example
This document describes how to use the QAI AppBuilder Python API to run inference with the OpenPose pose estimation model on Qualcomm® Hexagon™ Processor (NPU).
Supported Devices
| Device | SoC |
|---|---|
| Fogwise® AIRbox Q900 | QCS9075 |
Install QAI AppBuilder
tip
-
Please install QAI AppBuilder according to QAI AppBuilder Installation Guide.
-
Please configure ADSP environment variables according to Create ADSP Environment Variables.
Run the Example
Install Dependencies
Device
pip3 install requests tqdm qai-hub py3_wget opencv-python torch torchvision matplotlib easyocr qai_hub_models transformers openai-clip
Run the Script
-
Navigate to the example directory
- QCS9075
Devicecd ai-engine-direct-helper/samples/python -
Prepare input image. The following image is used as an example:

input image
-
Run inference
Devicepython3 openpose/openpose.py$ python3 openpose/openpose.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
161.4ms [WARNING] Time: Read model file to memory. 49.87
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
214.6ms [WARNING] Time: contextCreateFromBinary. 53.04
214.6ms [WARNING] Time: UnmapViewOfFile. 0.00
216.5ms [WARNING] Time: model_initialize openpose 216.47
273.6ms [WARNING] Time: model_inference openpose 24.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
/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
929.9ms [WARNING] Time: model_destroy openpose 57.19
/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/tmpfvxac2nz.PNG'
output image