Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -37,29 +37,31 @@ More details on model performance across various devices, can be found
|
|
37 |
|
38 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
39 |
|---|---|---|---|---|---|---|---|---|
|
40 |
-
| Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE |
|
41 |
-
| Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN |
|
42 |
-
| Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX |
|
43 |
-
| Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE |
|
44 |
-
| Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN |
|
45 |
-
| Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX |
|
46 |
-
| Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE |
|
47 |
-
| Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN |
|
48 |
-
| Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX |
|
49 |
-
| Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE |
|
50 |
-
| Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | QNN |
|
51 |
-
| Unet-Segmentation |
|
52 |
-
| Unet-Segmentation |
|
53 |
-
| Unet-Segmentation |
|
54 |
-
| Unet-Segmentation |
|
55 |
-
| Unet-Segmentation |
|
56 |
-
| Unet-Segmentation |
|
57 |
-
| Unet-Segmentation |
|
58 |
-
| Unet-Segmentation |
|
59 |
-
| Unet-Segmentation |
|
60 |
-
| Unet-Segmentation |
|
61 |
-
| Unet-Segmentation |
|
62 |
-
| Unet-Segmentation |
|
|
|
|
|
63 |
|
64 |
|
65 |
|
@@ -123,8 +125,8 @@ Profiling Results
|
|
123 |
Unet-Segmentation
|
124 |
Device : Samsung Galaxy S23 (13)
|
125 |
Runtime : TFLITE
|
126 |
-
Estimated inference time (ms) :
|
127 |
-
Estimated peak memory usage (MB): [
|
128 |
Total # Ops : 32
|
129 |
Compute Unit(s) : NPU (32 ops)
|
130 |
```
|
@@ -145,13 +147,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
145 |
import torch
|
146 |
|
147 |
import qai_hub as hub
|
148 |
-
from qai_hub_models.models.unet_segmentation import
|
149 |
|
150 |
# Load the model
|
|
|
151 |
|
152 |
# Device
|
153 |
device = hub.Device("Samsung Galaxy S23")
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
```
|
157 |
|
|
|
37 |
|
38 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
39 |
|---|---|---|---|---|---|---|---|---|
|
40 |
+
| Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 152.941 ms | 6 - 466 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
41 |
+
| Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 154.481 ms | 9 - 37 MB | FP16 | NPU | [Unet-Segmentation.so](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.so) |
|
42 |
+
| Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 153.838 ms | 16 - 19 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
|
43 |
+
| Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 113.773 ms | 6 - 92 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
44 |
+
| Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 110.791 ms | 9 - 93 MB | FP16 | NPU | [Unet-Segmentation.so](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.so) |
|
45 |
+
| Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 112.812 ms | 1 - 406 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
|
46 |
+
| Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 102.108 ms | 4 - 105 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
47 |
+
| Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 89.253 ms | 9 - 110 MB | FP16 | NPU | Use Export Script |
|
48 |
+
| Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 103.52 ms | 14 - 134 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
|
49 |
+
| Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 157.694 ms | 3 - 469 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
50 |
+
| Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 139.616 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
|
51 |
+
| Unet-Segmentation | SA7255P ADP | SA7255P | TFLITE | 7406.94 ms | 2 - 100 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
52 |
+
| Unet-Segmentation | SA7255P ADP | SA7255P | QNN | 7399.668 ms | 1 - 7 MB | FP16 | NPU | Use Export Script |
|
53 |
+
| Unet-Segmentation | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 154.76 ms | 6 - 241 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
54 |
+
| Unet-Segmentation | SA8255 (Proxy) | SA8255P Proxy | QNN | 145.08 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
|
55 |
+
| Unet-Segmentation | SA8295P ADP | SA8295P | TFLITE | 273.606 ms | 6 - 106 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
56 |
+
| Unet-Segmentation | SA8295P ADP | SA8295P | QNN | 266.119 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
57 |
+
| Unet-Segmentation | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 156.964 ms | 3 - 471 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
58 |
+
| Unet-Segmentation | SA8650 (Proxy) | SA8650P Proxy | QNN | 139.333 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
|
59 |
+
| Unet-Segmentation | SA8775P ADP | SA8775P | TFLITE | 303.207 ms | 6 - 104 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
60 |
+
| Unet-Segmentation | SA8775P ADP | SA8775P | QNN | 297.898 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
|
61 |
+
| Unet-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 297.003 ms | 6 - 98 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
|
62 |
+
| Unet-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 322.428 ms | 5 - 92 MB | FP16 | NPU | Use Export Script |
|
63 |
+
| Unet-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 135.772 ms | 9 - 9 MB | FP16 | NPU | Use Export Script |
|
64 |
+
| Unet-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 147.629 ms | 54 - 54 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
|
65 |
|
66 |
|
67 |
|
|
|
125 |
Unet-Segmentation
|
126 |
Device : Samsung Galaxy S23 (13)
|
127 |
Runtime : TFLITE
|
128 |
+
Estimated inference time (ms) : 152.9
|
129 |
+
Estimated peak memory usage (MB): [6, 466]
|
130 |
Total # Ops : 32
|
131 |
Compute Unit(s) : NPU (32 ops)
|
132 |
```
|
|
|
147 |
import torch
|
148 |
|
149 |
import qai_hub as hub
|
150 |
+
from qai_hub_models.models.unet_segmentation import Model
|
151 |
|
152 |
# Load the model
|
153 |
+
torch_model = Model.from_pretrained()
|
154 |
|
155 |
# Device
|
156 |
device = hub.Device("Samsung Galaxy S23")
|
157 |
|
158 |
+
# Trace model
|
159 |
+
input_shape = torch_model.get_input_spec()
|
160 |
+
sample_inputs = torch_model.sample_inputs()
|
161 |
+
|
162 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
163 |
+
|
164 |
+
# Compile model on a specific device
|
165 |
+
compile_job = hub.submit_compile_job(
|
166 |
+
model=pt_model,
|
167 |
+
device=device,
|
168 |
+
input_specs=torch_model.get_input_spec(),
|
169 |
+
)
|
170 |
+
|
171 |
+
# Get target model to run on-device
|
172 |
+
target_model = compile_job.get_target_model()
|
173 |
|
174 |
```
|
175 |
|