QAI AppBuilder
Quick AI Application Builder (QAI AppBuilder) helps developers easily use the Qualcomm® AI Runtime SDK to deploy AI models and design AI applications on Qualcomm® SoC platforms equipped with Qualcomm® Hexagon™ Processor (NPU). It encapsulates model deployment APIs into a set of simplified interfaces for loading models to the NPU and performing inference. QAI AppBuilder significantly reduces the complexity of model deployment for developers and provides multiple demos as references for designing their own AI applications.
Supports Python API / C++ API

QAI-APPBUILDER Architecture
Supported Devices
| Device | SoC |
|---|---|
| Dragon Q6A | QCS6490 |
| Fogwise® AIRbox Q900 | QCS9075 |
Installation Methods
You can install via wheel package or build from source
Clone the Repository
git clone -b radxa-dev https://github.com/ZIFENG278/ai-engine-direct-helper.git && cd ai-engine-direct-helper
Install via Wheel Package
Create a Virtual Environment
Create a virtual environment to isolate the Python libraries
sudo apt install python3-venv
python3 -m venv .venv
source .venv/bin/activate
pip3 install https://github.com/ZIFENG278/ai-engine-direct-helper/releases/download/radxa-dev-2.38.0/qai_appbuilder-2.38.0-cp312-cp312-linux_aarch64.whl
Build from Source
git submodule update --init --recursive
Download QAIRT SDK
Please download and extract the QAIRT SDK according to Download QAIRT SDK Package
Configure QAIRT Environment Variables
- QCS6490
- QCS9075
export PRODUCT_SOC=6490 DSP_ARCH=68
export PRODUCT_SOC=9075 DSP_ARCH=73
cd qairt/2.42.0.251225
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
Compile qai_appbuilder
Create a Virtual Environment
Create a virtual environment to isolate the Python libraries
sudo apt install python3-venv python3-dev cmake gcc g++
python3 -m venv .venv
source .venv/bin/activate
Compile qai_appbuilder Wheel
pip3 install setuptools
cd ai-engine-direct-helper
python3 setup.py bdist_wheel
After compilation, a qai_appbuilder-2.38.0-cp312-cp312-linux_aarch64.whl file will be generated in the dist directory
Install qai_appbuilder
Install qai_appbuilder Wheel
cd dist
pip3 install ./qai_appbuilder-2.38.0-cp312-cp312-linux_aarch64.whl
Create QAIRT SDK LIB Symlink
Create a qai_libs symlink in ai-engine-direct-helper/samples/python to link to the lib directory of the QAIRT SDK
- qcom-qairt
- QAIRT-SDK
If you haven't downloaded the complete QAIRT_SDK, you can install qcom-qairt and then create the symlink.
qcom-qairt is a slimmed-down version of QAIRT-SDK, installing only the required files
- QCS6490
- QCS9075
sudo apt install qcom-qnn-sdk-v68 qcom-genie-sdk-v68
sudo apt install qcom-qnn-sdk-v73 qcom-genie-sdk-v73
ln -s /usr/lib/aarch64-linux-gnu samples/python/qai_libs
If you have already downloaded the complete QAIRT-SDK, you can link to the lib/aarch64-oe-linux-gcc11.2/ directory under QAIRT-SDK
ln -s qairt/2.42.0.251225/lib/aarch64-oe-linux-gcc11.2/ samples/python/qai_libs
Create ADSP Environment Variables
- qcom-qairt
- QAIRT-SDK
If you installed the qcom-qairt package, use the following command to create the ADSP_LIBRARY_PATH environment variable
export ADSP_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu
If you installed the complete QAIRT-SDK, use the following command to create the ADSP_LIBRARY_PATH environment variable
- QCS6490
- QCS9075
export PRODUCT_SOC=6490 DSP_ARCH=68
export PRODUCT_SOC=9075 DSP_ARCH=73
cd qairt/2.42.0.251225
export ADSP_LIBRARY_PATH=$(pwd)/lib/hexagon-v${DSP_ARCH}/unsigned
Application Examples
- QCS6490
- QCS9075
For QCS6490 Demos, please refer to Demo Examples
cd ai-engine-direct-helper/samples/linux/python
-
Object Recognition
Model Run Command convnext_base python3 convnext_base/convnext_base.pyconvnext_tiny python3 convnext_tiny/convnext_tiny.pyefficientnet_b0 python3 efficientnet_b0/efficientnet_b0.pyefficientnet_b4 python3 efficientnet_b4/efficientnet_b4.pyefficientnet_v2_s python3 efficientnet_v2_s/efficientnet_v2_s.pygooglenet python3 googlenet/googlenet.pyinception_v3 python3 inception_v3/inception_v3.pylevit python3 levit/levit.pyregnet python3 regnet/regnet.pyshufflenet_v2 python3 shufflenet_v2/shufflenet_v2.pysqueezenet1_1 python3 squeezenet1_1/squeezenet1_1.pyvit python3 vit/vit.pywideresnet50 python3 wideresnet50/wideresnet50.py -
Image Segmentation
Model Run Command fcn_resnet50 python3 fcn_resnet50/fcn_resnet50.py -
Object Detection
Model Run Command yolov8_det python3 yolov8_det/yolov8_det.py -
Image Super-Resolution
Model Run Command quicksrnetmedium python3 quicksrnetmedium/quicksrnetmedium.pyreal_esrgan_general_x4v3 python3 real_esrgan_general_x4v3/real_esrgan_general_x4v3.pyreal_esrgan_x4plus python3 real_esrgan_x4plus/real_esrgan_x4plus.pysesr_m5 python3 sesr_m5/sesr_m5.pyxlsr python3 xlsr/xlsr.py
For QCS9075 Demos, please refer to Demo Examples
cd ai-engine-direct-helper/samples/python
-
Image Generation / Inpainting
Model Run Command stable_diffusion_v2_1 python3 stable_diffusion_v2_1/stable_diffusion_v2_1.py --prompt "the prompt string ..."stable_diffusion_v1_5 python3 stable_diffusion_v1_5/stable_diffusion_v1_5.py --prompt "the prompt string ..."lama_dilated python3 lama_dilated/lama_dilated.pyaotgan python3 aotgan/aotgan.py -
Image Super-Resolution
Model Run Command real_esrgan_x4plus python3 real_esrgan_x4plus/real_esrgan_x4plus.pyreal_esrgan_general_x4v3 python3 real_esrgan_general_x4v3/real_esrgan_general_x4v3.pyquicksrnetmedium python3 quicksrnetmedium/quicksrnetmedium.py -
Image Recognition
Model Run Command inception_v3 python3 inception_v3/inception_v3.pybeit python3 beit/beit.pygooglenet python3 googlenet/googlenet.py -
Pose Estimation
Model Run Command openpose python3 openpose/openpose.pymediapipe_hand python3 mediapipe_hand/mediapipe_hand.py -
Image Segmentation / Depth Estimation
Model Run Command unet_segmentation python3 unet_segmentation/unet_segmentation.pydepth_anything python3 depth_anything/depth_anything.py -
Object Detection
Model Run Command yolov8_det python3 yolov8_det/yolov8_det.py -
3D Modeling
Model Run Command facemap_3dmm python3 facemap_3dmm/facemap_3dmm.pyface_attrib_net python3 face_attrib_net/face_attrib_net.py -
Audio Models
Model Run Command yamnet python3 yamnet/yamnet.pywhisper_base_en python3 whisper_base_en/whisper_base_en.pywhisper_tiny_en python3 whisper_tiny_en/whisper_tiny_en.py -
Text / Multimodal Embeddings
Model Run Command nomic_embed_text python3 nomic_embed_text/nomic_embed_text.pyopenai_clip python3 openai_clip/openai_clip.py --text "mountain" -
3D Action Recognition
Model Run Command resnet_3d python3 resnet_3d/resnet_3d.py -
OCR (Text Recognition)
Model Run Command easy_ocr python3 easy_ocr/easy_ocr.py