| With the enhancement of social safety awareness,more and more safety production sites and construction sites will monitor and record safety production and life by installing surveillance cameras.Among them,safety helmets are an important tool for construction workers to protect their heads,and their wearing detection has become one of the necessary contents of safety monitoring.Therefore,in this paper,the research on the automatic detection algorithm of helmet wearing is carried out to replace manual detection and achieve the purpose of saving human resources efficiently and stably.The specific research work and innovation points are as follows:(1)This paper designs a safety helmet wearing detection algorithm based on EfficientDet,aiming at the problems of low feature extraction quality,slow detection speed,large amount of parameters,and poor small target recognition effect of existing detection algorithms.Firstly,the k-means++method is used to optimize the initial cluster center to generate candidate boxes.Then the SeparableConv2D network is introduced to enhance the quality of feature extraction,combined with the simple and efficient weighted Bi-directional Feature Pyramid Network proposed in the EfficientDet algorithm to extract image feature maps,Finally,the CC-Loss function is used as the classification loss function to complete the model parameter learning.The innovation of this algorithm lies in the addition of kmeans++algorithm,which solves the problem of unstable selection of the initial cluster center;Improve the MBConv module in the EfficientDet network,replace the DepthwiseConv2D with the SeparableConv2D network,and improve the quality of feature extraction;By introducing the CC-Loss loss function,by constraining the specific relationship between classes and channels and maintaining the separability within and between classes,a feature embedding with good intra-class compactness and inter-class separability is obtained,the model detection accuracy and running speed are improved.The experimental results on the open source helmet dataset show that the helmet wearing detection accuracy of the improved EfficientDet model reaches 98.75%,the mAP reaches 90.02%,and the FPS reaches 23.4.(2)Aiming at the problem of low detection accuracy of helmets in complex scenes such as underground mines or strong light,this paper further improves and designs the ResNet50-EfficientDet detection algorithm.The method consists of a backbone network EfficientNet-RC,a feature extraction network BiFPN,an Adaptive Spatial Feature Fusion module,and a prediction network that integrates ResNet50.Its innovation lies in that,by combining the Resnet50 network to better fit the classification function,the problem of gradient disappearance is prevented,the information loss of the feature layer in the feature extraction network is reduced by residual error,to obtain higher detection accuracy;Introduce ASFF to adaptively fuse the features of different scales generated by BiFPN,and input them into the prediction network of the model;The DIoU Loss function is used in the regression prediction network.By directly minimizing the distance between the real frame and the predicted frame,the convergence speed of the function is accelerated,and the speed of model detection is further improved.The experimental results on the self-built complex scene helmet dataset CSHD show that the ResNet50-EfficientDet model proposed in this paper has a helmet wearing detection accuracy reaches 89.24%,mAP reaches 83.76%,and FPS reaches 19.4. |