--- library_name: pytorch license: other tags: - real_time - bu_auto - android pipeline_tag: object-detection --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/cavaface/web-assets/model_demo.png) # CavaFace: Optimized for Qualcomm Devices A PyTorch-based framework for training face recognition models that generates facial embeddings for verification and identification tasks This is based on the implementation of CavaFace found [here](https://github.com/cavalleria/cavaface). 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/cavaface) 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/cavaface/releases/v0.51.0/cavaface-onnx-float.zip) | QNN_DLC | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/cavaface/releases/v0.51.0/cavaface-qnn_dlc-float.zip) | TFLITE | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/cavaface/releases/v0.51.0/cavaface-tflite-float.zip) For more device-specific assets and performance metrics, visit **[CavaFace on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/cavaface)**. ### 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/cavaface) 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 [CavaFace on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/cavaface) for usage instructions. ## Model Details **Model Type:** Model_use_case.object_detection **Model Stats:** - Model checkpoint: IR_SE_100_Combined_Epoch_24.pt - Input resolution: 112x112 - Number of parameters: 65.5M - Model size (float): 249.96MB ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | CavaFace | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 2.261 ms | 0 - 92 MB | NPU | CavaFace | ONNX | float | Snapdragon® X2 Elite | 2.346 ms | 126 - 126 MB | NPU | CavaFace | ONNX | float | Snapdragon® X Elite | 4.509 ms | 126 - 126 MB | NPU | CavaFace | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 3.205 ms | 0 - 112 MB | NPU | CavaFace | ONNX | float | Qualcomm® QCS8550 (Proxy) | 4.405 ms | 0 - 132 MB | NPU | CavaFace | ONNX | float | Qualcomm® QCS9075 | 6.782 ms | 0 - 3 MB | NPU | CavaFace | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 2.653 ms | 0 - 82 MB | NPU | CavaFace | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 2.231 ms | 0 - 83 MB | NPU | CavaFace | QNN_DLC | float | Snapdragon® X2 Elite | 2.614 ms | 0 - 0 MB | NPU | CavaFace | QNN_DLC | float | Snapdragon® X Elite | 4.443 ms | 0 - 0 MB | NPU | CavaFace | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 3.189 ms | 0 - 129 MB | NPU | CavaFace | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 24.697 ms | 0 - 81 MB | NPU | CavaFace | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 4.306 ms | 0 - 2 MB | NPU | CavaFace | QNN_DLC | float | Qualcomm® SA8775P | 6.924 ms | 0 - 80 MB | NPU | CavaFace | QNN_DLC | float | Qualcomm® QCS9075 | 6.742 ms | 0 - 2 MB | NPU | CavaFace | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 9.58 ms | 0 - 217 MB | NPU | CavaFace | QNN_DLC | float | Qualcomm® SA7255P | 24.697 ms | 0 - 81 MB | NPU | CavaFace | QNN_DLC | float | Qualcomm® SA8295P | 8.002 ms | 0 - 199 MB | NPU | CavaFace | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 2.621 ms | 0 - 84 MB | NPU | CavaFace | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 2.222 ms | 0 - 96 MB | NPU | CavaFace | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 3.13 ms | 0 - 244 MB | NPU | CavaFace | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 24.538 ms | 0 - 95 MB | NPU | CavaFace | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 4.212 ms | 0 - 2 MB | NPU | CavaFace | TFLITE | float | Qualcomm® SA8775P | 6.873 ms | 0 - 95 MB | NPU | CavaFace | TFLITE | float | Qualcomm® QCS9075 | 6.634 ms | 0 - 128 MB | NPU | CavaFace | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 9.442 ms | 0 - 332 MB | NPU | CavaFace | TFLITE | float | Qualcomm® SA7255P | 24.538 ms | 0 - 95 MB | NPU | CavaFace | TFLITE | float | Qualcomm® SA8295P | 7.967 ms | 0 - 210 MB | NPU | CavaFace | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 2.577 ms | 0 - 98 MB | NPU ## License * The license for the original implementation of CavaFace can be found [here](https://github.com/cavalleria/cavaface/blob/master/LICENSE). ## References * [Source Model Implementation](https://github.com/cavalleria/cavaface) ## 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).