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 |
-
| Real-ESRGAN-x4plus | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE |
|
| 38 |
-
| Real-ESRGAN-x4plus | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN |
|
| 39 |
-
| Real-ESRGAN-x4plus | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX |
|
| 40 |
-
| Real-ESRGAN-x4plus | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE |
|
| 41 |
-
| Real-ESRGAN-x4plus | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 50.
|
| 42 |
-
| Real-ESRGAN-x4plus | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 53.
|
| 43 |
-
| Real-ESRGAN-x4plus | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE |
|
| 44 |
-
| Real-ESRGAN-x4plus | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN |
|
| 45 |
-
| Real-ESRGAN-x4plus | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX |
|
| 46 |
-
| Real-ESRGAN-x4plus | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE |
|
| 47 |
-
| Real-ESRGAN-x4plus | QCS8550 (Proxy) | QCS8550 Proxy | QNN |
|
| 48 |
-
| Real-ESRGAN-x4plus |
|
| 49 |
-
| Real-ESRGAN-x4plus |
|
| 50 |
-
| Real-ESRGAN-x4plus |
|
| 51 |
-
| Real-ESRGAN-x4plus |
|
| 52 |
-
| Real-ESRGAN-x4plus |
|
| 53 |
-
| Real-ESRGAN-x4plus |
|
| 54 |
-
| Real-ESRGAN-x4plus |
|
| 55 |
-
| Real-ESRGAN-x4plus |
|
| 56 |
-
| Real-ESRGAN-x4plus |
|
| 57 |
-
| Real-ESRGAN-x4plus |
|
| 58 |
-
| Real-ESRGAN-x4plus |
|
| 59 |
-
| Real-ESRGAN-x4plus |
|
|
|
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
|
|
@@ -121,8 +123,8 @@ Profiling Results
|
|
| 121 |
Real-ESRGAN-x4plus
|
| 122 |
Device : Samsung Galaxy S23 (13)
|
| 123 |
Runtime : TFLITE
|
| 124 |
-
Estimated inference time (ms) :
|
| 125 |
-
Estimated peak memory usage (MB): [
|
| 126 |
Total # Ops : 1028
|
| 127 |
Compute Unit(s) : NPU (1028 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.real_esrgan_x4plus import
|
| 147 |
|
| 148 |
# Load the model
|
|
|
|
| 149 |
|
| 150 |
# Device
|
| 151 |
device = hub.Device("Samsung Galaxy S23")
|
| 152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
```
|
| 155 |
|
|
|
|
| 34 |
|
| 35 |
| Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
| 36 |
|---|---|---|---|---|---|---|---|---|
|
| 37 |
+
| Real-ESRGAN-x4plus | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 70.24 ms | 0 - 114 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 38 |
+
| Real-ESRGAN-x4plus | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 67.48 ms | 0 - 36 MB | FP16 | NPU | [Real-ESRGAN-x4plus.so](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.so) |
|
| 39 |
+
| Real-ESRGAN-x4plus | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 65.834 ms | 0 - 42 MB | FP16 | NPU | [Real-ESRGAN-x4plus.onnx](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.onnx) |
|
| 40 |
+
| Real-ESRGAN-x4plus | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 51.62 ms | 196 - 304 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 41 |
+
| Real-ESRGAN-x4plus | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 50.354 ms | 0 - 107 MB | FP16 | NPU | [Real-ESRGAN-x4plus.so](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.so) |
|
| 42 |
+
| Real-ESRGAN-x4plus | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 53.489 ms | 8 - 700 MB | FP16 | NPU | [Real-ESRGAN-x4plus.onnx](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.onnx) |
|
| 43 |
+
| Real-ESRGAN-x4plus | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 43.169 ms | 3 - 135 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 44 |
+
| Real-ESRGAN-x4plus | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 38.318 ms | 0 - 132 MB | FP16 | NPU | Use Export Script |
|
| 45 |
+
| Real-ESRGAN-x4plus | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 42.84 ms | 0 - 177 MB | FP16 | NPU | [Real-ESRGAN-x4plus.onnx](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.onnx) |
|
| 46 |
+
| Real-ESRGAN-x4plus | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 71.114 ms | 0 - 217 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 47 |
+
| Real-ESRGAN-x4plus | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 62.862 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
|
| 48 |
+
| Real-ESRGAN-x4plus | SA7255P ADP | SA7255P | TFLITE | 3549.899 ms | 0 - 134 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 49 |
+
| Real-ESRGAN-x4plus | SA7255P ADP | SA7255P | QNN | 3549.353 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
| 50 |
+
| Real-ESRGAN-x4plus | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 69.977 ms | 3 - 44 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 51 |
+
| Real-ESRGAN-x4plus | SA8255 (Proxy) | SA8255P Proxy | QNN | 67.209 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
|
| 52 |
+
| Real-ESRGAN-x4plus | SA8295P ADP | SA8295P | TFLITE | 113.248 ms | 3 - 125 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 53 |
+
| Real-ESRGAN-x4plus | SA8295P ADP | SA8295P | QNN | 113.219 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
|
| 54 |
+
| Real-ESRGAN-x4plus | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 68.292 ms | 0 - 217 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 55 |
+
| Real-ESRGAN-x4plus | SA8650 (Proxy) | SA8650P Proxy | QNN | 63.047 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
|
| 56 |
+
| Real-ESRGAN-x4plus | SA8775P ADP | SA8775P | TFLITE | 132.705 ms | 3 - 136 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 57 |
+
| Real-ESRGAN-x4plus | SA8775P ADP | SA8775P | QNN | 131.262 ms | 0 - 5 MB | FP16 | NPU | Use Export Script |
|
| 58 |
+
| Real-ESRGAN-x4plus | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 133.383 ms | 3 - 106 MB | FP16 | NPU | [Real-ESRGAN-x4plus.tflite](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.tflite) |
|
| 59 |
+
| Real-ESRGAN-x4plus | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 140.758 ms | 0 - 86 MB | FP16 | NPU | Use Export Script |
|
| 60 |
+
| Real-ESRGAN-x4plus | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 65.114 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
|
| 61 |
+
| Real-ESRGAN-x4plus | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 65.633 ms | 38 - 38 MB | FP16 | NPU | [Real-ESRGAN-x4plus.onnx](https://huggingface.co/qualcomm/Real-ESRGAN-x4plus/blob/main/Real-ESRGAN-x4plus.onnx) |
|
| 62 |
|
| 63 |
|
| 64 |
|
|
|
|
| 123 |
Real-ESRGAN-x4plus
|
| 124 |
Device : Samsung Galaxy S23 (13)
|
| 125 |
Runtime : TFLITE
|
| 126 |
+
Estimated inference time (ms) : 70.2
|
| 127 |
+
Estimated peak memory usage (MB): [0, 114]
|
| 128 |
Total # Ops : 1028
|
| 129 |
Compute Unit(s) : NPU (1028 ops)
|
| 130 |
```
|
|
|
|
| 145 |
import torch
|
| 146 |
|
| 147 |
import qai_hub as hub
|
| 148 |
+
from qai_hub_models.models.real_esrgan_x4plus 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 |
|