Using the Qualcomm AI Accelerator on Tachyon 24.04
Tachyon’s Qualcomm QCM6490 SoC includes an octa-core Kryo CPU, Adreno 643 GPU, and a Hexagon 770 DSP AI accelerator capable of up to 12 TOPS of ML inference.
With Ubuntu 24.04 support, Tachyon can run real-time neural-network models such as object detection or classification directly on-device.
Overview
This tutorial demonstrates how to deploy a custom object-detection model on Tachyon using the Qualcomm AI Engine Direct (QNN) runtime and Edge Impulse.
You’ll learn how to:
- Install the Qualcomm AI Engine SDK on Tachyon.
- Train and quantize a model in Edge Impulse.
- Convert and deploy the model for QNN.
- Run real-time inference from a USB webcam.
Prerequisites
- Particle Tachyon running Ubuntu 24.04 with SSH access.
- Internet connection (Ethernet or Wi-Fi).
- Linux host (Ubuntu 22.04 recommended) to download the Qualcomm SDK.
- USB webcam.
- Edge Impulse account (free).
- Basic familiarity with Linux and ML.
Installing the Qualcomm AI Engine Direct SDK (QNN)
1. Install Qualcomm Package Manager (QPM)
On your Ubuntu 22.04 host system, download the QPM .deb from the Qualcomm Developer Network.
Then install it:
sudo dpkg -i QualcommPackageManager3.x.x.deb
This provides the qpm-cli tool used to obtain SDK packages.
- Accept the License Agreement
Before you can download any Qualcomm SDKs, you must accept the Qualcomm AI Engine license agreement.
Go to: https://developer.qualcomm.com/qualcomm-ai-engine-direct-sdk-license
Sign in with your Qualcomm account and accept the terms.
If you skip this step, the download will fail with a license error. You only need to do this once per developer account.
- Authenticate and Download the SDK
After accepting the license, authenticate and fetch the SDK:
qpm-cli --login
qpm-cli --license-activate qualcomm_ai_engine_direct
qpm-cli --extract qualcomm_ai_engine_direct.2.31.0.250130.Linux-AnyCPU.qik
The SDK will extract to /opt/qcom/aistack/qairt/2.31.0.250130/.
- Collect Runtime Libraries
From that directory, gather the runtime libraries.
AArch64 user-space:
libQnnDsp.so
libQnnDspV66Stub.so
libQnnGpu.so
libQnnHtp.so
libQnnHtpV68Stub.so
libQnnHtpPrepare.so
libQnnSaver.so
libQnnSystem.so
libQnnTFLiteDelegate.so
DSP (Skel) libraries:
libQnnDspV66Skel.so
libQnnHtpV68Skel.so
libQnnHtpV69Skel.so
libQnnHtpV73Skel.so
libQnnHtpV75Skel.so
libQnnHtpV79Skel.so
- Copy to Tachyon
Transfer via scp to Tachyon and install:
sudo cp libQnn*.so /usr/lib/
sudo mkdir -p /usr/lib/rfsa/adsp
sudo cp libQnn*Skel.so /usr/lib/rfsa/adsp/
Tip:
libQnnTFLiteDelegate.so enables TensorFlow Lite offload.
The “Skel” libraries are the DSP executables loaded on the Hexagon AI cores.
Building an Object-Detection Model (Edge Impulse)
Note:
This tutorial uses Edge Impulse to generate and quantize the model for Qualcomm QNN deployment.
- Data Collection
Connect a webcam to Tachyon and check its there:
lsusb
Install the Edge Impulse CLI:
wget https://cdn.edgeimpulse.com/firmware/linux/setup-edge-impulse-qc-linux.sh
sudo bash setup-edge-impulse-qc-linux.sh
Link Tachyon to your project:
edge-impulse-linux
Capture and label images — for example, colored blocks, logos, or simple household objects.
- Create the Impulse
In Edge Impulse Studio → Create Impulse:
- Processing Block: Image
- Learning Block: Object Detection (Images)
- Input size: 320×320, color: RGB
- Generate features and visualize.
- Train the Model
Under Object Detection, choose YOLO-Pro, disable color augmentation if colors matter, then train. Adjust epochs, learning rate, or dataset volume for best results.
- Deploy for Qualcomm QNN
In Deployment:
- Target: Linux (AARCH64 with Qualcomm QNN)
- Quantization: INT8 (required for hardware acceleration)
- Click Build and download the .eim model file.
Running On-Device Inference
- Install Edge Impulse SDK
pip3 install edge_impulse_linux
- Create inference.py
import cv2, numpy as np
from edge_impulse_linux.image import ImageImpulseRunner
runner = ImageImpulseRunner("model-linux-aarch64-qnn.eim")
model_info = runner.init()
cap = cv2.VideoCapture(0)
cap.set(3, 640)
cap.set(4, 480)
print("Running inference… Ctrl+C to exit.")
while True:
ret, frame = cap.read()
if not ret: break
rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
features, cropped = runner.get_features_from_image_auto_studio_settings(rgb)
res = runner.classify(features)
for bb in res["result"]["bounding_boxes"]:
x, y, w, h = bb["x"], bb["y"], bb["width"], bb["height"]
label, val = bb["label"], bb["value"]
cv2.rectangle(frame, (x, y), (x+w, y+h), (0,255,0), 2)
cv2.putText(frame, f"{label}:{val:.2f}", (x, y-5),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0,255,0), 2)
print(f"Detected {label} ({val:.2f})")
- Run the Model
python3 inference.py
You’ll see bounding boxes and console output for detected objects. Performance depends on input resolution and model size.
Optional:
For live streaming, serve frames via an HTTP server and view at
http://<tachyon_ip>:8888.