Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -36,27 +36,29 @@ More details on model performance across various devices, can be found
|
|
36 |
|
37 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
38 |
|---|---|---|---|---|---|---|---|---|
|
39 |
-
| FCN-ResNet50-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 15.
|
40 |
-
| FCN-ResNet50-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 17.
|
41 |
-
| FCN-ResNet50-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 11.
|
42 |
-
| FCN-ResNet50-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 12.
|
43 |
-
| FCN-ResNet50-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 9.
|
44 |
-
| FCN-ResNet50-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN |
|
45 |
-
| FCN-ResNet50-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN |
|
46 |
-
| FCN-ResNet50-Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE |
|
47 |
-
| FCN-ResNet50-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 15.
|
48 |
-
| FCN-ResNet50-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 14.
|
49 |
-
| FCN-ResNet50-Quantized |
|
50 |
-
| FCN-ResNet50-Quantized |
|
51 |
-
| FCN-ResNet50-Quantized |
|
52 |
-
| FCN-ResNet50-Quantized |
|
53 |
-
| FCN-ResNet50-Quantized |
|
54 |
-
| FCN-ResNet50-Quantized |
|
55 |
-
| FCN-ResNet50-Quantized |
|
56 |
-
| FCN-ResNet50-Quantized |
|
57 |
-
| FCN-ResNet50-Quantized |
|
58 |
-
| FCN-ResNet50-Quantized |
|
59 |
-
| FCN-ResNet50-Quantized |
|
|
|
|
|
60 |
|
61 |
|
62 |
|
@@ -121,8 +123,8 @@ Profiling Results
|
|
121 |
FCN-ResNet50-Quantized
|
122 |
Device : Samsung Galaxy S23 (13)
|
123 |
Runtime : TFLITE
|
124 |
-
Estimated inference time (ms) : 15.
|
125 |
-
Estimated peak memory usage (MB): [0,
|
126 |
Total # Ops : 90
|
127 |
Compute Unit(s) : NPU (90 ops)
|
128 |
```
|
@@ -143,13 +145,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.fcn_resnet50_quantized import
|
147 |
|
148 |
# Load the model
|
|
|
149 |
|
150 |
# Device
|
151 |
device = hub.Device("Samsung Galaxy S23")
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
```
|
155 |
|
|
|
36 |
|
37 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
38 |
|---|---|---|---|---|---|---|---|---|
|
39 |
+
| FCN-ResNet50-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 15.139 ms | 0 - 18 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
40 |
+
| FCN-ResNet50-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 17.116 ms | 0 - 18 MB | INT8 | NPU | [FCN-ResNet50-Quantized.so](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.so) |
|
41 |
+
| FCN-ResNet50-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 11.353 ms | 0 - 45 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
42 |
+
| FCN-ResNet50-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 12.899 ms | 1 - 42 MB | INT8 | NPU | [FCN-ResNet50-Quantized.so](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.so) |
|
43 |
+
| FCN-ResNet50-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 9.425 ms | 0 - 40 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
44 |
+
| FCN-ResNet50-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 10.79 ms | 1 - 41 MB | INT8 | NPU | Use Export Script |
|
45 |
+
| FCN-ResNet50-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 139.127 ms | 1 - 9 MB | INT8 | NPU | Use Export Script |
|
46 |
+
| FCN-ResNet50-Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 1383.08 ms | 87 - 158 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
47 |
+
| FCN-ResNet50-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 15.186 ms | 0 - 16 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
48 |
+
| FCN-ResNet50-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 14.114 ms | 1 - 2 MB | INT8 | NPU | Use Export Script |
|
49 |
+
| FCN-ResNet50-Quantized | SA7255P ADP | SA7255P | TFLITE | 270.259 ms | 0 - 39 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
50 |
+
| FCN-ResNet50-Quantized | SA7255P ADP | SA7255P | QNN | 268.117 ms | 1 - 7 MB | INT8 | NPU | Use Export Script |
|
51 |
+
| FCN-ResNet50-Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 15.144 ms | 0 - 18 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
52 |
+
| FCN-ResNet50-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 14.237 ms | 1 - 3 MB | INT8 | NPU | Use Export Script |
|
53 |
+
| FCN-ResNet50-Quantized | SA8295P ADP | SA8295P | TFLITE | 22.346 ms | 0 - 39 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
54 |
+
| FCN-ResNet50-Quantized | SA8295P ADP | SA8295P | QNN | 21.046 ms | 1 - 6 MB | INT8 | NPU | Use Export Script |
|
55 |
+
| FCN-ResNet50-Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 15.187 ms | 0 - 24 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
56 |
+
| FCN-ResNet50-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 14.208 ms | 1 - 2 MB | INT8 | NPU | Use Export Script |
|
57 |
+
| FCN-ResNet50-Quantized | SA8775P ADP | SA8775P | TFLITE | 18.77 ms | 0 - 39 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
58 |
+
| FCN-ResNet50-Quantized | SA8775P ADP | SA8775P | QNN | 17.772 ms | 1 - 7 MB | INT8 | NPU | Use Export Script |
|
59 |
+
| FCN-ResNet50-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 17.903 ms | 0 - 49 MB | INT8 | NPU | [FCN-ResNet50-Quantized.tflite](https://huggingface.co/qualcomm/FCN-ResNet50-Quantized/blob/main/FCN-ResNet50-Quantized.tflite) |
|
60 |
+
| FCN-ResNet50-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 19.761 ms | 1 - 44 MB | INT8 | NPU | Use Export Script |
|
61 |
+
| FCN-ResNet50-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 14.577 ms | 1 - 1 MB | INT8 | NPU | Use Export Script |
|
62 |
|
63 |
|
64 |
|
|
|
123 |
FCN-ResNet50-Quantized
|
124 |
Device : Samsung Galaxy S23 (13)
|
125 |
Runtime : TFLITE
|
126 |
+
Estimated inference time (ms) : 15.1
|
127 |
+
Estimated peak memory usage (MB): [0, 18]
|
128 |
Total # Ops : 90
|
129 |
Compute Unit(s) : NPU (90 ops)
|
130 |
```
|
|
|
145 |
import torch
|
146 |
|
147 |
import qai_hub as hub
|
148 |
+
from qai_hub_models.models.fcn_resnet50_quantized import Model
|
149 |
|
150 |
# Load the model
|
151 |
+
torch_model = Model.from_pretrained()
|
152 |
|
153 |
# Device
|
154 |
device = hub.Device("Samsung Galaxy S23")
|
155 |
|
156 |
+
# Trace model
|
157 |
+
input_shape = torch_model.get_input_spec()
|
158 |
+
sample_inputs = torch_model.sample_inputs()
|
159 |
+
|
160 |
+
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
161 |
+
|
162 |
+
# Compile model on a specific device
|
163 |
+
compile_job = hub.submit_compile_job(
|
164 |
+
model=pt_model,
|
165 |
+
device=device,
|
166 |
+
input_specs=torch_model.get_input_spec(),
|
167 |
+
)
|
168 |
+
|
169 |
+
# Get target model to run on-device
|
170 |
+
target_model = compile_job.get_target_model()
|
171 |
|
172 |
```
|
173 |
|