qaihm-bot commited on
Commit
c95eb37
·
verified ·
1 Parent(s): 160250c

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

QuickSRNetSmall_float.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:eb3a0f636d6f60651254043b055a8c275fcfad441e1c35f2ad544f38fdfaa81a
3
- size 156836
 
 
 
 
QuickSRNetSmall_float.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:59991db6735c03b4f454c5151d0b18fdc598f273e2408495fd9ce12394ab2383
3
- size 126767
 
 
 
 
QuickSRNetSmall_float.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0d1fdfe1da12d6c6ba6d89df933fbdecd7aaee6a843d20fdd604fe0557d4dff7
3
- size 136904
 
 
 
 
QuickSRNetSmall_w8a8.dlc DELETED
Binary file (65.9 kB)
 
QuickSRNetSmall_w8a8.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b86db2e7365ee5d597ad7c0cb1938515995817b5b7c1e03f5e03a728dfc066b4
3
- size 43752
 
 
 
 
README.md CHANGED
@@ -9,272 +9,121 @@ pipeline_tag: image-to-image
9
 
10
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/quicksrnetsmall/web-assets/model_demo.png)
11
 
12
- # QuickSRNetSmall: Optimized for Mobile Deployment
13
- ## Upscale images and remove image noise
14
-
15
 
16
  QuickSRNet Small is designed for upscaling images on mobile platforms to sharpen in real-time.
17
 
