| The use of box elevators is becoming more and more popular in daily life and production.However,some safety issues such as the prevention and control of the epidemic in elevator and the elevator shaft operation emerge in endlessly.To solve these issues depends on the timely decision of elevator supervision department.The traditional elevator safety supervision still depends on manpower supervision,whose effectiveness cannot be guaranteed.To solve the problem,computer vision technology is used to realize the detection of mask wearing in elevators and the detection of helmet wearing in elevator shafts.When a violation is detected,the supervisor will be reminded to take corresponding reactions immediately.Including improvement of YOLOv5 algorithm in many aspects,the main research contents of this paper are as follows:(1)Aiming at solving the problem that YOLOv5 uses maximum pooling to downsample the feature map,which is easy to lose important feature information,Softpool is used as the pooling method in the SPP module to retain important feature information;(2)GIo U,the metric used for assessing YOLOv5 bounding box regression loss,will degenerate into Io U in some cases.Therefore CIo U_Loss,which is with more factors,is used instead of GIo U,so that the model converges better during training.(3)In view of the problem that the weighted NMS method in YOLOv5 is easy to filter out non-redundant bounding boxes,DIo U is used as the metric of NMS method,so that it can consider the distance between the center points of the boxes and avoid filtering out non-redundant bounding boxes,where the recall rate is improved.In this paper,a rich data set of masks and helmets wearing is produced and used to train the model based on the improved YOLOv5 algorithm.After a large number of model tests,the improved algorithm shows better performance than the original one.The recall rate increased 5.5 percent on average.In addition,the improved YOLOv5 model is successfully deployed,the mask and helmet detection system is designed and implemented,and the main functions such as real-time detection visualization,detection result storage,and real-time alarm are realized,which effectively solved the problem brought by manpower supervision. |