bhushans commited on
Commit
9bae97a
1 Parent(s): 8661dfc

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +33 -16
README.md CHANGED
@@ -33,19 +33,20 @@ More details on model performance across various devices, can be found
33
 
34
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
35
  |---|---|---|---|---|---|---|---|---|
36
- | LiteHRNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 7.964 ms | 0 - 2 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
37
- | LiteHRNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 7.174 ms | 0 - 160 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
38
- | LiteHRNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 4.917 ms | 0 - 97 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
39
- | LiteHRNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 4.418 ms | 1 - 109 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
40
- | LiteHRNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 5.295 ms | 0 - 68 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
41
- | LiteHRNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 4.829 ms | 1 - 79 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
42
- | LiteHRNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 7.939 ms | 0 - 151 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
43
- | LiteHRNet | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 7.958 ms | 0 - 2 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
44
- | LiteHRNet | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 7.942 ms | 0 - 3 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
45
- | LiteHRNet | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 7.921 ms | 0 - 2 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
46
- | LiteHRNet | SA8295P ADP | SA8295P | TFLITE | 9.944 ms | 0 - 61 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
47
- | LiteHRNet | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 8.569 ms | 0 - 85 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
48
- | LiteHRNet | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 8.124 ms | 6 - 6 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
 
49
 
50
 
51
 
@@ -110,8 +111,8 @@ Profiling Results
110
  LiteHRNet
111
  Device : Samsung Galaxy S23 (13)
112
  Runtime : TFLITE
113
- Estimated inference time (ms) : 8.0
114
- Estimated peak memory usage (MB): [0, 2]
115
  Total # Ops : 1235
116
  Compute Unit(s) : NPU (1233 ops) CPU (2 ops)
117
  ```
@@ -132,13 +133,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
132
  import torch
133
 
134
  import qai_hub as hub
135
- from qai_hub_models.models.litehrnet import
136
 
137
  # Load the model
 
138
 
139
  # Device
140
  device = hub.Device("Samsung Galaxy S23")
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
  ```
144
 
 
33
 
34
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
35
  |---|---|---|---|---|---|---|---|---|
36
+ | LiteHRNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 7.877 ms | 0 - 15 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
37
+ | LiteHRNet | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 7.308 ms | 0 - 6 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
38
+ | LiteHRNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 4.774 ms | 0 - 38 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
39
+ | LiteHRNet | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 4.737 ms | 1 - 111 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
40
+ | LiteHRNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 4.296 ms | 0 - 31 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
41
+ | LiteHRNet | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 4.942 ms | 1 - 79 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
42
+ | LiteHRNet | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 7.832 ms | 0 - 18 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
43
+ | LiteHRNet | SA7255P ADP | SA7255P | TFLITE | 28.622 ms | 0 - 30 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
44
+ | LiteHRNet | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 7.875 ms | 0 - 15 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
45
+ | LiteHRNet | SA8295P ADP | SA8295P | TFLITE | 9.858 ms | 0 - 26 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
46
+ | LiteHRNet | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 7.892 ms | 0 - 14 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
47
+ | LiteHRNet | SA8775P ADP | SA8775P | TFLITE | 10.712 ms | 0 - 30 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
48
+ | LiteHRNet | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 8.527 ms | 0 - 32 MB | FP16 | NPU | [LiteHRNet.tflite](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.tflite) |
49
+ | LiteHRNet | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 8.163 ms | 4 - 4 MB | FP16 | NPU | [LiteHRNet.onnx](https://huggingface.co/qualcomm/LiteHRNet/blob/main/LiteHRNet.onnx) |
50
 
51
 
52
 
 
111
  LiteHRNet
112
  Device : Samsung Galaxy S23 (13)
113
  Runtime : TFLITE
114
+ Estimated inference time (ms) : 7.9
115
+ Estimated peak memory usage (MB): [0, 15]
116
  Total # Ops : 1235
117
  Compute Unit(s) : NPU (1233 ops) CPU (2 ops)
118
  ```
 
133
  import torch
134
 
135
  import qai_hub as hub
136
+ from qai_hub_models.models.litehrnet import Model
137
 
138
  # Load the model
139
+ torch_model = Model.from_pretrained()
140
 
141
  # Device
142
  device = hub.Device("Samsung Galaxy S23")
143
 
144
+ # Trace model
145
+ input_shape = torch_model.get_input_spec()
146
+ sample_inputs = torch_model.sample_inputs()
147
+
148
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
149
+
150
+ # Compile model on a specific device
151
+ compile_job = hub.submit_compile_job(
152
+ model=pt_model,
153
+ device=device,
154
+ input_specs=torch_model.get_input_spec(),
155
+ )
156
+
157
+ # Get target model to run on-device
158
+ target_model = compile_job.get_target_model()
159
 
160
  ```
161