Upload README.md with huggingface_hub
Browse files34 unmodified lines353637383839404154 unmodified lines969798991001019910010110210310415 unmodified lines1201211221231231241251261261271281291311321331341351361371381391401411421431441451301311326 unmodified lines1391401411581591601611421431441451461471483 unmodified lines15215315417117217317417517615515615715815916016116234 unmodified lines
| Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model| ---|---|---|---|---|---|---|---|| 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) | 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)
54 unmodified lines```Profile Job summary of DeepLabV3-ResNet50--------------------------------------------------Device: QCS8550 (Proxy) (12)Estimated Inference Time: 291.45 msEstimated Peak Memory Range: 2.10-142.83 MBDevice: SA8255 (Proxy) (13)Estimated Inference Time: 291.68 msEstimated Peak Memory Range: 0.00-306.68 MBCompute Units: GPU (95) | Total (95)
15 unmodified linesimport torch
import qai_hub as hubfrom qai_hub_models.models.deeplabv3_resnet50 import Modelfrom qai_hub_models.models.deeplabv3_resnet50 import
# Load the modeltorch_model = Model.from_pretrained()
# Devicedevice = hub.Device("Samsung Galaxy S23")
# Trace modelinput_shape = torch_model.get_input_spec()sample_inputs = torch_model.sample_inputs()
pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
# Compile model on a specific devicecompile_job = hub.submit_compile_job( model=pt_model, device=device, input_specs=torch_model.get_input_spec(),)
# Get target model to run on-devicetarget_model = compile_job.get_target_model()
```
6 unmodified linesprovided job URL to view a variety of on-device performance metrics.```pythonprofile_job = hub.submit_profile_job( model=target_model, device=device,)
model=target_model, device=device, ) ```
Step 3: **Verify on-device accuracy**3 unmodified lines```pythoninput_data = torch_model.sample_inputs()inference_job = hub.submit_inference_job( model=target_model, device=device, inputs=input_data,)
on_device_output = inference_job.download_output_data() model=target_model, device=device, inputs=input_data, ) on_device_output = inference_job.download_output_data()
```With the output of the model, you can compute like PSNR, relative errors orREADME.md+14-31