Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -34,29 +34,31 @@ More details on model performance across various devices, can be found
|
|
34 |
|
35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
36 |
|---|---|---|---|---|---|---|---|---|
|
37 |
-
| Posenet-Mobilenet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.
|
38 |
-
| Posenet-Mobilenet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.
|
39 |
-
| Posenet-Mobilenet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.
|
40 |
-
| Posenet-Mobilenet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.962 ms | 0 -
|
41 |
-
| Posenet-Mobilenet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.
|
42 |
-
| Posenet-Mobilenet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.
|
43 |
-
| Posenet-Mobilenet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE |
|
44 |
-
| Posenet-Mobilenet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN |
|
45 |
-
| Posenet-Mobilenet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.
|
46 |
-
| Posenet-Mobilenet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.
|
47 |
-
| Posenet-Mobilenet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.
|
48 |
-
| Posenet-Mobilenet |
|
49 |
-
| Posenet-Mobilenet |
|
50 |
-
| Posenet-Mobilenet |
|
51 |
-
| Posenet-Mobilenet |
|
52 |
-
| Posenet-Mobilenet |
|
53 |
-
| Posenet-Mobilenet |
|
54 |
-
| Posenet-Mobilenet |
|
55 |
-
| Posenet-Mobilenet |
|
56 |
-
| Posenet-Mobilenet |
|
57 |
-
| Posenet-Mobilenet |
|
58 |
-
| Posenet-Mobilenet |
|
59 |
-
| Posenet-Mobilenet |
|
|
|
|
|
60 |
|
61 |
|
62 |
|
@@ -121,7 +123,7 @@ Posenet-Mobilenet
|
|
121 |
Device : Samsung Galaxy S23 (13)
|
122 |
Runtime : TFLITE
|
123 |
Estimated inference time (ms) : 1.4
|
124 |
-
Estimated peak memory usage (MB): [0,
|
125 |
Total # Ops : 41
|
126 |
Compute Unit(s) : NPU (41 ops)
|
127 |
```
|
@@ -142,13 +144,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
142 |
import torch
|
143 |
|
144 |
import qai_hub as hub
|
145 |
-
from qai_hub_models.models.posenet_mobilenet import
|
146 |
|
147 |
# Load the model
|
|
|
148 |
|
149 |
# Device
|
150 |
device = hub.Device("Samsung Galaxy S23")
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
```
|
154 |
|
|
|
34 |
|
35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
36 |
|---|---|---|---|---|---|---|---|---|
|
37 |
+
| Posenet-Mobilenet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.39 ms | 0 - 150 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
38 |
+
| Posenet-Mobilenet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.461 ms | 0 - 12 MB | FP16 | NPU | [Posenet-Mobilenet.so](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.so) |
|
39 |
+
| Posenet-Mobilenet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.899 ms | 0 - 8 MB | FP16 | NPU | [Posenet-Mobilenet.onnx](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.onnx) |
|
40 |
+
| Posenet-Mobilenet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.962 ms | 0 - 16 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
41 |
+
| Posenet-Mobilenet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 1.017 ms | 0 - 15 MB | FP16 | NPU | [Posenet-Mobilenet.so](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.so) |
|
42 |
+
| Posenet-Mobilenet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 1.326 ms | 0 - 45 MB | FP16 | NPU | [Posenet-Mobilenet.onnx](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.onnx) |
|
43 |
+
| Posenet-Mobilenet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 1.007 ms | 0 - 12 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
44 |
+
| Posenet-Mobilenet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.835 ms | 0 - 14 MB | FP16 | NPU | Use Export Script |
|
45 |
+
| Posenet-Mobilenet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 1.3 ms | 0 - 24 MB | FP16 | NPU | [Posenet-Mobilenet.onnx](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.onnx) |
|
46 |
+
| Posenet-Mobilenet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.38 ms | 0 - 21 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
47 |
+
| Posenet-Mobilenet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.402 ms | 2 - 3 MB | FP16 | NPU | Use Export Script |
|
48 |
+
| Posenet-Mobilenet | SA7255P ADP | SA7255P | TFLITE | 53.854 ms | 0 - 13 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
49 |
+
| Posenet-Mobilenet | SA7255P ADP | SA7255P | QNN | 54.108 ms | 2 - 7 MB | FP16 | NPU | Use Export Script |
|
50 |
+
| Posenet-Mobilenet | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.389 ms | 0 - 22 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
51 |
+
| Posenet-Mobilenet | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.412 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
|
52 |
+
| Posenet-Mobilenet | SA8295P ADP | SA8295P | TFLITE | 2.796 ms | 0 - 12 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
53 |
+
| Posenet-Mobilenet | SA8295P ADP | SA8295P | QNN | 3.159 ms | 0 - 5 MB | FP16 | NPU | Use Export Script |
|
54 |
+
| Posenet-Mobilenet | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 1.383 ms | 0 - 22 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
55 |
+
| Posenet-Mobilenet | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.411 ms | 2 - 3 MB | FP16 | NPU | Use Export Script |
|
56 |
+
| Posenet-Mobilenet | SA8775P ADP | SA8775P | TFLITE | 2.874 ms | 0 - 14 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
57 |
+
| Posenet-Mobilenet | SA8775P ADP | SA8775P | QNN | 3.09 ms | 2 - 7 MB | FP16 | NPU | Use Export Script |
|
58 |
+
| Posenet-Mobilenet | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 2.197 ms | 0 - 18 MB | FP16 | NPU | [Posenet-Mobilenet.tflite](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.tflite) |
|
59 |
+
| Posenet-Mobilenet | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.272 ms | 2 - 20 MB | FP16 | NPU | Use Export Script |
|
60 |
+
| Posenet-Mobilenet | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.583 ms | 2 - 2 MB | FP16 | NPU | Use Export Script |
|
61 |
+
| Posenet-Mobilenet | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 2.26 ms | 7 - 7 MB | FP16 | NPU | [Posenet-Mobilenet.onnx](https://huggingface.co/qualcomm/Posenet-Mobilenet/blob/main/Posenet-Mobilenet.onnx) |
|
62 |
|
63 |
|
64 |
|
|
|
123 |
Device : Samsung Galaxy S23 (13)
|
124 |
Runtime : TFLITE
|
125 |
Estimated inference time (ms) : 1.4
|
126 |
+
Estimated peak memory usage (MB): [0, 150]
|
127 |
Total # Ops : 41
|
128 |
Compute Unit(s) : NPU (41 ops)
|
129 |
```
|
|
|
144 |
import torch
|
145 |
|
146 |
import qai_hub as hub
|
147 |
+
from qai_hub_models.models.posenet_mobilenet import Model
|
148 |
|
149 |
# Load the model
|
150 |
+
torch_model = Model.from_pretrained()
|
151 |
|
152 |
# Device
|
153 |
device = hub.Device("Samsung Galaxy S23")
|
154 |
|
155 |
+
# Trace model
|
156 |
+
input_shape = torch_model.get_input_spec()
|
157 |
+
sample_inputs = torch_model.sample_inputs()
|
158 |
+
|
159 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
160 |
+
|
161 |
+
# Compile model on a specific device
|
162 |
+
compile_job = hub.submit_compile_job(
|
163 |
+
model=pt_model,
|
164 |
+
device=device,
|
165 |
+
input_specs=torch_model.get_input_spec(),
|
166 |
+
)
|
167 |
+
|
168 |
+
# Get target model to run on-device
|
169 |
+
target_model = compile_job.get_target_model()
|
170 |
|
171 |
```
|
172 |
|