Journal of Computer Applications ›› 2022, Vol. 42 ›› Issue (4): 1292-1300.DOI: 10.11772/j.issn.1001-9081.2021071246
Special Issue: CCF第36届中国计算机应用大会 (CCF NCCA 2021)
• The 36 CCF National Conference of Computer Applications (CCF NCCA 2020) • Previous Articles Next Articles
Jin ZHANG1, Peiqi QU1(), Cheng SUN2, Meng LUO2
Received:
2021-07-16
Revised:
2021-08-27
Accepted:
2021-08-31
Online:
2021-09-10
Published:
2022-04-10
Contact:
Peiqi QU
About author:
ZHANG Jin, born in 1979, Ph. D., professor. His research interests include artificial intelligence, software engineering.Supported by:
通讯作者:
屈佩琪
作者简介:
张锦(1979—),男,河南信阳人,教授,博士,CCF会员,主要研究方向:人工智能、软件工程基金资助:
CLC Number:
Jin ZHANG, Peiqi QU, Cheng SUN, Meng LUO. Safety helmet wearing detection algorithm based on improved YOLOv5[J]. Journal of Computer Applications, 2022, 42(4): 1292-1300.
张锦, 屈佩琪, 孙程, 罗蒙. 基于改进YOLOv5的安全帽佩戴检测算法[J]. 《计算机应用》唯一官方网站, 2022, 42(4): 1292-1300.
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.joca.cn/EN/10.11772/j.issn.1001-9081.2021071246
特征图尺度 | 锚框尺寸 | ||
---|---|---|---|
锚框1 | 锚框2 | 锚框3 | |
小尺度 | (11.9,18) | (21.5,30.8) | (30.8,43) |
中尺度 | (38.1,60) | (52.3,73.6) | (63,103.3) |
大尺度 | (89.2,135) | (120,207.5) | (209.4,324) |
Tab. 1 Anchor box size
特征图尺度 | 锚框尺寸 | ||
---|---|---|---|
锚框1 | 锚框2 | 锚框3 | |
小尺度 | (11.9,18) | (21.5,30.8) | (30.8,43) |
中尺度 | (38.1,60) | (52.3,73.6) | (63,103.3) |
大尺度 | (89.2,135) | (120,207.5) | (209.4,324) |
K-Means++聚类 | MCA模块 | AP50/% | mAP/% | |
---|---|---|---|---|
佩戴安全帽 | 未佩戴安全帽 | |||
× | × | 93.3 | 91.7 | 92.7 |
√ | × | 94.4 | 92.8 | 93.6 |
× | √ | 95.6 | 94.4 | 95.0 |
√ | √ | 96.7 | 95.2 | 96.0 |
Tab. 2 Performance comparison of different improvements of YOLOv5
K-Means++聚类 | MCA模块 | AP50/% | mAP/% | |
---|---|---|---|---|
佩戴安全帽 | 未佩戴安全帽 | |||
× | × | 93.3 | 91.7 | 92.7 |
√ | × | 94.4 | 92.8 | 93.6 |
× | √ | 95.6 | 94.4 | 95.0 |
√ | √ | 96.7 | 95.2 | 96.0 |
检测算法 | AP50 | 精度 | 召回率 | mAP | ||
---|---|---|---|---|---|---|
小目标 | 中等目标 | 大目标 | ||||
YOLOv5 | 83.0 | 97.9 | 99.3 | 76.4 | 92.5 | 92.7 |
MCA-YOLOv5-BackBone | 90.4 | 98.6 | 99.6 | 82.2 | 95.4 | 96.0 |
MCA-YOLOv5-Neck | 78.3 | 96.4 | 99.1 | 70.9 | 93.7 | 91.6 |
MCA-YOLOv5-Prediction | 82.7 | 97.1 | 99.2 | 72.5 | 92.8 | 92.4 |
Tab. 3 Comparison of MCA module fusion results
检测算法 | AP50 | 精度 | 召回率 | mAP | ||
---|---|---|---|---|---|---|
小目标 | 中等目标 | 大目标 | ||||
YOLOv5 | 83.0 | 97.9 | 99.3 | 76.4 | 92.5 | 92.7 |
MCA-YOLOv5-BackBone | 90.4 | 98.6 | 99.6 | 82.2 | 95.4 | 96.0 |
MCA-YOLOv5-Neck | 78.3 | 96.4 | 99.1 | 70.9 | 93.7 | 91.6 |
MCA-YOLOv5-Prediction | 82.7 | 97.1 | 99.2 | 72.5 | 92.8 | 92.4 |
目标类别 | 训练集目标数 | 测试集目标数 | 标注目标总数 |
---|---|---|---|
佩戴安全帽类别 | 81 836 | 11 316 | 93 152 |
未佩戴安全帽类别 | 98 187 | 12 021 | 110 208 |
Tab. 4 Dataset category distribution
目标类别 | 训练集目标数 | 测试集目标数 | 标注目标总数 |
---|---|---|---|
佩戴安全帽类别 | 81 836 | 11 316 | 93 152 |
未佩戴安全帽类别 | 98 187 | 12 021 | 110 208 |
类别 | 条目 | 版本 |
---|---|---|
硬件配置 | 显卡 | GeForce RTX 2080 Ti |
软件配置 | 系统 | Ubuntu 18.04 |
CPU | AMD Ryzen 7 3800X 8-Core | |
Python版本 | 3.8 | |
深度学习框架 | Pytorch | |
CUDA | 10.0 |
Tab. 5 Experimental operating environment
类别 | 条目 | 版本 |
---|---|---|
硬件配置 | 显卡 | GeForce RTX 2080 Ti |
软件配置 | 系统 | Ubuntu 18.04 |
CPU | AMD Ryzen 7 3800X 8-Core | |
Python版本 | 3.8 | |
深度学习框架 | Pytorch | |
CUDA | 10.0 |
检测算法 | AP50/% | mAP/% | 参数量/106 | 推理时间/ms | 模型大小/MB | |
---|---|---|---|---|---|---|
佩戴安全帽 | 未佩戴安全帽 | |||||
Faster R-CNN | 80.80 | 42.20 | 61.50 | 186.00 | 291 | 182.1 |
SSD | 78.80 | 68.20 | 73.50 | 23.75 | 126 | 188.0 |
YOLOv3 | 89.12 | 80.70 | 84.90 | 61.90 | 69 | 236.0 |
YOLOv3+SPP | 90.50 | 86.30 | 88.41 | 63.00 | 70 | 237.4 |
YOLOv5 | 93.30 | 91.70 | 92.70 | 7.10 | 36 | 14.8 |
MCA-YOLOv5 | 96.70 | 95.20 | 96.00 | 7.30 | 37 | 15.2 |
Tab. 6 Comparison of results of multiple detection algorithms
检测算法 | AP50/% | mAP/% | 参数量/106 | 推理时间/ms | 模型大小/MB | |
---|---|---|---|---|---|---|
佩戴安全帽 | 未佩戴安全帽 | |||||
Faster R-CNN | 80.80 | 42.20 | 61.50 | 186.00 | 291 | 182.1 |
SSD | 78.80 | 68.20 | 73.50 | 23.75 | 126 | 188.0 |
YOLOv3 | 89.12 | 80.70 | 84.90 | 61.90 | 69 | 236.0 |
YOLOv3+SPP | 90.50 | 86.30 | 88.41 | 63.00 | 70 | 237.4 |
YOLOv5 | 93.30 | 91.70 | 92.70 | 7.10 | 36 | 14.8 |
MCA-YOLOv5 | 96.70 | 95.20 | 96.00 | 7.30 | 37 | 15.2 |
1 | 常欣,刘鑫萌. 建筑施工人员不合理佩戴安全帽事故树分析[J]. 吉林建筑大学学报, 2018, 35(6):65-69. 10.3969/j.issn.1009-0185.2018.06.014 |
CHANG X, LIU X M. Fault tree analysis of unreasonably wearing helmets for builders[J]. Journal of Jilin Jianzhu University, 2018, 35(6):65-69. 10.3969/j.issn.1009-0185.2018.06.014 | |
2 | 王忠玉. 智能视频监控下的安全帽佩戴检测系统的设计与实现[D]. 北京:北京邮电大学, 2018: 1-18. |
WANG Z Y. Design and implementation of detection system of wearing helmets based on intelligent video surveillance[D]. Beijing: Beijing University of Posts and Telecommunications, 2018:1-18. | |
3 | GIRSHICK R, DONAHUE J, DARRELL T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]// Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2014:580-587. 10.1109/cvpr.2014.81 |
4 | GIRSHICK R. Fast R-CNN[C]// Proceedings of the 2015 IEEE International Conference on Computer Vision. Piscataway: IEEE, 2015:1440-1448. 10.1109/iccv.2015.169 |
5 | REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6):1137-1149. 10.1109/tpami.2016.2577031 |
6 | REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection[C]// Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2016:779-788. 10.1109/cvpr.2016.91 |
7 | LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot multiBox detector[C]// Proceedings of the 2016 European Conference on Computer Vision, LNCS 9905. Cham: Springer, 2016:21-37. |
8 | REDMON J, FARHADI A. YOLO9000: better, faster, stronger[C]// Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2017:6517-6525. 10.1109/cvpr.2017.690 |
9 | REDMON J, FARHADI A. YOLOv3: an incremental improvement[EB/OL]. (2018-04-08) [2021-04-08].. 10.1109/cvpr.2018.00430 |
10 | BOCHKOVSKIY A, WANG C Y, LIAO H Y M. YOLOv4: optimal speed and accuracy of object detection[EB/OL]. [2020-05-09].. 10.1109/cvpr46437.2021.01283 |
11 | Ultralytics. YOLOv5[CP/OL]. [2020-08-09].. 10.1109/iccvw54120.2021.00312 |
12 | ZHANG L L, LIN L, LIANG X D, et al. Is faster R-CNN doing well for pedestrian detection?[C]// Proceedings of the 2016 European Conference on Computer Vision, LNCS, 9906. Cham: Springer, 2016:443-457. 10.1007/978-3-319-46475-6_28 |
13 | 宋欢欢,惠飞,景首才,等.改进的RetinaNet模型的车辆目标检测[J].计算机工程与应用,2019,55(13):225-230. |
SONG H H, HUI F, JING S C, et al. Improved RetinaNet model for vehicle target detection[J]. Computer Engineering and Applications, 2019, 55(13):225-230. | |
14 | 陈磊,张孙杰,王永雄.基于改进的YOLOv3及其在遥感图像中的检测[J].小型微型计算机系统,2020,41(11):2321-2324. 10.3969/j.issn.1000-1220.2020.11.014 |
CHEN L, ZHANG S J, WANG Y X. Based on improved YOLOv3 and its detection in remote sensing images[J]. Journal of Chinese Computer Systems, 2020, 41(11):2321-2324. 10.3969/j.issn.1000-1220.2020.11.014 | |
15 | 邓壮来,汪盼,宋雪桦,等.基于SSD的粮仓害虫检测研究[J]. 计算机工程与应用,2020,56(11):214-218. |
DENG Z L, WANG P, SONG X H, et al. Research on granary pest detection based on SSD[J]. Computer Engineering and Applications, 2020, 56(11):214-218. | |
16 | 张海川,彭博,许伟强.基于UNet++及条件生成对抗网络的道路裂缝检测[J].计算机应用,2020,40(S2):158-161. |
ZHANG H C, PENG B, XU W Q. Road crack detection based on UNet++ and conditional generative adversarial nets[J]. Journal of Computer Applications, 2020, 40(S2):158-161. | |
17 | KELM A, LAUβAT L, MEINS-BECKER A, et al. Mobile passive Radio Frequency Identification (RFID) portal for automated and rapid control of Personal Protective Equipment (PPE) on construction sites[J]. Automation in Construction, 2013, 36:38-52. 10.1016/j.autcon.2013.08.009 |
18 | 刘晓慧,叶西宁.肤色检测和Hu矩在安全帽识别中的应用[J].华东理工大学学报(自然科学版),2014,40(3):365-370. |
LIU X H, YE X N. Skin color detection and Hu moments in helmet recognition research[J]. Journal of East China University of Science and Technology (Natural Science Edition), 2014, 40(3):365-370. | |
19 | SHRESTHA K, SHRESTHA P P, BAJRACHARYA D, et al. Hard-hat detection for construction safety visualization[J]. Journal of Construction Engineering, 2015, 2015:No.721380. 10.1155/2015/721380 |
20 | RUBAIYAT A H M, TOMA T T, KALANTARI-KHANDANI M, et al. Automatic detection of helmet uses for construction safety[C]// Proceedings of the 2016 IEEE/WIC/ACM International Conference on Web Intelligence Workshops. Piscataway: IEEE,2016:135-142. 10.1109/wiw.2016.045 |
21 | SILVA R R V e, AIRES K R T, VERAS R de M S. Helmet detection on motorcyclists using image descriptors and classifiers[C]// Proceedings of the 27th SIBGRAPI Conference on Graphics, Patterns and Images. Piscataway: IEEE, 2014:141-148. 10.1109/sibgrapi.2014.28 |
22 | 李琪瑞.基于人体识别的安全帽视频检测系统研究与实现[D].成都:电子科技大学,2017:1-6,34-59. |
LI Q R. A research and implementation of safety-helmet video detection system based on human body recognition[D]. Chengdu: University of Electronic Science and Technology of China, 2017: 1-6, 34-59. | |
23 | WU H, ZHAO J S. An intelligent vision-based approach for helmet identification for work safety[J]. Computers in Industry, 2018, 100:267-277. 10.1016/j.compind.2018.03.037 |
24 | QIN Z Q, ZHANG P Y, WU F, et al. FcaNet: frequency channel attention networks[EB/OL]. (2021-07-23) [2021-08-04].. 10.1109/iccv48922.2021.00082 |
25 | HU J, SHEN L, SUN G. Squeeze-and-excitation networks[C]// Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2018:7132-7141. 10.1109/cvpr.2018.00745 |
26 | WANG Q L, WU B G, ZHU P F, et al. ECA-net: efficient channel attention for deep convolutional neural networks[C]// Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2020:11531-11539. 10.1109/cvpr42600.2020.01155 |
27 | FU J, LIU J, TIAN H J, et al. Dual attention network for scene segmentation[C]// Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2019:3141-3149. 10.1109/cvpr.2019.00326 |
28 | WOO S, PARK J, LEE J Y, et al. CBAM: convolutional block attention module[C]// Proceedings of the 2018 European Conference on Computer Vision, LNCS 11211. Cham: Springer, 2018:3-19. |
29 | ZHANG Z L, ZHANG X Y, PENG C, et al. ExFuse: enhancing feature fusion for semantic segmentation[C]// Proceedings of the 2018 European Conference on Computer Vision, LNCS 11214. Cham: Springer, 2018:273-288. |
30 | CHAIB S, LIU H, GU Y F, et al. Deep feature fusion for VHR remote sensing scene classification[J]. IEEE Transactions on Geoscience and Remote Sensing, 2017, 55(8):4775-4784. 10.1109/tgrs.2017.2700322 |
31 | GHIASI G, LIN T Y, LE Q V. NAS-FPN: learning scalable feature pyramid architecture for object detection[C]// Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2019:7029-7038. 10.1109/cvpr.2019.00720 |
32 | PENG D Z, SUN Z K, CHEN Z R, et al. Detecting heads using feature refine net and cascaded multi-scale architecture[C]// Proceedings of the 24th International Conference on Pattern Recognition. Piscataway: IEEE, 2018:2528-2533. 10.1109/icpr.2018.8545068 |
33 | EVERINGHAM M, WINN J. The PASCAL Visual Object Classes challenge 2012 (VOC2012) development kit[EB/OL]. (2012-05-18) [2021-07-20].. 10.1007/s11263-009-0275-4 |
[1] | Yunchuan HUANG, Yongquan JIANG, Juntao HUANG, Yan YANG. Molecular toxicity prediction based on meta graph isomorphism network [J]. Journal of Computer Applications, 2024, 44(9): 2964-2969. |
[2] | Shunyong LI, Shiyi LI, Rui XU, Xingwang ZHAO. Incomplete multi-view clustering algorithm based on self-attention fusion [J]. Journal of Computer Applications, 2024, 44(9): 2696-2703. |
[3] | Jing QIN, Zhiguang QIN, Fali LI, Yueheng PENG. Diagnosis of major depressive disorder based on probabilistic sparse self-attention neural network [J]. Journal of Computer Applications, 2024, 44(9): 2970-2974. |
[4] | Xiyuan WANG, Zhancheng ZHANG, Shaokang XU, Baocheng ZHANG, Xiaoqing LUO, Fuyuan HU. Unsupervised cross-domain transfer network for 3D/2D registration in surgical navigation [J]. Journal of Computer Applications, 2024, 44(9): 2911-2918. |
[5] | Liting LI, Bei HUA, Ruozhou HE, Kuang XU. Multivariate time series prediction model based on decoupled attention mechanism [J]. Journal of Computer Applications, 2024, 44(9): 2732-2738. |
[6] | Yexin PAN, Zhe YANG. Optimization model for small object detection based on multi-level feature bidirectional fusion [J]. Journal of Computer Applications, 2024, 44(9): 2871-2877. |
[7] | Zhiqiang ZHAO, Peihong MA, Xinhong HEI. Crowd counting method based on dual attention mechanism [J]. Journal of Computer Applications, 2024, 44(9): 2886-2892. |
[8] | Yingjun ZHANG, Niuniu LI, Binhong XIE, Rui ZHANG, Wangdong LU. Semi-supervised object detection framework guided by curriculum learning [J]. Journal of Computer Applications, 2024, 44(8): 2326-2333. |
[9] | Kaipeng XUE, Tao XU, Chunjie LIAO. Multimodal sentiment analysis network with self-supervision and multi-layer cross attention [J]. Journal of Computer Applications, 2024, 44(8): 2387-2392. |
[10] | Pengqi GAO, Heming HUANG, Yonghong FAN. Fusion of coordinate and multi-head attention mechanisms for interactive speech emotion recognition [J]. Journal of Computer Applications, 2024, 44(8): 2400-2406. |
[11] | Yuhan LIU, Genlin JI, Hongping ZHANG. Video pedestrian anomaly detection method based on skeleton graph and mixed attention [J]. Journal of Computer Applications, 2024, 44(8): 2551-2557. |
[12] | Zhonghua LI, Yunqi BAI, Xuejin WANG, Leilei HUANG, Chujun LIN, Shiyu LIAO. Low illumination face detection based on image enhancement [J]. Journal of Computer Applications, 2024, 44(8): 2588-2594. |
[13] | Shangbin MO, Wenjun WANG, Ling DONG, Shengxiang GAO, Zhengtao YU. Single-channel speech enhancement based on multi-channel information aggregation and collaborative decoding [J]. Journal of Computer Applications, 2024, 44(8): 2611-2617. |
[14] | Yanjie GU, Yingjun ZHANG, Xiaoqian LIU, Wei ZHOU, Wei SUN. Traffic flow forecasting via spatial-temporal multi-graph fusion [J]. Journal of Computer Applications, 2024, 44(8): 2618-2625. |
[15] | Qianhong SHI, Yan YANG, Yongquan JIANG, Xiaocao OUYANG, Wubo FAN, Qiang CHEN, Tao JIANG, Yuan LI. Multi-granularity abrupt change fitting network for air quality prediction [J]. Journal of Computer Applications, 2024, 44(8): 2643-2650. |
Viewed | ||||||
Full text |
|
|||||
Abstract |
|
|||||