Skip to main content

TFLite Delegate Verification

This document provides an out-of-the-box TFLite Delegate inference demo using the Inception_v3 image classification model.

This demo runs on Radxa Dragon Ubuntu and uses the TFLite Delegate to offload inference to the Qualcomm® Hexagon™ Processor (NPU).

tip

This document can be used to verify that TFLite Delegate, fastrpc, and the NPU are working properly.

Before running the TFLite Delegate verification, please refer to Enable NPU on the device.

Download the demo

Device
pip3 install modelscope
modelscope download --model radxa/Inception_v3_qairt_tflite_delegate --local ./Inception_v3_qairt_tflite_delegate

Run the demo

Device
cd Inception_v3_qairt_tflite_delegate
chmod +x qtld-net-run
export LD_LIBRARY_PATH=$(pwd)/libs:$LD_LIBRARY_PATH
export ADSP_LIBRARY_PATH=$(pwd)/libs
./qtld-net-run --model inception_v3_quant.tflite --input input_list.txt --output outputs --backend htp

Verify the results

You can use a Python script to verify the output:

Device
cd scripts
python3 show_inceptionv3_classifications.py --input_list ../input_list.txt -o ../outputs --labels_file ../data/imagenet_slim_labels.txt
(.venv) rock@radxa-dragon-q6a:~/Inception_v3_qairt_tflite_delegate/scripts$ python3 show_inceptionv3_classifications.py --input_list ../input_list.txt -o ../outputs --labels_file ../data/imagenet_slim_labels.txt
Classification results
data/cropped/ILSVRC2012_val_00003441.raw 0.875000 403 acoustic guitar
data/cropped/ILSVRC2012_val_00008465.raw 0.992188 928 trifle
data/cropped/ILSVRC2012_val_00010218.raw 0.515625 282 tabby
data/cropped/ILSVRC2012_val_00044076.raw 0.941406 377 proboscis monkey

By comparing the printed results with the test images, you can confirm that Inception_v3 inference via TFLite Delegate on the Qualcomm® NPU produces correct outputs.

inceptionv3 input images

References

    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