qaihm-bot commited on
Commit
9f60ac1
·
verified ·
1 Parent(s): d5418c3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +79 -107
README.md CHANGED
@@ -36,64 +36,64 @@ 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
- | MediaPipePoseDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.778 ms | 0 - 26 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
40
- | MediaPipePoseDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.762 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.so) |
41
- | MediaPipePoseDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 0.93 ms | 0 - 12 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.onnx) |
42
- | MediaPipePoseDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.611 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
43
- | MediaPipePoseDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.554 ms | 0 - 20 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.so) |
44
- | MediaPipePoseDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.672 ms | 0 - 30 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.onnx) |
45
- | MediaPipePoseDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.458 ms | 0 - 18 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
46
- | MediaPipePoseDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.555 ms | 0 - 17 MB | FP16 | NPU | Use Export Script |
47
- | MediaPipePoseDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.688 ms | 0 - 18 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.onnx) |
48
- | MediaPipePoseDetector | SA7255P ADP | SA7255P | TFLITE | 37.855 ms | 0 - 15 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
49
- | MediaPipePoseDetector | SA7255P ADP | SA7255P | QNN | 37.769 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
50
- | MediaPipePoseDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.779 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
51
- | MediaPipePoseDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.757 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
52
- | MediaPipePoseDetector | SA8295P ADP | SA8295P | TFLITE | 2.358 ms | 0 - 19 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
53
- | MediaPipePoseDetector | SA8295P ADP | SA8295P | QNN | 2.319 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
54
- | MediaPipePoseDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.786 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
55
- | MediaPipePoseDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.76 ms | 0 - 3 MB | FP16 | NPU | Use Export Script |
56
- | MediaPipePoseDetector | SA8775P ADP | SA8775P | TFLITE | 1.776 ms | 0 - 16 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
57
- | MediaPipePoseDetector | SA8775P ADP | SA8775P | QNN | 1.736 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
58
- | MediaPipePoseDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 37.855 ms | 0 - 15 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
59
- | MediaPipePoseDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 37.769 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
60
- | MediaPipePoseDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.787 ms | 0 - 26 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
61
- | MediaPipePoseDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.762 ms | 0 - 3 MB | FP16 | NPU | Use Export Script |
62
- | MediaPipePoseDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 1.776 ms | 0 - 16 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
63
- | MediaPipePoseDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 1.736 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
64
- | MediaPipePoseDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.966 ms | 0 - 21 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.tflite) |
65
- | MediaPipePoseDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 2.043 ms | 0 - 26 MB | FP16 | NPU | Use Export Script |
66
- | MediaPipePoseDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.887 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
67
- | MediaPipePoseDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.943 ms | 2 - 2 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseDetector.onnx) |
68
- | MediaPipePoseLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.817 ms | 0 - 70 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
69
- | MediaPipePoseLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.897 ms | 1 - 3 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.so) |
70
- | MediaPipePoseLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.116 ms | 0 - 32 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.onnx) |
71
- | MediaPipePoseLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.612 ms | 0 - 50 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
72
- | MediaPipePoseLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.562 ms | 0 - 21 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.so) |
73
- | MediaPipePoseLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.788 ms | 0 - 50 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.onnx) |
74
- | MediaPipePoseLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.555 ms | 0 - 33 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
75
- | MediaPipePoseLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.552 ms | 1 - 27 MB | FP16 | NPU | Use Export Script |
76
- | MediaPipePoseLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.764 ms | 1 - 28 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.onnx) |
77
- | MediaPipePoseLandmarkDetector | SA7255P ADP | SA7255P | TFLITE | 17.165 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
78
- | MediaPipePoseLandmarkDetector | SA7255P ADP | SA7255P | QNN | 17.111 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
79
- | MediaPipePoseLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.818 ms | 0 - 70 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
80
- | MediaPipePoseLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.796 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
81
- | MediaPipePoseLandmarkDetector | SA8295P ADP | SA8295P | TFLITE | 1.458 ms | 0 - 25 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
82
- | MediaPipePoseLandmarkDetector | SA8295P ADP | SA8295P | QNN | 1.38 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
83
- | MediaPipePoseLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.81 ms | 0 - 70 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
84
- | MediaPipePoseLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.898 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
85
- | MediaPipePoseLandmarkDetector | SA8775P ADP | SA8775P | TFLITE | 1.629 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
86
- | MediaPipePoseLandmarkDetector | SA8775P ADP | SA8775P | QNN | 1.574 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
87
- | MediaPipePoseLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 17.165 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
88
- | MediaPipePoseLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 17.111 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
89
- | MediaPipePoseLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.807 ms | 0 - 71 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
90
- | MediaPipePoseLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.811 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
91
- | MediaPipePoseLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 1.629 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
92
- | MediaPipePoseLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 1.574 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
93
- | MediaPipePoseLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.111 ms | 0 - 46 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.tflite) |
94
- | MediaPipePoseLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.147 ms | 1 - 38 MB | FP16 | NPU | Use Export Script |
95
- | MediaPipePoseLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.007 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
96
- | MediaPipePoseLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.164 ms | 7 - 7 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/MediaPipePoseLandmarkDetector.onnx) |
97
 
