首页|基于改进YOLOv5的护目镜佩戴检测算法

基于改进YOLOv5的护目镜佩戴检测算法

扫码查看
目的 解决目前危化实验室、工厂等危险环境下护目镜佩戴情况检测存在的人工检查效率低下、无法有效保障人员眼部安全等问题。方法 首先构建出护目镜佩戴检测数据集,其中包含4个真实场景图片与部分网络爬取数据集,并通过数据增强等手段将原始的3 383张扩充至5 462张图片,构成最终数据集,使各个样本数量达到均衡,有效预防了因样本不均衡导致的模型精度低的问题;接着提出改进型YOLOv5目标检测算法来实现对护目镜佩戴情况的自动检测,算法在YOLOv5中添加SPD小目标检测模块,该模块完全消除了传统卷积模块中导致信息丢失的步长卷积和池化操作,使网络保留更多信息,引入坐标注意力机制解决了因添加SPD带来的相邻位置关系无法有效提取的问题;同时,将原本的损失函数替换为SIoU损失函数,有效解决了真实框与目标框相互包含情况下的IoU计算问题,减少了计算自由度,降低了模型计算量,提升了模型准确率。结果 在护目镜配戴检测数据集上的实验结果表明:改进型的YOLOv5模型在护目镜佩戴检测数据集上的平均精度为72。7%,相较于原始YOLOv5模型平均精度提高了 5。6%。结论 该模型实现了对复杂环境下护目镜佩戴情况的基本检测。
Goggle Wearing Detection Algorithm Based on Improved YOLOv5
Objective In response to the problems of low efficiency in manual inspection and the inability to effectively ensure the eye safety of personnel in hazardous environments such as chemical laboratories and factories,this study aims to address these issues in the detection of goggles wearing.Methods Firstly,a dataset for goggles wearing detection was constructed,including four real-scene images and a portion of data obtained by web crawling.By means of data augmentation,the original dataset of 3383 images was expanded to 5462 images to form the final dataset,ensuring the balance of sample quantities and effectively preventing the problem of low model accuracy caused by sample imbalance.Then,an improved YOLOv5 object detection algorithm was proposed to automatically detect the wearing status of goggles.In the YOLOv5 algorithm,an SPD small target detection module was added to completely eliminate the stride convolution and pooling operations that lead to information loss in traditional convolution modules,allowing the network to retain more information.Subsequently,a coordinate attention mechanism was introduced to address the problem of ineffective extraction of neighboring position relationships caused by the addition of SPD.Moreover,the original loss function was replaced with the SIoU loss function to effectively solve the IoU calculation problem when the real box and the target box contain each other,reducing the degrees of freedom in calculations,decreasing the model's computational complexity,and improving model accuracy.Results Experimental results on the goggles wearing detection dataset show that the improved YOLOv5 model has an average precision of 72.7%on the goggle wearing detection dataset,which is 5.6%higher than the average precision of the original YOLOv5 model on the same dataset.Conclusion This model realizes the basic detection of goggles wearing status in complex environments.

goggles wearing detectiondata augmentationobject detectionSPDcoordinate attention mechanism

聂壮壮、汪军、黄翔翔

展开 >

安徽工程大学计算机与信息学院,安徽芜湖 241000

护目镜佩戴检测 数据增强 目标检测 SPD 坐标注意力机制

2025

重庆工商大学学报(自然科学版)
重庆工商大学

重庆工商大学学报(自然科学版)

影响因子:0.548
ISSN:1672-058X
年,卷(期):2025.42(1)