qaihm-bot commited on
Commit
5c1c651
·
verified ·
1 Parent(s): 0b12b23

See https://github.com/quic/ai-hub-models/releases/v0.46.1 for changelog.

BiseNet_float.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cbac5a4a15632c159df91a6bca910bde5cc83c9994e62d4e592d27bc9a4b224a
3
- size 48027436
 
 
 
 
BiseNet_float.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:282d573282c0648fc5265b22580d8bec294b802710a6b30a891988234bbb9d2f
3
- size 44672559
 
 
 
 
BiseNet_float.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:91121b7a8fb247edb5b7152c610fa95d9847686ec95e58dd4f9af723048f7ef7
3
- size 47946948
 
 
 
 
BiseNet_w8a8.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3a9fa258970f68d70bcf42217501093826e5440c6a599c32489a8c7ca78c2f1b
3
- size 12443548
 
 
 
 
BiseNet_w8a8.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:aa4a783dcb76741edf77b9739ac4912d4460b1f8aae3c0249c514e479f1df730
3
- size 20202994
 
 
 
 
BiseNet_w8a8.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:70b256815493db9f259a72672f2972336f63862e9966a1b11c5ad4c21b1a1de8
3
- size 12226544
 
 
 
 
README.md CHANGED
@@ -10,280 +10,131 @@ pipeline_tag: image-segmentation
10
 
11
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/bisenet/web-assets/model_demo.png)
12
 
13
- # BiseNet: Optimized for Mobile Deployment
14
- ## Segment images or video by class in real-time on device
15
-
16
 
17
  BiSeNet (Bilateral Segmentation Network) is a novel architecture designed for real-time semantic segmentation. It addresses the challenge of balancing spatial resolution and receptive field by employing a Spatial Path to preserve high-resolution features and a context path to capture sufficient receptive field.
18
 
