bhushans commited on
Commit
3ae2c7b
·
verified ·
1 Parent(s): 614305b

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
- | PPE-Detection | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.683 ms | 0 - 2 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
40
- | PPE-Detection | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.754 ms | 0 - 59 MB | FP16 | NPU | [PPE-Detection.so](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.so) |
41
- | PPE-Detection | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.076 ms | 0 - 15 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
42
- | PPE-Detection | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.495 ms | 0 - 42 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
43
- | PPE-Detection | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.542 ms | 0 - 16 MB | FP16 | NPU | [PPE-Detection.so](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.so) |
44
- | PPE-Detection | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.845 ms | 0 - 47 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
45
- | PPE-Detection | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.503 ms | 0 - 22 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
46
- | PPE-Detection | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.527 ms | 1 - 13 MB | FP16 | NPU | Use Export Script |
47
- | PPE-Detection | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.71 ms | 0 - 24 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
48
- | PPE-Detection | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.67 ms | 0 - 1 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
49
- | PPE-Detection | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.727 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
50
- | PPE-Detection | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.673 ms | 0 - 1 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
51
- | PPE-Detection | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.726 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
52
- | PPE-Detection | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 0.671 ms | 0 - 134 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
53
- | PPE-Detection | SA8775 (Proxy) | SA8775P Proxy | QNN | 0.727 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
54
- | PPE-Detection | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.684 ms | 0 - 1 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
55
- | PPE-Detection | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.729 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
56
- | PPE-Detection | SA8295P ADP | SA8295P | TFLITE | 1.813 ms | 0 - 17 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
57
- | PPE-Detection | SA8295P ADP | SA8295P | QNN | 2.031 ms | 0 - 6 MB | FP16 | NPU | Use Export Script |
58
- | PPE-Detection | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.411 ms | 0 - 37 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
59
- | PPE-Detection | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.485 ms | 1 - 17 MB | FP16 | NPU | Use Export Script |
60
- | PPE-Detection | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.86 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
61
- | PPE-Detection | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.172 ms | 14 - 14 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
 
 
62
 
63
 
64
 
@@ -123,7 +125,7 @@ PPE-Detection
123
  Device : Samsung Galaxy S23 (13)
124
  Runtime : TFLITE
125
  Estimated inference time (ms) : 0.7
126
- Estimated peak memory usage (MB): [0, 2]
127
  Total # Ops : 77
128
  Compute Unit(s) : NPU (77 ops)
129
  ```
@@ -144,13 +146,29 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
144
  import torch
145
 
146
  import qai_hub as hub
147
- from qai_hub_models.models.gear_guard_net import
148
 
149
  # Load the model
 
150
 
151
  # Device
152
  device = hub.Device("Samsung Galaxy S23")
153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
 
155
  ```
156
 
 
36
 
37
  | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
38
  |---|---|---|---|---|---|---|---|---|
39
+ | PPE-Detection | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 0.682 ms | 0 - 79 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
40
+ | PPE-Detection | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 0.751 ms | 1 - 60 MB | FP16 | NPU | [PPE-Detection.so](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.so) |
41
+ | PPE-Detection | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 1.053 ms | 0 - 15 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
42
+ | PPE-Detection | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 0.494 ms | 0 - 15 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
43
+ | PPE-Detection | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 0.544 ms | 0 - 17 MB | FP16 | NPU | [PPE-Detection.so](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.so) |
44
+ | PPE-Detection | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 0.848 ms | 0 - 46 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
45
+ | PPE-Detection | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 0.412 ms | 0 - 14 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
46
+ | PPE-Detection | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 0.53 ms | 0 - 13 MB | FP16 | NPU | Use Export Script |
47
+ | PPE-Detection | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 0.849 ms | 0 - 24 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
48
+ | PPE-Detection | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 0.683 ms | 0 - 70 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
49
+ | PPE-Detection | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 0.728 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
50
+ | PPE-Detection | SA7255P ADP | SA7255P | TFLITE | 29.048 ms | 0 - 13 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
51
+ | PPE-Detection | SA7255P ADP | SA7255P | QNN | 29.306 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
52
+ | PPE-Detection | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 0.684 ms | 0 - 80 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
53
+ | PPE-Detection | SA8255 (Proxy) | SA8255P Proxy | QNN | 0.738 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
54
+ | PPE-Detection | SA8295P ADP | SA8295P | TFLITE | 1.822 ms | 0 - 10 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
55
+ | PPE-Detection | SA8295P ADP | SA8295P | QNN | 1.991 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
56
+ | PPE-Detection | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 0.681 ms | 0 - 6 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
57
+ | PPE-Detection | SA8650 (Proxy) | SA8650P Proxy | QNN | 0.743 ms | 1 - 2 MB | FP16 | NPU | Use Export Script |
58
+ | PPE-Detection | SA8775P ADP | SA8775P | TFLITE | 1.567 ms | 0 - 14 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
59
+ | PPE-Detection | SA8775P ADP | SA8775P | QNN | 1.787 ms | 1 - 6 MB | FP16 | NPU | Use Export Script |
60
+ | PPE-Detection | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 1.406 ms | 0 - 14 MB | FP16 | NPU | [PPE-Detection.tflite](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.tflite) |
61
+ | PPE-Detection | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 1.494 ms | 1 - 17 MB | FP16 | NPU | Use Export Script |
62
+ | PPE-Detection | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 0.829 ms | 1 - 1 MB | FP16 | NPU | Use Export Script |
63
+ | PPE-Detection | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 1.142 ms | 13 - 13 MB | FP16 | NPU | [PPE-Detection.onnx](https://huggingface.co/qualcomm/PPE-Detection/blob/main/PPE-Detection.onnx) |
64
 
65
 
66
 
 
125
  Device : Samsung Galaxy S23 (13)
126
  Runtime : TFLITE
127
  Estimated inference time (ms) : 0.7
128
+ Estimated peak memory usage (MB): [0, 79]
129
  Total # Ops : 77
130
  Compute Unit(s) : NPU (77 ops)
131
  ```
 
146
  import torch
147
 
148
  import qai_hub as hub
149
+ from qai_hub_models.models.gear_guard_net import Model
150
 
151
  # Load the model
152
+ torch_model = Model.from_pretrained()
153
 
154
  # Device
155
  device = hub.Device("Samsung Galaxy S23")
156
 
157
+ # Trace model
158
+ input_shape = torch_model.get_input_spec()
159
+ sample_inputs = torch_model.sample_inputs()
160
+
161
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
162
+
163
+ # Compile model on a specific device
164
+ compile_job = hub.submit_compile_job(
165
+ model=pt_model,
166
+ device=device,
167
+ input_specs=torch_model.get_input_spec(),
168
+ )
169
+
170
+ # Get target model to run on-device
171
+ target_model = compile_job.get_target_model()
172
 
173
  ```
174