Since the end of 2019,the new coronavirus pneumonia epidemic has been effectively controlled under the leadership of the party and the state.Studies have shown that wearing a mask is the most convenient and effective way to stop the spread of the virus.To prevent the epidemic from recurring,laws and regulations require subway stations and other public places to wear masks to enter.Nowadays,the widespread use of manpower supervision is inefficient and may increase the risk of staff infection.This paper designs and implements a gate system that automatically detects whether passengers are wearing masks at the entrance of a subway station based on a deep learning target detection algorithm,reducing the risk of infection of passengers and staff,and improving the efficiency of investigation.The main contents of the thesis are as follows:(1)Research the principle of target detection algorithm based on deep learning.The Mobile Net V2-SSD target detection algorithm is selected to detect the wearing of face masks.9000 open source face images in RMFRD,CASIA-Face V5,and Celeb A databases are used as training sets,and the target detection model is trained using the transfer learning method.The network performance is tested under the test set,and the m AP is 0.7798.(2)In order to improve the performance of model detection,add a self-built data set to retrain the Mobile Net V2-SSD target detection model.Establish a training set containing 13,500 images and a test set containing 1,350 images,and perform image cropping and data enhancement on the training set images.After testing,it can achieve precise positioning of the target face prediction frame,with fewer missed and false detections,and m AP has increased by2.5% compared with the previous one.(3)Use the improved Retina Face-Mobile Net V2 algorithm to further improve the detection effect of face mask wearing.Use Retina Face to regress the face in the image,and then classify the image in the prediction frame through Mobile Net V2 to achieve face mask wearing detection.After testing,the use of Retina Face-Mobile Net V2 face detection model has improved the face prediction frame positioning effect and classification effect compared with the Mobile Net V2-SSD target detection model,the false detection and missed detection are reduced,and the m AP is increased by 2.21%.(4)The Raspberry Pi is used as the client’s main control module,responsible for the triggering of the peripheral function sub-modules;the computer is used as the server for target detection,and the detection results are fed back to the client.The server and the client establish communication through Socket.connection.The system detects whether passengers entering the monitoring range are wearing masks,controls the opening and closing of the gates based on the detection results,and broadcasts the passengers wearing masks by voice. |