| As one of the most widely used fields of artificial intelligence,face recognition has attracted much attention due to its great potential in practical applications such as public security,attendance and access control,and convenient payment.With the advancement of construction industry management information,more and more construction enterprises have begun to use artificial intelligence for management,and face recognition technology has also been widely used in construction site safety supervision.Some existing face recognition algorithms have problems such as slow speed,low accuracy and face occlusion.In view of the above problems,this paper conducts in-depth research on target detection algorithm and face recognition algorithm,which provides reference value in algorithm optimization and face recognition system design.A two-stage face recognition algorithm is proposed.The main research results and innovations are as follows:(1)The first stage is to quickly locate the face.In this paper,the YOLOv5 target detection network is used to quickly locate the face position by semantic segmentation of the face task.The network has the advantages of high detection accuracy and fast recognition speed.The accuracy rate reaches 95.72% after testing,and the recognition speed reaches 140 frames per second at the fastest.Through the face positioning experiment and the face wearing mask,the ideal recognition accuracy is achieved,and the real-time face detection function can be realized.(2)The second stage is face recognition.In order to solve the problem of low accuracy of facial occlusion recognition in face recognition networks,an optimization algorithm based on Face Net was proposed.On the basis of Face Net,the algorithm introduces lightweight Ghost module as part of feature extraction to extract face features better,and the integration of attention mechanism and feature pyramid enhancement feature extraction network to achieve the local information amplification of the three kinds of scale feature map,strengthen the feature extraction under different field of perception,enhance the more important feature information.Through comparison and analysis with Face Net method,the face recognition algorithm in this paper achieves good recognition effect,not only achieving 99.62% accuracy in LWF face data set,but also achieving 98.71% high accuracy in face recognition with occlusion,which can accurately identify occlusion face targets.In this paper,the fast YOLOv5 algorithm and the high accuracy Face Net face recognition algorithm are improved and combined into a two-stage face recognition algorithm.In addition to the lightweight optimization of the algorithm,the local extraction of feature information is explored.Under the circumstances of adverse factors such as masks,sunglasses and poor facial posture,the experiment proves that the proposed algorithm has good robustness. |