bhushans commited on
Commit
0e0cf7b
1 Parent(s): 808c210

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +43 -25
README.md CHANGED
@@ -36,29 +36,31 @@ 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
- | MediaPipe-Selfie-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.696 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
40
- | MediaPipe-Selfie-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.773 ms | 1 - 7 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.so](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.so) |
41
- | MediaPipe-Selfie-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.296 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
42
- | MediaPipe-Selfie-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.467 ms | 0 - 28 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
43
- | MediaPipe-Selfie-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.511 ms | 1 - 14 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.so](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.so) |
44
- | MediaPipe-Selfie-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.879 ms | 0 - 33 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
45
- | MediaPipe-Selfie-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.434 ms | 0 - 18 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
46
- | MediaPipe-Selfie-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.519 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
47
- | MediaPipe-Selfie-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.872 ms | 0 - 22 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
48
- | MediaPipe-Selfie-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.696 ms | 0 - 1 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
49
- | MediaPipe-Selfie-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.757 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
50
- | MediaPipe-Selfie-Segmentation | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.696 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
51
- | MediaPipe-Selfie-Segmentation | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.763 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
52
- | MediaPipe-Selfie-Segmentation | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 0.7 ms | 0 - 68 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
53
- | MediaPipe-Selfie-Segmentation | SA8775 (Proxy) | SA8775P Proxy | QNN | 0.758 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
54
- | MediaPipe-Selfie-Segmentation | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.699 ms | 0 - 1 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
55
- | MediaPipe-Selfie-Segmentation | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.756 ms | 0 - 1 MB | FP16 | NPU | Use Export Script |
56
- | MediaPipe-Selfie-Segmentation | SA8295P ADP | SA8295P | TFLITE | 1.305 ms | 0 - 17 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
57
- | MediaPipe-Selfie-Segmentation | SA8295P ADP | SA8295P | QNN | 1.454 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
58
- | MediaPipe-Selfie-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 0.924 ms | 0 - 28 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
59
- | MediaPipe-Selfie-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.986 ms | 1 - 16 MB | FP16 | NPU | Use Export Script |
60
- | MediaPipe-Selfie-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.906 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
61
- | MediaPipe-Selfie-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.406 ms | 2 - 2 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
 
 
62
 
63
 
64
 
@@ -124,7 +126,7 @@ MediaPipe-Selfie-Segmentation
124
  Device : Samsung Galaxy S23 (13)
125
  Runtime : TFLITE
126
  Estimated inference time (ms) : 0.7
127
- Estimated peak memory usage (MB): [0, 2]
128
  Total # Ops : 118
129
  Compute Unit(s) : NPU (118 ops)
130
  ```
@@ -145,13 +147,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
145
  import torch
146
 
147
  import qai_hub as hub
148
- from qai_hub_models.models.mediapipe_selfie import
149
 
150
  # Load the model
 
151
 
152
  # Device
153
  device = hub.Device("Samsung Galaxy S23")
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
  ```
157
 
 
36
 
37
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
38
  |---|---|---|---|---|---|---|---|---|
39
+ | MediaPipe-Selfie-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.706 ms | 0 - 40 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
40
+ | MediaPipe-Selfie-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.777 ms | 1 - 6 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.so](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.so) |
41
+ | MediaPipe-Selfie-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.331 ms | 0 - 2 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
42
+ | MediaPipe-Selfie-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.468 ms | 0 - 13 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
43
+ | MediaPipe-Selfie-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.518 ms | 0 - 14 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.so](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.so) |
44
+ | MediaPipe-Selfie-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.883 ms | 0 - 36 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
45
+ | MediaPipe-Selfie-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.441 ms | 0 - 10 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
46
+ | MediaPipe-Selfie-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.483 ms | 0 - 10 MB | FP16 | NPU | Use Export Script |
47
+ | MediaPipe-Selfie-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.872 ms | 0 - 25 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
48
+ | MediaPipe-Selfie-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.694 ms | 0 - 4 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
49
+ | MediaPipe-Selfie-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.758 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
50
+ | MediaPipe-Selfie-Segmentation | SA7255P ADP | SA7255P | TFLITE | 6.211 ms | 0 - 11 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
51
+ | MediaPipe-Selfie-Segmentation | SA7255P ADP | SA7255P | QNN | 6.499 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
52
+ | MediaPipe-Selfie-Segmentation | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.706 ms | 0 - 7 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
53
+ | MediaPipe-Selfie-Segmentation | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.785 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
54
+ | MediaPipe-Selfie-Segmentation | SA8295P ADP | SA8295P | TFLITE | 1.28 ms | 0 - 9 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
55
+ | MediaPipe-Selfie-Segmentation | SA8295P ADP | SA8295P | QNN | 1.472 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
56
+ | MediaPipe-Selfie-Segmentation | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.703 ms | 0 - 68 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
57
+ | MediaPipe-Selfie-Segmentation | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.761 ms | 0 - 2 MB | FP16 | NPU | Use Export Script |
58
+ | MediaPipe-Selfie-Segmentation | SA8775P ADP | SA8775P | TFLITE | 1.197 ms | 0 - 9 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
59
+ | MediaPipe-Selfie-Segmentation | SA8775P ADP | SA8775P | QNN | 1.426 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
60
+ | MediaPipe-Selfie-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 0.935 ms | 0 - 14 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.tflite](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.tflite) |
61
+ | MediaPipe-Selfie-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 0.987 ms | 1 - 16 MB | FP16 | NPU | Use Export Script |
62
+ | MediaPipe-Selfie-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.904 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
63
+ | MediaPipe-Selfie-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 5.938 ms | 2 - 2 MB | FP16 | NPU | [MediaPipe-Selfie-Segmentation.onnx](https://huggingface.co/qualcomm/MediaPipe-Selfie-Segmentation/blob/main/MediaPipe-Selfie-Segmentation.onnx) |
64
 
65
 
66
 
 
126
  Device : Samsung Galaxy S23 (13)
127
  Runtime : TFLITE
128
  Estimated inference time (ms) : 0.7
129
+ Estimated peak memory usage (MB): [0, 40]
130
  Total # Ops : 118
131
  Compute Unit(s) : NPU (118 ops)
132
  ```
 
147
  import torch
148
 
149
  import qai_hub as hub
150
+ from qai_hub_models.models.mediapipe_selfie import Model
151
 
152
  # Load the model
153
+ torch_model = Model.from_pretrained()
154
 
155
  # Device
156
  device = hub.Device("Samsung Galaxy S23")
157
 
158
+ # Trace model
159
+ input_shape = torch_model.get_input_spec()
160
+ sample_inputs = torch_model.sample_inputs()
161
+
162
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
163
+
164
+ # Compile model on a specific device
165
+ compile_job = hub.submit_compile_job(
166
+ model=pt_model,
167
+ device=device,
168
+ input_specs=torch_model.get_input_spec(),
169
+ )
170
+
171
+ # Get target model to run on-device
172
+ target_model = compile_job.get_target_model()
173
 
174
  ```
175