qaihm-bot commited on
Commit
edd6f19
·
verified ·
1 Parent(s): 3886967

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +78 -106
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
- | MediaPipeHandDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.737 ms | 0 - 31 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
40
- | MediaPipeHandDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.712 ms | 1 - 3 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.so) |
41
- | MediaPipeHandDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.007 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.onnx) |
42
- | MediaPipeHandDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.542 ms | 0 - 32 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
43
- | MediaPipeHandDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.527 ms | 0 - 18 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.so) |
44
- | MediaPipeHandDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.694 ms | 0 - 38 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.onnx) |
45
- | MediaPipeHandDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.609 ms | 0 - 26 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
46
- | MediaPipeHandDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.535 ms | 0 - 20 MB | FP16 | NPU | Use Export Script |
47
- | MediaPipeHandDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.72 ms | 1 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.onnx) |
48
- | MediaPipeHandDetector | SA7255P ADP | SA7255P | TFLITE | 24.617 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
49
- | MediaPipeHandDetector | SA7255P ADP | SA7255P | QNN | 24.625 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
50
- | MediaPipeHandDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.743 ms | 0 - 31 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
51
- | MediaPipeHandDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.712 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
52
- | MediaPipeHandDetector | SA8295P ADP | SA8295P | TFLITE | 1.742 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
53
- | MediaPipeHandDetector | SA8295P ADP | SA8295P | QNN | 1.678 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
54
- | MediaPipeHandDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.738 ms | 0 - 32 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
55
- | MediaPipeHandDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.709 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
56
- | MediaPipeHandDetector | SA8775P ADP | SA8775P | TFLITE | 1.554 ms | 0 - 21 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
57
- | MediaPipeHandDetector | SA8775P ADP | SA8775P | QNN | 1.488 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
58
- | MediaPipeHandDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 24.617 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
59
- | MediaPipeHandDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 24.625 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
60
- | MediaPipeHandDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.734 ms | 0 - 30 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
61
- | MediaPipeHandDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.706 ms | 1 - 4 MB | FP16 | NPU | Use Export Script |
62
- | MediaPipeHandDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 1.554 ms | 0 - 21 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
63
- | MediaPipeHandDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 1.488 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
64
- | MediaPipeHandDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.426 ms | 0 - 29 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.tflite) |
65
- | MediaPipeHandDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.406 ms | 1 - 27 MB | FP16 | NPU | Use Export Script |
66
- | MediaPipeHandDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.857 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
67
- | MediaPipeHandDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.018 ms | 4 - 4 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandDetector.onnx) |
68
- | MediaPipeHandLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.017 ms | 0 - 63 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
69
- | MediaPipeHandLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.011 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.so) |
70
- | MediaPipeHandLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.338 ms | 0 - 42 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.onnx) |
71
- | MediaPipeHandLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.756 ms | 0 - 36 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
72
- | MediaPipeHandLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.748 ms | 1 - 20 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.so) |
73
- | MediaPipeHandLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.948 ms | 0 - 37 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.onnx) |
74
- | MediaPipeHandLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.706 ms | 0 - 28 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
75
- | MediaPipeHandLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.7 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
76
- | MediaPipeHandLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.902 ms | 1 - 23 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.onnx) |
77
- | MediaPipeHandLandmarkDetector | SA7255P ADP | SA7255P | TFLITE | 35.408 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
78
- | MediaPipeHandLandmarkDetector | SA7255P ADP | SA7255P | QNN | 35.37 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
79
- | MediaPipeHandLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.015 ms | 0 - 64 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
80
- | MediaPipeHandLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.031 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
81
- | MediaPipeHandLandmarkDetector | SA8295P ADP | SA8295P | TFLITE | 2.325 ms | 0 - 23 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
82
- | MediaPipeHandLandmarkDetector | SA8295P ADP | SA8295P | QNN | 2.248 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
83
- | MediaPipeHandLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.999 ms | 0 - 64 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
84
- | MediaPipeHandLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.018 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
85
- | MediaPipeHandLandmarkDetector | SA8775P ADP | SA8775P | TFLITE | 2.216 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
86
- | MediaPipeHandLandmarkDetector | SA8775P ADP | SA8775P | QNN | 2.143 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
87
- | MediaPipeHandLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 35.408 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
88
- | MediaPipeHandLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 35.37 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
89
- | MediaPipeHandLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.01 ms | 0 - 64 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
90
- | MediaPipeHandLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.005 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
91
- | MediaPipeHandLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 2.216 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
92
- | MediaPipeHandLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 2.143 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
93
- | MediaPipeHandLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.945 ms | 0 - 34 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.tflite) |
94
- | MediaPipeHandLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.936 ms | 1 - 33 MB | FP16 | NPU | Use Export Script |
95
- | MediaPipeHandLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.218 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
96
- | MediaPipeHandLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.38 ms | 6 - 6 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/MediaPipeHandLandmarkDetector.onnx) |
97
 
98
 
