Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -34,19 +34,19 @@ 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 |
-
| DETR-ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE |
|
38 |
-
| DETR-ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 12.
|
39 |
-
| DETR-ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 7.
|
40 |
-
| DETR-ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 8.
|
41 |
-
| DETR-ResNet50 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 7.
|
42 |
-
| DETR-ResNet50 |
|
43 |
-
| DETR-ResNet50 |
|
44 |
-
| DETR-ResNet50 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 10.
|
45 |
-
| DETR-ResNet50 |
|
46 |
-
| DETR-ResNet50 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 10.
|
47 |
-
| DETR-ResNet50 |
|
48 |
-
| DETR-ResNet50 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 14.
|
49 |
-
| DETR-ResNet50 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 13.
|
50 |
|
51 |
|
52 |
|
@@ -111,8 +111,8 @@ Profiling Results
|
|
111 |
DETR-ResNet50
|
112 |
Device : Samsung Galaxy S23 (13)
|
113 |
Runtime : TFLITE
|
114 |
-
Estimated inference time (ms) :
|
115 |
-
Estimated peak memory usage (MB): [0,
|
116 |
Total # Ops : 788
|
117 |
Compute Unit(s) : NPU (788 ops)
|
118 |
```
|
@@ -133,13 +133,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
133 |
import torch
|
134 |
|
135 |
import qai_hub as hub
|
136 |
-
from qai_hub_models.models.detr_resnet50 import
|
137 |
|
138 |
# Load the model
|
|
|
139 |
|
140 |
# Device
|
141 |
device = hub.Device("Samsung Galaxy S23")
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
```
|
145 |
|
|
|
34 |
|
35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
36 |
|---|---|---|---|---|---|---|---|---|
|
37 |
+
| DETR-ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 10.819 ms | 0 - 24 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
38 |
+
| DETR-ResNet50 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 12.164 ms | 0 - 406 MB | FP16 | NPU | [DETR-ResNet50.onnx](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.onnx) |
|
39 |
+
| DETR-ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 7.712 ms | 0 - 66 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
40 |
+
| DETR-ResNet50 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 8.834 ms | 3 - 217 MB | FP16 | NPU | [DETR-ResNet50.onnx](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.onnx) |
|
41 |
+
| DETR-ResNet50 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 7.269 ms | 0 - 65 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
42 |
+
| DETR-ResNet50 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 10.852 ms | 0 - 26 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
43 |
+
| DETR-ResNet50 | SA7255P ADP | SA7255P | TFLITE | 309.163 ms | 0 - 65 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
44 |
+
| DETR-ResNet50 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 10.817 ms | 0 - 26 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
45 |
+
| DETR-ResNet50 | SA8295P ADP | SA8295P | TFLITE | 16.397 ms | 0 - 46 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
46 |
+
| DETR-ResNet50 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 10.831 ms | 0 - 32 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
47 |
+
| DETR-ResNet50 | SA8775P ADP | SA8775P | TFLITE | 18.402 ms | 0 - 64 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
48 |
+
| DETR-ResNet50 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 14.437 ms | 0 - 47 MB | FP16 | NPU | [DETR-ResNet50.tflite](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.tflite) |
|
49 |
+
| DETR-ResNet50 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 13.381 ms | 79 - 79 MB | FP16 | NPU | [DETR-ResNet50.onnx](https://huggingface.co/qualcomm/DETR-ResNet50/blob/main/DETR-ResNet50.onnx) |
|
50 |
|
51 |
|
52 |
|
|
|
111 |
DETR-ResNet50
|
112 |
Device : Samsung Galaxy S23 (13)
|
113 |
Runtime : TFLITE
|
114 |
+
Estimated inference time (ms) : 10.8
|
115 |
+
Estimated peak memory usage (MB): [0, 24]
|
116 |
Total # Ops : 788
|
117 |
Compute Unit(s) : NPU (788 ops)
|
118 |
```
|
|
|
133 |
import torch
|
134 |
|
135 |
import qai_hub as hub
|
136 |
+
from qai_hub_models.models.detr_resnet50 import Model
|
137 |
|
138 |
# Load the model
|
139 |
+
torch_model = Model.from_pretrained()
|
140 |
|
141 |
# Device
|
142 |
device = hub.Device("Samsung Galaxy S23")
|
143 |
|
144 |
+
# Trace model
|
145 |
+
input_shape = torch_model.get_input_spec()
|
146 |
+
sample_inputs = torch_model.sample_inputs()
|
147 |
+
|
148 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
149 |
+
|
150 |
+
# Compile model on a specific device
|
151 |
+
compile_job = hub.submit_compile_job(
|
152 |
+
model=pt_model,
|
153 |
+
device=device,
|
154 |
+
input_specs=torch_model.get_input_spec(),
|
155 |
+
)
|
156 |
+
|
157 |
+
# Get target model to run on-device
|
158 |
+
target_model = compile_job.get_target_model()
|
159 |
|
160 |
```
|
161 |
|