File size: 4,841 Bytes
fc1f451 74c124e fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c 1770481 b3d006c fc1f451 b3d006c fc1f451 b3d006c 5fcef0f fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c fc1f451 b3d006c 5fcef0f fc1f451 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | ---
library_name: pytorch
license: other
tags:
- bu_auto
- real_time
- android
pipeline_tag: image-segmentation
---

# HRNet-W48-OCR: Optimized for Qualcomm Devices
HRNet-W48-OCR is a machine learning model that can segment images from the Cityscape dataset. It has lightweight and hardware-efficient operations and thus delivers significant speedup on diverse hardware platforms
This is based on the implementation of HRNet-W48-OCR found [here](https://github.com/HRNet/HRNet-Semantic-Segmentation).
This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/hrnet_w48_ocr) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device.
## Getting Started
There are two ways to deploy this model on your device:
### Option 1: Download Pre-Exported Models
Below are pre-exported model assets ready for deployment.
| Runtime | Precision | Chipset | SDK Versions | Download |
|---|---|---|---|---|
| ONNX | float | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_w48_ocr/releases/v0.47.0/hrnet_w48_ocr-onnx-float.zip)
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_w48_ocr/releases/v0.47.0/hrnet_w48_ocr-onnx-w8a16.zip)
| QNN_DLC | w8a16 | Universal | QAIRT 2.43 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_w48_ocr/releases/v0.47.0/hrnet_w48_ocr-qnn_dlc-w8a16.zip)
| TFLITE | float | Universal | TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_w48_ocr/releases/v0.47.0/hrnet_w48_ocr-tflite-float.zip)
For more device-specific assets and performance metrics, visit **[HRNet-W48-OCR on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/hrnet_w48_ocr)**.
### Option 2: Export with Custom Configurations
Use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/hrnet_w48_ocr) Python library to compile and export the model with your own:
- Custom weights (e.g., fine-tuned checkpoints)
- Custom input shapes
- Target device and runtime configurations
This option is ideal if you need to customize the model beyond the default configuration provided here.
See our repository for [HRNet-W48-OCR on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/hrnet_w48_ocr) for usage instructions.
## Model Details
**Model Type:** Model_use_case.semantic_segmentation
**Model Stats:**
- Model checkpoint: hrnet_ocr_cs_8162_torch11.pth
- Input resolution: 2048x1024
- Number of output classes: 19
- Number of parameters: 70.3M
- Model size (float): 268 MB
- Model size (w8a16): 70.3 MB
## Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
|---|---|---|---|---|---|---
| HRNet-W48-OCR | ONNX | float | Snapdragon® X Elite | 1089.986 ms | 146 - 146 MB | NPU
| HRNet-W48-OCR | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 972.202 ms | 1 - 3922 MB | NPU
| HRNet-W48-OCR | ONNX | float | Qualcomm® QCS8550 (Proxy) | 1204.67 ms | 0 - 168 MB | NPU
| HRNet-W48-OCR | ONNX | float | Qualcomm® QCS9075 | 1389.278 ms | 24 - 51 MB | NPU
| HRNet-W48-OCR | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 784.286 ms | 13 - 2553 MB | NPU
| HRNet-W48-OCR | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 687.218 ms | 35 - 2714 MB | NPU
| HRNet-W48-OCR | ONNX | float | Snapdragon® X2 Elite | 636.212 ms | 148 - 148 MB | NPU
## License
* The license for the original implementation of HRNet-W48-OCR can be found
[here](https://github.com/HRNet/HRNet-Semantic-Segmentation/blob/HRNet-OCR/LICENSE).
## References
* [Segmentation Transformer: Object-Contextual Representations for Semantic Segmentation](https://arxiv.org/abs/1909.11065)
* [Source Model Implementation](https://github.com/HRNet/HRNet-Semantic-Segmentation)
## Community
* Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
* For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
|