Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -34,19 +34,20 @@ 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-DC5 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE |
|
38 |
-
| DETR-ResNet50-DC5 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX |
|
39 |
-
| DETR-ResNet50-DC5 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE |
|
40 |
-
| DETR-ResNet50-DC5 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX |
|
41 |
-
| DETR-ResNet50-DC5 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE |
|
42 |
-
| DETR-ResNet50-DC5 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX |
|
43 |
-
| DETR-ResNet50-DC5 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE |
|
44 |
-
| DETR-ResNet50-DC5 |
|
45 |
-
| DETR-ResNet50-DC5 |
|
46 |
-
| DETR-ResNet50-DC5 |
|
47 |
-
| DETR-ResNet50-DC5 |
|
48 |
-
| DETR-ResNet50-DC5 |
|
49 |
-
| DETR-ResNet50-DC5 |
|
|
|
50 |
|
51 |
|
52 |
|
@@ -111,8 +112,8 @@ Profiling Results
|
|
111 |
DETR-ResNet50-DC5
|
112 |
Device : Samsung Galaxy S23 (13)
|
113 |
Runtime : TFLITE
|
114 |
-
Estimated inference time (ms) :
|
115 |
-
Estimated peak memory usage (MB): [0,
|
116 |
Total # Ops : 789
|
117 |
Compute Unit(s) : NPU (789 ops)
|
118 |
```
|
@@ -133,13 +134,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_dc5 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-DC5 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 84.968 ms | 0 - 46 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
38 |
+
| DETR-ResNet50-DC5 | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 70.957 ms | 0 - 96 MB | FP16 | NPU | [DETR-ResNet50-DC5.onnx](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.onnx) |
|
39 |
+
| DETR-ResNet50-DC5 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 60.654 ms | 0 - 148 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
40 |
+
| DETR-ResNet50-DC5 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 53.404 ms | 3 - 476 MB | FP16 | NPU | [DETR-ResNet50-DC5.onnx](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.onnx) |
|
41 |
+
| DETR-ResNet50-DC5 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 49.391 ms | 0 - 155 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
42 |
+
| DETR-ResNet50-DC5 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 44.861 ms | 0 - 269 MB | FP16 | NPU | [DETR-ResNet50-DC5.onnx](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.onnx) |
|
43 |
+
| DETR-ResNet50-DC5 | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 85.054 ms | 0 - 51 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
44 |
+
| DETR-ResNet50-DC5 | SA7255P ADP | SA7255P | TFLITE | 631.553 ms | 0 - 155 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
45 |
+
| DETR-ResNet50-DC5 | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 84.991 ms | 0 - 45 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
46 |
+
| DETR-ResNet50-DC5 | SA8295P ADP | SA8295P | TFLITE | 94.835 ms | 0 - 137 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
47 |
+
| DETR-ResNet50-DC5 | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 86.776 ms | 0 - 54 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
48 |
+
| DETR-ResNet50-DC5 | SA8775P ADP | SA8775P | TFLITE | 95.923 ms | 0 - 154 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
49 |
+
| DETR-ResNet50-DC5 | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 98.287 ms | 0 - 135 MB | FP16 | NPU | [DETR-ResNet50-DC5.tflite](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.tflite) |
|
50 |
+
| DETR-ResNet50-DC5 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 65.507 ms | 83 - 83 MB | FP16 | NPU | [DETR-ResNet50-DC5.onnx](https://huggingface.co/qualcomm/DETR-ResNet50-DC5/blob/main/DETR-ResNet50-DC5.onnx) |
|
51 |
|
52 |
|
53 |
|
|
|
112 |
DETR-ResNet50-DC5
|
113 |
Device : Samsung Galaxy S23 (13)
|
114 |
Runtime : TFLITE
|
115 |
+
Estimated inference time (ms) : 85.0
|
116 |
+
Estimated peak memory usage (MB): [0, 46]
|
117 |
Total # Ops : 789
|
118 |
Compute Unit(s) : NPU (789 ops)
|
119 |
```
|
|
|
134 |
import torch
|
135 |
|
136 |
import qai_hub as hub
|
137 |
+
from qai_hub_models.models.detr_resnet50_dc5 import Model
|
138 |
|
139 |
# Load the model
|
140 |
+
torch_model = Model.from_pretrained()
|
141 |
|
142 |
# Device
|
143 |
device = hub.Device("Samsung Galaxy S23")
|
144 |
|
145 |
+
# Trace model
|
146 |
+
input_shape = torch_model.get_input_spec()
|
147 |
+
sample_inputs = torch_model.sample_inputs()
|
148 |
+
|
149 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
150 |
+
|
151 |
+
# Compile model on a specific device
|
152 |
+
compile_job = hub.submit_compile_job(
|
153 |
+
model=pt_model,
|
154 |
+
device=device,
|
155 |
+
input_specs=torch_model.get_input_spec(),
|
156 |
+
)
|
157 |
+
|
158 |
+
# Get target model to run on-device
|
159 |
+
target_model = compile_job.get_target_model()
|
160 |
|
161 |
```
|
162 |
|