Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -35,24 +35,150 @@ More details on model performance across various devices, can be found
|
|
35 |
|
36 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
|---|---|---|---|---|---|---|---|---|
|
38 |
-
| SAMDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE |
|
39 |
-
| SAMDecoder | Samsung Galaxy
|
40 |
-
| SAMDecoder |
|
41 |
-
| SAMDecoder |
|
42 |
-
| SAMDecoder |
|
43 |
-
| SAMDecoder |
|
44 |
-
| SAMDecoder |
|
45 |
-
| SAMDecoder |
|
46 |
-
|
|
47 |
-
|
|
48 |
-
|
|
49 |
-
|
|
50 |
-
|
|
51 |
-
|
|
52 |
-
|
|
53 |
-
|
|
54 |
-
|
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
|
58 |
|
@@ -117,19 +243,64 @@ Profiling Results
|
|
117 |
SAMDecoder
|
118 |
Device : Samsung Galaxy S23 (13)
|
119 |
Runtime : TFLITE
|
120 |
-
Estimated inference time (ms) :
|
121 |
-
Estimated peak memory usage (MB): [
|
122 |
-
Total # Ops :
|
123 |
-
Compute Unit(s) : NPU (
|
124 |
|
125 |
------------------------------------------------------------
|
126 |
-
|
127 |
-
Device : Samsung Galaxy S23 (13)
|
128 |
-
Runtime : TFLITE
|
129 |
-
Estimated inference time (ms) :
|
130 |
-
Estimated peak memory usage (MB): [
|
131 |
-
Total # Ops :
|
132 |
-
Compute Unit(s) :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
```
|
134 |
|
135 |
|
@@ -152,42 +323,122 @@ from qai_hub_models.models.sam import Model
|
|
152 |
|
153 |
# Load the model
|
154 |
model = Model.from_pretrained()
|
155 |
-
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
# Device
|
159 |
device = hub.Device("Samsung Galaxy S23")
|
160 |
|
161 |
# Trace model
|
162 |
-
|
163 |
-
|
164 |
|
165 |
-
|
166 |
|
167 |
# Compile model on a specific device
|
168 |
-
|
169 |
-
model=
|
170 |
device=device,
|
171 |
-
input_specs=
|
172 |
)
|
173 |
|
174 |
# Get target model to run on-device
|
175 |
-
|
176 |
# Trace model
|
177 |
-
|
178 |
-
|
179 |
|
180 |
-
|
181 |
|
182 |
# Compile model on a specific device
|
183 |
-
|
184 |
-
model=
|
185 |
device=device,
|
186 |
-
input_specs=
|
187 |
)
|
188 |
|
189 |
# Get target model to run on-device
|
190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
```
|
193 |
|
@@ -199,12 +450,32 @@ After compiling models from step 1. Models can be profiled model on-device using
|
|
199 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
200 |
provided job URL to view a variety of on-device performance metrics.
|
201 |
```python
|
202 |
-
|
203 |
-
model=
|
204 |
device=device,
|
205 |
)
|
206 |
-
|
207 |
-
model=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
device=device,
|
209 |
)
|
210 |
|
@@ -215,20 +486,55 @@ Step 3: **Verify on-device accuracy**
|
|
215 |
To verify the accuracy of the model on-device, you can run on-device inference
|
216 |
on sample input data on the same cloud hosted device.
|
217 |
```python
|
218 |
-
|
219 |
-
|
220 |
-
model=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
device=device,
|
222 |
-
inputs=
|
223 |
)
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
model=
|
228 |
device=device,
|
229 |
-
inputs=
|
230 |
)
|
231 |
-
|
232 |
|
233 |
```
|
234 |
With the output of the model, you can compute like PSNR, relative errors or
|
|
|
35 |
|
36 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
|---|---|---|---|---|---|---|---|---|
|
38 |
+
| SAMDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 7.557 ms | 0 - 31 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
39 |
+
| SAMDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 7.052 ms | 4 - 19 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.so) |
|
40 |
+
| SAMDecoder | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 11.415 ms | 0 - 266 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.onnx) |
|
41 |
+
| SAMDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 5.23 ms | 0 - 39 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
42 |
+
| SAMDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 4.973 ms | 4 - 46 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.so) |
|
43 |
+
| SAMDecoder | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 7.741 ms | 5 - 126 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.onnx) |
|
44 |
+
| SAMDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 5.18 ms | 0 - 35 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
45 |
+
| SAMDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 3.787 ms | 4 - 42 MB | FP16 | NPU | Use Export Script |
|
46 |
+
| SAMDecoder | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 8.231 ms | 0 - 86 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.onnx) |
|
47 |
+
| SAMDecoder | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 7.484 ms | 0 - 33 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
48 |
+
| SAMDecoder | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 6.814 ms | 4 - 5 MB | FP16 | NPU | Use Export Script |
|
49 |
+
| SAMDecoder | SA7255P ADP | SA7255P | TFLITE | 52.929 ms | 0 - 32 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
50 |
+
| SAMDecoder | SA7255P ADP | SA7255P | QNN | 50.031 ms | 2 - 11 MB | FP16 | NPU | Use Export Script |
|
51 |
+
| SAMDecoder | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 7.484 ms | 0 - 32 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
52 |
+
| SAMDecoder | SA8255 (Proxy) | SA8255P Proxy | QNN | 6.852 ms | 4 - 5 MB | FP16 | NPU | Use Export Script |
|
53 |
+
| SAMDecoder | SA8295P ADP | SA8295P | TFLITE | 9.976 ms | 0 - 35 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
54 |
+
| SAMDecoder | SA8295P ADP | SA8295P | QNN | 9.05 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
55 |
+
| SAMDecoder | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 7.477 ms | 0 - 29 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
56 |
+
| SAMDecoder | SA8650 (Proxy) | SA8650P Proxy | QNN | 6.893 ms | 4 - 6 MB | FP16 | NPU | Use Export Script |
|
57 |
+
| SAMDecoder | SA8775P ADP | SA8775P | TFLITE | 10.51 ms | 0 - 34 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
58 |
+
| SAMDecoder | SA8775P ADP | SA8775P | QNN | 9.667 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
59 |
+
| SAMDecoder | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 8.533 ms | 0 - 37 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.tflite) |
|
60 |
+
| SAMDecoder | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 8.315 ms | 4 - 44 MB | FP16 | NPU | Use Export Script |
|
61 |
+
| SAMDecoder | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 7.458 ms | 4 - 4 MB | FP16 | NPU | Use Export Script |
|
62 |
+
| SAMDecoder | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 14.75 ms | 12 - 12 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMDecoder.onnx) |
|
63 |
+
| SAMEncoderPart1 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 208.201 ms | 12 - 74 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
64 |
+
| SAMEncoderPart1 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 203.885 ms | 12 - 67 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.so) |
|
65 |
+
| SAMEncoderPart1 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 168.865 ms | 12 - 57 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.onnx) |
|
66 |
+
| SAMEncoderPart1 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 149.759 ms | 11 - 660 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
67 |
+
| SAMEncoderPart1 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 144.476 ms | 364 - 1006 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.so) |
|
68 |
+
| SAMEncoderPart1 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 121.68 ms | 0 - 1234 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.onnx) |
|
69 |
+
| SAMEncoderPart1 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 128.622 ms | 11 - 667 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
70 |
+
| SAMEncoderPart1 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 141.432 ms | 3 - 655 MB | FP16 | NPU | Use Export Script |
|
71 |
+
| SAMEncoderPart1 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 96.596 ms | 39 - 1086 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.onnx) |
|
72 |
+
| SAMEncoderPart1 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 205.315 ms | 12 - 81 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
73 |
+
| SAMEncoderPart1 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 177.157 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
74 |
+
| SAMEncoderPart1 | SA7255P ADP | SA7255P | TFLITE | 1173.558 ms | 2 - 646 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
75 |
+
| SAMEncoderPart1 | SA7255P ADP | SA7255P | QNN | 1100.71 ms | 4 - 13 MB | FP16 | NPU | Use Export Script |
|
76 |
+
| SAMEncoderPart1 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 208.837 ms | 12 - 70 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
77 |
+
| SAMEncoderPart1 | SA8255 (Proxy) | SA8255P Proxy | QNN | 178.44 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
78 |
+
| SAMEncoderPart1 | SA8295P ADP | SA8295P | TFLITE | 242.752 ms | 12 - 640 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
79 |
+
| SAMEncoderPart1 | SA8295P ADP | SA8295P | QNN | 206.972 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
80 |
+
| SAMEncoderPart1 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 208.397 ms | 12 - 65 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
81 |
+
| SAMEncoderPart1 | SA8650 (Proxy) | SA8650P Proxy | QNN | 177.673 ms | 13 - 14 MB | FP16 | NPU | Use Export Script |
|
82 |
+
| SAMEncoderPart1 | SA8775P ADP | SA8775P | TFLITE | 251.286 ms | 12 - 656 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
83 |
+
| SAMEncoderPart1 | SA8775P ADP | SA8775P | QNN | 211.825 ms | 3 - 9 MB | FP16 | NPU | Use Export Script |
|
84 |
+
| SAMEncoderPart1 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 226.498 ms | 12 - 995 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.tflite) |
|
85 |
+
| SAMEncoderPart1 | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 219.929 ms | 9 - 964 MB | FP16 | NPU | Use Export Script |
|
86 |
+
| SAMEncoderPart1 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 171.827 ms | 12 - 12 MB | FP16 | NPU | Use Export Script |
|
87 |
+
| SAMEncoderPart1 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 179.691 ms | 39 - 39 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart1.onnx) |
|
88 |
+
| SAMEncoderPart2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 670.133 ms | 12 - 104 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
89 |
+
| SAMEncoderPart2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 838.379 ms | 12 - 109 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.so) |
|
90 |
+
| SAMEncoderPart2 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 722.337 ms | 0 - 54 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.onnx) |
|
91 |
+
| SAMEncoderPart2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 556.374 ms | 11 - 1092 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
92 |
+
| SAMEncoderPart2 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 668.897 ms | 12 - 1113 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.so) |
|
93 |
+
| SAMEncoderPart2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 487.43 ms | 12 - 1100 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
94 |
+
| SAMEncoderPart2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 574.723 ms | 10 - 1113 MB | FP16 | NPU | Use Export Script |
|
95 |
+
| SAMEncoderPart2 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 474.562 ms | 41 - 4748 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.onnx) |
|
96 |
+
| SAMEncoderPart2 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 671.625 ms | 0 - 102 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
97 |
+
| SAMEncoderPart2 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 737.788 ms | 13 - 14 MB | FP16 | NPU | Use Export Script |
|
98 |
+
| SAMEncoderPart2 | SA7255P ADP | SA7255P | QNN | 1869.513 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
|
99 |
+
| SAMEncoderPart2 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 690.907 ms | 12 - 116 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
100 |
+
| SAMEncoderPart2 | SA8255 (Proxy) | SA8255P Proxy | QNN | 731.994 ms | 15 - 16 MB | FP16 | NPU | Use Export Script |
|
101 |
+
| SAMEncoderPart2 | SA8295P ADP | SA8295P | TFLITE | 726.454 ms | 12 - 1141 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
102 |
+
| SAMEncoderPart2 | SA8295P ADP | SA8295P | QNN | 782.399 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
103 |
+
| SAMEncoderPart2 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 671.719 ms | 12 - 104 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
104 |
+
| SAMEncoderPart2 | SA8650 (Proxy) | SA8650P Proxy | QNN | 733.997 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
105 |
+
| SAMEncoderPart2 | SA8775P ADP | SA8775P | TFLITE | 717.157 ms | 0 - 1105 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.tflite) |
|
106 |
+
| SAMEncoderPart2 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 633.76 ms | 12 - 12 MB | FP16 | NPU | Use Export Script |
|
107 |
+
| SAMEncoderPart2 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 743.453 ms | 51 - 51 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart2.onnx) |
|
108 |
+
| SAMEncoderPart3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 686.379 ms | 12 - 103 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.tflite) |
|
109 |
+
| SAMEncoderPart3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 852.964 ms | 12 - 115 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.so) |
|
110 |
+
| SAMEncoderPart3 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 740.438 ms | 9 - 62 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.onnx) |
|
111 |
+
| SAMEncoderPart3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 440.773 ms | 12 - 1099 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.tflite) |
|
112 |
+
| SAMEncoderPart3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 579.622 ms | 11 - 1115 MB | FP16 | NPU | Use Export Script |
|
113 |
+
| SAMEncoderPart3 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 472.649 ms | 39 - 4748 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.onnx) |
|
114 |
+
| SAMEncoderPart3 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 668.273 ms | 12 - 114 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.tflite) |
|
115 |
+
| SAMEncoderPart3 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 731.938 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
116 |
+
| SAMEncoderPart3 | SA7255P ADP | SA7255P | QNN | 1874.534 ms | 12 - 22 MB | FP16 | NPU | Use Export Script |
|
117 |
+
| SAMEncoderPart3 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 684.379 ms | 12 - 108 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.tflite) |
|
118 |
+
| SAMEncoderPart3 | SA8255 (Proxy) | SA8255P Proxy | QNN | 731.638 ms | 13 - 15 MB | FP16 | NPU | Use Export Script |
|
119 |
+
| SAMEncoderPart3 | SA8295P ADP | SA8295P | TFLITE | 725.387 ms | 12 - 1148 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.tflite) |
|
120 |
+
| SAMEncoderPart3 | SA8295P ADP | SA8295P | QNN | 781.146 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
121 |
+
| SAMEncoderPart3 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 683.645 ms | 12 - 112 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.tflite) |
|
122 |
+
| SAMEncoderPart3 | SA8650 (Proxy) | SA8650P Proxy | QNN | 735.421 ms | 13 - 14 MB | FP16 | NPU | Use Export Script |
|
123 |
+
| SAMEncoderPart3 | SA8775P ADP | SA8775P | TFLITE | 724.877 ms | 0 - 1107 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.tflite) |
|
124 |
+
| SAMEncoderPart3 | SA8775P ADP | SA8775P | QNN | 742.231 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
|
125 |
+
| SAMEncoderPart3 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 632.458 ms | 12 - 12 MB | FP16 | NPU | Use Export Script |
|
126 |
+
| SAMEncoderPart3 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 741.655 ms | 51 - 51 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart3.onnx) |
|
127 |
+
| SAMEncoderPart4 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 833.428 ms | 12 - 100 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.so) |
|
128 |
+
| SAMEncoderPart4 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 682.163 ms | 0 - 53 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.onnx) |
|
129 |
+
| SAMEncoderPart4 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 437.593 ms | 11 - 1098 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.tflite) |
|
130 |
+
| SAMEncoderPart4 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 531.361 ms | 10 - 1119 MB | FP16 | NPU | Use Export Script |
|
131 |
+
| SAMEncoderPart4 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 563.94 ms | 26 - 5204 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.onnx) |
|
132 |
+
| SAMEncoderPart4 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 675.986 ms | 12 - 102 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.tflite) |
|
133 |
+
| SAMEncoderPart4 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 731.308 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
134 |
+
| SAMEncoderPart4 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 677.387 ms | 12 - 103 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.tflite) |
|
135 |
+
| SAMEncoderPart4 | SA8255 (Proxy) | SA8255P Proxy | QNN | 740.258 ms | 13 - 14 MB | FP16 | NPU | Use Export Script |
|
136 |
+
| SAMEncoderPart4 | SA8295P ADP | SA8295P | TFLITE | 725.343 ms | 12 - 1150 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.tflite) |
|
137 |
+
| SAMEncoderPart4 | SA8295P ADP | SA8295P | QNN | 782.501 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
138 |
+
| SAMEncoderPart4 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 674.544 ms | 12 - 102 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.tflite) |
|
139 |
+
| SAMEncoderPart4 | SA8650 (Proxy) | SA8650P Proxy | QNN | 745.54 ms | 13 - 14 MB | FP16 | NPU | Use Export Script |
|
140 |
+
| SAMEncoderPart4 | SA8775P ADP | SA8775P | QNN | 738.7 ms | 12 - 22 MB | FP16 | NPU | Use Export Script |
|
141 |
+
| SAMEncoderPart4 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 628.108 ms | 12 - 12 MB | FP16 | NPU | Use Export Script |
|
142 |
+
| SAMEncoderPart4 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 739.45 ms | 53 - 53 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart4.onnx) |
|
143 |
+
| SAMEncoderPart5 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 671.428 ms | 12 - 107 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.tflite) |
|
144 |
+
| SAMEncoderPart5 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 844.265 ms | 12 - 102 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.so) |
|
145 |
+
| SAMEncoderPart5 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 684.639 ms | 0 - 53 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.onnx) |
|
146 |
+
| SAMEncoderPart5 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 548.457 ms | 12 - 1096 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.tflite) |
|
147 |
+
| SAMEncoderPart5 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 484.471 ms | 11 - 1099 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.tflite) |
|
148 |
+
| SAMEncoderPart5 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 575.509 ms | 7 - 1111 MB | FP16 | NPU | Use Export Script |
|
149 |
+
| SAMEncoderPart5 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 470.838 ms | 39 - 4742 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.onnx) |
|
150 |
+
| SAMEncoderPart5 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 665.458 ms | 12 - 104 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.tflite) |
|
151 |
+
| SAMEncoderPart5 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 720.635 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
152 |
+
| SAMEncoderPart5 | SA7255P ADP | SA7255P | QNN | 1874.681 ms | 11 - 22 MB | FP16 | NPU | Use Export Script |
|
153 |
+
| SAMEncoderPart5 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 691.758 ms | 12 - 113 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.tflite) |
|
154 |
+
| SAMEncoderPart5 | SA8255 (Proxy) | SA8255P Proxy | QNN | 745.957 ms | 13 - 14 MB | FP16 | NPU | Use Export Script |
|
155 |
+
| SAMEncoderPart5 | SA8295P ADP | SA8295P | TFLITE | 725.701 ms | 12 - 1149 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.tflite) |
|
156 |
+
| SAMEncoderPart5 | SA8295P ADP | SA8295P | QNN | 782.525 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
157 |
+
| SAMEncoderPart5 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 679.545 ms | 12 - 105 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.tflite) |
|
158 |
+
| SAMEncoderPart5 | SA8650 (Proxy) | SA8650P Proxy | QNN | 730.129 ms | 13 - 15 MB | FP16 | NPU | Use Export Script |
|
159 |
+
| SAMEncoderPart5 | SA8775P ADP | SA8775P | QNN | 741.02 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
|
160 |
+
| SAMEncoderPart5 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 640.949 ms | 12 - 12 MB | FP16 | NPU | Use Export Script |
|
161 |
+
| SAMEncoderPart5 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 735.548 ms | 51 - 51 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart5.onnx) |
|
162 |
+
| SAMEncoderPart6 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 677.701 ms | 12 - 102 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
163 |
+
| SAMEncoderPart6 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 841.659 ms | 12 - 109 MB | FP16 | NPU | [Segment-Anything-Model.so](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.so) |
|
164 |
+
| SAMEncoderPart6 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 684.635 ms | 0 - 935 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.onnx) |
|
165 |
+
| SAMEncoderPart6 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 536.637 ms | 10 - 1099 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
166 |
+
| SAMEncoderPart6 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 485.849 ms | 11 - 1093 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
167 |
+
| SAMEncoderPart6 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 579.641 ms | 10 - 1114 MB | FP16 | NPU | Use Export Script |
|
168 |
+
| SAMEncoderPart6 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 472.01 ms | 39 - 4745 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.onnx) |
|
169 |
+
| SAMEncoderPart6 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 656.062 ms | 12 - 113 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
170 |
+
| SAMEncoderPart6 | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 730.888 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
171 |
+
| SAMEncoderPart6 | SA7255P ADP | SA7255P | QNN | 1868.576 ms | 5 - 15 MB | FP16 | NPU | Use Export Script |
|
172 |
+
| SAMEncoderPart6 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 688.443 ms | 12 - 102 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
173 |
+
| SAMEncoderPart6 | SA8255 (Proxy) | SA8255P Proxy | QNN | 736.226 ms | 12 - 14 MB | FP16 | NPU | Use Export Script |
|
174 |
+
| SAMEncoderPart6 | SA8295P ADP | SA8295P | TFLITE | 725.807 ms | 5 - 1142 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
175 |
+
| SAMEncoderPart6 | SA8295P ADP | SA8295P | QNN | 782.131 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
176 |
+
| SAMEncoderPart6 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 672.876 ms | 12 - 104 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
177 |
+
| SAMEncoderPart6 | SA8650 (Proxy) | SA8650P Proxy | QNN | 740.495 ms | 16 - 18 MB | FP16 | NPU | Use Export Script |
|
178 |
+
| SAMEncoderPart6 | SA8775P ADP | SA8775P | TFLITE | 726.536 ms | 0 - 1104 MB | FP16 | NPU | [Segment-Anything-Model.tflite](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.tflite) |
|
179 |
+
| SAMEncoderPart6 | SA8775P ADP | SA8775P | QNN | 742.038 ms | 2 - 12 MB | FP16 | NPU | Use Export Script |
|
180 |
+
| SAMEncoderPart6 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 629.137 ms | 12 - 12 MB | FP16 | NPU | Use Export Script |
|
181 |
+
| SAMEncoderPart6 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 743.947 ms | 52 - 52 MB | FP16 | NPU | [Segment-Anything-Model.onnx](https://huggingface.co/qualcomm/Segment-Anything-Model/blob/main/SAMEncoderPart6.onnx) |
|
182 |
|
183 |
|
184 |
|
|
|
243 |
SAMDecoder
|
244 |
Device : Samsung Galaxy S23 (13)
|
245 |
Runtime : TFLITE
|
246 |
+
Estimated inference time (ms) : 7.6
|
247 |
+
Estimated peak memory usage (MB): [0, 31]
|
248 |
+
Total # Ops : 845
|
249 |
+
Compute Unit(s) : NPU (845 ops)
|
250 |
|
251 |
------------------------------------------------------------
|
252 |
+
SAMEncoderPart1
|
253 |
+
Device : Samsung Galaxy S23 (13)
|
254 |
+
Runtime : TFLITE
|
255 |
+
Estimated inference time (ms) : 208.2
|
256 |
+
Estimated peak memory usage (MB): [12, 74]
|
257 |
+
Total # Ops : 585
|
258 |
+
Compute Unit(s) : NPU (585 ops)
|
259 |
+
|
260 |
+
------------------------------------------------------------
|
261 |
+
SAMEncoderPart2
|
262 |
+
Device : Samsung Galaxy S23 (13)
|
263 |
+
Runtime : TFLITE
|
264 |
+
Estimated inference time (ms) : 670.1
|
265 |
+
Estimated peak memory usage (MB): [12, 104]
|
266 |
+
Total # Ops : 580
|
267 |
+
Compute Unit(s) : NPU (580 ops)
|
268 |
+
|
269 |
+
------------------------------------------------------------
|
270 |
+
SAMEncoderPart3
|
271 |
+
Device : Samsung Galaxy S23 (13)
|
272 |
+
Runtime : TFLITE
|
273 |
+
Estimated inference time (ms) : 686.4
|
274 |
+
Estimated peak memory usage (MB): [12, 103]
|
275 |
+
Total # Ops : 580
|
276 |
+
Compute Unit(s) : NPU (580 ops)
|
277 |
+
|
278 |
+
------------------------------------------------------------
|
279 |
+
SAMEncoderPart4
|
280 |
+
Device : Samsung Galaxy S23 (13)
|
281 |
+
Runtime : QNN
|
282 |
+
Estimated inference time (ms) : 833.4
|
283 |
+
Estimated peak memory usage (MB): [12, 100]
|
284 |
+
Total # Ops : 613
|
285 |
+
Compute Unit(s) : NPU (613 ops)
|
286 |
+
|
287 |
+
------------------------------------------------------------
|
288 |
+
SAMEncoderPart5
|
289 |
+
Device : Samsung Galaxy S23 (13)
|
290 |
+
Runtime : TFLITE
|
291 |
+
Estimated inference time (ms) : 671.4
|
292 |
+
Estimated peak memory usage (MB): [12, 107]
|
293 |
+
Total # Ops : 580
|
294 |
+
Compute Unit(s) : NPU (580 ops)
|
295 |
+
|
296 |
+
------------------------------------------------------------
|
297 |
+
SAMEncoderPart6
|
298 |
+
Device : Samsung Galaxy S23 (13)
|
299 |
+
Runtime : TFLITE
|
300 |
+
Estimated inference time (ms) : 677.7
|
301 |
+
Estimated peak memory usage (MB): [12, 102]
|
302 |
+
Total # Ops : 580
|
303 |
+
Compute Unit(s) : NPU (580 ops)
|
304 |
```
|
305 |
|
306 |
|
|
|
323 |
|
324 |
# Load the model
|
325 |
model = Model.from_pretrained()
|
326 |
+
decoder_model = model.decoder
|
327 |
+
encoder_splits[0]_model = model.encoder_splits[0]
|
328 |
+
encoder_splits[1]_model = model.encoder_splits[1]
|
329 |
+
encoder_splits[2]_model = model.encoder_splits[2]
|
330 |
+
encoder_splits[3]_model = model.encoder_splits[3]
|
331 |
+
encoder_splits[4]_model = model.encoder_splits[4]
|
332 |
+
encoder_splits[5]_model = model.encoder_splits[5]
|
333 |
|
334 |
# Device
|
335 |
device = hub.Device("Samsung Galaxy S23")
|
336 |
|
337 |
# Trace model
|
338 |
+
decoder_input_shape = decoder_model.get_input_spec()
|
339 |
+
decoder_sample_inputs = decoder_model.sample_inputs()
|
340 |
|
341 |
+
traced_decoder_model = torch.jit.trace(decoder_model, [torch.tensor(data[0]) for _, data in decoder_sample_inputs.items()])
|
342 |
|
343 |
# Compile model on a specific device
|
344 |
+
decoder_compile_job = hub.submit_compile_job(
|
345 |
+
model=traced_decoder_model ,
|
346 |
device=device,
|
347 |
+
input_specs=decoder_model.get_input_spec(),
|
348 |
)
|
349 |
|
350 |
# Get target model to run on-device
|
351 |
+
decoder_target_model = decoder_compile_job.get_target_model()
|
352 |
# Trace model
|
353 |
+
encoder_splits[0]_input_shape = encoder_splits[0]_model.get_input_spec()
|
354 |
+
encoder_splits[0]_sample_inputs = encoder_splits[0]_model.sample_inputs()
|
355 |
|
356 |
+
traced_encoder_splits[0]_model = torch.jit.trace(encoder_splits[0]_model, [torch.tensor(data[0]) for _, data in encoder_splits[0]_sample_inputs.items()])
|
357 |
|
358 |
# Compile model on a specific device
|
359 |
+
encoder_splits[0]_compile_job = hub.submit_compile_job(
|
360 |
+
model=traced_encoder_splits[0]_model ,
|
361 |
device=device,
|
362 |
+
input_specs=encoder_splits[0]_model.get_input_spec(),
|
363 |
)
|
364 |
|
365 |
# Get target model to run on-device
|
366 |
+
encoder_splits[0]_target_model = encoder_splits[0]_compile_job.get_target_model()
|
367 |
+
# Trace model
|
368 |
+
encoder_splits[1]_input_shape = encoder_splits[1]_model.get_input_spec()
|
369 |
+
encoder_splits[1]_sample_inputs = encoder_splits[1]_model.sample_inputs()
|
370 |
+
|
371 |
+
traced_encoder_splits[1]_model = torch.jit.trace(encoder_splits[1]_model, [torch.tensor(data[0]) for _, data in encoder_splits[1]_sample_inputs.items()])
|
372 |
+
|
373 |
+
# Compile model on a specific device
|
374 |
+
encoder_splits[1]_compile_job = hub.submit_compile_job(
|
375 |
+
model=traced_encoder_splits[1]_model ,
|
376 |
+
device=device,
|
377 |
+
input_specs=encoder_splits[1]_model.get_input_spec(),
|
378 |
+
)
|
379 |
+
|
380 |
+
# Get target model to run on-device
|
381 |
+
encoder_splits[1]_target_model = encoder_splits[1]_compile_job.get_target_model()
|
382 |
+
# Trace model
|
383 |
+
encoder_splits[2]_input_shape = encoder_splits[2]_model.get_input_spec()
|
384 |
+
encoder_splits[2]_sample_inputs = encoder_splits[2]_model.sample_inputs()
|
385 |
+
|
386 |
+
traced_encoder_splits[2]_model = torch.jit.trace(encoder_splits[2]_model, [torch.tensor(data[0]) for _, data in encoder_splits[2]_sample_inputs.items()])
|
387 |
+
|
388 |
+
# Compile model on a specific device
|
389 |
+
encoder_splits[2]_compile_job = hub.submit_compile_job(
|
390 |
+
model=traced_encoder_splits[2]_model ,
|
391 |
+
device=device,
|
392 |
+
input_specs=encoder_splits[2]_model.get_input_spec(),
|
393 |
+
)
|
394 |
+
|
395 |
+
# Get target model to run on-device
|
396 |
+
encoder_splits[2]_target_model = encoder_splits[2]_compile_job.get_target_model()
|
397 |
+
# Trace model
|
398 |
+
encoder_splits[3]_input_shape = encoder_splits[3]_model.get_input_spec()
|
399 |
+
encoder_splits[3]_sample_inputs = encoder_splits[3]_model.sample_inputs()
|
400 |
+
|
401 |
+
traced_encoder_splits[3]_model = torch.jit.trace(encoder_splits[3]_model, [torch.tensor(data[0]) for _, data in encoder_splits[3]_sample_inputs.items()])
|
402 |
+
|
403 |
+
# Compile model on a specific device
|
404 |
+
encoder_splits[3]_compile_job = hub.submit_compile_job(
|
405 |
+
model=traced_encoder_splits[3]_model ,
|
406 |
+
device=device,
|
407 |
+
input_specs=encoder_splits[3]_model.get_input_spec(),
|
408 |
+
)
|
409 |
+
|
410 |
+
# Get target model to run on-device
|
411 |
+
encoder_splits[3]_target_model = encoder_splits[3]_compile_job.get_target_model()
|
412 |
+
# Trace model
|
413 |
+
encoder_splits[4]_input_shape = encoder_splits[4]_model.get_input_spec()
|
414 |
+
encoder_splits[4]_sample_inputs = encoder_splits[4]_model.sample_inputs()
|
415 |
+
|
416 |
+
traced_encoder_splits[4]_model = torch.jit.trace(encoder_splits[4]_model, [torch.tensor(data[0]) for _, data in encoder_splits[4]_sample_inputs.items()])
|
417 |
+
|
418 |
+
# Compile model on a specific device
|
419 |
+
encoder_splits[4]_compile_job = hub.submit_compile_job(
|
420 |
+
model=traced_encoder_splits[4]_model ,
|
421 |
+
device=device,
|
422 |
+
input_specs=encoder_splits[4]_model.get_input_spec(),
|
423 |
+
)
|
424 |
+
|
425 |
+
# Get target model to run on-device
|
426 |
+
encoder_splits[4]_target_model = encoder_splits[4]_compile_job.get_target_model()
|
427 |
+
# Trace model
|
428 |
+
encoder_splits[5]_input_shape = encoder_splits[5]_model.get_input_spec()
|
429 |
+
encoder_splits[5]_sample_inputs = encoder_splits[5]_model.sample_inputs()
|
430 |
+
|
431 |
+
traced_encoder_splits[5]_model = torch.jit.trace(encoder_splits[5]_model, [torch.tensor(data[0]) for _, data in encoder_splits[5]_sample_inputs.items()])
|
432 |
+
|
433 |
+
# Compile model on a specific device
|
434 |
+
encoder_splits[5]_compile_job = hub.submit_compile_job(
|
435 |
+
model=traced_encoder_splits[5]_model ,
|
436 |
+
device=device,
|
437 |
+
input_specs=encoder_splits[5]_model.get_input_spec(),
|
438 |
+
)
|
439 |
+
|
440 |
+
# Get target model to run on-device
|
441 |
+
encoder_splits[5]_target_model = encoder_splits[5]_compile_job.get_target_model()
|
442 |
|
443 |
```
|
444 |
|
|
|
450 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
451 |
provided job URL to view a variety of on-device performance metrics.
|
452 |
```python
|
453 |
+
decoder_profile_job = hub.submit_profile_job(
|
454 |
+
model=decoder_target_model,
|
455 |
device=device,
|
456 |
)
|
457 |
+
encoder_splits[0]_profile_job = hub.submit_profile_job(
|
458 |
+
model=encoder_splits[0]_target_model,
|
459 |
+
device=device,
|
460 |
+
)
|
461 |
+
encoder_splits[1]_profile_job = hub.submit_profile_job(
|
462 |
+
model=encoder_splits[1]_target_model,
|
463 |
+
device=device,
|
464 |
+
)
|
465 |
+
encoder_splits[2]_profile_job = hub.submit_profile_job(
|
466 |
+
model=encoder_splits[2]_target_model,
|
467 |
+
device=device,
|
468 |
+
)
|
469 |
+
encoder_splits[3]_profile_job = hub.submit_profile_job(
|
470 |
+
model=encoder_splits[3]_target_model,
|
471 |
+
device=device,
|
472 |
+
)
|
473 |
+
encoder_splits[4]_profile_job = hub.submit_profile_job(
|
474 |
+
model=encoder_splits[4]_target_model,
|
475 |
+
device=device,
|
476 |
+
)
|
477 |
+
encoder_splits[5]_profile_job = hub.submit_profile_job(
|
478 |
+
model=encoder_splits[5]_target_model,
|
479 |
device=device,
|
480 |
)
|
481 |
|
|
|
486 |
To verify the accuracy of the model on-device, you can run on-device inference
|
487 |
on sample input data on the same cloud hosted device.
|
488 |
```python
|
489 |
+
decoder_input_data = decoder_model.sample_inputs()
|
490 |
+
decoder_inference_job = hub.submit_inference_job(
|
491 |
+
model=decoder_target_model,
|
492 |
+
device=device,
|
493 |
+
inputs=decoder_input_data,
|
494 |
+
)
|
495 |
+
decoder_inference_job.download_output_data()
|
496 |
+
encoder_splits[0]_input_data = encoder_splits[0]_model.sample_inputs()
|
497 |
+
encoder_splits[0]_inference_job = hub.submit_inference_job(
|
498 |
+
model=encoder_splits[0]_target_model,
|
499 |
+
device=device,
|
500 |
+
inputs=encoder_splits[0]_input_data,
|
501 |
+
)
|
502 |
+
encoder_splits[0]_inference_job.download_output_data()
|
503 |
+
encoder_splits[1]_input_data = encoder_splits[1]_model.sample_inputs()
|
504 |
+
encoder_splits[1]_inference_job = hub.submit_inference_job(
|
505 |
+
model=encoder_splits[1]_target_model,
|
506 |
+
device=device,
|
507 |
+
inputs=encoder_splits[1]_input_data,
|
508 |
+
)
|
509 |
+
encoder_splits[1]_inference_job.download_output_data()
|
510 |
+
encoder_splits[2]_input_data = encoder_splits[2]_model.sample_inputs()
|
511 |
+
encoder_splits[2]_inference_job = hub.submit_inference_job(
|
512 |
+
model=encoder_splits[2]_target_model,
|
513 |
+
device=device,
|
514 |
+
inputs=encoder_splits[2]_input_data,
|
515 |
+
)
|
516 |
+
encoder_splits[2]_inference_job.download_output_data()
|
517 |
+
encoder_splits[3]_input_data = encoder_splits[3]_model.sample_inputs()
|
518 |
+
encoder_splits[3]_inference_job = hub.submit_inference_job(
|
519 |
+
model=encoder_splits[3]_target_model,
|
520 |
+
device=device,
|
521 |
+
inputs=encoder_splits[3]_input_data,
|
522 |
+
)
|
523 |
+
encoder_splits[3]_inference_job.download_output_data()
|
524 |
+
encoder_splits[4]_input_data = encoder_splits[4]_model.sample_inputs()
|
525 |
+
encoder_splits[4]_inference_job = hub.submit_inference_job(
|
526 |
+
model=encoder_splits[4]_target_model,
|
527 |
device=device,
|
528 |
+
inputs=encoder_splits[4]_input_data,
|
529 |
)
|
530 |
+
encoder_splits[4]_inference_job.download_output_data()
|
531 |
+
encoder_splits[5]_input_data = encoder_splits[5]_model.sample_inputs()
|
532 |
+
encoder_splits[5]_inference_job = hub.submit_inference_job(
|
533 |
+
model=encoder_splits[5]_target_model,
|
534 |
device=device,
|
535 |
+
inputs=encoder_splits[5]_input_data,
|
536 |
)
|
537 |
+
encoder_splits[5]_inference_job.download_output_data()
|
538 |
|
539 |
```
|
540 |
With the output of the model, you can compute like PSNR, relative errors or
|