-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced 'build_apk.py' logic & 'README.md' #41
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
|
||
1. Java, android-sdk and sdkmanager is already set at user's end | ||
2. User should have Linux QNN SDK in local machine. | ||
3. If models need to be downloaded during the execution of build_apk.py, qai-hub must be installed first according to the[ README.md in ai-hub-models](https://github.com/quic/ai-hub-models/blob/main/README.md). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also move the space before There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was my negligence, thank you for pointing out the mistake. The document has been revised |
||
|
||
4. When downloading [MobileNet_v3_Small](https://aihub.qualcomm.com/mobile/models/mobilenet_v3_small) via the web interface, qai-hub installation can be temporarily skipped. | ||
|
||
|
||
|
||
## Info | ||
|
@@ -53,20 +57,33 @@ Right now we use mobilenet_v3_small.tflite model which takes 224x224 as input an | |
|
||
You have to run build_apk.py for Image Classification. It will generate classification-debug.apk and install it in connected device. | ||
|
||
Please first use `python build_apk.py -h` to understand the parameters. | ||
|
||
|
||
``` | ||
build_apk.py [-h] -q QNNSDK [-m MODEL_NAME] [-path MODEL_PATH] | ||
``` | ||
|
||
build_apk.py [-h] -q QNNSDK (-m MODEL_PATH | -e MODEL_NAME) | ||
The parameter "-q" must be entered. QNN SDK can be utilized by setting an environment variable or specifying the path directly.<br />There are three ways to input parameters:<br />1. Inputting only the parameter "-path"<br />2. Inputting only the parameter "-m"<br />3. Neither entering the parameter "-m" nor "-path" | ||
|
||
|
||
|
||
### Example | ||
|
||
Here, with -m, give your tflite model path i.e. till `*.tflite file`, and it will copy model file to assets folder to build andoid app. | ||
Here, with -path, give your tflite model path i.e. till `*.tflite file`, and it will copy model file to assets folder to build andoid app. | ||
``` | ||
python build_apk.py -q "<QNN_SDK_PATH>" -m "Path\to\TFLITE\Model" | ||
python build_apk.py -q "<QNN_SDK_PATH>" -path "Path/to/TFLITE/Model" | ||
``` | ||
|
||
|
||
Also, you can use AI-HUB Model name as mentioned in models directory, to directly export the model from AI-Hub and copy it to app assets. | ||
|
||
``` | ||
python build_apk.py -q "<QNN_SDK_PATH>" -e <Model Name> | ||
python build_apk.py -q "<QNN_SDK_PATH>" -m <Model Name> | ||
``` | ||
|
||
You can also select the model provided in the list menu during the execution of build_apk.py without specifying the model name and model path. | ||
|
||
``` | ||
python build_apk.py -q "<QNN_SDK_PATH>" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you replace
qui-hub
withAI Hub Models
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your correction. The document has been revised