98
 
99
 
@@ -154,20 +154,20 @@ python -m qai_hub_models.models.mediapipe_pose.export
154
  ```
155
  Profiling Results
156
  ------------------------------------------------------------
157
- MediaPipePoseDetector
158
  Device : Samsung Galaxy S23 (13)
159
  Runtime : TFLITE
160
  Estimated inference time (ms) : 0.8
161
- Estimated peak memory usage (MB): [0, 26]
162
  Total # Ops : 106
163
  Compute Unit(s) : NPU (106 ops)
164
 
165
  ------------------------------------------------------------
166
- MediaPipePoseLandmarkDetector
167
  Device : Samsung Galaxy S23 (13)
168
  Runtime : TFLITE
169
  Estimated inference time (ms) : 0.8
170
- Estimated peak memory usage (MB): [0, 70]
171
  Total # Ops : 219
172
  Compute Unit(s) : NPU (219 ops)
173
  ```
@@ -191,43 +191,26 @@ import qai_hub as hub
191
  from qai_hub_models.models.mediapipe_pose import Model
192
 
193
  # Load the model
194
- model = Model.from_pretrained()
195
- pose_detector_model = model.pose_detector
196
- pose_landmark_detector_model = model.pose_landmark_detector
197
 
198
  # Device
199
- device = hub.Device("Samsung Galaxy S23")
200
 
201
  # Trace model
202
- pose_detector_input_shape = pose_detector_model.get_input_spec()
203
- pose_detector_sample_inputs = pose_detector_model.sample_inputs()
204
 
205
- traced_pose_detector_model = torch.jit.trace(pose_detector_model, [torch.tensor(data[0]) for _, data in pose_detector_sample_inputs.items()])
206
 
207
  # Compile model on a specific device
208
- pose_detector_compile_job = hub.submit_compile_job(
209
- model=traced_pose_detector_model ,
210
  device=device,
211
- input_specs=pose_detector_model.get_input_spec(),
212
  )
213
 
214
  # Get target model to run on-device
215
- pose_detector_target_model = pose_detector_compile_job.get_target_model()
216
- # Trace model
217
- pose_landmark_detector_input_shape = pose_landmark_detector_model.get_input_spec()
218
- pose_landmark_detector_sample_inputs = pose_landmark_detector_model.sample_inputs()
219
-
220
- traced_pose_landmark_detector_model = torch.jit.trace(pose_landmark_detector_model, [torch.tensor(data[0]) for _, data in pose_landmark_detector_sample_inputs.items()])
221
-
222
- # Compile model on a specific device
223
- pose_landmark_detector_compile_job = hub.submit_compile_job(
224
- model=traced_pose_landmark_detector_model ,
225
- device=device,
226
- input_specs=pose_landmark_detector_model.get_input_spec(),
227
- )
228
-
229
- # Get target model to run on-device
230
- pose_landmark_detector_target_model = pose_landmark_detector_compile_job.get_target_model()
231
 
232
  ```
233
 
@@ -239,15 +222,11 @@ After compiling models from step 1. Models can be profiled model on-device using
239
  provisioned in the cloud. Once the job is submitted, you can navigate to a
240
  provided job URL to view a variety of on-device performance metrics.
241
  ```python
