Technical solutions to the problem of ID photo posing
The common features in ID documents such as positive face strictly facing forward and neutral expression may lead to DeepFace misjudgment, which can be improved by the following methods:
- forced alignment: Use first
DeepFace.detectFace()Extract aligned face regions to ensure input standardization - <strong]Extended Detection Parameters: Settings
align=TrueAt the same time, adjustmentsdetector_backend='ssd'to fit the features of the front face - <strong]Synthetic Data Enhancement: Artificially generate ±15 degree deflection samples and slight expression change samples for ID photos.
- <strong]Multi-feature fusion: In addition to facial embedding, geometric features such as eye distance and nose bridge proportions are combined to aid judgment
Optimization suggestions for special scenarios: 1) Banks and other institutions can build special positive face models; 2) For special expressions such as squinting, disable sentiment analysis (actions=['age','gender']); 3) use ofnormalization='base'Change the way of feature normalization. With these adjustments, the pass rate of ID photo recognition can be improved by 20-30%.
This answer comes from the articleDeepFace: a lightweight Python library that implements facial age, gender, emotion, race recognitionThe































