Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -35,20 +35,20 @@ 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 |
-
| FastSam-S | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 8.
|
39 |
-
| FastSam-S | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 9.
|
40 |
-
| FastSam-S | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN |
|
41 |
-
| FastSam-S | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 6.
|
42 |
-
| FastSam-S | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 5.
|
43 |
-
| FastSam-S | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX |
|
44 |
-
| FastSam-S | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 7.
|
45 |
-
| FastSam-S |
|
46 |
-
| FastSam-S |
|
47 |
-
| FastSam-S |
|
48 |
-
| FastSam-S |
|
49 |
-
| FastSam-S |
|
50 |
-
| FastSam-S |
|
51 |
-
| FastSam-S | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 9.
|
52 |
|
53 |
|
54 |
|
@@ -114,7 +114,7 @@ FastSam-S
|
|
114 |
Device : Samsung Galaxy S23 (13)
|
115 |
Runtime : QNN
|
116 |
Estimated inference time (ms) : 8.1
|
117 |
-
Estimated peak memory usage (MB): [5,
|
118 |
Total # Ops : 286
|
119 |
Compute Unit(s) : NPU (286 ops)
|
120 |
```
|
@@ -135,13 +135,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
135 |
import torch
|
136 |
|
137 |
import qai_hub as hub
|
138 |
-
from qai_hub_models.models.fastsam_s import
|
139 |
|
140 |
# Load the model
|
|
|
141 |
|
142 |
# Device
|
143 |
device = hub.Device("Samsung Galaxy S23")
|
144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
|
146 |
```
|
147 |
|
|
|
35 |
|
36 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
|---|---|---|---|---|---|---|---|---|
|
38 |
+
| FastSam-S | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 8.104 ms | 5 - 22 MB | FP16 | NPU | [FastSam-S.so](https://huggingface.co/qualcomm/FastSam-S/blob/main/FastSam-S.so) |
|
39 |
+
| FastSam-S | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 9.535 ms | 3 - 24 MB | FP16 | NPU | [FastSam-S.onnx](https://huggingface.co/qualcomm/FastSam-S/blob/main/FastSam-S.onnx) |
|
40 |
+
| FastSam-S | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 5.994 ms | 67 - 104 MB | FP16 | NPU | [FastSam-S.so](https://huggingface.co/qualcomm/FastSam-S/blob/main/FastSam-S.so) |
|
41 |
+
| FastSam-S | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 6.6 ms | 15 - 97 MB | FP16 | NPU | [FastSam-S.onnx](https://huggingface.co/qualcomm/FastSam-S/blob/main/FastSam-S.onnx) |
|
42 |
+
| FastSam-S | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 5.49 ms | 5 - 35 MB | FP16 | NPU | Use Export Script |
|
43 |
+
| FastSam-S | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 5.363 ms | 16 - 64 MB | FP16 | NPU | [FastSam-S.onnx](https://huggingface.co/qualcomm/FastSam-S/blob/main/FastSam-S.onnx) |
|
44 |
+
| FastSam-S | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 7.622 ms | 5 - 6 MB | FP16 | NPU | Use Export Script |
|
45 |
+
| FastSam-S | SA7255P ADP | SA7255P | QNN | 257.585 ms | 5 - 10 MB | FP16 | NPU | Use Export Script |
|
46 |
+
| FastSam-S | SA8255 (Proxy) | SA8255P Proxy | QNN | 7.649 ms | 5 - 10 MB | FP16 | NPU | Use Export Script |
|
47 |
+
| FastSam-S | SA8295P ADP | SA8295P | QNN | 13.964 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
48 |
+
| FastSam-S | SA8650 (Proxy) | SA8650P Proxy | QNN | 7.68 ms | 5 - 6 MB | FP16 | NPU | Use Export Script |
|
49 |
+
| FastSam-S | SA8775P ADP | SA8775P | QNN | 14.14 ms | 2 - 7 MB | FP16 | NPU | Use Export Script |
|
50 |
+
| FastSam-S | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 14.048 ms | 5 - 38 MB | FP16 | NPU | Use Export Script |
|
51 |
+
| FastSam-S | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 9.897 ms | 20 - 20 MB | FP16 | NPU | [FastSam-S.onnx](https://huggingface.co/qualcomm/FastSam-S/blob/main/FastSam-S.onnx) |
|
52 |
|
53 |
|
54 |
|
|
|
114 |
Device : Samsung Galaxy S23 (13)
|
115 |
Runtime : QNN
|
116 |
Estimated inference time (ms) : 8.1
|
117 |
+
Estimated peak memory usage (MB): [5, 22]
|
118 |
Total # Ops : 286
|
119 |
Compute Unit(s) : NPU (286 ops)
|
120 |
```
|
|
|
135 |
import torch
|
136 |
|
137 |
import qai_hub as hub
|
138 |
+
from qai_hub_models.models.fastsam_s import Model
|
139 |
|
140 |
# Load the model
|
141 |
+
torch_model = Model.from_pretrained()
|
142 |
|
143 |
# Device
|
144 |
device = hub.Device("Samsung Galaxy S23")
|
145 |
|
146 |
+
# Trace model
|
147 |
+
input_shape = torch_model.get_input_spec()
|
148 |
+
sample_inputs = torch_model.sample_inputs()
|
149 |
+
|
150 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
151 |
+
|
152 |
+
# Compile model on a specific device
|
153 |
+
compile_job = hub.submit_compile_job(
|
154 |
+
model=pt_model,
|
155 |
+
device=device,
|
156 |
+
input_specs=torch_model.get_input_spec(),
|
157 |
+
)
|
158 |
+
|
159 |
+
# Get target model to run on-device
|
160 |
+
target_model = compile_job.get_target_model()
|
161 |
|
162 |
```
|
163 |
|