To solve the problem of low accuracy of existing target detection algorithms in complex environments in a printing workshop, we propose a new target recognition algorithm based on YOLOv5 algorithm. First, the new algorithm uses an efficient channel attention mechanism (ECA) to enhance the extraction of workers’ facial features. Second, it introduces a weighted bidirectional feature pyramid network (BiFPN), which enhances the ability to extract features at different scales of images and effectively improving the accuracy of target recognition. Subsequently, it replaces the original loss function with the efficient intersection over union (EIoU) loss function, which makes the prediction box closer to the real world situation and improves the algorithm recognition accuracy. Finally, an enhanced dataset is created to address the low confidence of the model due to low number of samples wearing masks and side face samples in the original dataset. Based on the experimental results, the average accuracy of the improved algorithm model reached 91.1%, an increase of 2.2% over the original model, and the average accuracy of the data-enhanced algorithm model reached 93.8%, an improvement of 4.9% over the original model. The model’s F1 score of 94.1 was the highest of all models tested, meeting the detection needs of printing shop workers wearing masks. The improved YOLOv5 algorithm proposed in this paper achieves real-time detection of mask-wearing workers in the printing shop, which can replace manual detection and reduce personnel costs.
Rui Zhu, Yuansheng Qi, Yongbin Zhang, "Mask Wearing Detection for Printing Shop Workers based on Improved YOLOv5" in Journal of Imaging Science and Technology, 2024, pp 1 - 10, https://doi.org/10.2352/J.ImagingSci.Technol.2024.68.2.020408