HRNetFace / README.md
qaihm-bot's picture
v0.51.0
3d435c2 verified
|
raw
history blame
10 kB
---
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/qualcomm/ai-hub-models/blob/main/src/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.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.51.0/hrnet_face-onnx-float.zip)
| ONNX | w8a8 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.51.0/hrnet_face-onnx-w8a8.zip)
| QNN_DLC | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.51.0/hrnet_face-qnn_dlc-float.zip)
| QNN_DLC | w8a8 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.51.0/hrnet_face-qnn_dlc-w8a8.zip)
| TFLITE | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.51.0/hrnet_face-tflite-float.zip)
| TFLITE | w8a8 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/hrnet_face/releases/v0.51.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/qualcomm/ai-hub-models/blob/main/src/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/qualcomm/ai-hub-models/blob/main/src/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® 8 Elite Gen 5 Mobile | 1.323 ms | 1 - 98 MB | NPU
| HRNetFace | ONNX | float | Snapdragon® X2 Elite | 1.527 ms | 31 - 31 MB | NPU
| HRNetFace | ONNX | float | Snapdragon® X Elite | 3.336 ms | 30 - 30 MB | NPU
| HRNetFace | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 2.153 ms | 0 - 155 MB | NPU
| HRNetFace | ONNX | float | Qualcomm® QCS8550 (Proxy) | 2.976 ms | 0 - 34 MB | NPU
| HRNetFace | ONNX | float | Qualcomm® QCS9075 | 4.752 ms | 2 - 4 MB | NPU
| HRNetFace | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.648 ms | 0 - 97 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.588 ms | 0 - 105 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® X2 Elite | 0.655 ms | 15 - 15 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® X Elite | 1.543 ms | 15 - 15 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.91 ms | 0 - 152 MB | NPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCS6490 | 91.333 ms | 18 - 36 MB | CPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 1.345 ms | 0 - 21 MB | NPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCS9075 | 1.53 ms | 0 - 3 MB | NPU
| HRNetFace | ONNX | w8a8 | Qualcomm® QCM6690 | 49.821 ms | 18 - 36 MB | CPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.703 ms | 0 - 105 MB | NPU
| HRNetFace | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 46.758 ms | 17 - 35 MB | CPU
| HRNetFace | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.383 ms | 1 - 81 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® X2 Elite | 1.937 ms | 1 - 1 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® X Elite | 3.693 ms | 1 - 1 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 2.305 ms | 1 - 122 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 15.432 ms | 1 - 75 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 3.276 ms | 1 - 3 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® SA8775P | 5.098 ms | 1 - 79 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS9075 | 5.02 ms | 1 - 4 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 5.502 ms | 0 - 104 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® SA7255P | 15.432 ms | 1 - 75 MB | NPU
| HRNetFace | QNN_DLC | float | Qualcomm® SA8295P | 5.64 ms | 0 - 62 MB | NPU
| HRNetFace | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.756 ms | 0 - 79 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.54 ms | 0 - 74 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® X2 Elite | 0.842 ms | 0 - 0 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® X Elite | 1.554 ms | 0 - 0 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.915 ms | 0 - 108 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS6490 | 3.853 ms | 0 - 2 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS8275 (Proxy) | 3.265 ms | 0 - 71 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS8550 (Proxy) | 1.363 ms | 0 - 2 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® SA8775P | 1.716 ms | 0 - 72 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS9075 | 1.611 ms | 0 - 2 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCM6690 | 10.627 ms | 0 - 200 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® QCS8450 (Proxy) | 1.841 ms | 0 - 108 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® SA7255P | 3.265 ms | 0 - 71 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Qualcomm® SA8295P | 2.222 ms | 0 - 70 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.69 ms | 0 - 74 MB | NPU
| HRNetFace | QNN_DLC | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1.645 ms | 0 - 80 MB | NPU
| HRNetFace | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.378 ms | 0 - 96 MB | NPU
| HRNetFace | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 2.337 ms | 0 - 135 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 15.489 ms | 0 - 93 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 3.357 ms | 0 - 2 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® SA8775P | 5.129 ms | 0 - 92 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS9075 | 5.052 ms | 0 - 35 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 5.488 ms | 0 - 124 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® SA7255P | 15.489 ms | 0 - 93 MB | NPU
| HRNetFace | TFLITE | float | Qualcomm® SA8295P | 5.65 ms | 1 - 74 MB | NPU
| HRNetFace | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 1.765 ms | 0 - 96 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 0.457 ms | 0 - 75 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 0.752 ms | 0 - 110 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS6490 | 3.357 ms | 0 - 18 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 2.912 ms | 0 - 72 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 1.134 ms | 0 - 3 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® SA8775P | 1.482 ms | 0 - 74 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS9075 | 1.303 ms | 0 - 18 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCM6690 | 9.846 ms | 0 - 193 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 1.557 ms | 0 - 112 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® SA7255P | 2.912 ms | 0 - 72 MB | NPU
| HRNetFace | TFLITE | w8a8 | Qualcomm® SA8295P | 1.989 ms | 0 - 70 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 0.578 ms | 0 - 71 MB | NPU
| HRNetFace | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 1.352 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).