File size: 12,082 Bytes
c9c0357
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
---
library_name: pytorch
license: apache-2.0
tags:
- real_time
- bu_auto
- android
pipeline_tag: object-detection

---

![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/web-assets/model_demo.png)

# 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.61.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.45, ONNX Runtime 1.27.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.61.0/mobile_facenet-onnx-float.zip)
| ONNX | w8a16 | Universal | QAIRT 2.45, ONNX Runtime 1.27.1 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.61.0/mobile_facenet-onnx-w8a16.zip)
| QNN_DLC | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.61.0/mobile_facenet-qnn_dlc-float.zip)
| QNN_DLC | w8a16 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.61.0/mobile_facenet-qnn_dlc-w8a16.zip)
| TFLITE | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mobile_facenet/releases/v0.61.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.61.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.61.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® X2 Elite | 0.583 ms | 1 - 1 MB | NPU
| MobileFaceNet | ONNX | float | Snapdragon® X Elite | 1.038 ms | 0 - 0 MB | NPU
| MobileFaceNet | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.7 ms | 0 - 51 MB | NPU
| MobileFaceNet | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 1.511 ms | 0 - 54 MB | NPU
| MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 1.471 ms | 0 - 4 MB | NPU
| MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.002 ms | 0 - 4 MB | NPU
| MobileFaceNet | ONNX | float | Qualcomm® QCS8450 | 1.511 ms | 0 - 54 MB | NPU
| MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 1.38 ms | 0 - 3 MB | NPU
| MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.038 ms | 0 - 0 MB | NPU
| MobileFaceNet | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 0.567 ms | 0 - 36 MB | NPU
| MobileFaceNet | ONNX | float | Snapdragon® 8 Elite Mobile | 0.567 ms | 0 - 36 MB | NPU
| MobileFaceNet | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.51 ms | 0 - 33 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Snapdragon® X2 Elite | 0.446 ms | 1 - 1 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Snapdragon® X Elite | 0.824 ms | 0 - 0 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.581 ms | 0 - 53 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 1.103 ms | 0 - 57 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 2.958 ms | 0 - 3 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 0.851 ms | 0 - 4 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 0.804 ms | 0 - 4 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® QCS8450 | 1.103 ms | 0 - 57 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 0.914 ms | 0 - 3 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 0.824 ms | 0 - 0 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 5.426 ms | 0 - 161 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 0.909 ms | 0 - 41 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.459 ms | 0 - 40 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 0.459 ms | 0 - 40 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.369 ms | 0 - 42 MB | NPU
| MobileFaceNet | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 0.909 ms | 0 - 41 MB | NPU
| MobileFaceNet | QNN_DLC | float | Snapdragon® X2 Elite | 0.696 ms | 0 - 0 MB | NPU
| MobileFaceNet | QNN_DLC | float | Snapdragon® X Elite | 1.305 ms | 0 - 0 MB | NPU
| MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 0.807 ms | 0 - 46 MB | NPU
| MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 1.63 ms | 0 - 50 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 1.467 ms | 0 - 3 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 4.53 ms | 0 - 30 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 1.15 ms | 0 - 12 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® SA8775P | 1.674 ms | 0 - 33 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® SA8650P | 1.674 ms | 0 - 33 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® SA8255P | 1.674 ms | 0 - 33 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® QCS8450 | 1.63 ms | 0 - 50 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 1.499 ms | 0 - 2 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 1.305 ms | 0 - 0 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 0.606 ms | 0 - 30 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® SA7255P | 4.53 ms | 0 - 30 MB | NPU
| MobileFaceNet | QNN_DLC | float | Qualcomm® SA8295P | 2.034 ms | 0 - 29 MB | NPU
| MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 0.606 ms | 0 - 30 MB | NPU
| MobileFaceNet | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.478 ms | 0 - 31 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 0.605 ms | 0 - 0 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® X Elite | 1.156 ms | 0 - 0 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.697 ms | 0 - 47 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 1.252 ms | 0 - 48 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 3.611 ms | 0 - 2 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 0.992 ms | 0 - 2 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 2.217 ms | 0 - 36 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 0.995 ms | 0 - 71 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA8775P | 1.198 ms | 0 - 38 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA8650P | 1.198 ms | 0 - 38 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA8255P | 1.198 ms | 0 - 38 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 1.252 ms | 0 - 48 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 1.095 ms | 0 - 2 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 1.156 ms | 0 - 0 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 6.123 ms | 0 - 149 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 1.104 ms | 0 - 36 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 0.489 ms | 0 - 35 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA7255P | 2.217 ms | 0 - 36 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Qualcomm® SA8295P | 1.584 ms | 0 - 34 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 0.489 ms | 0 - 35 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.398 ms | 0 - 37 MB | NPU
| MobileFaceNet | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 1.104 ms | 0 - 36 MB | NPU
| MobileFaceNet | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 0.687 ms | 0 - 48 MB | NPU
| MobileFaceNet | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 1.481 ms | 0 - 49 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 1.444 ms | 0 - 6 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 4.498 ms | 0 - 33 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 0.977 ms | 0 - 2 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® SA8775P | 1.502 ms | 0 - 36 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® SA8650P | 1.502 ms | 0 - 36 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® SA8255P | 1.502 ms | 0 - 36 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® QCS8450 | 1.481 ms | 0 - 49 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 1.347 ms | 0 - 5 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 0.575 ms | 0 - 32 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® SA7255P | 4.498 ms | 0 - 33 MB | NPU
| MobileFaceNet | TFLITE | float | Qualcomm® SA8295P | 1.81 ms | 0 - 28 MB | NPU
| MobileFaceNet | TFLITE | float | Snapdragon® 8 Elite Mobile | 0.575 ms | 0 - 32 MB | NPU
| MobileFaceNet | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.509 ms | 0 - 31 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).