# CFormerFaceNet: Efficient Lightweight Network Merging a CNN and Transformer for Face Recognition
## 4 Experiments
### Comparison with Different CNN Models for Face Recognition  
We compared the performance of CFormerFaceNet with popular CNN models used for face recognition in recent years. ArcFace [32] was used as the loss function. Except for GhostFaceNet, the results of other lightweight face recognition models on different datasets were obtained from [54]. It can be seen in Table 3 that compared with these CNN models, the proposed CFormerFaceNet model achieved the best performance on the LFW and CALFW test datasets. In addition, its performance on the CPLFW, CFP_FF, CFP_FP, and AgeDB-30 datasets was also competitive. It is noteworthy that our computational cost was much lower than that of other lightweight face recognition models. The GhostFaceNet model had the most similar computational complexity to CFormerFaceNet among the lightweight face recognition models, but its computational cost was still 3.75 times that of CFormerFaceNet, and its performance on the LFW, CALFW, and CFP_FP test datasets was inferior to that of CFormerFaceNet. The significantly lower computational demand of CFormerFaceNet can significantly reduce the processing requirements of edge-device processors for face recognition tasks.  
Speed Comparison of Different Lightweight Face Recognition Models on a Computer and an Embedded Device  
We conducted the speed test on a computer (i9-9900K CPU). CFormerFaceNet was compared with the various lightweight models reported in [39]. The performance of the models on the LFW, as well as their speeds, is illustrated in Table 4. CFormerFaceNet achieved the best performance on the LFW dataset and it was faster than EfficientNet, MobileNetV2, and MobileFaceNet despite being run on a much older i9 processor.  
Additionally, we carried out experiments comparing the running speeds of CFormerFaceNet and MobileFaceNet on a resource-limited embedded device based on an ARMv8 processor rev1(vsl) \(\times 4\) for an additional demonstration of the superiority of the proposed model in such environments (Table 5).  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Model** & **Accuracy on LFW** & **Speed** \\ \hline EfficientNet & 99.53\% & 36.50 ms \\ MobileNetV2 & 99.55\% & 25.67 ms \\ MobileFaceNet & 99.53\% & 23.67 ms \\ GhostFaceNet & 99.63\% & 15.30 ms \\ CformerFaceNet (ours) & 99.73\% & 19.00 ms \\ \hline \hline \end{tabular}
\end{table}
Table 4: Speed comparison of CFormerFaceNet and various lightweight face recognition models on a computer.  
\begin{table}
\begin{tabular}{l l l l l l l l l} \hline \hline
**Model** & **LFW** & **CPLFW** & **CALFW** & **CFP\_FF** & **CFP\_FP** & **AgeDB-30** & **PARAMs** & **FLOPs** \\ \hline DensNet & 99.22\% & 86.84\% & 93.03\% & 99.18\% & 94.44\% & - & 66.37 M & 8.52 G \\ ResNet-50 & 99.64\% & 90.57\% & 95.28\% & 99.50\% & 96.32\% & 95.2\% & 40.29 M & 2.19 G \\ VarGFaceNet & 99.70\% & 88.55\% & 95.15\% & 99.50\% & 96.90\% & 97.5\% & - & - \\ ProxylessFaceNAS & 99.20\% & 84.17\% & 92.55\% & 98.80\% & 94.70\% & 94.4\% & - & - \\ EfficientNet & 99.53\% & 90.92\% & 95.78\% & 99.5\% & 96.32\% & - & 6.58 M & 1.14 G \\ MobileNetV2 & 99.55\% & 89.43\% & 95.34\% & 99.48\% & 93.17\% & - & 2.26 M & 0.43 G \\ MobileFaceNetV1 & 99.40\% & 87.17\% & 94.47\% & 99.50\% & 95.80\% & 96.4\% & - & - \\ MobileFaceNet & 99.53\% & 90.34\% & 95.42\% & 99.55\% & 95.26\% & 97.6\% & 1.0 M & 0.45 G \\ ShuffleFaceNet & 99.70\% & 88.50\% & 95.05\% & 99.60\% & 96.30\% & 97.3\% & 2.60 M & 0.58 G \\ GhostFaceNet [39] & 99.50\% & - & 94.63\% & - & 94.54 & - & 0.82 M & 0.15 G \\ CformerFaceNet (ours) & **99.73\%** & 90.20\% & **95.80\%** & 99.71\% & 95.06\% & 97.12\% & 1.7 M & **0.04 G** \\ \hline \hline \end{tabular}
\end{table}
Table 3: Performance comparison of CFormerFaceNet and the various CNN models for face recognition on the LFW, CPLFW, CALFW, CFP_FF, CFP_FP, and AgeDB-30 datasets.