shreyajn commited on
Commit
ac609a4
·
verified ·
1 Parent(s): 9bbc7b7

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +14 -31
README.md CHANGED
@@ -35,7 +35,7 @@ More details on model performance across various devices, can be found
35
 
36
  | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
37
  | ---|---|---|---|---|---|---|---|
38
- | Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | TFLite | 292.637 ms | 0 - 23 MB | FP16 | GPU | [DeepLabV3-ResNet50.tflite](https://huggingface.co/qualcomm/DeepLabV3-ResNet50/blob/main/DeepLabV3-ResNet50.tflite)
39
 
40
 
41
 
@@ -96,9 +96,9 @@ python -m qai_hub_models.models.deeplabv3_resnet50.export
96
  ```
97
  Profile Job summary of DeepLabV3-ResNet50
98
  --------------------------------------------------
99
- Device: QCS8550 (Proxy) (12)
100
- Estimated Inference Time: 291.45 ms
101
- Estimated Peak Memory Range: 2.10-142.83 MB
102
  Compute Units: GPU (95) | Total (95)
103
 
104
 
@@ -120,29 +120,13 @@ in memory using the `jit.trace` and then call the `submit_compile_job` API.
120
  import torch
121
 
122
  import qai_hub as hub
123
- from qai_hub_models.models.deeplabv3_resnet50 import Model
124
 
125
  # Load the model
126
- torch_model = Model.from_pretrained()
127
 
128
  # Device
129
  device = hub.Device("Samsung Galaxy S23")
130
 
131
- # Trace model
132
- input_shape = torch_model.get_input_spec()
133
- sample_inputs = torch_model.sample_inputs()
134
-
135
- pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
136
-
137
- # Compile model on a specific device
138
- compile_job = hub.submit_compile_job(
139
- model=pt_model,
140
- device=device,
141
- input_specs=torch_model.get_input_spec(),
142
- )
143
-
144
- # Get target model to run on-device
145
- target_model = compile_job.get_target_model()
146
 
147
  ```
148
 
@@ -155,10 +139,10 @@ provisioned in the cloud. Once the job is submitted, you can navigate to a
155
  provided job URL to view a variety of on-device performance metrics.
156
  ```python
157
  profile_job = hub.submit_profile_job(
158
- model=target_model,
159
- device=device,
160
- )
161
-
162
  ```
163
 
164
  Step 3: **Verify on-device accuracy**
@@ -168,12 +152,11 @@ on sample input data on the same cloud hosted device.
168
  ```python
169
  input_data = torch_model.sample_inputs()
170
  inference_job = hub.submit_inference_job(
171
- model=target_model,
172
- device=device,
173
- inputs=input_data,
174
- )
175
-
176
- on_device_output = inference_job.download_output_data()
177
 
178
  ```
179
  With the output of the model, you can compute like PSNR, relative errors or
 
35
 
36
  | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
37
  | ---|---|---|---|---|---|---|---|
38
+ | Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | TFLite | 292.954 ms | 15 - 188 MB | FP16 | GPU | [DeepLabV3-ResNet50.tflite](https://huggingface.co/qualcomm/DeepLabV3-ResNet50/blob/main/DeepLabV3-ResNet50.tflite)
39
 
40
 
41
 
 
96
  ```
97
  Profile Job summary of DeepLabV3-ResNet50
98
  --------------------------------------------------
99
+ Device: SA8255 (Proxy) (13)
100
+ Estimated Inference Time: 291.68 ms
101
+ Estimated Peak Memory Range: 0.00-306.68 MB
102
  Compute Units: GPU (95) | Total (95)
103
 
104
 
 
120
  import torch
121
 
122
  import qai_hub as hub
123
+ from qai_hub_models.models.deeplabv3_resnet50 import
124
 
125
  # Load the model
 
126
 
127
  # Device
128
  device = hub.Device("Samsung Galaxy S23")
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
  ```
132
 
 
139
  provided job URL to view a variety of on-device performance metrics.
140
  ```python
141
  profile_job = hub.submit_profile_job(
142
+ model=target_model,
143
+ device=device,
144
+ )
145
+
146
  ```
147
 
148
  Step 3: **Verify on-device accuracy**
 
152
  ```python
153
  input_data = torch_model.sample_inputs()
154
  inference_job = hub.submit_inference_job(
155
+ model=target_model,
156
+ device=device,
157
+ inputs=input_data,
158
+ )
159
+ on_device_output = inference_job.download_output_data()
 
160
 
161
  ```
162
  With the output of the model, you can compute like PSNR, relative errors or