v0.46.1
Browse filesSee https://github.com/quic/ai-hub-models/releases/v0.46.1 for changelog.
Files changed (8)
- README.md+135-262
- YamNet_float.dlcDeleted-3
- YamNet_float.onnx.zipDeleted-3
- YamNet_float.tfliteDeleted-3
- YamNet_w8a8.dlcDeleted-3
- YamNet_w8a8.onnx.zipDeleted-3
- YamNet_w8a8.tfliteDeleted-3
- tool-versions.yamlDeleted-4
9 unmodified lines1011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882899 unmodified lines# YamNet: Optimized for Mobile Deployment## Audio Event classification ModelAn audio event classifier trained on the AudioSet dataset to predict audio events from the AudioSet ontology employing the Mobilenet_v1 depthwise-separable convolution architecture.This model is an implementation of YamNet found [here](https://github.com/w-hc/torch_audioset).This repository provides scripts to run YamNet on Qualcomm® devices.More details on model performance across various devices, can be found[here](https://aihub.qualcomm.com/models/yamnet).### Model Details- **Model Type:** Model_use_case.audio_classification- **Model Stats:**- Model checkpoint: yamnet.pth- Input resolution: 1x1x96x64- Number of parameters: 3.73M- Model size (float): 14.2 MB| Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model|---|---|---|---|---|---|---|---|---|| YamNet | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 0.67 ms | 0 - 122 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 0.652 ms | 0 - 115 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 0.355 ms | 0 - 150 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 0.359 ms | 0 - 137 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 0.216 ms | 0 - 2 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 0.208 ms | 0 - 2 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 0.419 ms | 0 - 10 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.onnx.zip) || YamNet | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 0.379 ms | 0 - 122 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 1.1 ms | 0 - 115 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 0.67 ms | 0 - 122 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 0.652 ms | 0 - 115 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 0.548 ms | 0 - 129 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 0.543 ms | 0 - 122 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 0.379 ms | 0 - 122 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 1.1 ms | 0 - 115 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 0.175 ms | 0 - 147 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.175 ms | 0 - 139 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 0.266 ms | 0 - 112 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.onnx.zip) || YamNet | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 0.153 ms | 0 - 126 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.163 ms | 0 - 119 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 0.245 ms | 0 - 94 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.onnx.zip) || YamNet | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 0.158 ms | 0 - 124 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.tflite) || YamNet | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.157 ms | 0 - 117 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 0.259 ms | 0 - 92 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.onnx.zip) || YamNet | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 0.276 ms | 0 - 0 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.dlc) || YamNet | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.272 ms | 8 - 8 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet.onnx.zip) || YamNet | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | TFLITE | 0.422 ms | 0 - 121 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | QNN_DLC | 0.423 ms | 0 - 122 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | ONNX | 0.882 ms | 0 - 14 MB | CPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) || YamNet | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | TFLITE | 0.522 ms | 0 - 6 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | QNN_DLC | 0.635 ms | 0 - 2 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | ONNX | 1.632 ms | 0 - 7 MB | CPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) || YamNet | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 0.398 ms | 0 - 117 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 0.375 ms | 0 - 118 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 0.22 ms | 0 - 140 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 0.224 ms | 0 - 136 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 0.138 ms | 0 - 3 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 0.136 ms | 0 - 2 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 0.333 ms | 0 - 7 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) || YamNet | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 0.295 ms | 0 - 117 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 0.274 ms | 0 - 118 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 0.398 ms | 0 - 117 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 0.375 ms | 0 - 118 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 0.442 ms | 0 - 123 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 0.406 ms | 0 - 124 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 0.295 ms | 0 - 117 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 0.274 ms | 0 - 118 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 0.11 ms | 0 - 140 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.112 ms | 0 - 138 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 0.206 ms | 0 - 110 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) || YamNet | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 0.097 ms | 0 - 121 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.091 ms | 0 - 122 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 0.197 ms | 0 - 98 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) || YamNet | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | TFLITE | 0.172 ms | 0 - 122 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | QNN_DLC | 0.165 ms | 0 - 122 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | ONNX | 0.714 ms | 0 - 15 MB | CPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) || YamNet | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 0.088 ms | 0 - 119 MB | NPU | [YamNet.tflite](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.tflite) || YamNet | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.094 ms | 0 - 120 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 0.184 ms | 0 - 96 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) || YamNet | w8a8 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 0.208 ms | 0 - 0 MB | NPU | [YamNet.dlc](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.dlc) || YamNet | w8a8 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.224 ms | 4 - 4 MB | NPU | [YamNet.onnx.zip](https://huggingface.co/qualcomm/YamNet/blob/main/YamNet_w8a8.onnx.zip) |## InstallationInstall the package via pip:```bash# NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.pip install "qai-hub-models[yamnet]" git+https://github.com/w-hc/torch_audioset.git```## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted deviceSign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with yourQualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.With this API token, you can configure your client to run models on the cloudhosted devices.```bashqai-hub configure --api_token API_TOKEN```Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.## Demo off targetThe package contains a simple end-to-end demo that downloads pre-trainedweights and runs this model on a sample input.```bashpython -m qai_hub_models.models.yamnet.demo```The above demo runs a reference implementation of pre-processing, modelinference, and post processing.**NOTE**: If you want running in a Jupyter Notebook or Google Colab likeenvironment, please add the following to your cell (instead of the above).```%run -m qai_hub_models.models.yamnet.demo```### Run model on a cloud-hosted deviceIn addition to the demo, you can also run the model on a cloud-hosted Qualcomm®device. This script does the following:* Performance check on-device on a cloud-hosted device* Downloads compiled assets that can be deployed on-device for Android.* Accuracy check between PyTorch and on-device outputs.```bashpython -m qai_hub_models.models.yamnet.export```## How does this work?This [export script](https://aihub.qualcomm.com/models/yamnet/qai_hub_models/models/YamNet/export.py)leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this modelon-device. Lets go through each step below in detail:Step 1: **Compile model for on-device deployment**To compile a PyTorch model for on-device deployment, we first trace the modelin memory using the `jit.trace` and then call the `submit_compile_job` API.```pythonimport torchimport qai_hub as hubfrom qai_hub_models.models.yamnet import Model# Load the modeltorch_model = Model.from_pretrained()# Devicedevice = hub.Device("Samsung Galaxy S25")# Trace modelinput_shape = torch_model.get_input_spec()sample_inputs = torch_model.sample_inputs()pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])# Compile model on a specific devicecompile_job = hub.submit_compile_job(model=pt_model,device=device,input_specs=torch_model.get_input_spec(),)# Get target model to run on-devicetarget_model = compile_job.get_target_model()```Step 2: **Performance profiling on cloud-hosted device**After compiling models from step 1. Models can be profiled model on-device using the`target_model`. Note that this scripts runs the model on a device automaticallyprovisioned in the cloud. Once the job is submitted, you can navigate to aprovided job URL to view a variety of on-device performance metrics.```pythonprofile_job = hub.submit_profile_job(model=target_model,device=device,)```Step 3: **Verify on-device accuracy**To verify the accuracy of the model on-device, you can run on-device inferenceon sample input data on the same cloud hosted device.```pythoninput_data = torch_model.sample_inputs()inference_job = hub.submit_inference_job(model=target_model,device=device,inputs=input_data,)on_device_output = inference_job.download_output_data()```With the output of the model, you can compute like PSNR, relative errors orspot check the output with expected output.**Note**: This on-device profiling and inference requires access to Qualcomm®AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).## Run demo on a cloud-hosted deviceYou can also run the demo on-device.```bashpython -m qai_hub_models.models.yamnet.demo --eval-mode on-device```**NOTE**: If you want running in a Jupyter Notebook or Google Colab likeenvironment, please add the following to your cell (instead of the above).```%run -m qai_hub_models.models.yamnet.demo -- --eval-mode on-device```## Deploying compiled model to AndroidThe models can be deployed using multiple runtimes:- TensorFlow Lite (`.tflite` export): [Thistutorial](https://www.tensorflow.org/lite/android/quickstart) provides aguide to deploy the .tflite model in an Android application.- QNN (`.so` export ): This [sampleapp](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)provides instructions on how to use the `.so` shared library in an Android application.## View on Qualcomm® AI HubGet more details on YamNet's performance across various devices [here](https://aihub.qualcomm.com/models/yamnet).Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)## License* The license for the original implementation of YamNet can be found[here](https://github.com/w-hc/torch_audioset/blob/master/LICENSE).## References* [MobileNets Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861)* [Source Model Implementation](https://github.com/w-hc/torch_audioset)## Community* Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.* For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).9 unmodified lines1011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611629 unmodified lines# YamNet: Optimized for Qualcomm DevicesAn audio event classifier trained on the AudioSet dataset to predict audio events from the AudioSet ontology employing the Mobilenet_v1 depthwise-separable convolution architecture.This is based on the implementation of YamNet found [here](https://github.com/w-hc/torch_audioset).This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/yamnet) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device.## Getting StartedThere are two ways to deploy this model on your device:### Option 1: Download Pre-Exported ModelsBelow are pre-exported model assets ready for deployment.| Runtime | Precision | Chipset | SDK Versions | Download ||---|---|---|---|---|| ONNX | float | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-onnx-float.zip)| ONNX | w8a16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-onnx-w8a16.zip)| ONNX | w8a8 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-onnx-w8a8.zip)| QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-qnn_dlc-float.zip)| QNN_DLC | w8a16 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-qnn_dlc-w8a16.zip)| QNN_DLC | w8a8 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-qnn_dlc-w8a8.zip)| TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-tflite-float.zip)| TFLITE | w8a8 | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/yamnet/releases/v0.46.1/yamnet-tflite-w8a8.zip)For more device-specific assets and performance metrics, visit **[YamNet on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/yamnet)**.### Option 2: Export with Custom ConfigurationsUse the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/yamnet) Python library to compile and export the model with your own:- Custom weights (e.g., fine-tuned checkpoints)- Custom input shapes- Target device and runtime configurationsThis option is ideal if you need to customize the model beyond the default configuration provided here.See our repository for [YamNet on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/yamnet) for usage instructions.## Model Details**Model Type:** Model_use_case.audio_classification**Model Stats:**- Model checkpoint: yamnet.pth- Input resolution: 1x1x96x64- Number of parameters: 3.73M- Model size (float): 14.2 MB## Performance Summary| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit|---|---|---|---|---|---|---| YamNet | ONNX | float | Snapdragon® X Elite | 0.286 ms | 8 - 8 MB | NPU| YamNet | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.33 ms | 0 - 109 MB | NPU| YamNet | ONNX | float | Qualcomm® QCS8550 (Proxy) | 0.367 ms | 0 - 117 MB | NPU| YamNet | ONNX | float | Qualcomm® QCS9075 | 0.487 ms | 0 - 3 MB | NPU| YamNet | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.269 ms | 0 - 92 MB | NPU| YamNet | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.26 ms | 0 - 92 MB | NPU| YamNet | ONNX | w8a16 | Snapdragon® X Elite | 0.21 ms | 4 - 4 MB | NPU| YamNet | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.265 ms | 0 - 106 MB | NPU| YamNet | ONNX | w8a16 | Qualcomm® QCS6490 | 11.068 ms | 9 - 14 MB | CPU| YamNet | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 0.317 ms | 0 - 11 MB | NPU| YamNet | ONNX | w8a16 | Qualcomm® QCS9075 | 0.394 ms | 0 - 3 MB | NPU| YamNet | ONNX | w8a16 | Qualcomm® QCM6690 | 6.783 ms | 6 - 13 MB | CPU| YamNet | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.208 ms | 0 - 96 MB | NPU| YamNet | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 4.83 ms | 6 - 13 MB | CPU| YamNet | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.204 ms | 0 - 95 MB | NPU| YamNet | ONNX | w8a8 | Snapdragon® X Elite | 0.22 ms | 4 - 4 MB | NPU| YamNet | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.255 ms | 0 - 105 MB | NPU| YamNet | ONNX | w8a8 | Qualcomm® QCS6490 | 1.655 ms | 0 - 6 MB | CPU| YamNet | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.333 ms | 0 - 6 MB | NPU| YamNet | ONNX | w8a8 | Qualcomm® QCS9075 | 0.393 ms | 0 - 3 MB | NPU| YamNet | ONNX | w8a8 | Qualcomm® QCM6690 | 0.825 ms | 0 - 8 MB | CPU| YamNet | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.207 ms | 0 - 92 MB | NPU| YamNet | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.561 ms | 0 - 7 MB | CPU| YamNet | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.2 ms | 0 - 95 MB | NPU| YamNet | QNN_DLC | float | Snapdragon® X Elite | 0.286 ms | 0 - 0 MB | NPU| YamNet | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 0.181 ms | 0 - 38 MB | NPU| YamNet | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 0.211 ms | 0 - 25 MB | NPU| YamNet | QNN_DLC | float | Qualcomm® SA8775P | 0.36 ms | 0 - 23 MB | NPU| YamNet | QNN_DLC | float | Qualcomm® QCS9075 | 0.259 ms | 0 - 2 MB | NPU| YamNet | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 0.355 ms | 0 - 39 MB | NPU| YamNet | QNN_DLC | float | Qualcomm® SA8295P | 0.556 ms | 0 - 20 MB | NPU| YamNet | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.161 ms | 0 - 25 MB | NPU| YamNet | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.15 ms | 0 - 24 MB | NPU| YamNet | QNN_DLC | w8a16 | Snapdragon® X Elite | 0.214 ms | 0 - 0 MB | NPU| YamNet | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.116 ms | 0 - 35 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® QCS6490 | 0.631 ms | 0 - 2 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 0.421 ms | 0 - 23 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 0.136 ms | 0 - 1 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® SA8775P | 0.268 ms | 0 - 25 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 0.184 ms | 0 - 2 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 0.502 ms | 0 - 22 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® QCS8450 (Proxy) | 0.214 ms | 0 - 36 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® SA7255P | 0.421 ms | 0 - 23 MB | NPU| YamNet | QNN_DLC | w8a16 | Qualcomm® SA8295P | 0.428 ms | 0 - 21 MB | NPU| YamNet | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.094 ms | 0 - 21 MB | NPU| YamNet | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 0.171 ms | 0 - 22 MB | NPU| YamNet | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.098 ms | 0 - 25 MB | NPU| YamNet | QNN_DLC | w8a8 | Snapdragon® X Elite | 0.202 ms | 0 - 0 MB | NPU| YamNet | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.11 ms | 0 - 35 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 0.624 ms | 0 - 2 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 0.392 ms | 0 - 24 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.131 ms | 0 - 1 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® SA8775P | 0.273 ms | 0 - 24 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 0.183 ms | 0 - 2 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 0.434 ms | 0 - 22 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.205 ms | 0 - 36 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® SA7255P | 0.392 ms | 0 - 24 MB | NPU| YamNet | QNN_DLC | w8a8 | Qualcomm® SA8295P | 0.443 ms | 0 - 21 MB | NPU| YamNet | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.094 ms | 0 - 25 MB | NPU| YamNet | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.164 ms | 0 - 22 MB | NPU| YamNet | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.089 ms | 0 - 25 MB | NPU| YamNet | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 0.181 ms | 0 - 44 MB | NPU| YamNet | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 1.962 ms | 0 - 20 MB | GPU| YamNet | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 0.221 ms | 0 - 1 MB | NPU| YamNet | TFLITE | float | Qualcomm® SA8775P | 0.368 ms | 0 - 31 MB | NPU| YamNet | TFLITE | float | Qualcomm® QCS9075 | 0.261 ms | 0 - 10 MB | NPU| YamNet | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 0.355 ms | 0 - 45 MB | NPU| YamNet | TFLITE | float | Qualcomm® SA7255P | 1.962 ms | 0 - 20 MB | GPU| YamNet | TFLITE | float | Qualcomm® SA8295P | 0.561 ms | 0 - 27 MB | NPU| YamNet | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.159 ms | 0 - 32 MB | NPU| YamNet | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.146 ms | 0 - 30 MB | NPU| YamNet | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.109 ms | 0 - 35 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® QCS6490 | 0.51 ms | 0 - 6 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 0.418 ms | 0 - 23 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.131 ms | 0 - 7 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® SA8775P | 0.784 ms | 0 - 24 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® QCS9075 | 0.182 ms | 0 - 6 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® QCM6690 | 0.426 ms | 0 - 21 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.208 ms | 0 - 37 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® SA7255P | 0.418 ms | 0 - 23 MB | NPU| YamNet | TFLITE | w8a8 | Qualcomm® SA8295P | 0.434 ms | 0 - 20 MB | NPU| YamNet | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.101 ms | 0 - 26 MB | NPU| YamNet | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.169 ms | 0 - 21 MB | NPU| YamNet | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.095 ms | 0 - 24 MB | NPU## License* The license for the original implementation of YamNet can be found[here](https://github.com/w-hc/torch_audioset/blob/master/LICENSE).## References* [MobileNets Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861)* [Source Model Implementation](https://github.com/w-hc/torch_audioset)## Community* Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.* For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
123version https://git-lfs.github.com/spec/v1oid sha256:22f7a1218cea50cfcb9605496c12847c9ac7bc464c005d2b3e3a720eae646a3fsize 14997292123version https://git-lfs.github.com/spec/v1oid sha256:eff9769ddc77bba73616342d2416e7e035998b606e25060ae2a805885199e65dsize 13923895123version https://git-lfs.github.com/spec/v1oid sha256:ef906bcd1b4671eda849a3d7dbe183e72c502470c0f1fd36f5c85b9d8bfc22aasize 14930120123version https://git-lfs.github.com/spec/v1oid sha256:0c07f61b8969a0b821443756a501bf7557c463d6a291e4cca0fcf4e7387fd640size 4459124123version https://git-lfs.github.com/spec/v1oid sha256:c8c7b21211961bd10679ae2a2d740ad05132bf084abdb4ccc8a8d8b1cc718c0esize 7097042123version https://git-lfs.github.com/spec/v1oid sha256:eeac04ebe1e8f153852b197e0908207ee3e2a08c3f515334fc420eff68cf2d97size 40436961234tool_versions: onnx: qairt: 2.37.1.250807093845_124904 onnx_runtime: 1.23.0README.md+135-262
YamNet_float.dlcDeleted-3
YamNet_float.onnx.zipDeleted-3
YamNet_float.tfliteDeleted-3
YamNet_w8a8.dlcDeleted-3
YamNet_w8a8.onnx.zipDeleted-3
YamNet_w8a8.tfliteDeleted-3
tool-versions.yamlDeleted-4