Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -35,29 +35,30 @@ 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 |
-
| FaceAttribNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.
|
39 |
-
| FaceAttribNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.
|
40 |
-
| FaceAttribNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.
|
41 |
-
| FaceAttribNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.
|
42 |
-
| FaceAttribNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.
|
43 |
-
| FaceAttribNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.
|
44 |
| FaceAttribNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.658 ms | 0 - 60 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
45 |
-
| FaceAttribNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.
|
46 |
-
| FaceAttribNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.
|
47 |
-
| FaceAttribNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.
|
48 |
-
| FaceAttribNet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.
|
49 |
-
| FaceAttribNet |
|
50 |
-
| FaceAttribNet | SA8255 (Proxy) | SA8255P Proxy |
|
51 |
-
| FaceAttribNet |
|
52 |
-
| FaceAttribNet |
|
53 |
-
| FaceAttribNet |
|
54 |
-
| FaceAttribNet | SA8650 (Proxy) | SA8650P Proxy |
|
55 |
-
| FaceAttribNet |
|
56 |
-
| FaceAttribNet |
|
57 |
-
| FaceAttribNet |
|
58 |
-
| FaceAttribNet | QCS8450 (Proxy) | QCS8450 Proxy |
|
59 |
-
| FaceAttribNet |
|
60 |
-
| FaceAttribNet | Snapdragon X Elite CRD | Snapdragon® X Elite |
|
|
|
61 |
|
62 |
|
63 |
|
@@ -122,7 +123,7 @@ FaceAttribNet
|
|
122 |
Device : Samsung Galaxy S23 (13)
|
123 |
Runtime : TFLITE
|
124 |
Estimated inference time (ms) : 1.0
|
125 |
-
Estimated peak memory usage (MB): [0,
|
126 |
Total # Ops : 161
|
127 |
Compute Unit(s) : NPU (161 ops)
|
128 |
```
|
@@ -143,13 +144,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
143 |
import torch
|
144 |
|
145 |
import qai_hub as hub
|
146 |
-
from qai_hub_models.models.face_attrib_net import
|
147 |
|
148 |
# Load the model
|
|
|
149 |
|
150 |
# Device
|
151 |
device = hub.Device("Samsung Galaxy S23")
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
```
|
155 |
|
|
|
35 |
|
36 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
|---|---|---|---|---|---|---|---|---|
|
38 |
+
| FaceAttribNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.958 ms | 0 - 106 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
39 |
+
| FaceAttribNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.035 ms | 0 - 66 MB | FP16 | NPU | [FaceAttribNet.so](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.so) |
|
40 |
+
| FaceAttribNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.221 ms | 0 - 30 MB | FP16 | NPU | [FaceAttribNet.onnx](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.onnx) |
|
41 |
+
| FaceAttribNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.728 ms | 0 - 21 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
42 |
+
| FaceAttribNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.778 ms | 0 - 23 MB | FP16 | NPU | [FaceAttribNet.so](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.so) |
|
43 |
+
| FaceAttribNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.935 ms | 0 - 114 MB | FP16 | NPU | [FaceAttribNet.onnx](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.onnx) |
|
44 |
| FaceAttribNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.658 ms | 0 - 60 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
45 |
+
| FaceAttribNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.651 ms | 0 - 21 MB | FP16 | NPU | Use Export Script |
|
46 |
+
| FaceAttribNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.866 ms | 0 - 62 MB | FP16 | NPU | [FaceAttribNet.onnx](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.onnx) |
|
47 |
+
| FaceAttribNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.949 ms | 0 - 106 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
48 |
+
| FaceAttribNet | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.984 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
|
49 |
+
| FaceAttribNet | SA7255P ADP | SA7255P | QNN | 30.142 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
50 |
+
| FaceAttribNet | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.967 ms | 0 - 106 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
51 |
+
| FaceAttribNet | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.006 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
|
52 |
+
| FaceAttribNet | SA8295P ADP | SA8295P | TFLITE | 1.666 ms | 0 - 17 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
53 |
+
| FaceAttribNet | SA8295P ADP | SA8295P | QNN | 1.902 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
54 |
+
| FaceAttribNet | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.958 ms | 0 - 106 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
55 |
+
| FaceAttribNet | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.004 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
|
56 |
+
| FaceAttribNet | SA8775P ADP | SA8775P | TFLITE | 1.779 ms | 0 - 20 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
57 |
+
| FaceAttribNet | SA8775P ADP | SA8775P | QNN | 1.958 ms | 0 - 5 MB | FP16 | NPU | Use Export Script |
|
58 |
+
| FaceAttribNet | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.276 ms | 0 - 22 MB | FP16 | NPU | [FaceAttribNet.tflite](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.tflite) |
|
59 |
+
| FaceAttribNet | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.34 ms | 0 - 22 MB | FP16 | NPU | Use Export Script |
|
60 |
+
| FaceAttribNet | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.12 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
|
61 |
+
| FaceAttribNet | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.241 ms | 27 - 27 MB | FP16 | NPU | [FaceAttribNet.onnx](https://huggingface.co/qualcomm/FaceAttribNet/blob/main/FaceAttribNet.onnx) |
|
62 |
|
63 |
|
64 |
|
|
|
123 |
Device : Samsung Galaxy S23 (13)
|
124 |
Runtime : TFLITE
|
125 |
Estimated inference time (ms) : 1.0
|
126 |
+
Estimated peak memory usage (MB): [0, 106]
|
127 |
Total # Ops : 161
|
128 |
Compute Unit(s) : NPU (161 ops)
|
129 |
```
|
|
|
144 |
import torch
|
145 |
|
146 |
import qai_hub as hub
|
147 |
+
from qai_hub_models.models.face_attrib_net 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 |
|