99
 
@@ -154,7 +154,7 @@ python -m qai_hub_models.models.mediapipe_hand.export
154
  ```
155
  Profiling Results
156
  ------------------------------------------------------------
157
- MediaPipeHandDetector
158
  Device : Samsung Galaxy S23 (13)
159
  Runtime : TFLITE
160
  Estimated inference time (ms) : 0.7
@@ -163,11 +163,11 @@ Total # Ops : 149
163
  Compute Unit(s) : NPU (149 ops)
164
 
165
  ------------------------------------------------------------
166
- MediaPipeHandLandmarkDetector
167
  Device : Samsung Galaxy S23 (13)
168
  Runtime : TFLITE
169
  Estimated inference time (ms) : 1.0
170
- Estimated peak memory usage (MB): [0, 63]
171
  Total # Ops : 158
172
  Compute Unit(s) : NPU (158 ops)
173
  ```
@@ -191,43 +191,26 @@ import qai_hub as hub
191
  from qai_hub_models.models.mediapipe_hand import Model
192
 
193
  # Load the model
194
- model = Model.from_pretrained()
195
- hand_detector_model = model.hand_detector
196
- hand_landmark_detector_model = model.hand_landmark_detector
197
 
198
  # Device
199
- device = hub.Device("Samsung Galaxy S23")
200
 
201
  # Trace model
202
- hand_detector_input_shape = hand_detector_model.get_input_spec()
203
- hand_detector_sample_inputs = hand_detector_model.sample_inputs()
204
 
205
- traced_hand_detector_model = torch.jit.trace(hand_detector_model, [torch.tensor(data[0]) for _, data in hand_detector_sample_inputs.items()])
206
 
207
  # Compile model on a specific device
208
- hand_detector_compile_job = hub.submit_compile_job(
209
- model=traced_hand_detector_model ,
210
  device=device,
211
- input_specs=hand_detector_model.get_input_spec(),
212
  )
213
 
214
  # Get target model to run on-device