18
- This model is an implementation of QuickSRNetSmall found [here](https://github.com/quic/aimet-model-zoo/tree/develop/aimet_zoo_torch/quicksrnet).
19
-
20
-
21
- This repository provides scripts to run QuickSRNetSmall on Qualcomm® devices.
22
- More details on model performance across various devices, can be found
23
- [here](https://aihub.qualcomm.com/models/quicksrnetsmall).
24
-
25
-
26
-
27
- ### Model Details
28
-
29
- - **Model Type:** Model_use_case.super_resolution
30
- - **Model Stats:**
31
- - Model checkpoint: quicksrnet_small_3x_checkpoint
32
- - Input resolution: 128x128
33
- - Number of parameters: 33.3K
34
- - Model size (float): 133 KB
35
- - Model size (w8a8): 41.7 KB
36
-
37
- | Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
38
- |---|---|---|---|---|---|---|---|---|
39
- | QuickSRNetSmall | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 2.335 ms | 1 - 115 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
40
- | QuickSRNetSmall | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 1.84 ms | 0 - 114 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
41
- | QuickSRNetSmall | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 1.308 ms | 2 - 133 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
42
- | QuickSRNetSmall | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 1.031 ms | 0 - 131 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
43
- | QuickSRNetSmall | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 1.014 ms | 0 - 2 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
44
- | QuickSRNetSmall | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 0.736 ms | 0 - 3 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
45
- | QuickSRNetSmall | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 1.138 ms | 0 - 2 MB | NPU | [QuickSRNetSmall.onnx.zip](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.onnx.zip) |
46
- | QuickSRNetSmall | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 1.396 ms | 0 - 115 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
47
- | QuickSRNetSmall | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 1.071 ms | 0 - 114 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
48
- | QuickSRNetSmall | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 2.335 ms | 1 - 115 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
49
- | QuickSRNetSmall | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 1.84 ms | 0 - 114 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
50
- | QuickSRNetSmall | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 1.621 ms | 0 - 120 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
51
- | QuickSRNetSmall | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 1.39 ms | 0 - 120 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
52
- | QuickSRNetSmall | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 1.396 ms | 0 - 115 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
53
- | QuickSRNetSmall | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 1.071 ms | 0 - 114 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
54
- | QuickSRNetSmall | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 0.624 ms | 0 - 128 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
55
- | QuickSRNetSmall | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.441 ms | 0 - 131 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
56
- | QuickSRNetSmall | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 0.721 ms | 0 - 102 MB | NPU | [QuickSRNetSmall.onnx.zip](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.onnx.zip) |
57
- | QuickSRNetSmall | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 0.472 ms | 0 - 118 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
58
- | QuickSRNetSmall | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.346 ms | 0 - 120 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
59
- | QuickSRNetSmall | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 0.553 ms | 0 - 89 MB | NPU | [QuickSRNetSmall.onnx.zip](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.onnx.zip) |
60
- | QuickSRNetSmall | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 0.511 ms | 0 - 118 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.tflite) |
61
- | QuickSRNetSmall | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.326 ms | 0 - 118 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
62
- | QuickSRNetSmall | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 0.503 ms | 1 - 89 MB | NPU | [QuickSRNetSmall.onnx.zip](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.onnx.zip) |
63
- | QuickSRNetSmall | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 0.863 ms | 0 - 0 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.dlc) |
64
- | QuickSRNetSmall | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.052 ms | 8 - 8 MB | NPU | [QuickSRNetSmall.onnx.zip](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall.onnx.zip) |
65
- | QuickSRNetSmall | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | TFLITE | 1.464 ms | 0 - 117 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
66
- | QuickSRNetSmall | w8a8 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | QNN_DLC | 1.263 ms | 0 - 118 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
67
- | QuickSRNetSmall | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | TFLITE | 1.132 ms | 0 - 2 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
68
- | QuickSRNetSmall | w8a8 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | QNN_DLC | 1.277 ms | 0 - 2 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
69
- | QuickSRNetSmall | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 0.912 ms | 0 - 112 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
70
- | QuickSRNetSmall | w8a8 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 0.801 ms | 0 - 113 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
71
- | QuickSRNetSmall | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 0.467 ms | 0 - 131 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
72
- | QuickSRNetSmall | w8a8 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 0.492 ms | 0 - 128 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
73
- | QuickSRNetSmall | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 0.407 ms | 0 - 3 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
74
- | QuickSRNetSmall | w8a8 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 0.352 ms | 0 - 2 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
75
- | QuickSRNetSmall | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 0.592 ms | 0 - 113 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
76
- | QuickSRNetSmall | w8a8 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 1.915 ms | 0 - 113 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
77
- | QuickSRNetSmall | w8a8 | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 0.912 ms | 0 - 112 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
78
- | QuickSRNetSmall | w8a8 | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 0.801 ms | 0 - 113 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
79
- | QuickSRNetSmall | w8a8 | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 0.792 ms | 0 - 118 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
80
- | QuickSRNetSmall | w8a8 | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 0.699 ms | 0 - 118 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
81
- | QuickSRNetSmall | w8a8 | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 0.592 ms | 0 - 113 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
82
- | QuickSRNetSmall | w8a8 | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 1.915 ms | 0 - 113 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
83
- | QuickSRNetSmall | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 0.272 ms | 0 - 128 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
84
- | QuickSRNetSmall | w8a8 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.212 ms | 0 - 125 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
85
- | QuickSRNetSmall | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 0.195 ms | 0 - 118 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
86
- | QuickSRNetSmall | w8a8 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.174 ms | 0 - 120 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
87
- | QuickSRNetSmall | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | TFLITE | 0.419 ms | 0 - 117 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
88
- | QuickSRNetSmall | w8a8 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | QNN_DLC | 0.358 ms | 0 - 117 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
89
- | QuickSRNetSmall | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 0.152 ms | 0 - 115 MB | NPU | [QuickSRNetSmall.tflite](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.tflite) |
90
- | QuickSRNetSmall | w8a8 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.147 ms | 0 - 115 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
91
- | QuickSRNetSmall | w8a8 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 0.438 ms | 0 - 0 MB | NPU | [QuickSRNetSmall.dlc](https://huggingface.co/qualcomm/QuickSRNetSmall/blob/main/QuickSRNetSmall_w8a8.dlc) |
92
-
93
-
94
-
95
-
96
- ## Installation
97
-
98
-
99
- Install the package via pip:
100
- ```bash
101
- pip install qai-hub-models
102
- ```
103
-
104
-
105
- ## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted device
106
-
107
- Sign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with your
108
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
109
-
110
- With this API token, you can configure your client to run models on the cloud
111
- hosted devices.
112
- ```bash
113
- qai-hub configure --api_token API_TOKEN
114
- ```
115
- Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.
116
-
117
-
118
-
119
- ## Demo off target
120
-
121
- The package contains a simple end-to-end demo that downloads pre-trained
122
- weights and runs this model on a sample input.
123
-
124
- ```bash
125
- python -m qai_hub_models.models.quicksrnetsmall.demo
126
- ```
127
-
128
- The above demo runs a reference implementation of pre-processing, model
129
- inference, and post processing.
130
-
131
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
132
- environment, please add the following to your cell (instead of the above).
133
- ```
134
- %run -m qai_hub_models.models.quicksrnetsmall.demo
135
- ```
136
-
137
-
138
- ### Run model on a cloud-hosted device
139
-
140
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
141
- device. This script does the following:
142
- * Performance check on-device on a cloud-hosted device
143
- * Downloads compiled assets that can be deployed on-device for Android.
144
- * Accuracy check between PyTorch and on-device outputs.
145
-
146
- ```bash
147
- python -m qai_hub_models.models.quicksrnetsmall.export
148
- ```
149
-
150
-
151
-
152
- ## How does this work?
153
-
154
- This [export script](https://aihub.qualcomm.com/models/quicksrnetsmall/qai_hub_models/models/QuickSRNetSmall/export.py)
155
- leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
156
- on-device. Lets go through each step below in detail:
157
-
158
- Step 1: **Compile model for on-device deployment**
159
-
160
- To compile a PyTorch model for on-device deployment, we first trace the model
161
- in memory using the `jit.trace` and then call the `submit_compile_job` API.
162
-
163
- ```python
164
- import torch
165
-
166
- import qai_hub as hub
167
- from qai_hub_models.models.quicksrnetsmall import Model
168
-
169
- # Load the model
170
- torch_model = Model.from_pretrained()
171
-
172
- # Device
173
- device = hub.Device("Samsung Galaxy S25")
174
-
175
- # Trace model
176
- input_shape = torch_model.get_input_spec()
177
- sample_inputs = torch_model.sample_inputs()
178
-
179
- pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
180
-
181
- # Compile model on a specific device
182
- compile_job = hub.submit_compile_job(
183
- model=pt_model,
184
- device=device,
185
- input_specs=torch_model.get_input_spec(),
186
- )
187
-
188
- # Get target model to run on-device
189
- target_model = compile_job.get_target_model()
190
-
191
- ```
192
-
193
-
194
- Step 2: **Performance profiling on cloud-hosted device**
195
-
196
- After compiling models from step 1. Models can be profiled model on-device using the
197
- `target_model`. Note that this scripts runs the model on a device automatically
198
- provisioned in the cloud. Once the job is submitted, you can navigate to a
199
- provided job URL to view a variety of on-device performance metrics.
200
- ```python
201
- profile_job = hub.submit_profile_job(
202
- model=target_model,
203
- device=device,
204
- )
205
-
206
- ```
207
-
208
- Step 3: **Verify on-device accuracy**
209
-
210
- To verify the accuracy of the model on-device, you can run on-device inference
211
- on sample input data on the same cloud hosted device.
212
- ```python
213
- input_data = torch_model.sample_inputs()
214
- inference_job = hub.submit_inference_job(
215
- model=target_model,
216
- device=device,
217
- inputs=input_data,
218
- )
219
- on_device_output = inference_job.download_output_data()
220
-
221
- ```
222
- With the output of the model, you can compute like PSNR, relative errors or
223
- spot check the output with expected output.
224
-
225
- **Note**: This on-device profiling and inference requires access to Qualcomm®
226
- AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).
227
-
228
-
229
-
230
- ## Run demo on a cloud-hosted device
231
-
232
- You can also run the demo on-device.
233
-
234
- ```bash
235
- python -m qai_hub_models.models.quicksrnetsmall.demo --eval-mode on-device
236
- ```
237
-
238
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
239
- environment, please add the following to your cell (instead of the above).
240
- ```
241
- %run -m qai_hub_models.models.quicksrnetsmall.demo -- --eval-mode on-device
242
- ```
243
-
244
-
245
- ## Deploying compiled model to Android
246
-
247
-
248
- The models can be deployed using multiple runtimes:
249
- - TensorFlow Lite (`.tflite` export): [This
250
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
251
- guide to deploy the .tflite model in an Android application.
252
-
253
-
254
- - QNN (`.so` export ): This [sample
255
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
256
- provides instructions on how to use the `.so` shared library in an Android application.
257
-
258
-
259
- ## View on Qualcomm® AI Hub
260
- Get more details on QuickSRNetSmall's performance across various devices [here](https://aihub.qualcomm.com/models/quicksrnetsmall).
261
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
262
-
263
 
264
  ## License
265
  * The license for the original implementation of QuickSRNetSmall can be found
266
  [here](https://github.com/quic/aimet-model-zoo/blob/develop/LICENSE.pdf).
267
 
268
-
269
-
270
  ## References
271
  * [QuickSRNet: Plain Single-Image Super-Resolution Architecture for Faster Inference on Mobile Platforms](https://arxiv.org/abs/2303.04336)
272
  * [Source Model Implementation](https://github.com/quic/aimet-model-zoo/tree/develop/aimet_zoo_torch/quicksrnet)
273
 
274
-
275
-
276
  ## Community
277
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
278
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
279
-
280
-
 
9
 
10
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/quicksrnetsmall/web-assets/model_demo.png)
11
 
12
+ # QuickSRNetSmall: Optimized for Qualcomm Devices
 
 
13
 
14
  QuickSRNet Small is designed for upscaling images on mobile platforms to sharpen in real-time.
15
 
16
+ This is based on the implementation of QuickSRNetSmall found [here](https://github.com/quic/aimet-model-zoo/tree/develop/aimet_zoo_torch/quicksrnet).
17
+ 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/quicksrnetsmall) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
18
+
19
+ 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.
20
+
21
+ ## Getting Started
22
+ There are two ways to deploy this model on your device:
23
+
24
+ ### Option 1: Download Pre-Exported Models
25
+
26
+ Below are pre-exported model assets ready for deployment.
27
+
28
+ | Runtime | Precision | Chipset | SDK Versions | Download |
29
+ |---|---|---|---|---|
30
+ | 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/quicksrnetsmall/releases/v0.46.1/quicksrnetsmall-onnx-float.zip)
31
+ | QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/quicksrnetsmall/releases/v0.46.1/quicksrnetsmall-qnn_dlc-float.zip)
32
+ | QNN_DLC | w8a8 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/quicksrnetsmall/releases/v0.46.1/quicksrnetsmall-qnn_dlc-w8a8.zip)
33
+ | 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/quicksrnetsmall/releases/v0.46.1/quicksrnetsmall-tflite-float.zip)
34
+ | 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/quicksrnetsmall/releases/v0.46.1/quicksrnetsmall-tflite-w8a8.zip)
35
+
36
+ For more device-specific assets and performance metrics, visit **[QuickSRNetSmall on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/quicksrnetsmall)**.
37
+
38
+
39
+ ### Option 2: Export with Custom Configurations
40
+
41
+ Use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/quicksrnetsmall) Python library to compile and export the model with your own:
42
+ - Custom weights (e.g., fine-tuned checkpoints)
43
+ - Custom input shapes
44
+ - Target device and runtime configurations
45
+
46
+ This option is ideal if you need to customize the model beyond the default configuration provided here.
47
+
48
+ See our repository for [QuickSRNetSmall on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/quicksrnetsmall) for usage instructions.
49
+
50
+ ## Model Details
51
+
52
+ **Model Type:** Model_use_case.super_resolution
53
+
54
+ **Model Stats:**
55
+ - Model checkpoint: quicksrnet_small_3x_checkpoint
56
+ - Input resolution: 128x128
57
+ - Number of parameters: 33.3K
58
+ - Model size (float): 133 KB
59
+ - Model size (w8a8): 41.7 KB
60
+
61
+ ## Performance Summary
62
+ | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
63
+ |---|---|---|---|---|---|---
64
+ | QuickSRNetSmall | ONNX | float | Snapdragon® X Elite | 1.049 ms | 8 - 8 MB | NPU
65
+ | QuickSRNetSmall | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.809 ms | 0 - 97 MB | NPU
66
+ | QuickSRNetSmall | ONNX | float | Qualcomm® QCS8550 (Proxy) | 1.138 ms | 0 - 44 MB | NPU
67
+ | QuickSRNetSmall | ONNX | float | Qualcomm® QCS9075 | 1.436 ms | 6 - 9 MB | NPU
68
+ | QuickSRNetSmall | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.594 ms | 0 - 91 MB | NPU
69
+ | QuickSRNetSmall | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.512 ms | 0 - 89 MB | NPU
70
+ | QuickSRNetSmall | QNN_DLC | float | Snapdragon® X Elite | 0.842 ms | 0 - 0 MB | NPU
71
+ | QuickSRNetSmall | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 0.452 ms | 0 - 28 MB | NPU
72
+ | QuickSRNetSmall | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 1.85 ms | 0 - 21 MB | NPU
73
+ | QuickSRNetSmall | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 0.742 ms | 0 - 1 MB | NPU
74
+ | QuickSRNetSmall | QNN_DLC | float | Qualcomm® SA8775P | 1.082 ms | 0 - 22 MB | NPU
75
+ | QuickSRNetSmall | QNN_DLC | float | Qualcomm® QCS9075 | 1.102 ms | 0 - 5 MB | NPU
76
+ | QuickSRNetSmall | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 1.04 ms | 0 - 29 MB | NPU
77
+ | QuickSRNetSmall | QNN_DLC | float | Qualcomm® SA7255P | 1.85 ms | 0 - 21 MB | NPU
78
+ | QuickSRNetSmall | QNN_DLC | float | Qualcomm® SA8295P | 1.383 ms | 0 - 17 MB | NPU
79
+ | QuickSRNetSmall | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.359 ms | 0 - 24 MB | NPU
80
+ | QuickSRNetSmall | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.326 ms | 0 - 24 MB | NPU
81
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Snapdragon® X Elite | 0.426 ms | 0 - 0 MB | NPU
82
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.214 ms | 0 - 24 MB | NPU
83
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 1.279 ms | 0 - 2 MB | NPU
84
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 0.774 ms | 0 - 19 MB | NPU
85
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.319 ms | 0 - 1 MB | NPU
86
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® SA8775P | 0.516 ms | 0 - 19 MB | NPU
87
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 0.497 ms | 0 - 2 MB | NPU
88
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 1.208 ms | 0 - 16 MB | NPU
89
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.463 ms | 0 - 25 MB | NPU
90
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® SA7255P | 0.774 ms | 0 - 19 MB | NPU
91
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Qualcomm® SA8295P | 0.703 ms | 0 - 15 MB | NPU
92
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.174 ms | 0 - 21 MB | NPU
93
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.351 ms | 0 - 16 MB | NPU
94
+ | QuickSRNetSmall | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.145 ms | 0 - 20 MB | NPU
95
+ | QuickSRNetSmall | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 0.628 ms | 0 - 28 MB | NPU
96
+ | QuickSRNetSmall | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 2.389 ms | 0 - 21 MB | NPU
97
+ | QuickSRNetSmall | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 1.003 ms | 0 - 1 MB | NPU
98
+ | QuickSRNetSmall | TFLITE | float | Qualcomm® SA8775P | 1.419 ms | 0 - 21 MB | NPU
99
+ | QuickSRNetSmall | TFLITE | float | Qualcomm® QCS9075 | 1.27 ms | 3 - 8 MB | NPU
100
+ | QuickSRNetSmall | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 1.318 ms | 1 - 30 MB | NPU
101
+ | QuickSRNetSmall | TFLITE | float | Qualcomm® SA7255P | 2.389 ms | 0 - 21 MB | NPU
102
+ | QuickSRNetSmall | TFLITE | float | Qualcomm® SA8295P | 1.652 ms | 0 - 17 MB | NPU
103
+ | QuickSRNetSmall | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.46 ms | 0 - 20 MB | NPU
104
+ | QuickSRNetSmall | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.397 ms | 0 - 23 MB | NPU
105
+ | QuickSRNetSmall | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.27 ms | 0 - 25 MB | NPU
106
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® QCS6490 | 1.042 ms | 0 - 2 MB | NPU
107
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 0.89 ms | 0 - 19 MB | NPU
108
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 0.398 ms | 0 - 1 MB | NPU
109
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® SA8775P | 0.594 ms | 0 - 20 MB | NPU
110
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® QCS9075 | 0.521 ms | 0 - 3 MB | NPU
111
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® QCM6690 | 1.5 ms | 0 - 16 MB | NPU
112
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 0.466 ms | 0 - 26 MB | NPU
113
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® SA7255P | 0.89 ms | 0 - 19 MB | NPU
114
+ | QuickSRNetSmall | TFLITE | w8a8 | Qualcomm® SA8295P | 0.806 ms | 0 - 15 MB | NPU
115
+ | QuickSRNetSmall | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.197 ms | 0 - 21 MB | NPU
116
+ | QuickSRNetSmall | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 0.415 ms | 0 - 17 MB | NPU
117
+ | QuickSRNetSmall | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.162 ms | 0 - 20 MB | NPU
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
  ## License
120
  * The license for the original implementation of QuickSRNetSmall can be found
121
  [here](https://github.com/quic/aimet-model-zoo/blob/develop/LICENSE.pdf).
122
 
 
 
123
  ## References
124
  * [QuickSRNet: Plain Single-Image Super-Resolution Architecture for Faster Inference on Mobile Platforms](https://arxiv.org/abs/2303.04336)
125
  * [Source Model Implementation](https://github.com/quic/aimet-model-zoo/tree/develop/aimet_zoo_torch/quicksrnet)
126
 
 
 
127
  ## Community
128
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
129
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
 
 
tool-versions.yaml DELETED
@@ -1,3 +0,0 @@
1
- tool_versions:
2
- qnn_dlc:
3
- qairt: 2.41.0.251128145156_191518