Failure to wear a helmet correctly is a significant cause of injury or death in the construction industry and industrial production. Traditional supervision methods predominantly rely on manual oversight, incurring substantial costs and demonstrating inefficiencies. To address this pressing issue, the present work introduces an advanced intelligent detection technology based on deep learning algorithms, which leverages the YOLOv5 algorithm to train a dataset, enabling real-time assessment of correct helmet usage among personnel while promptly issuing warnings when deviations are detected. Simultaneously, to mitigate challenges related to object leakage and false detections in complex backgrounds, the model’s performance is further enhanced by optimizing Generalized Intersection over Union, Distance Intersection over Union, and Complete Intersection over Union loss functions and improving the Mosaic-9 data enhancement algorithm. Empirical results validate the system’s efficacy, with the optimized YOLOv5 algorithm achieving an impressive precision rate of 93.16% and a robust recall rate of 88.96%. These findings underscore the system’s ability to accurately identify instances of workers’ improper helmet usage. This enhanced YOLOv5-based intelligent detection technology provides a more efficient and accurate method for monitoring helmet compliance within the construction industry and industrial production, effectively addressing the limitations of traditional manual supervision and ensuring precision in complex operational contexts.