bhushans commited on
Commit
2afd55d
·
verified ·
1 Parent(s): 561f684

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +44 -26
README.md CHANGED
@@ -37,29 +37,31 @@ More details on model performance across various devices, can be found
37
 
38
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
39
  |---|---|---|---|---|---|---|---|---|
40
- | Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 150.193 ms | 0 - 525 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
41
- | Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 161.015 ms | 10 - 40 MB | FP16 | NPU | [Unet-Segmentation.so](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.so) |
42
- | Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 161.889 ms | 15 - 16 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
43
- | Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 111.024 ms | 5 - 390 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
44
- | Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 111.294 ms | 20 - 103 MB | FP16 | NPU | [Unet-Segmentation.so](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.so) |
45
- | Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 113.283 ms | 25 - 425 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
46
- | Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 103.436 ms | 5 - 117 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
47
- | Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 90.17 ms | 9 - 110 MB | FP16 | NPU | Use Export Script |
48
- | Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 104.832 ms | 19 - 136 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
49
- | Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 153.377 ms | 1 - 451 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
50
- | Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 136.975 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
51
- | Unet-Segmentation | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 149.315 ms | 0 - 451 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
52
- | Unet-Segmentation | SA8255 (Proxy) | SA8255P Proxy | QNN | 139.944 ms | 10 - 18 MB | FP16 | NPU | Use Export Script |
53
- | Unet-Segmentation | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 154.145 ms | 6 - 441 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
54
- | Unet-Segmentation | SA8775 (Proxy) | SA8775P Proxy | QNN | 145.992 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
55
- | Unet-Segmentation | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 150.322 ms | 6 - 442 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
56
- | Unet-Segmentation | SA8650 (Proxy) | SA8650P Proxy | QNN | 138.474 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
57
- | Unet-Segmentation | SA8295P ADP | SA8295P | TFLITE | 275.014 ms | 7 - 120 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
58
- | Unet-Segmentation | SA8295P ADP | SA8295P | QNN | 266.041 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
59
- | Unet-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 361.208 ms | 8 - 395 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
60
- | Unet-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 290.451 ms | 9 - 100 MB | FP16 | NPU | Use Export Script |
61
- | Unet-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 135.755 ms | 9 - 9 MB | FP16 | NPU | Use Export Script |
62
- | Unet-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 147.5 ms | 54 - 54 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
 
 
63
 
64
 
65
 
@@ -123,8 +125,8 @@ Profiling Results
123
  Unet-Segmentation
124
  Device : Samsung Galaxy S23 (13)
125
  Runtime : TFLITE
126
- Estimated inference time (ms) : 150.2
127
- Estimated peak memory usage (MB): [0, 525]
128
  Total # Ops : 32
129
  Compute Unit(s) : NPU (32 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.unet_segmentation import
149
 
150
  # Load the model
 
151
 
152
  # Device
153
  device = hub.Device("Samsung Galaxy S23")
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
  ```
157
 
 
37
 
38
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
39
  |---|---|---|---|---|---|---|---|---|
40
+ | Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 152.941 ms | 6 - 466 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
41
+ | Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 154.481 ms | 9 - 37 MB | FP16 | NPU | [Unet-Segmentation.so](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.so) |
42
+ | Unet-Segmentation | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 153.838 ms | 16 - 19 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
43
+ | Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 113.773 ms | 6 - 92 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
44
+ | Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 110.791 ms | 9 - 93 MB | FP16 | NPU | [Unet-Segmentation.so](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.so) |
45
+ | Unet-Segmentation | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 112.812 ms | 1 - 406 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
46
+ | Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 102.108 ms | 4 - 105 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
47
+ | Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 89.253 ms | 9 - 110 MB | FP16 | NPU | Use Export Script |
48
+ | Unet-Segmentation | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 103.52 ms | 14 - 134 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
49
+ | Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 157.694 ms | 3 - 469 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
50
+ | Unet-Segmentation | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 139.616 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
51
+ | Unet-Segmentation | SA7255P ADP | SA7255P | TFLITE | 7406.94 ms | 2 - 100 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
52
+ | Unet-Segmentation | SA7255P ADP | SA7255P | QNN | 7399.668 ms | 1 - 7 MB | FP16 | NPU | Use Export Script |
53
+ | Unet-Segmentation | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 154.76 ms | 6 - 241 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
54
+ | Unet-Segmentation | SA8255 (Proxy) | SA8255P Proxy | QNN | 145.08 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
55
+ | Unet-Segmentation | SA8295P ADP | SA8295P | TFLITE | 273.606 ms | 6 - 106 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
56
+ | Unet-Segmentation | SA8295P ADP | SA8295P | QNN | 266.119 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
57
+ | Unet-Segmentation | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 156.964 ms | 3 - 471 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
58
+ | Unet-Segmentation | SA8650 (Proxy) | SA8650P Proxy | QNN | 139.333 ms | 10 - 11 MB | FP16 | NPU | Use Export Script |
59
+ | Unet-Segmentation | SA8775P ADP | SA8775P | TFLITE | 303.207 ms | 6 - 104 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
60
+ | Unet-Segmentation | SA8775P ADP | SA8775P | QNN | 297.898 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
61
+ | Unet-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 297.003 ms | 6 - 98 MB | FP16 | NPU | [Unet-Segmentation.tflite](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.tflite) |
62
+ | Unet-Segmentation | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 322.428 ms | 5 - 92 MB | FP16 | NPU | Use Export Script |
63
+ | Unet-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 135.772 ms | 9 - 9 MB | FP16 | NPU | Use Export Script |
64
+ | Unet-Segmentation | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 147.629 ms | 54 - 54 MB | FP16 | NPU | [Unet-Segmentation.onnx](https://huggingface.co/qualcomm/Unet-Segmentation/blob/main/Unet-Segmentation.onnx) |
65
 
66
 
67
 
 
125
  Unet-Segmentation
126
  Device : Samsung Galaxy S23 (13)
127
  Runtime : TFLITE
128
+ Estimated inference time (ms) : 152.9
129
+ Estimated peak memory usage (MB): [6, 466]
130
  Total # Ops : 32
131
  Compute Unit(s) : NPU (32 ops)
132
  ```
 
147
  import torch
148
 
149
  import qai_hub as hub
150
+ from qai_hub_models.models.unet_segmentation 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