215
- hand_detector_target_model = hand_detector_compile_job.get_target_model()
216
- # Trace model
217
- hand_landmark_detector_input_shape = hand_landmark_detector_model.get_input_spec()
218
- hand_landmark_detector_sample_inputs = hand_landmark_detector_model.sample_inputs()
219
-
220
- traced_hand_landmark_detector_model = torch.jit.trace(hand_landmark_detector_model, [torch.tensor(data[0]) for _, data in hand_landmark_detector_sample_inputs.items()])
221
-
222
- # Compile model on a specific device
223
- hand_landmark_detector_compile_job = hub.submit_compile_job(
224
- model=traced_hand_landmark_detector_model ,
225
- device=device,
226
- input_specs=hand_landmark_detector_model.get_input_spec(),
227
- )
228
-
229
- # Get target model to run on-device
230
- hand_landmark_detector_target_model = hand_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
- hand_detector_profile_job = hub.submit_profile_job(
243
- model=hand_detector_target_model,
244
- device=device,
245
- )
246
- hand_landmark_detector_profile_job = hub.submit_profile_job(
247
- model=hand_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
- hand_detector_input_data = hand_detector_model.sample_inputs()
259
- hand_detector_inference_job = hub.submit_inference_job(
260
- model=hand_detector_target_model,
261
- device=device,
262
- inputs=hand_detector_input_data,
263
- )
264
- hand_detector_inference_job.download_output_data()
265
- hand_landmark_detector_input_data = hand_landmark_detector_model.sample_inputs()
266
- hand_landmark_detector_inference_job = hub.submit_inference_job(
267
- model=hand_landmark_detector_target_model,
268
  device=device,
269
- inputs=hand_landmark_detector_input_data,
270
  )
271
- hand_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
+ | HandDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.734 ms | 0 - 31 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
40
+ | HandDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.718 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.so) |
41
+ | HandDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.003 ms | 0 - 18 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.onnx) |
42
+ | HandDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.54 ms | 0 - 32 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
43
+ | HandDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.519 ms | 0 - 19 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.so) |
44
+ | HandDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.685 ms | 0 - 39 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.onnx) |
45
+ | HandDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.445 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
46
+ | HandDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.538 ms | 1 - 20 MB | FP16 | NPU | Use Export Script |
47
+ | HandDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.728 ms | 1 - 25 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.onnx) |
48
+ | HandDetector | SA7255P ADP | SA7255P | TFLITE | 24.662 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
49
+ | HandDetector | SA7255P ADP | SA7255P | QNN | 24.595 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
50
+ | HandDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.744 ms | 0 - 30 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
51
+ | HandDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.712 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
52
+ | HandDetector | SA8295P ADP | SA8295P | TFLITE | 1.741 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
53
+ | HandDetector | SA8295P ADP | SA8295P | QNN | 1.677 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
54
+ | HandDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.738 ms | 0 - 29 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
55
+ | HandDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.71 ms | 1 - 4 MB | FP16 | NPU | Use Export Script |
56
+ | HandDetector | SA8775P ADP | SA8775P | TFLITE | 1.575 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
57
+ | HandDetector | SA8775P ADP | SA8775P | QNN | 1.504 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
58
+ | HandDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 24.662 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
59
+ | HandDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 24.595 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
60
+ | HandDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.736 ms | 0 - 31 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
61
+ | HandDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.705 ms | 1 - 4 MB | FP16 | NPU | Use Export Script |
62
+ | HandDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 1.575 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
63
+ | HandDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 1.504 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
64
+ | HandDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.429 ms | 0 - 26 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.tflite) |
65
+ | HandDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.41 ms | 1 - 25 MB | FP16 | NPU | Use Export Script |
66
+ | HandDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.869 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
67
+ | HandDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.987 ms | 4 - 4 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandDetector.onnx) |
68
+ | HandLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 1.009 ms | 0 - 64 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
69
+ | HandLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 1.006 ms | 1 - 3 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.so) |
70
+ | HandLandmarkDetector | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.339 ms | 0 - 38 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.onnx) |
71
+ | HandLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.757 ms | 0 - 37 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
72
+ | HandLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.752 ms | 1 - 20 MB | FP16 | NPU | [MediaPipe-Hand-Detection.so](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.so) |
73
+ | HandLandmarkDetector | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.941 ms | 0 - 33 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.onnx) |
74
+ | HandLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.764 ms | 0 - 27 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
75
+ | HandLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.706 ms | 1 - 19 MB | FP16 | NPU | Use Export Script |
76
+ | HandLandmarkDetector | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.795 ms | 1 - 28 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.onnx) |
77
+ | HandLandmarkDetector | SA7255P ADP | SA7255P | TFLITE | 35.432 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
78
+ | HandLandmarkDetector | SA7255P ADP | SA7255P | QNN | 35.402 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
79
+ | HandLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 1.015 ms | 0 - 63 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
80
+ | HandLandmarkDetector | SA8255 (Proxy) | SA8255P Proxy | QNN | 1.004 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
81
+ | HandLandmarkDetector | SA8295P ADP | SA8295P | TFLITE | 2.291 ms | 0 - 23 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
82
+ | HandLandmarkDetector | SA8295P ADP | SA8295P | QNN | 2.212 ms | 0 - 18 MB | FP16 | NPU | Use Export Script |
83
+ | HandLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.998 ms | 0 - 64 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
84
+ | HandLandmarkDetector | SA8650 (Proxy) | SA8650P Proxy | QNN | 1.037 ms | 1 - 3 MB | FP16 | NPU | Use Export Script |
85
+ | HandLandmarkDetector | SA8775P ADP | SA8775P | TFLITE | 2.237 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
86
+ | HandLandmarkDetector | SA8775P ADP | SA8775P | QNN | 2.164 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
87
+ | HandLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | TFLITE | 35.432 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
88
+ | HandLandmarkDetector | QCS8275 (Proxy) | QCS8275 Proxy | QNN | 35.402 ms | 1 - 10 MB | FP16 | NPU | Use Export Script |
89
+ | HandLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 1.008 ms | 0 - 63 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
90
+ | HandLandmarkDetector | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 1.003 ms | 1 - 4 MB | FP16 | NPU | Use Export Script |
91
+ | HandLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | TFLITE | 2.237 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
92
+ | HandLandmarkDetector | QCS9075 (Proxy) | QCS9075 Proxy | QNN | 2.164 ms | 1 - 11 MB | FP16 | NPU | Use Export Script |
93
+ | HandLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.902 ms | 0 - 36 MB | FP16 | NPU | [MediaPipe-Hand-Detection.tflite](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.tflite) |
94
+ | HandLandmarkDetector | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.908 ms | 1 - 30 MB | FP16 | NPU | Use Export Script |
95
+ | HandLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 1.237 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
96
+ | HandLandmarkDetector | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.36 ms | 6 - 6 MB | FP16 | NPU | [MediaPipe-Hand-Detection.onnx](https://huggingface.co/qualcomm/MediaPipe-Hand-Detection/blob/main/HandLandmarkDetector.onnx) |
97
 
98
 
99
 
 
154
  ```
155
  Profiling Results
156
  ------------------------------------------------------------
157
+ HandDetector
158
  Device : Samsung Galaxy S23 (13)
159
  Runtime : TFLITE
160
  Estimated inference time (ms) : 0.7
 
163
  Compute Unit(s) : NPU (149 ops)
164
 
165
  ------------------------------------------------------------
166
+ HandLandmarkDetector
167
  Device : Samsung Galaxy S23 (13)
168
  Runtime : TFLITE
169
  Estimated inference time (ms) : 1.0
170
+ Estimated peak memory usage (MB): [0, 64]
171
  Total # Ops : 158
172
  Compute Unit(s) : NPU (158 ops)
173
  ```
 
191
  from qai_hub_models.models.mediapipe_hand 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