19
- This model is an implementation of BiseNet found [here](https://github.com/ooooverflow/BiSeNet).
20
-
21
-
22
- This repository provides scripts to run BiseNet on Qualcomm® devices.
23
- More details on model performance across various devices, can be found
24
- [here](https://aihub.qualcomm.com/models/bisenet).
25
-
26
-
27
-
28
- ### Model Details
29
-
30
- - **Model Type:** Model_use_case.semantic_segmentation
31
- - **Model Stats:**
32
- - Model checkpoint: best_dice_loss_miou_0.655.pth
33
- - Inference latency: RealTime
34
- - Input resolution: 720x960
35
- - Number of parameters: 12.0M
36
- - Model size (float): 45.7 MB
37
-
38
- | Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
39
- |---|---|---|---|---|---|---|---|---|
40
- | BiseNet | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 105.14 ms | 32 - 195 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
41
- | BiseNet | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 105.598 ms | 2 - 163 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
42
- | BiseNet | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 55.562 ms | 32 - 278 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
43
- | BiseNet | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 56.142 ms | 8 - 252 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
44
- | BiseNet | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 27.367 ms | 32 - 35 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
45
- | BiseNet | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 27.633 ms | 8 - 10 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
46
- | BiseNet | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 32.615 ms | 63 - 86 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.onnx.zip) |
47
- | BiseNet | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 36.987 ms | 32 - 194 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
48
- | BiseNet | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 37.039 ms | 2 - 163 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
49
- | BiseNet | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 105.14 ms | 32 - 195 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
50
- | BiseNet | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 105.598 ms | 2 - 163 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
51
- | BiseNet | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 42.839 ms | 32 - 220 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
52
- | BiseNet | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 42.808 ms | 0 - 187 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
53
- | BiseNet | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 36.987 ms | 32 - 194 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
54
- | BiseNet | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 37.039 ms | 2 - 163 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
55
- | BiseNet | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 19.493 ms | 31 - 264 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
56
- | BiseNet | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 19.385 ms | 8 - 237 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
57
- | BiseNet | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 26.19 ms | 73 - 269 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.onnx.zip) |
58
- | BiseNet | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 18.526 ms | 31 - 261 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
59
- | BiseNet | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 15.886 ms | 8 - 208 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
60
- | BiseNet | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 19.385 ms | 65 - 205 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.onnx.zip) |
61
- | BiseNet | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 11.724 ms | 30 - 214 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.tflite) |
62
- | BiseNet | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 11.784 ms | 8 - 190 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
63
- | BiseNet | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 15.167 ms | 73 - 220 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.onnx.zip) |
64
- | BiseNet | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 27.498 ms | 8 - 8 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.dlc) |
65
- | BiseNet | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 31.473 ms | 66 - 66 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet.onnx.zip) |
66
- | BiseNet | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | TFLITE | 69.16 ms | 6 - 183 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
67
- | BiseNet | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | QNN_DLC | 83.202 ms | 2 - 180 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
68
- | BiseNet | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | ONNX | 232.951 ms | 225 - 239 MB | CPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
69
- | BiseNet | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | TFLITE | 40.076 ms | 7 - 31 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
70
- | BiseNet | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | QNN_DLC | 34.191 ms | 2 - 13 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
71
- | BiseNet | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | ONNX | 235.308 ms | 221 - 234 MB | CPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
72
- | BiseNet | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 20.517 ms | 8 - 164 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
73
- | BiseNet | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 20.047 ms | 2 - 157 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
74
- | BiseNet | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 15.74 ms | 8 - 215 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
75
- | BiseNet | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 16.14 ms | 2 - 204 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
76
- | BiseNet | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 11.826 ms | 8 - 10 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
77
- | BiseNet | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 9.512 ms | 2 - 5 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
78
- | BiseNet | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 8.616 ms | 16 - 30 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
79
- | BiseNet | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 12.591 ms | 8 - 164 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
80
- | BiseNet | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 10.219 ms | 2 - 158 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
81
- | BiseNet | w8a8 | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 20.517 ms | 8 - 164 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
82
- | BiseNet | w8a8 | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 20.047 ms | 2 - 157 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
83
- | BiseNet | w8a8 | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 14.927 ms | 8 - 168 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
84
- | BiseNet | w8a8 | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 12.613 ms | 2 - 161 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
85
- | BiseNet | w8a8 | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 12.591 ms | 8 - 164 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
86
- | BiseNet | w8a8 | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 10.219 ms | 2 - 158 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
87
- | BiseNet | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 8.515 ms | 8 - 213 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
88
- | BiseNet | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 6.605 ms | 2 - 206 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
89
- | BiseNet | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 5.989 ms | 18 - 209 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
90
- | BiseNet | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 6.555 ms | 6 - 171 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
91
- | BiseNet | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 5.119 ms | 2 - 163 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
92
- | BiseNet | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 4.805 ms | 18 - 163 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
93
- | BiseNet | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | TFLITE | 14.954 ms | 6 - 177 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
94
- | BiseNet | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | QNN_DLC | 12.695 ms | 2 - 173 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
95
- | BiseNet | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | ONNX | 221.072 ms | 214 - 231 MB | CPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
96
- | BiseNet | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 5.468 ms | 6 - 173 MB | NPU | [BiseNet.tflite](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.tflite) |
97
- | BiseNet | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 4.199 ms | 2 - 166 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
98
- | BiseNet | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 3.775 ms | 0 - 149 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
99
- | BiseNet | w8a8 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 10.144 ms | 2 - 2 MB | NPU | [BiseNet.dlc](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.dlc) |
100
- | BiseNet | w8a8 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 8.664 ms | 19 - 19 MB | NPU | [BiseNet.onnx.zip](https://huggingface.co/qualcomm/BiseNet/blob/main/BiseNet_w8a8.onnx.zip) |
101
-
102
-
103
-
104
-
105
- ## Installation
106
-
107
-
108
- Install the package via pip:
109
- ```bash
110
- pip install qai-hub-models
111
- ```
112
-
113
-
114
- ## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted device
115
-
116
- Sign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with your
117
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
118
-
119
- With this API token, you can configure your client to run models on the cloud
120
- hosted devices.
121
- ```bash
122
- qai-hub configure --api_token API_TOKEN
123
- ```
124
- Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.
125
-
126
-
127
-
128
- ## Demo off target
129
-
130
- The package contains a simple end-to-end demo that downloads pre-trained
131
- weights and runs this model on a sample input.
132
-
133
- ```bash
134
- python -m qai_hub_models.models.bisenet.demo
135
- ```
136
-
137
- The above demo runs a reference implementation of pre-processing, model
138
- inference, and post processing.
139
-
140
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
141
- environment, please add the following to your cell (instead of the above).
142
- ```
143
- %run -m qai_hub_models.models.bisenet.demo
144
- ```
145
-
146
-
147
- ### Run model on a cloud-hosted device
148
-
149
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
150
- device. This script does the following:
151
- * Performance check on-device on a cloud-hosted device
152
- * Downloads compiled assets that can be deployed on-device for Android.
153
- * Accuracy check between PyTorch and on-device outputs.
154
-
155
- ```bash
156
- python -m qai_hub_models.models.bisenet.export
157
- ```
158
-
159
-
160
-
161
- ## How does this work?
162
-
163
- This [export script](https://aihub.qualcomm.com/models/bisenet/qai_hub_models/models/BiseNet/export.py)
164
- leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
165
- on-device. Lets go through each step below in detail:
166
-
167
- Step 1: **Compile model for on-device deployment**
168
-
169
- To compile a PyTorch model for on-device deployment, we first trace the model
170
- in memory using the `jit.trace` and then call the `submit_compile_job` API.
171
-
172
- ```python
173
- import torch
174
-
175
- import qai_hub as hub
176
- from qai_hub_models.models.bisenet import Model
177
-
178
- # Load the model
179
- torch_model = Model.from_pretrained()
180
-
181
- # Device
182
- device = hub.Device("Samsung Galaxy S25")
183
-
184
- # Trace model
185
- input_shape = torch_model.get_input_spec()
186
- sample_inputs = torch_model.sample_inputs()
187
-
188
- pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
189
-
190
- # Compile model on a specific device
191
- compile_job = hub.submit_compile_job(
192
- model=pt_model,
193
- device=device,
194
- input_specs=torch_model.get_input_spec(),
195
- )
196
-
197
- # Get target model to run on-device
198
- target_model = compile_job.get_target_model()
199
-
200
- ```
201
-
202
-
203
- Step 2: **Performance profiling on cloud-hosted device**
204
-
205
- After compiling models from step 1. Models can be profiled model on-device using the
206
- `target_model`. Note that this scripts runs the model on a device automatically
207
- provisioned in the cloud. Once the job is submitted, you can navigate to a
208
- provided job URL to view a variety of on-device performance metrics.
209
- ```python
210
- profile_job = hub.submit_profile_job(
211
- model=target_model,
212
- device=device,
213
- )
214
-
215
- ```
216
-
217
- Step 3: **Verify on-device accuracy**
218
-
219
- To verify the accuracy of the model on-device, you can run on-device inference
220
- on sample input data on the same cloud hosted device.
221
- ```python
222
- input_data = torch_model.sample_inputs()
223
- inference_job = hub.submit_inference_job(
224
- model=target_model,
225
- device=device,
226
- inputs=input_data,
227
- )
228
- on_device_output = inference_job.download_output_data()
229
-
230
- ```
231
- With the output of the model, you can compute like PSNR, relative errors or
232
- spot check the output with expected output.
233
-
234
- **Note**: This on-device profiling and inference requires access to Qualcomm®
235
- AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).
236
-
237
-
238
-
239
- ## Run demo on a cloud-hosted device
240
-
241
- You can also run the demo on-device.
242
-
243
- ```bash
244
- python -m qai_hub_models.models.bisenet.demo --eval-mode on-device
245
- ```
246
-
247
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
248
- environment, please add the following to your cell (instead of the above).
249
- ```
250
- %run -m qai_hub_models.models.bisenet.demo -- --eval-mode on-device
251
- ```
252
-
253
-
254
- ## Deploying compiled model to Android
255
-
256
-
257
- The models can be deployed using multiple runtimes:
258
- - TensorFlow Lite (`.tflite` export): [This
259
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
260
- guide to deploy the .tflite model in an Android application.
261
-
262
-
263
- - QNN (`.so` export ): This [sample
264
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
265
- provides instructions on how to use the `.so` shared library in an Android application.
266
-
267
-
268
- ## View on Qualcomm® AI Hub
269
- Get more details on BiseNet's performance across various devices [here](https://aihub.qualcomm.com/models/bisenet).
270
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
271
-
272
 
273
  ## License
274
  * The license for the original implementation of BiseNet can be found
275
  [here](https://github.com/ooooverflow/BiSeNet/pull/45/files).
276
 
277
-
278
-
279
  ## References
280
  * [BiSeNet Bilateral Segmentation Network for Real-time Semantic Segmentation](https://arxiv.org/abs/1808.00897)
281
  * [Source Model Implementation](https://github.com/ooooverflow/BiSeNet)
282
 
283
-
284
-
285
  ## Community
286
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
287
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
288
-
289
-
 
10
 
11
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/bisenet/web-assets/model_demo.png)
12
 
13
+ # BiseNet: Optimized for Qualcomm Devices
 
 
14
 
15
  BiSeNet (Bilateral Segmentation Network) is a novel architecture designed for real-time semantic segmentation. It addresses the challenge of balancing spatial resolution and receptive field by employing a Spatial Path to preserve high-resolution features and a context path to capture sufficient receptive field.
16
 
17
+ This is based on the implementation of BiseNet found [here](https://github.com/ooooverflow/BiSeNet).
18
+ 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/bisenet) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
19
+
20
+ 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.
21
+
22
+ ## Getting Started
23
+ There are two ways to deploy this model on your device:
24
+
25
+ ### Option 1: Download Pre-Exported Models
26
+
27
+ Below are pre-exported model assets ready for deployment.
28
+
29
+ | Runtime | Precision | Chipset | SDK Versions | Download |
30
+ |---|---|---|---|---|
31
+ | 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/bisenet/releases/v0.46.1/bisenet-onnx-float.zip)
32
+ | 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/bisenet/releases/v0.46.1/bisenet-onnx-w8a8.zip)
33
+ | QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/bisenet/releases/v0.46.1/bisenet-qnn_dlc-float.zip)
34
+ | QNN_DLC | w8a8 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/bisenet/releases/v0.46.1/bisenet-qnn_dlc-w8a8.zip)
35
+ | 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/bisenet/releases/v0.46.1/bisenet-tflite-float.zip)
36
+ | 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/bisenet/releases/v0.46.1/bisenet-tflite-w8a8.zip)
37
+
38
+ For more device-specific assets and performance metrics, visit **[BiseNet on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/bisenet)**.
39
+
40
+
41
+ ### Option 2: Export with Custom Configurations
42
+
43
+ Use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/bisenet) Python library to compile and export the model with your own:
44
+ - Custom weights (e.g., fine-tuned checkpoints)
45
+ - Custom input shapes
46
+ - Target device and runtime configurations
47
+
48
+ This option is ideal if you need to customize the model beyond the default configuration provided here.
49
+
50
+ See our repository for [BiseNet on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/bisenet) for usage instructions.
51
+
52
+ ## Model Details
53
+
54
+ **Model Type:** Model_use_case.semantic_segmentation
55
+
56
+ **Model Stats:**
57
+ - Model checkpoint: best_dice_loss_miou_0.655.pth
58
+ - Inference latency: RealTime
59
+ - Input resolution: 720x960
60
+ - Number of parameters: 12.0M
61
+ - Model size (float): 45.7 MB
62
+
63
+ ## Performance Summary
64
+ | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
65
+ |---|---|---|---|---|---|---
66
+ | BiseNet | ONNX | float | Snapdragon® X Elite | 31.468 ms | 66 - 66 MB | NPU
67
+ | BiseNet | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 26.195 ms | 73 - 270 MB | NPU
68
+ | BiseNet | ONNX | float | Qualcomm® QCS8550 (Proxy) | 32.87 ms | 63 - 86 MB | NPU
69
+ | BiseNet | ONNX | float | Qualcomm® QCS9075 | 51.221 ms | 8 - 11 MB | NPU
70
+ | BiseNet | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 19.854 ms | 71 - 211 MB | NPU
71
+ | BiseNet | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 15.173 ms | 56 - 204 MB | NPU
72
+ | BiseNet | ONNX | w8a8 | Snapdragon® X Elite | 8.703 ms | 19 - 19 MB | NPU
73
+ | BiseNet | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 5.962 ms | 18 - 210 MB | NPU
74
+ | BiseNet | ONNX | w8a8 | Qualcomm® QCS6490 | 236.082 ms | 223 - 236 MB | CPU
75
+ | BiseNet | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 8.607 ms | 16 - 45 MB | NPU
76
+ | BiseNet | ONNX | w8a8 | Qualcomm® QCS9075 | 10.345 ms | 18 - 21 MB | NPU
77
+ | BiseNet | ONNX | w8a8 | Qualcomm® QCM6690 | 232.957 ms | 132 - 139 MB | CPU
78
+ | BiseNet | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 4.798 ms | 17 - 164 MB | NPU
79
+ | BiseNet | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 204.645 ms | 212 - 219 MB | CPU
80
+ | BiseNet | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 3.743 ms | 0 - 151 MB | NPU
81
+ | BiseNet | QNN_DLC | float | Snapdragon® X Elite | 28.927 ms | 8 - 8 MB | NPU
82
+ | BiseNet | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 20.22 ms | 8 - 285 MB | NPU
83
+ | BiseNet | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 107.749 ms | 2 - 194 MB | NPU
84
+ | BiseNet | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 28.517 ms | 8 - 10 MB | NPU
85
+ | BiseNet | QNN_DLC | float | Qualcomm® SA8775P | 38.769 ms | 1 - 188 MB | NPU
86
+ | BiseNet | QNN_DLC | float | Qualcomm® QCS9075 | 55.43 ms | 8 - 49 MB | NPU
87
+ | BiseNet | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 59.857 ms | 8 - 277 MB | NPU
88
+ | BiseNet | QNN_DLC | float | Qualcomm® SA7255P | 107.749 ms | 2 - 194 MB | NPU
89
+ | BiseNet | QNN_DLC | float | Qualcomm® SA8295P | 44.137 ms | 0 - 213 MB | NPU
90
+ | BiseNet | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 15.012 ms | 8 - 262 MB | NPU
91
+ | BiseNet | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 11.918 ms | 6 - 284 MB | NPU
92
+ | BiseNet | QNN_DLC | w8a8 | Snapdragon® X Elite | 10.122 ms | 2 - 2 MB | NPU
93
+ | BiseNet | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 6.747 ms | 2 - 233 MB | NPU
94
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 40.586 ms | 2 - 14 MB | NPU
95
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 20.155 ms | 2 - 182 MB | NPU
96
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 9.474 ms | 2 - 4 MB | NPU
97
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® SA8775P | 10.25 ms | 2 - 183 MB | NPU
98
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 13.068 ms | 2 - 14 MB | NPU
99
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 90.291 ms | 2 - 206 MB | NPU
100
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 16.163 ms | 2 - 231 MB | NPU
101
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® SA7255P | 20.155 ms | 2 - 182 MB | NPU
102
+ | BiseNet | QNN_DLC | w8a8 | Qualcomm® SA8295P | 12.588 ms | 2 - 185 MB | NPU
103
+ | BiseNet | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 5.175 ms | 2 - 192 MB | NPU
104
+ | BiseNet | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 13.403 ms | 2 - 198 MB | NPU
105
+ | BiseNet | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 4.278 ms | 2 - 193 MB | NPU
106
+ | BiseNet | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 20.372 ms | 31 - 310 MB | NPU
107
+ | BiseNet | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 105.404 ms | 32 - 247 MB | NPU
108
+ | BiseNet | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 27.811 ms | 32 - 34 MB | NPU
109
+ | BiseNet | TFLITE | float | Qualcomm® SA8775P | 37.795 ms | 32 - 246 MB | NPU
110
+ | BiseNet | TFLITE | float | Qualcomm® QCS9075 | 54.488 ms | 0 - 66 MB | NPU
111
+ | BiseNet | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 59.939 ms | 32 - 307 MB | NPU
112
+ | BiseNet | TFLITE | float | Qualcomm® SA7255P | 105.404 ms | 32 - 247 MB | NPU
113
+ | BiseNet | TFLITE | float | Qualcomm® SA8295P | 44.229 ms | 23 - 237 MB | NPU
114
+ | BiseNet | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 15.177 ms | 30 - 288 MB | NPU
115
+ | BiseNet | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 11.908 ms | 30 - 309 MB | NPU
116
+ | BiseNet | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 8.658 ms | 7 - 240 MB | NPU
117
+ | BiseNet | TFLITE | w8a8 | Qualcomm® QCS6490 | 47.105 ms | 6 - 30 MB | NPU
118
+ | BiseNet | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 20.753 ms | 0 - 182 MB | NPU
119
+ | BiseNet | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 12.154 ms | 0 - 110 MB | NPU
120
+ | BiseNet | TFLITE | w8a8 | Qualcomm® SA8775P | 12.707 ms | 0 - 183 MB | NPU
121
+ | BiseNet | TFLITE | w8a8 | Qualcomm® QCS9075 | 13.12 ms | 8 - 32 MB | NPU
122
+ | BiseNet | TFLITE | w8a8 | Qualcomm® QCM6690 | 101.835 ms | 6 - 209 MB | NPU
123
+ | BiseNet | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 16.289 ms | 8 - 238 MB | NPU
124
+ | BiseNet | TFLITE | w8a8 | Qualcomm® SA7255P | 20.753 ms | 0 - 182 MB | NPU
125
+ | BiseNet | TFLITE | w8a8 | Qualcomm® SA8295P | 15.152 ms | 8 - 194 MB | NPU
126
+ | BiseNet | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 6.588 ms | 6 - 200 MB | NPU
127
+ | BiseNet | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 15.957 ms | 0 - 199 MB | NPU
128
+ | BiseNet | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 5.515 ms | 6 - 199 MB | NPU
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
  ## License
131
  * The license for the original implementation of BiseNet can be found
132
  [here](https://github.com/ooooverflow/BiSeNet/pull/45/files).
133
 
 
 
134
  ## References
135
  * [BiSeNet Bilateral Segmentation Network for Real-time Semantic Segmentation](https://arxiv.org/abs/1808.00897)
136
  * [Source Model Implementation](https://github.com/ooooverflow/BiSeNet)
137
 
 
 
138
  ## Community
139
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
140
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
 
 
tool-versions.yaml DELETED
@@ -1,4 +0,0 @@
1
- tool_versions:
2
- onnx:
3
- qairt: 2.37.1.250807093845_124904
4
- onnx_runtime: 1.23.0