-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See https://github.com/quic/ai-hub-apps/releases/v0.1.1 for changelog. Signed-off-by: QAIHM Team <[email protected]>
- Loading branch information
Showing
139 changed files
with
7,547 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[run] | ||
omit = */test_*,*/test,*/test/*,build/*,src/customer/*,/private/*,/tmp/* | ||
|
||
[report] | ||
ignore_errors = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[flake8] | ||
ignore = E501,W503,E203,E266,E265,F811 | ||
# E501 line too long | ||
# W503 clang-formatter can produce line break before binary operator | ||
# E203 False positive "whitespaces before :" especially when slicing list, arrays etc. | ||
# E266 Too many leading '#' for block comment | ||
# E265 Block comment should start with '# ' | ||
# F811 A module has been imported twice, but seen when importing functions for fixtures in pytest files. | ||
exclude = **/*_pb2.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.jpg filter=lfs diff=lfs merge=lfs -text | ||
*.png filter=lfs diff=lfs merge=lfs -text | ||
*.jar filter=lfs diff=lfs merge=lfs -text |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Distribution / packaging | ||
.Python | ||
/bench/ | ||
build/ | ||
dist/ | ||
demo_artifacts/ | ||
develop-eggs/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
**/.idea | ||
**/local.properties | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
**/.gradle | ||
**/gradle | ||
**/gradlew* | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
qaiha-dev | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Environments | ||
.venv | ||
env/ | ||
envs/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
*build/* | ||
*.onnx | ||
*.mlmodelc* | ||
*.pt | ||
*.wav | ||
*.npy | ||
*.csv | ||
*.dylib | ||
*.fpie | ||
*bin/ADSP_Inference_Test | ||
*.DS_Store | ||
|
||
# Hub exports | ||
**/*.mlmodel | ||
**/*.tflite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[settings] | ||
profile=black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# exclude: | ||
# * third_party folders | ||
# * CloudFormation templates don't pass the yaml-check hook (a known issue) | ||
|
||
exclude: | | ||
(?x)( | ||
/build/ | ||
) | ||
repos: | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.5.5 | ||
hooks: | ||
- id: insert-license | ||
files: \.py|\.sh$ | ||
args: | ||
- --license-filepath | ||
- .pre-commit-license-header.txt | ||
- --use-current-year | ||
- --allow-past-years | ||
- --no-extra-eol | ||
- id: insert-license | ||
files: \.java$ | ||
args: | ||
- --license-filepath | ||
- .pre-commit-license-header.txt | ||
- --comment-style | ||
- // | ||
- --use-current-year | ||
- --allow-past-years | ||
- --no-extra-eol | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-yaml | ||
args: [--allow-multiple-documents] | ||
- id: trailing-whitespace | ||
exclude: '\.diff$' | ||
- id: check-added-large-files | ||
args: ['--maxkb=1024'] | ||
- id: check-merge-conflict | ||
- id: detect-aws-credentials | ||
args: [--allow-missing-credentials] | ||
- id: end-of-file-fixer | ||
exclude: | | ||
(?x)( | ||
\.diff$ | ||
) | ||
- id: fix-byte-order-marker | ||
- repo: https://github.com/rhysd/actionlint | ||
rev: v1.6.26 | ||
hooks: | ||
- id: actionlint | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.6 | ||
hooks: | ||
- id: shellcheck | ||
exclude: gradlew | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--filter-files"] | ||
- repo: https://github.com/psf/black | ||
rev: 22.1.0 | ||
hooks: | ||
- id: black | ||
additional_dependencies: ['click==8.0.4'] | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: local | ||
hooks: | ||
- id: mypy | ||
name: mypy | ||
files: \.(py|pyi|ipynb|proto|fbs)$ | ||
entry: scripts/util/run_mypy.sh | ||
language: system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--------------------------------------------------------------------- | ||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. | ||
SPDX-License-Identifier: BSD-3-Clause | ||
--------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## How to update these rules | ||
## | ||
## From repo root, `pre-commit run -a shellcheck` to run shellcheck across all files in the repo. By default, the commit hook | ||
## will only run on your patch. However, CI runs it across all files, so if you're going to touch this file, I | ||
## recommend forcing it to run. | ||
## | ||
## To run on and fix a specific file, run: | ||
## shellcheck -x -f diff {filename} | apply | ||
## | ||
|
||
external-sources=true | ||
|
||
## Issue 7533: [shellcheck] Explore miscellaneous checks | ||
disable=SC2003 # expr is antiquated. Consider rewriting this using `$((..))`, `${}` or `[[ ]]`. | ||
disable=SC2005 # Useless `echo`? Instead of `echo $(cmd)`, just use `cmd` | ||
disable=SC2012 # Use `find` instead of `ls` to better handle non-alphanumeric filenames. | ||
disable=SC2116 # Useless echo? Instead of `cmd $(echo foo)`, just use `cmd foo`. | ||
disable=SC2155 # Declare and assign separately to avoid masking return values. | ||
disable=SC2166 # Prefer `[ p ] && [ q ]` as `[ p -a q ]` is not well defined. | ||
|
||
|
||
## things we probably don't care about ever fixing. | ||
|
||
disable=SC1083 # This `{`/`}` is literal. Check if `;` is missing or quote the expression. | ||
|
||
disable=SC2001 # See if you can use `${variable//search/replace}` instead. | ||
disable=SC2064 # Use single quotes, otherwise this expands now rather than when signalled. | ||
disable=SC2129 # Consider using `{ cmd1; cmd2; } >> file` instead of individual redirects. | ||
disable=SC2143 # Use `grep -q` instead of comparing output with `[ -n .. ]`. | ||
disable=SC2148 # Tips depend on target shell and yours is unknown. Add a shebang. | ||
disable=SC2162 # `read` without `-r` will mangle backslashes. | ||
disable=SC2164 # Use `cd ... || exit` in case `cd` fails. | ||
disable=SC2181 # Check exit code directly with e.g. `if mycmd;`, not indirectly with `$?`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Copyright 2024 Qualcomm Innovation Center, Inc. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[![Qualcomm® AI Hub Apps](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/quic-logo.jpg)](https://aihub.qualcomm.com) | ||
|
||
# Qualcomm® AI Hub Apps | ||
|
||
The Qualcomm® AI Hub Apps are a collection of sample machine learning apps ready to deploy on Qualcomm® devices. | ||
|
||
Each app is designed to work with one or more models from [Qualcomm® AI Hub Models](https://aihub.qualcomm.com/). | ||
|
||
With this repository, you can... | ||
* Explore apps optimized for on-device deployment of various machine learning tasks. | ||
* View open-source app recipes for running [Qualcomm® AI Hub Models](https://aihub.qualcomm.com/) on local devices. | ||
|
||
### Supported runtimes | ||
* [TensorFlow Lite](https://www.tensorflow.org/lite) | ||
|
||
### Supported Deployment Targets | ||
* Android 11 Red Velvet Cake & Newer, API v30+ | ||
|
||
### Supported compute units | ||
* CPU, GPU, NPU (includes [hexagon HTP](https://developer.qualcomm.com/hardware/qualcomm-innovators-development-kit/ai-resources-overview/ai-hardware-cores-accelerators)) | ||
|
||
### Chipsets supported for NPU Acceleration | ||
* [Snapdragon 888/888+](https://www.qualcomm.com/products/mobile/snapdragon/smartphones/snapdragon-8-series-mobile-platforms/snapdragon-888-5g-mobile-platform) | ||
* [Snapdragon 8 Gen 1](https://www.qualcomm.com/products/mobile/snapdragon/smartphones/snapdragon-8-series-mobile-platforms/snapdragon-8-gen-1-mobile-platform) | ||
* [Snapdragon 8 Gen 2](https://www.qualcomm.com/products/mobile/snapdragon/smartphones/snapdragon-8-series-mobile-platforms/snapdragon-8-gen-2-mobile-platform) | ||
* [Snapdragon 8 Gen 3](https://www.qualcomm.com/products/mobile/snapdragon/smartphones/snapdragon-8-series-mobile-platforms/snapdragon-8-gen-3-mobile-platform) | ||
* ... and all other [Snapdragon® chipsets supported by the QNN SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/overview.html#supported-snapdragon-devices) | ||
|
||
_Weight and activation type required for NPU Acceleration:_ | ||
* Floating Point: FP16 (All Snapdragon® chipsets with Hexagon® Architecture v69 or newer) | ||
* Integer : INT8 (All Snapdragon® chipsets) | ||
|
||
__NOTE: These apps will run without NPU acceleration on non-Snapdragon® chipsets.__ | ||
|
||
## Getting Started | ||
|
||
1. Search for your desired OS & app in [this folder](apps), or in the [app directory](#app_directory) at the bottom of this file. | ||
|
||
2. The README of the selected app will contain build & installation instructions. | ||
|
||
## App Directory | ||
|
||
| Task | OS | Language | Inference API | Special Tags | ||
| -- | -- | -- | -- | -- | ||
| | | | | ||
| [Image Classification](apps/android/ImageClassification) | Android | Java | TensorFlow Lite | | ||
| [Super Resolution](apps/android/SuperResolution) | Android | Java | TensorFlow Lite | | ||
| [Semantic Segmentation](apps/android/SemanticSegmentation) | Android | Java | TensorFlow Lite | OpenCV, Live Camera Feed | ||
|
||
## LICENSE | ||
|
||
Qualcomm® AI Hub Apps is licensed under BSD-3. See the [LICENSE file](../LICENSE). |
Oops, something went wrong.