Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -35,8 +35,8 @@ More details on model performance across various devices, can be found
|
|
35 |
|
36 |
| Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
| ---|---|---|---|---|---|---|---|
|
38 |
-
| Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | TFLite | 5.
|
39 |
-
| Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | QNN Model Library | 5.
|
40 |
|
41 |
|
42 |
|
@@ -98,9 +98,9 @@ python -m qai_hub_models.models.yolov8_det.export
|
|
98 |
```
|
99 |
Profile Job summary of YOLOv8-Detection
|
100 |
--------------------------------------------------
|
101 |
-
Device:
|
102 |
-
Estimated Inference Time: 5.
|
103 |
-
Estimated Peak Memory Range: 4.
|
104 |
Compute Units: NPU (285) | Total (285)
|
105 |
|
106 |
|
@@ -122,29 +122,13 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
|
|
122 |
import torch
|
123 |
|
124 |
import qai_hub as hub
|
125 |
-
from qai_hub_models.models.yolov8_det import
|
126 |
|
127 |
# Load the model
|
128 |
-
torch_model = Model.from_pretrained()
|
129 |
|
130 |
# Device
|
131 |
device = hub.Device("Samsung Galaxy S23")
|
132 |
|
133 |
-
# Trace model
|
134 |
-
input_shape = torch_model.get_input_spec()
|
135 |
-
sample_inputs = torch_model.sample_inputs()
|
136 |
-
|
137 |
-
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
|
138 |
-
|
139 |
-
# Compile model on a specific device
|
140 |
-
compile_job = hub.submit_compile_job(
|
141 |
-
model=pt_model,
|
142 |
-
device=device,
|
143 |
-
input_specs=torch_model.get_input_spec(),
|
144 |
-
)
|
145 |
-
|
146 |
-
# Get target model to run on-device
|
147 |
-
target_model = compile_job.get_target_model()
|
148 |
|
149 |
```
|
150 |
|
@@ -157,10 +141,10 @@ provisioned in the cloud. Once the job is submitted, you can navigate to a
|
|
157 |
provided job URL to view a variety of on-device performance metrics.
|
158 |
```python
|
159 |
profile_job = hub.submit_profile_job(
|
160 |
-
|
161 |
-
|
162 |
-
)
|
163 |
-
|
164 |
```
|
165 |
|
166 |
Step 3: **Verify on-device accuracy**
|
@@ -170,12 +154,11 @@ on sample input data on the same cloud hosted device.
|
|
170 |
```python
|
171 |
input_data = torch_model.sample_inputs()
|
172 |
inference_job = hub.submit_inference_job(
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
)
|
177 |
-
|
178 |
-
on_device_output = inference_job.download_output_data()
|
179 |
|
180 |
```
|
181 |
With the output of the model, you can compute like PSNR, relative errors or
|
|
|
35 |
|
36 |
| Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
|
37 |
| ---|---|---|---|---|---|---|---|
|
38 |
+
| Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | TFLite | 5.212 ms | 0 - 2 MB | FP16 | NPU | [YOLOv8-Detection.tflite](https://huggingface.co/qualcomm/YOLOv8-Detection/blob/main/YOLOv8-Detection.tflite)
|
39 |
+
| Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | QNN Model Library | 5.206 ms | 4 - 18 MB | FP16 | NPU | [YOLOv8-Detection.so](https://huggingface.co/qualcomm/YOLOv8-Detection/blob/main/YOLOv8-Detection.so)
|
40 |
|
41 |
|
42 |
|
|
|
98 |
```
|
99 |
Profile Job summary of YOLOv8-Detection
|
100 |
--------------------------------------------------
|
101 |
+
Device: Snapdragon X Elite CRD (11)
|
102 |
+
Estimated Inference Time: 5.79 ms
|
103 |
+
Estimated Peak Memory Range: 4.70-4.70 MB
|
104 |
Compute Units: NPU (285) | Total (285)
|
105 |
|
106 |
|
|
|
122 |
import torch
|
123 |
|
124 |
import qai_hub as hub
|
125 |
+
from qai_hub_models.models.yolov8_det import
|
126 |
|
127 |
# Load the model
|
|
|
128 |
|
129 |
# Device
|
130 |
device = hub.Device("Samsung Galaxy S23")
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
```
|
134 |
|
|
|
141 |
provided job URL to view a variety of on-device performance metrics.
|
142 |
```python
|
143 |
profile_job = hub.submit_profile_job(
|
144 |
+
model=target_model,
|
145 |
+
device=device,
|
146 |
+
)
|
147 |
+
|
148 |
```
|
149 |
|
150 |
Step 3: **Verify on-device accuracy**
|
|
|
154 |
```python
|
155 |
input_data = torch_model.sample_inputs()
|
156 |
inference_job = hub.submit_inference_job(
|
157 |
+
model=target_model,
|
158 |
+
device=device,
|
159 |
+
inputs=input_data,
|
160 |
+
)
|
161 |
+
on_device_output = inference_job.download_output_data()
|
|
|
162 |
|
163 |
```
|
164 |
With the output of the model, you can compute like PSNR, relative errors or
|