HRNetFace / README.md
qaihm-bot's picture
v0.46.0
ea34727 verified
---
library_name: pytorch
license: other
tags:
- real_time
- android
pipeline_tag: object-detection
---
![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/web-assets/model_demo.png)
# HRNetFace: Optimized for Qualcomm Devices
Detects attributes (liveness, eye closeness, mask presence, glasses presence, sunglasses presence) that apply to a given face.
This is based on the implementation of HRNetFace found [here](https://github.com/HRNet/HRNet-Facial-Landmark-Detection).
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_face) 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.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.46.0/hrnet_face-onnx-float.zip)
| ONNX | w8a8 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.46.0/hrnet_face-onnx-w8a8.zip)
| QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.46.0/hrnet_face-qnn_dlc-float.zip)
| QNN_DLC | w8a8 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.46.0/hrnet_face-qnn_dlc-w8a8.zip)
| TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.46.0/hrnet_face-tflite-float.zip)
| TFLITE | w8a8 | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.46.0/hrnet_face-tflite-w8a8.zip)
For more device-specific assets and performance metrics, visit **[HRNetFace on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/hrnet_face)**.
### 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_face) 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 [HRNetFace on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/hrnet_face) for usage instructions.
## Model Details
**Model Type:** Model_use_case.object_detection
**Model Stats:**
- Model checkpoint: HR18-COFW.pth
- Input resolution: 256x256
- Number of parameters: 9.68M
- Model size (float): 36.87MB
- Model size (w8a8): 17.7 MB
## Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
|---|---|---|---|---|---|---
| HRNetFace | ONNX | float | Snapdragon® X Elite | 3.233 ms | 30 - 30 MB | NPU
| HRNetFace | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 2.296 ms | 0 - 203 MB | NPU
| HRNetFace | ONNX | float | Qualcomm® QCS8550 (Proxy) | 3.221 ms | 1 - 3 MB | NPU
| HRNetFace | ONNX | float | Qualcomm® QCS9075 | 4.954 ms | 2 - 4 MB | NPU
| HRNetFace | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.917 ms | 0 - 146 MB | NPU
| HRNetFace | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.551 ms | 0 - 146 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® X Elite | 1.545 ms | 15 - 15 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 1.166 ms | 0 - 213 MB | NPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCS6490 | 91.814 ms | 18 - 37 MB | CPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 1.612 ms | 0 - 30 MB | NPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCS9075 | 1.791 ms | 0 - 3 MB | NPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCM6690 | 49.183 ms | 18 - 35 MB | CPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.913 ms | 0 - 163 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 45.82 ms | 19 - 37 MB | CPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.774 ms | 0 - 165 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® X Elite | 3.707 ms | 1 - 1 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 2.379 ms | 1 - 125 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 15.608 ms | 1 - 76 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 3.313 ms | 1 - 34 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® SA8775P | 5.144 ms | 1 - 80 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS9075 | 5.092 ms | 3 - 6 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 4.973 ms | 0 - 105 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® SA7255P | 15.608 ms | 1 - 76 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® SA8295P | 5.681 ms | 1 - 62 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.795 ms | 0 - 78 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.416 ms | 1 - 81 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® X Elite | 1.605 ms | 0 - 0 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.957 ms | 0 - 109 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 3.864 ms | 0 - 2 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 3.373 ms | 0 - 71 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 1.387 ms | 0 - 6 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® SA8775P | 1.761 ms | 0 - 72 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 1.631 ms | 2 - 4 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 10.678 ms | 0 - 195 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 1.88 ms | 0 - 107 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® SA7255P | 3.373 ms | 0 - 71 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® SA8295P | 2.286 ms | 0 - 68 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.688 ms | 0 - 72 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1.659 ms | 0 - 78 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.553 ms | 0 - 72 MB | NPU
| HRNetFace | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 2.172 ms | 0 - 144 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 15.341 ms | 0 - 96 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 2.976 ms | 0 - 3 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® SA8775P | 4.875 ms | 0 - 97 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS9075 | 4.725 ms | 0 - 35 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 4.511 ms | 0 - 127 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® SA7255P | 15.341 ms | 0 - 96 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® SA8295P | 5.359 ms | 0 - 75 MB | NPU
| HRNetFace | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.667 ms | 0 - 96 MB | NPU
| HRNetFace | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.332 ms | 0 - 99 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.868 ms | 0 - 117 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS6490 | 3.487 ms | 0 - 18 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 3.214 ms | 0 - 73 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 1.268 ms | 0 - 5 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® SA8775P | 6.374 ms | 0 - 75 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS9075 | 1.475 ms | 0 - 18 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCM6690 | 10.058 ms | 0 - 190 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 1.73 ms | 0 - 108 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® SA7255P | 3.214 ms | 0 - 73 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® SA8295P | 2.18 ms | 0 - 68 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.671 ms | 0 - 73 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1.563 ms | 0 - 72 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.567 ms | 0 - 75 MB | NPU
## License
* The license for the original implementation of HRNetFace can be found
[here](https://github.com/HRNet/HRNet-Facial-Landmark-Detection/blob/master/LICENCE).
## References
* [Deep High-Resolution Representation Learning for Visual Recognition](https://arxiv.org/abs/1908.07919)
* [Source Model Implementation](https://github.com/HRNet/HRNet-Facial-Landmark-Detection)
## 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).