v0.40.0
Browse filesSee https://github.com/quic/ai-hub-models/releases/v0.40.0 for changelog.
- .gitattributes +1 -0
- DEPLOYMENT_MODEL_LICENSE.pdf +3 -0
- LICENSE +2 -0
- README.md +243 -0
- precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionDecoder_float.bin +3 -0
- precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder1_float.bin +3 -0
- precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder2_float.bin +3 -0
- precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder3_float.bin +3 -0
- precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder4_float.bin +3 -0
- precompiled/qualcomm-qcs8275-proxy/tool-versions.yaml +3 -0
- precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionDecoder_float.bin +3 -0
- precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder1_float.bin +3 -0
- precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder2_float.bin +3 -0
- precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder3_float.bin +3 -0
- precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder4_float.bin +3 -0
- precompiled/qualcomm-qcs8550-proxy/tool-versions.yaml +3 -0
- precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionDecoder_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder1_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder2_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder3_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder4_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-for-galaxy/tool-versions.yaml +3 -0
- precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionDecoder_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder1_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder2_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder3_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder4_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8-elite-gen5/tool-versions.yaml +3 -0
- precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionDecoder_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder1_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder2_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder3_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder4_float.bin +3 -0
- precompiled/qualcomm-snapdragon-8gen3/tool-versions.yaml +3 -0
- precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionDecoder_float.bin +3 -0
- precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder1_float.bin +3 -0
- precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder2_float.bin +3 -0
- precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder3_float.bin +3 -0
- precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder4_float.bin +3 -0
- precompiled/qualcomm-snapdragon-x-elite/tool-versions.yaml +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
DEPLOYMENT_MODEL_LICENSE.pdf filter=lfs diff=lfs merge=lfs -text
|
DEPLOYMENT_MODEL_LICENSE.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4409f93b0e82531303b3e10f52f1fdfb56467a25f05b7441c6bbd8bb8a64b42c
|
| 3 |
+
size 109629
|
LICENSE
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The license of the original trained model can be found at https://github.com/w-hc/torch_audioset/blob/master/LICENSE.
|
| 2 |
+
The license for the deployable model files (.tflite, .onnx, .dlc, .bin, etc.) can be found in DEPLOYMENT_MODEL_LICENSE.pdf.
|
README.md
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
license: other
|
| 4 |
+
tags:
|
| 5 |
+
- android
|
| 6 |
+
pipeline_tag: other
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+