242
- pose_detector_profile_job = hub.submit_profile_job(
243
- model=pose_detector_target_model,
244
- device=device,
245
- )
246
- pose_landmark_detector_profile_job = hub.submit_profile_job(
247
- model=pose_landmark_detector_target_model,
248
  device=device,
249
  )
250
-
251
  ```
252
 
253
  Step 3: **Verify on-device accuracy**
@@ -255,20 +234,13 @@ Step 3: **Verify on-device accuracy**
255
  To verify the accuracy of the model on-device, you can run on-device inference
256
  on sample input data on the same cloud hosted device.
257
  ```python
258
- pose_detector_input_data = pose_detector_model.sample_inputs()
259
- pose_detector_inference_job = hub.submit_inference_job(
260
- model=pose_detector_target_model,
261
- device=device,
262
- inputs=pose_detector_input_data,
263
- )
264
- pose_detector_inference_job.download_output_data()
265
- pose_landmark_detector_input_data = pose_landmark_detector_model.sample_inputs()
266
- pose_landmark_detector_inference_job = hub.submit_inference_job(
267
- model=pose_landmark_detector_target_model,
268
  device=device,
269
- inputs=pose_landmark_detector_input_data,
270
  )
271
- pose_landmark_detector_inference_job.download_output_data()
272
 
273
  ```
274
  With the output of the model, you can compute like PSNR, relative errors or
 
36
 
37
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
38
  |---|---|---|---|---|---|---|---|---|
39
+ | PoseDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.786 ms | 0 - 28 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
40
+ | PoseDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.761 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.so) |
41
+ | PoseDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 0.907 ms | 0 - 12 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.onnx) |
42
+ | PoseDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.573 ms | 0 - 28 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
43
+ | PoseDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.567 ms | 0 - 18 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.so) |
44
+ | PoseDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.648 ms | 0 - 28 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.onnx) |
45
+ | PoseDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.565 ms | 0 - 24 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
46
+ | PoseDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.454 ms | 0 - 15 MB | FP16 | NPU | Use Export Script |
47
+ | PoseDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.689 ms | 0 - 19 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.onnx) |
48
+ | PoseDetector | SA7255P ADP | SA7255P | TFLITE | 37.857 ms | 0 - 15 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
49
+ | PoseDetector | SA7255P ADP | SA7255P | QNN | 37.821 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
50
+ | PoseDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.777 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
51
+ | PoseDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.755 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
52
+ | PoseDetector | SA8295P ADP | SA8295P | TFLITE | 2.336 ms | 0 - 19 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
53
+ | PoseDetector | SA8295P ADP | SA8295P | QNN | 2.349 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
54
+ | PoseDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.78 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
55
+ | PoseDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.756 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
56
+ | PoseDetector | SA8775P ADP | SA8775P | TFLITE | 1.782 ms | 0 - 15 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
57
+ | PoseDetector | SA8775P ADP | SA8775P | QNN | 1.736 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
58
+ | PoseDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 37.857 ms | 0 - 15 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
59
+ | PoseDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 37.821 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
60
+ | PoseDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.788 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
61
+ | PoseDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.753 ms | 0 - 3 MB | FP16 | NPU | Use Export Script |
62
+ | PoseDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 1.782 ms | 0 - 15 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
63
+ | PoseDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 1.736 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
64
+ | PoseDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.972 ms | 0 - 30 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.tflite) |
65
+ | PoseDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.969 ms | 0 - 28 MB | FP16 | NPU | Use Export Script |
66
+ | PoseDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.88 ms | 0 - 0 MB | FP16 | NPU | Use Export Script |
67
+ | PoseDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.938 ms | 2 - 2 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseDetector.onnx) |
68
+ | PoseLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.816 ms | 0 - 68 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
69
+ | PoseLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.82 ms | 1 - 3 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.so) |
70
+ | PoseLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.114 ms | 0 - 34 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.onnx) |
71
+ | PoseLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.572 ms | 0 - 49 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
72
+ | PoseLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.601 ms | 1 - 20 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.so](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.so) |
73
+ | PoseLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.766 ms | 0 - 49 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.onnx) |
74
+ | PoseLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.555 ms | 0 - 30 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
75
+ | PoseLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.56 ms | 1 - 24 MB | FP16 | NPU | Use Export Script |
76
+ | PoseLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.651 ms | 1 - 30 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.onnx) |
77
+ | PoseLandmarkDetector | SA7255P ADP | SA7255P | TFLITE | 17.205 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
78
+ | PoseLandmarkDetector | SA7255P ADP | SA7255P | QNN | 17.082 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
79
+ | PoseLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.818 ms | 0 - 69 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
80
+ | PoseLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.832 ms | 1 - 4 MB | FP16 | NPU | Use Export Script |
81
+ | PoseLandmarkDetector | SA8295P ADP | SA8295P | TFLITE | 1.439 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
82
+ | PoseLandmarkDetector | SA8295P ADP | SA8295P | QNN | 1.383 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
83
+ | PoseLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.822 ms | 0 - 71 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
84
+ | PoseLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.794 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
85
+ | PoseLandmarkDetector | SA8775P ADP | SA8775P | TFLITE | 1.673 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
86
+ | PoseLandmarkDetector | SA8775P ADP | SA8775P | QNN | 1.601 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
87
+ | PoseLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 17.205 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
88
+ | PoseLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 17.082 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
89
+ | PoseLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.818 ms | 0 - 69 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
90
+ | PoseLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.797 ms | 1 - 4 MB | FP16 | NPU | Use Export Script |
91
+ | PoseLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 1.673 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
92
+ | PoseLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 1.601 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
93
+ | PoseLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.146 ms | 0 - 46 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.tflite](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.tflite) |
94
+ | PoseLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.141 ms | 1 - 39 MB | FP16 | NPU | Use Export Script |
95
+ | PoseLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.013 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
96
+ | PoseLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.133 ms | 7 - 7 MB | FP16 | NPU | [MediaPipe-Pose-Estimation.onnx](https://huggingface.co/qualcomm/MediaPipe-Pose-Estimation/blob/main/PoseLandmarkDetector.onnx) |
97
 
98
 
99
 
 
154
  ```
