quic / ai-hub-models

The Qualcomm® AI Hub Models are a collection of state-of-the-art machine learning models optimized for performance (latency, memory etc.) and ready to deploy on Qualcomm® devices.
https://aihub.qualcomm.com
BSD 3-Clause "New" or "Revised" License
338 stars 45 forks source link

[Feature Request] OpenPose model has no option to use .bin file as target runtime. #56

Closed ukc-work closed 1 week ago

ukc-work commented 1 week ago

With target-runtime option as qnn, it uses .so file only. How can I use .bin file for the same model ?

kory commented 1 week ago

Unfortunately, at the moment, our export scripts support context binary only for non-Android devices. If you choose a Windows device (Snapdragon X Elite CRD), we compile to a qnn .bin.

All of our models can be compiled to .bin via AI Hub, but you would need to make a code change & install ai_hub_models from source:

In base_model.py, you would need to replace the if statement + block on lines 189-202 with

target_runtime_flag = "qnn_context_binary"
break