|
| 11 |
+
|
| 12 |
+
# BEVFusion: Optimized for Mobile Deployment
|
| 13 |
+
## Construct a bird’s eye view from sensors mounted on a vehicle
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
BeVFusion is a machine learning model for generating a birds eye view represenation from the sensors(cameras) mounted on a vehicle.
|
| 17 |
+
|
| 18 |
+
This model is an implementation of BEVFusion found [here](https://github.com/mit-han-lab/bevfusion).
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
This repository provides scripts to run BEVFusion on Qualcomm® devices.
|
| 22 |
+
More details on model performance across various devices, can be found
|
| 23 |
+
[here](https://aihub.qualcomm.com/models/bevfusion_det).
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
### Model Details
|
| 28 |
+
|
| 29 |
+
- **Model Type:** Model_use_case.driver_assistance
|
| 30 |
+
- **Model Stats:**
|
| 31 |
+
- Model checkpoint: camera-only-det.pth
|
| 32 |
+
- Input resolution: 1 x 6 x 3 x 256 x 704
|
| 33 |
+
- Number of parameters: 44M
|
| 34 |
+
- Model size: 171 MB
|
| 35 |
+
|
| 36 |
+
| Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
|
| 37 |
+
|---|---|---|---|---|---|---|---|---|
|
| 38 |
+
| BEVFusionEncoder1 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_CONTEXT_BINARY | 1078.859 ms | 4 - 14 MB | NPU | Use Export Script |
|
| 39 |
+
| BEVFusionEncoder1 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_CONTEXT_BINARY | 732.856 ms | 13 - 16 MB | NPU | Use Export Script |
|
| 40 |
+
| BEVFusionEncoder1 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_CONTEXT_BINARY | 547.855 ms | 13 - 31 MB | NPU | Use Export Script |
|
| 41 |
+
| BEVFusionEncoder1 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_CONTEXT_BINARY | 440.393 ms | 12 - 29 MB | NPU | Use Export Script |
|
| 42 |
+
| BEVFusionEncoder1 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen5 Mobile | QNN_CONTEXT_BINARY | 361.452 ms | 12 - 23 MB | NPU | Use Export Script |
|
| 43 |
+
| BEVFusionEncoder1 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_CONTEXT_BINARY | 691.022 ms | 12 - 12 MB | NPU | Use Export Script |
|
| 44 |
+
| BEVFusionEncoder2 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_CONTEXT_BINARY | 5445.765 ms | 17 - 27 MB | NPU | Use Export Script |
|
| 45 |
+
| BEVFusionEncoder2 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_CONTEXT_BINARY | 3543.695 ms | 17 - 20 MB | NPU | Use Export Script |
|
| 46 |
+
| BEVFusionEncoder2 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_CONTEXT_BINARY | 2635.488 ms | 17 - 35 MB | NPU | Use Export Script |
|
| 47 |
+
| BEVFusionEncoder2 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_CONTEXT_BINARY | 2345.316 ms | 17 - 33 MB | NPU | Use Export Script |
|
| 48 |
+
| BEVFusionEncoder2 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen5 Mobile | QNN_CONTEXT_BINARY | 2280.661 ms | 17 - 27 MB | NPU | Use Export Script |
|
| 49 |
+
| BEVFusionEncoder2 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_CONTEXT_BINARY | 3337.453 ms | 17 - 17 MB | NPU | Use Export Script |
|
| 50 |
+
| BEVFusionEncoder3 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_CONTEXT_BINARY | 994.618 ms | 609 - 619 MB | NPU | Use Export Script |
|
| 51 |
+
| BEVFusionEncoder3 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_CONTEXT_BINARY | 648.913 ms | 611 - 614 MB | NPU | Use Export Script |
|
| 52 |
+
| BEVFusionEncoder3 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_CONTEXT_BINARY | 523.718 ms | 608 - 627 MB | NPU | Use Export Script |
|
| 53 |
+
| BEVFusionEncoder3 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_CONTEXT_BINARY | 445.664 ms | 609 - 630 MB | NPU | Use Export Script |
|
| 54 |
+
| BEVFusionEncoder3 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen5 Mobile | QNN_CONTEXT_BINARY | 367.939 ms | 609 - 624 MB | NPU | Use Export Script |
|
| 55 |
+
| BEVFusionEncoder3 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_CONTEXT_BINARY | 605.931 ms | 610 - 610 MB | NPU | Use Export Script |
|
| 56 |
+
| BEVFusionEncoder4 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_CONTEXT_BINARY | 25.458 ms | 18 - 28 MB | NPU | Use Export Script |
|
| 57 |
+
| BEVFusionEncoder4 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_CONTEXT_BINARY | 12.57 ms | 19 - 21 MB | NPU | Use Export Script |
|
| 58 |
+
| BEVFusionEncoder4 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_CONTEXT_BINARY | 9.191 ms | 14 - 33 MB | NPU | Use Export Script |
|
| 59 |
+
| BEVFusionEncoder4 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_CONTEXT_BINARY | 7.772 ms | 13 - 30 MB | NPU | Use Export Script |
|
| 60 |
+
| BEVFusionEncoder4 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen5 Mobile | QNN_CONTEXT_BINARY | 6.806 ms | 18 - 30 MB | NPU | Use Export Script |
|
| 61 |
+
| BEVFusionEncoder4 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_CONTEXT_BINARY | 12.112 ms | 19 - 19 MB | NPU | Use Export Script |
|
| 62 |
+
| BEVFusionDecoder | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_CONTEXT_BINARY | 92.613 ms | 4 - 14 MB | NPU | Use Export Script |
|
| 63 |
+
| BEVFusionDecoder | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_CONTEXT_BINARY | 12.479 ms | 5 - 8 MB | NPU | Use Export Script |
|
| 64 |
+
| BEVFusionDecoder | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_CONTEXT_BINARY | 9.692 ms | 5 - 23 MB | NPU | Use Export Script |
|
| 65 |
+
| BEVFusionDecoder | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_CONTEXT_BINARY | 7.682 ms | 5 - 18 MB | NPU | Use Export Script |
|
| 66 |
+
| BEVFusionDecoder | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen5 Mobile | QNN_CONTEXT_BINARY | 5.949 ms | 5 - 16 MB | NPU | Use Export Script |
|
| 67 |
+
| BEVFusionDecoder | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_CONTEXT_BINARY | 13.126 ms | 5 - 5 MB | NPU | Use Export Script |
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
## Installation
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
Install the package via pip:
|
| 76 |
+
```bash
|
| 77 |
+
pip install "qai-hub-models[bevfusion-det]" torch==2.4.1 --trusted-host download.openmmlab.com -f https://download.openmmlab.com/mmcv/dist/cpu/torch2.4/index.html -f https://qaihub-public-python-wheels.s3.us-west-2.amazonaws.com/index.html
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
## Configure Qualcomm® AI Hub to run this model on a cloud-hosted device
|
| 82 |
+
|
| 83 |
+
Sign-in to [Qualcomm® AI Hub](https://app.aihub.qualcomm.com/) with your
|
| 84 |
+
Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
|
| 85 |
+
|
| 86 |
+
With this API token, you can configure your client to run models on the cloud
|
| 87 |
+
hosted devices.
|
| 88 |
+
```bash
|
| 89 |
+
qai-hub configure --api_token API_TOKEN
|
| 90 |
+
```
|
| 91 |
+
Navigate to [docs](https://app.aihub.qualcomm.com/docs/) for more information.
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
## Demo off target
|
| 96 |
+
|
| 97 |
+
The package contains a simple end-to-end demo that downloads pre-trained
|
| 98 |
+
weights and runs this model on a sample input.
|
| 99 |
+
|
| 100 |
+
```bash
|
| 101 |
+
python -m qai_hub_models.models.bevfusion_det.demo
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
The above demo runs a reference implementation of pre-processing, model
|
| 105 |
+
inference, and post processing.
|
| 106 |
+
|
| 107 |
+
**NOTE**: If you want running in a Jupyter Notebook or Google Colab like
|
| 108 |
+
environment, please add the following to your cell (instead of the above).
|
| 109 |
+
```
|
| 110 |
+
%run -m qai_hub_models.models.bevfusion_det.demo
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
### Run model on a cloud-hosted device
|
| 115 |
+
|
| 116 |
+
In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
|
| 117 |
+
device. This script does the following:
|
| 118 |
+
* Performance check on-device on a cloud-hosted device
|
| 119 |
+
* Downloads compiled assets that can be deployed on-device for Android.
|
| 120 |
+
* Accuracy check between PyTorch and on-device outputs.
|
| 121 |
+
|
| 122 |
+
```bash
|
| 123 |
+
python -m qai_hub_models.models.bevfusion_det.export
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
## How does this work?
|
| 129 |
+
|
| 130 |
+
This [export script](https://aihub.qualcomm.com/models/bevfusion_det/qai_hub_models/models/BEVFusion/export.py)
|
| 131 |
+
leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
|
| 132 |
+
on-device. Lets go through each step below in detail:
|
| 133 |
+
|
| 134 |
+
Step 1: **Compile model for on-device deployment**
|
| 135 |
+
|
| 136 |
+
To compile a PyTorch model for on-device deployment, we first trace the model
|
| 137 |
+
in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
| 138 |
+
|
| 139 |
+
```python
|
| 140 |
+
import torch
|
| 141 |
+
|
| 142 |
+
import qai_hub as hub
|
| 143 |
+
from qai_hub_models.models.bevfusion_det import Model
|
| 144 |
+
|
| 145 |
+
# Load the model
|
| 146 |
+
torch_model = Model.from_pretrained()
|
| 147 |
+
|
| 148 |
+
# Device
|
| 149 |
+
device = hub.Device("Samsung Galaxy S25")
|
| 150 |
+
|
| 151 |
+
# Trace model
|
| 152 |
+
input_shape = torch_model.get_input_spec()
|
| 153 |
+
sample_inputs = torch_model.sample_inputs()
|
| 154 |
+
|
| 155 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
| 156 |
+
|
| 157 |
+
# Compile model on a specific device
|
| 158 |
+
compile_job = hub.submit_compile_job(
|
| 159 |
+
model=pt_model,
|
| 160 |
+
device=device,
|
| 161 |
+
input_specs=torch_model.get_input_spec(),
|
| 162 |
+
)
|
| 163 |
+
|
| 164 |
+
# Get target model to run on-device
|
| 165 |
+
target_model = compile_job.get_target_model()
|
| 166 |
+
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
Step 2: **Performance profiling on cloud-hosted device**
|
| 171 |
+
|
| 172 |
+
After compiling models from step 1. Models can be profiled model on-device using the
|
| 173 |
+
`target_model`. Note that this scripts runs the model on a device automatically
|
| 174 |
+
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
| 175 |
+
provided job URL to view a variety of on-device performance metrics.
|
| 176 |
+
```python
|
| 177 |
+
profile_job = hub.submit_profile_job(
|
| 178 |
+
model=target_model,
|
| 179 |
+
device=device,
|
| 180 |
+
)
|
| 181 |
+
|
| 182 |
+
```
|
| 183 |
+
|
| 184 |
+
Step 3: **Verify on-device accuracy**
|
| 185 |
+
|
| 186 |
+
To verify the accuracy of the model on-device, you can run on-device inference
|
| 187 |
+
on sample input data on the same cloud hosted device.
|
| 188 |
+
```python
|
| 189 |
+
input_data = torch_model.sample_inputs()
|
| 190 |
+
inference_job = hub.submit_inference_job(
|
| 191 |
+
model=target_model,
|
| 192 |
+
device=device,
|
| 193 |
+
inputs=input_data,
|
| 194 |
+
)
|
| 195 |
+
on_device_output = inference_job.download_output_data()
|
| 196 |
+
|
| 197 |
+
```
|
| 198 |
+
With the output of the model, you can compute like PSNR, relative errors or
|
| 199 |
+
spot check the output with expected output.
|
| 200 |
+
|
| 201 |
+
**Note**: This on-device profiling and inference requires access to Qualcomm®
|
| 202 |
+
AI Hub. [Sign up for access](https://myaccount.qualcomm.com/signup).
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
## Deploying compiled model to Android
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
The models can be deployed using multiple runtimes:
|
| 211 |
+
- TensorFlow Lite (`.tflite` export): [This
|
| 212 |
+
tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
|
| 213 |
+
guide to deploy the .tflite model in an Android application.
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
- QNN (`.so` export ): This [sample
|
| 217 |
+
app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
|
| 218 |
+
provides instructions on how to use the `.so` shared library in an Android application.
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
## View on Qualcomm® AI Hub
|
| 222 |
+
Get more details on BEVFusion's performance across various devices [here](https://aihub.qualcomm.com/models/bevfusion_det).
|
| 223 |
+
Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
## License
|
| 227 |
+
* The license for the original implementation of BEVFusion can be found
|
| 228 |
+
[here](https://github.com/w-hc/torch_audioset/blob/master/LICENSE).
|
| 229 |
+
* The license for the compiled assets for on-device deployment can be found [here](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/Qualcomm+AI+Hub+Proprietary+License.pdf)
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
## References
|
| 234 |
+
* [BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation](https://arxiv.org/abs/2205.13542)
|
| 235 |
+
* [Source Model Implementation](https://github.com/mit-han-lab/bevfusion)
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
## Community
|
| 240 |
+
* Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
|
| 241 |
+
* For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
|
| 242 |
+
|
| 243 |
+
|
precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionDecoder_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8db24ea62e0e6e017c55a6805c3488e4105ccbc28adfdabbc65599aa2e4a5d64
|
| 3 |
+
size 29622272
|
precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder1_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0a2828140fd96def647e91e6bd7533bbce15df171026549f79e1eda5f7b69359
|
| 3 |
+
size 122155008
|
precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder2_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6bd97d827ae1270cd8d7e834a723385887fe94c9524763acf43111978bb785e
|
| 3 |
+
size 31428608
|
precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder3_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ba6ec867b5c411034df41ddbefa642a37770a15ee7497e47a5f77726599644f
|
| 3 |
+
size 12492800
|
precompiled/qualcomm-qcs8275-proxy/BEVFusion_BEVFusionEncoder4_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98e9be6f196fdf852eb9f298f353779fd613a3feac497746307db5c0fbf1cc1f
|
| 3 |
+
size 3530752
|
precompiled/qualcomm-qcs8275-proxy/tool-versions.yaml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tool_versions:
|
| 2 |
+
qnn_context_binary:
|
| 3 |
+
qairt: 2.39.0.250925215840_163802-auto
|
precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionDecoder_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6aeabd61139aa695ba5005c79603aed59d381077f9401433ccbab010f5b6eaba
|
| 3 |
+
size 29601792
|
precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder1_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fab7d916452d5eda7e032e752e062e3ecd3ca7e4a2ec7f27f40933d3afde3e16
|
| 3 |
+
size 122150912
|
precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder2_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbdbaeadafdfb72c4db99c3c83f73289e63ba90857e2e933b0e4d610ef5485e6
|
| 3 |
+
size 33808384
|
precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder3_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60129650ab71e5353885224f67a84da88f4b98399a1b3ab594be20aa135a3784
|
| 3 |
+
size 12488704
|
precompiled/qualcomm-qcs8550-proxy/BEVFusion_BEVFusionEncoder4_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6fc0fa7ebbf4b09f96f2fefa02ee1c056b5bb44c24c5bdd2b13c48e12257a03a
|
| 3 |
+
size 3526656
|
precompiled/qualcomm-qcs8550-proxy/tool-versions.yaml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tool_versions:
|
| 2 |
+
qnn_context_binary:
|
| 3 |
+
qairt: 2.39.0.250925215840_163802
|
precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionDecoder_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22d8febfa43704afd470260d5d4979ce7a8d134cc9e29212263085e0af3801b2
|
| 3 |
+
size 29597696
|
precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder1_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f2124e83f6c7bf08b2dd3c40d873872c5ababbbf8572ffc3ee31b8655531b03
|
| 3 |
+
size 121659392
|
precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder2_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44c20b36097be1d444ed3650d73ae86cbcaf9df986364e06265f95ebbd5646ef
|
| 3 |
+
size 32071680
|
precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder3_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2dd0ac8c84766ac896d644a254fce679f5e5bc7084826235c35484edeb363c6b
|
| 3 |
+
size 12517376
|
precompiled/qualcomm-snapdragon-8-elite-for-galaxy/BEVFusion_BEVFusionEncoder4_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f027c3407477de8ea60bd4683bfec24f9e26650a81d7570f164b6a5cd7695a80
|
| 3 |
+
size 3526656
|
precompiled/qualcomm-snapdragon-8-elite-for-galaxy/tool-versions.yaml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tool_versions:
|
| 2 |
+
qnn_context_binary:
|
| 3 |
+
qairt: 2.39.0.250925215840_163802
|
precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionDecoder_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6ca5a7d7d1a9fbf9c968f5fafac3b9ec9030083c4f99f61b79c0bd98ff77831
|
| 3 |
+
size 29663232
|
precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder1_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cad29fc978860d2e2a77ae09b1500f660f5fc38aad91bb99744d0e0258dc4b2b
|
| 3 |
+
size 119054336
|
precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder2_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b2faca1342201465511a83834efe5bb9a177df5313afc33fd980a1425180ed3
|
| 3 |
+
size 33230848
|
precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder3_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1fa703f16da620a506e1b925117eb33b09ec55a49651af6f6e7788835e67f9e2
|
| 3 |
+
size 14450688
|
precompiled/qualcomm-snapdragon-8-elite-gen5/BEVFusion_BEVFusionEncoder4_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba6b39707abe00aaeae93ee450ecfb66bf4ff9b0c926ecfa0317e6ce46fbe46e
|
| 3 |
+
size 3526656
|
precompiled/qualcomm-snapdragon-8-elite-gen5/tool-versions.yaml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tool_versions:
|
| 2 |
+
qnn_context_binary:
|
| 3 |
+
qairt: 2.39.0.250925215840_163802
|
precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionDecoder_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb32dd073cc61628d8969798e7077a2ac82dfefc153d2c29a1e2bd0dd018e9c2
|
| 3 |
+
size 29605888
|
precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder1_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d50fc07f5bb2fd6bb9fc86315900c65001a123e59961e3f779b75090218596e
|
| 3 |
+
size 122150912
|
precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder2_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab8138900bcfb9165d2d759fdcb797a9ba4274e9203e433b3f64c242d9350918
|
| 3 |
+
size 31428608
|
precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder3_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7db4f914590debc9894d351e8627455bc368d02ef5b68776d6d70594f661b492
|
| 3 |
+
size 12488704
|
precompiled/qualcomm-snapdragon-8gen3/BEVFusion_BEVFusionEncoder4_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bfd0fc0d3f7c21190f77d9a5dbc649b7a81682a6480e95dccf8ed3c14257907f
|
| 3 |
+
size 3526656
|
precompiled/qualcomm-snapdragon-8gen3/tool-versions.yaml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tool_versions:
|
| 2 |
+
qnn_context_binary:
|
| 3 |
+
qairt: 2.39.0.250925215840_163802
|
precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionDecoder_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:821db17878644d6f2f6e1c6d385e72b62aad0776d23440ded984f69265756fd7
|
| 3 |
+
size 29601792
|
precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder1_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7555efbba25d22231923f499f3305fbb04f1f85065f0df033d76a0f64a04a40a
|
| 3 |
+
size 122150912
|
precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder2_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5bb2faad36a721b57c4ffdb4bfb8a8ca3383040ede4203888c5e41cc88cbeaee
|
| 3 |
+
size 33808384
|
precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder3_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3de0f3b163d8660cb2a702e3c6bd07e8aa8c8862a3cbd6095d5e5b93e0954cdf
|
| 3 |
+
size 12488704
|
precompiled/qualcomm-snapdragon-x-elite/BEVFusion_BEVFusionEncoder4_float.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:316434e0db29761505eaf6f8dd1957c01e56f746d57b9be873d59158feba83e0
|
| 3 |
+
size 3526656
|
precompiled/qualcomm-snapdragon-x-elite/tool-versions.yaml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tool_versions:
|
| 2 |
+
qnn_context_binary:
|
| 3 |
+
qairt: 2.39.0.250925215840_163802
|