155
  Profiling Results
156
  ------------------------------------------------------------
157
+ PoseDetector
158
  Device : Samsung Galaxy S23 (13)
159
  Runtime : TFLITE
160
  Estimated inference time (ms) : 0.8
161
+ Estimated peak memory usage (MB): [0, 28]
162
  Total # Ops : 106
163
  Compute Unit(s) : NPU (106 ops)
164
 
165
  ------------------------------------------------------------
166
+ PoseLandmarkDetector
167
  Device : Samsung Galaxy S23 (13)
168
  Runtime : TFLITE
169
  Estimated inference time (ms) : 0.8
170
+ Estimated peak memory usage (MB): [0, 68]
171
  Total # Ops : 219
172
  Compute Unit(s) : NPU (219 ops)
173
  ```
 
191
  from qai_hub_models.models.mediapipe_pose import Model
192
 
193
  # Load the model
194
+ torch_model = Model.from_pretrained()
 
 
195
 
196
  # Device
197
+ device = hub.Device("Samsung Galaxy S24")
198
 
199
  # Trace model
200
+ input_shape = torch_model.get_input_spec()
201
+ sample_inputs = torch_model.sample_inputs()
202
 
203
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
204
 
205
  # Compile model on a specific device
206
+ compile_job = hub.submit_compile_job(
207
+ model=pt_model,
208
  device=device,
209
+ input_specs=torch_model.get_input_spec(),
210
  )
211
 
212
  # Get target model to run on-device
213
+ target_model = compile_job.get_target_model()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
 
215
  ```
216
 
 
222
  provisioned in the cloud. Once the job is submitted, you can navigate to a
223
  provided job URL to view a variety of on-device performance metrics.
224
  ```python
225
+ profile_job = hub.submit_profile_job(
226
+ model=target_model,
 
 
 
 
227
  device=device,
228
  )
229
+
230
  ```
231
 
232
  Step 3: **Verify on-device accuracy**
 
234
  To verify the accuracy of the model on-device, you can run on-device inference
235
  on sample input data on the same cloud hosted device.
236
  ```python
237
+ input_data = torch_model.sample_inputs()
238
+ inference_job = hub.submit_inference_job(
239
+ model=target_model,
 
 
 
 
 
 
 
240
  device=device,
241
+ inputs=input_data,
242
  )
243
+ on_device_output = inference_job.download_output_data()
244
 
245
  ```
246
  With the output of the model, you can compute like PSNR, relative errors or