|
Download README.md from qualcomm/MobileFaceNet: direct link, hf CLI and curl.
- Browser
- Download file 11.4 kB
-
https://huggingface.co/qualcomm/MobileFaceNet/resolve/main/README.md
- Command line
-
hf download hf://qualcomm/MobileFaceNet/README.md
-
curl -L -o README.md https://huggingface.co/qualcomm/MobileFaceNet/resolve/main/README.md
11.4 kB
| library_name: pytorch | |
| license: apache-2.0 | |
| tags: | |
| - real_time | |
| - bu_auto | |
| - android | |
| pipeline_tag: object-detection | |
|  | |
| # MobileFaceNet: Optimized for Qualcomm Devices | |
| MobileFaceNet is an efficient CNN that maps a 112x112 face image to a compact 128-dimensional embedding. Two embeddings are compared via cosine similarity to determine whether they belong to the same person, achieving 99.48% accuracy on the LFW benchmark. The model uses depthwise-separable convolutions and inverted residual blocks (MobileNetV2-style) to stay under 1M parameters, making it well-suited for real-time face verification on mobile and edge devices. Trained with ArcFace loss on MS-Celeb-1M. | |
| This is based on the implementation of MobileFaceNet found [here](https://github.com/foamliu/MobileFaceNet). | |
| 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/v0.63.0/src/qai_hub_models/models/mobile_facenet) 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.50, ONNX Runtime 1.27.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.63.0/mobile_facenet-onnx-float.zip) | |
| | ONNX | w8a16 | Universal | QAIRT 2.50, ONNX Runtime 1.27.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.63.0/mobile_facenet-onnx-w8a16.zip) | |
| | QNN_DLC | float | Universal | QAIRT 2.50 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.63.0/mobile_facenet-qnn_dlc-float.zip) | |
| | QNN_DLC | w8a16 | Universal | QAIRT 2.50 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.63.0/mobile_facenet-qnn_dlc-w8a16.zip) | |
| | TFLITE | float | Universal | QAIRT 2.50 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.63.0/mobile_facenet-tflite-float.zip) | |
| For more device-specific assets and performance metrics, visit **[MobileFaceNet on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/mobile_facenet)**. | |
| ### Option 2: Export with Custom Configurations | |
| Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.63.0/src/qai_hub_models/models/mobile_facenet) 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 [MobileFaceNet on GitHub](https://github.com/qualcomm/ai-hub-models/blob/v0.63.0/src/qai_hub_models/models/mobile_facenet) for usage instructions. | |
| ## Model Details | |
| **Model Type:** Model_use_case.object_detection | |
| **Model Stats:** | |
| - Embedding dimension: 128 | |
| - Input resolution: 112x112 | |
| - Model checkpoint: mobilefacenet.pt | |
| - Model size (float): 4MB | |
| - Number of parameters: 1M | |
| ## Performance Summary | |
| | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | |
| |---|---|---|---|---|---|--- | |
| | MobileFaceNet | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.531 ms | 0 - 38 MB | NPU | |
| | MobileFaceNet | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.545 ms | 0 - 41 MB | NPU | |
| | MobileFaceNet | ONNX | float | Snapdragon® X2 Elite | 0.609 ms | 1 - 1 MB | NPU | |
| | MobileFaceNet | ONNX | float | Snapdragon® X Elite | 1.034 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.699 ms | 0 - 57 MB | NPU | |
| | MobileFaceNet | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 1.467 ms | 0 - 59 MB | NPU | |
| | MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 1.457 ms | 0 - 4 MB | NPU | |
| | MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.001 ms | 0 - 5 MB | NPU | |
| | MobileFaceNet | ONNX | float | Qualcomm® QCS8450 | 1.467 ms | 0 - 59 MB | NPU | |
| | MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 1.393 ms | 0 - 4 MB | NPU | |
| | MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.034 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 0.545 ms | 0 - 41 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.377 ms | 0 - 47 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.451 ms | 0 - 51 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Snapdragon® X2 Elite | 0.459 ms | 1 - 1 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Snapdragon® X Elite | 0.819 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.575 ms | 0 - 59 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 1.054 ms | 0 - 61 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 2.372 ms | 0 - 3 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 0.879 ms | 0 - 4 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 0.797 ms | 0 - 3 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® QCS8450 | 1.054 ms | 0 - 61 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 0.907 ms | 0 - 3 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 0.819 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 5.437 ms | 0 - 158 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 0.924 ms | 0 - 46 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.451 ms | 0 - 51 MB | NPU | |
| | MobileFaceNet | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 0.924 ms | 0 - 46 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.532 ms | 0 - 35 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.591 ms | 0 - 34 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Snapdragon® X2 Elite | 0.733 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Snapdragon® X Elite | 1.343 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 0.786 ms | 0 - 50 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 1.624 ms | 0 - 55 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 1.464 ms | 0 - 3 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.171 ms | 0 - 30 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Qualcomm® QCS8450 | 1.624 ms | 0 - 55 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 1.496 ms | 0 - 3 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.343 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 0.591 ms | 0 - 34 MB | NPU | |
| | MobileFaceNet | QNN_DLC | float | Qualcomm® SA8295P | 1.907 ms | 0 - 33 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.389 ms | 0 - 42 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.497 ms | 0 - 41 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 0.585 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® X Elite | 1.154 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.682 ms | 0 - 53 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 1.202 ms | 0 - 58 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 2.705 ms | 0 - 2 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 0.966 ms | 0 - 3 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 0.997 ms | 0 - 2 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA8650P | 1.205 ms | 0 - 38 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA8255P | 1.205 ms | 0 - 38 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 1.202 ms | 0 - 58 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 1.091 ms | 0 - 2 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.154 ms | 0 - 0 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 6.035 ms | 0 - 148 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 1.081 ms | 0 - 40 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.497 ms | 0 - 41 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA8295P | 1.456 ms | 0 - 40 MB | NPU | |
| | MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.081 ms | 0 - 40 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 0.533 ms | 0 - 36 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.562 ms | 0 - 35 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 0.699 ms | 9 - 60 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 1.411 ms | 0 - 53 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 1.442 ms | 0 - 6 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 0.976 ms | 0 - 2 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® SA8775P | 16.232 ms | 1 - 6 MB | CPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® SA8650P | 16.232 ms | 1 - 6 MB | CPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® SA8255P | 16.232 ms | 1 - 6 MB | CPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® QCS8450 | 1.411 ms | 0 - 53 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 1.357 ms | 0 - 5 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 0.562 ms | 0 - 35 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® SA7255P | 4.497 ms | 0 - 38 MB | NPU | |
| | MobileFaceNet | TFLITE | float | Qualcomm® SA8295P | 1.702 ms | 0 - 33 MB | NPU | |
| ## License | |
| * The license for the original implementation of MobileFaceNet can be found | |
| [here](https://github.com/foamliu/MobileFaceNet/blob/master/LICENSE). | |
| ## References | |
| * [Source Model Implementation](https://github.com/foamliu/MobileFaceNet) | |
| ## 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). | |