Detection of dress code violations based on improved YOLOv5s
Addressing the issue of non-compliance in the attire of culinary staff in the complex background of the catering kitchen,where existing algorithms tend to have low detection accuracy and are prone to false detections and omissions,this paper proposed an improved attire compliance detection algorithm,YOLOv5s-ESW,based on YOLOv5s.Firstly,a novel multi-scale attention mechanism was introduced into the main network to enhance the network's feature extraction capability.Secondly,within the neck network,the spatial and channel reconstruction convolution module(SCConv)replaced the original convolution module(Conv)to reduce model parameter redundancy and simultaneously enhanced model accuracy.Lastly,the WIoU loss function was introduced in the prediction part to accelerate convergence and enhance the model's generalization capability.The improved algorithm was applied to a self-compiled dataset of catering kitchen staff attire for experimentation.The results validated that the improved model has elevated its mean detection accuracy by 4.1%and reduced its parameter quantity by 11.4%.While enhancing detection accuracy,the model also reduced network complexity,thereby satisfying the requirements for attire compliance detection among catering kitchen staff.