《计算机应用》唯一官方网站 ›› 2023, Vol. 43 ›› Issue (7): 2295-2302.DOI: 10.11772/j.issn.1001-9081.2022060857
收稿日期:
2022-06-13
修回日期:
2022-09-06
接受日期:
2022-09-08
发布日期:
2022-10-08
出版日期:
2023-07-10
通讯作者:
周箩鱼
作者简介:
郭奕裕(1997—),男,广东潮州人,硕士研究生,主要研究方向:图像处理、机器学习;基金资助:
Yiyu GUO, Luoyu ZHOU(), Xinyu LIU, Yao LI
Received:
2022-06-13
Revised:
2022-09-06
Accepted:
2022-09-08
Online:
2022-10-08
Published:
2023-07-10
Contact:
Luoyu ZHOU
About author:
GUO Yiyu, born in 1997, M. S. candidate. His research interests include image processing, machine learning.Supported by:
摘要:
针对电动自行车和煤气罐搭乘电梯引起的火灾隐患,提出一种改进注意力机制的电梯场景下危险品检测方法。以YOLOX-s为基线模型,首先在加强特征提取网络中引入深度可分离卷积替换标准卷积,提升模型的推理速度。然后提出一种基于混合域的高效卷积块注意力模块(ECBAM)并嵌入主干特征提取网络中。在ECBAM模块的通道注意力部分,使用一维卷积替换两个全连接层,既降低了卷积块注意力模块(CBAM)的复杂度又提高了检测精度。最后提出一种多帧协同算法,通过结合多张图片的危险品检测结果以减少危险品入侵电梯的误报警。实验结果表明:改进后模型比YOLOX-s的平均精度均值(mAP)提升了1.05个百分点,浮点计算量降低了34.1%,模型体积减小了42.8%。可见改进后模型降低了实际应用中的误报警,且满足电梯场景下危险品检测的精度和速度要求。
中图分类号:
郭奕裕, 周箩鱼, 刘新瑜, 李尧. 改进注意力机制的电梯场景下危险品检测方法[J]. 计算机应用, 2023, 43(7): 2295-2302.
Yiyu GUO, Luoyu ZHOU, Xinyu LIU, Yao LI. Dangerous goods detection method in elevator scene based on improved attention mechanism[J]. Journal of Computer Applications, 2023, 43(7): 2295-2302.
类别 | 数据描述 | 图像数 |
---|---|---|
电动自行车 | 共计402辆,包括多种品牌、多种颜色和多种型号 | 3 536 |
自行车 | 共计357辆,包括多种品牌、多种颜色和多种型号 | 3 506 |
煤气罐 | 共计338个,包括大、中、小3种型号,银灰色、蓝色、蓝灰色等常见颜色 | 3 187 |
表1 数据集分布
Tab. 1 Distribution of dataset
类别 | 数据描述 | 图像数 |
---|---|---|
电动自行车 | 共计402辆,包括多种品牌、多种颜色和多种型号 | 3 536 |
自行车 | 共计357辆,包括多种品牌、多种颜色和多种型号 | 3 506 |
煤气罐 | 共计338个,包括大、中、小3种型号,银灰色、蓝色、蓝灰色等常见颜色 | 3 187 |
模型 | mAP/% | 模型体积/MB | 浮点计算量/BFLOPs |
---|---|---|---|
YOLOX-s | 92.14 | 36.0 | 26.64 |
D-YOLOX | 92.01 | 20.6 | 17.54 |
表2 引入深度可分离卷积前后的效果对比
Tab. 2 Comparison of effects before and after introducing depthwise separable convolution
模型 | mAP/% | 模型体积/MB | 浮点计算量/BFLOPs |
---|---|---|---|
YOLOX-s | 92.14 | 36.0 | 26.64 |
D-YOLOX | 92.01 | 20.6 | 17.54 |
模型 | 新增 参数量 | AP/% | mAP/% | ||
---|---|---|---|---|---|
电动自行车 | 自行车 | 煤气罐 | |||
D-YOLOX | 0 | 88.53 | 91.98 | 95.50 | 92.01 |
D-YOLOX +SE | 23 665 | 89.32 | 90.60 | 96.30 | 92.08 |
D-YOLOX +ECA | 19 | 89.45 | 91.54 | 96.31 | 92.43 |
D-YOLOX +CBAM | 24 445 | 89.67 | 91.45 | 96.37 | 92.49 |
D-YOLOX +ECBAM | 837 | 90.41 | 91.78 | 97.38 | 93.19 |
表3 嵌入不同注意力模块的模型的实验结果对比
Tab. 3 Comparison of experimental results of models embedded with different attention modules
模型 | 新增 参数量 | AP/% | mAP/% | ||
---|---|---|---|---|---|
电动自行车 | 自行车 | 煤气罐 | |||
D-YOLOX | 0 | 88.53 | 91.98 | 95.50 | 92.01 |
D-YOLOX +SE | 23 665 | 89.32 | 90.60 | 96.30 | 92.08 |
D-YOLOX +ECA | 19 | 89.45 | 91.54 | 96.31 | 92.43 |
D-YOLOX +CBAM | 24 445 | 89.67 | 91.45 | 96.37 | 92.49 |
D-YOLOX +ECBAM | 837 | 90.41 | 91.78 | 97.38 | 93.19 |
深度可分离卷积 | ECBAM | mAP/% | 模型体积/MB | 浮点计算量/BFLOPs |
---|---|---|---|---|
× | × | 92.14 | 36.0 | 26.64 |
√ | × | 92.01 | 20.6 | 17.54 |
× | √ | 92.89 | 36.0 | 26.65 |
√ | √ | 93.19 | 20.6 | 17.55 |
表4 消融实验结果的对比
Tab. 4 Comparison of results of ablation experiments
深度可分离卷积 | ECBAM | mAP/% | 模型体积/MB | 浮点计算量/BFLOPs |
---|---|---|---|---|
× | × | 92.14 | 36.0 | 26.64 |
√ | × | 92.01 | 20.6 | 17.54 |
× | √ | 92.89 | 36.0 | 26.65 |
√ | √ | 93.19 | 20.6 | 17.55 |
模型 | mAP/% | 模型体积/MB | 浮点计算量/BFLOPs |
---|---|---|---|
Faster R-CNN[ | 93.78 | 113.5 | 226.59 |
CenterNet[ | 91.96 | 131.0 | 50.64 |
MobileNet-SSD [ | 88.38 | 96.1 | 60.99 |
W-YOLOv4[ | 89.60 | 257.9 | 59.71 |
YOLOv4-Tiny[ | 69.89 | 22.4 | 14.50 |
YOLOX-m[ | 93.02 | 96.8 | 73.51 |
YOLOX-s[ | 92.14 | 36.0 | 26.64 |
本文模型 | 93.19 | 20.6 | 17.55 |
表5 不同模型性能的对比
Tab. 5 Performance comparison of different models
模型 | mAP/% | 模型体积/MB | 浮点计算量/BFLOPs |
---|---|---|---|
Faster R-CNN[ | 93.78 | 113.5 | 226.59 |
CenterNet[ | 91.96 | 131.0 | 50.64 |
MobileNet-SSD [ | 88.38 | 96.1 | 60.99 |
W-YOLOv4[ | 89.60 | 257.9 | 59.71 |
YOLOv4-Tiny[ | 69.89 | 22.4 | 14.50 |
YOLOX-m[ | 93.02 | 96.8 | 73.51 |
YOLOX-s[ | 92.14 | 36.0 | 26.64 |
本文模型 | 93.19 | 20.6 | 17.55 |
1 | 恩旺,刘子金,张淼.中国电梯行业的技术发展与趋势[J].建筑科学, 2018, 34(9): 110-118. |
EN W, LIU Z J, ZHANG M. Technical development and trend of elevator industry in China[J]. Building Science, 2018, 34(9): 110-118. | |
2 | 廖聪,邬伦,蔡恒,等.城市电动自行车违规充电隐患的空间分布及其影响因素[J].北京大学学报(自然科学版), 2021, 57(4): 671-678. |
LIAO C, WU L, CAI H, et al. Spatial distribution and influencing factors of unsafe charging for electric bicycles in urban areas[J]. Acta Scientiarum Naturalium Universitatis Pekinensis, 2021, 57(4): 671-678. | |
3 | 郭瑞鸿,张莉,杨莹,等.基于改进SSD的X光图像管制刀具检测与识别[J].激光与光电子学进展, 2021, 58(4): No.0404001. 10.3788/lop202158.0404001 |
GUO R H, ZHANG L, YANG Y, et al. X-ray image controlled knife detection and recognition based on improved SSD[J]. Laser and Optoelectronics Progress, 2021, 58(4): No.0404001. 10.3788/lop202158.0404001 | |
4 | WARSI A, ABDULLAH M, HUSEN M N, et al. Gun detection system using YOLOV3 [C]// Proceedings of the 2019 IEEE International Conference on Smart Instrumentation, Measurement and Application. Piscataway: IEEE, 2019: 1-4. 10.1109/icsima47653.2019.9057329 |
5 | 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 |
6 | REDMON J, FARHADI A. YOLOv3: an incremental improvement[EB/OL]. (2018-04-08) [2022-04-08]. . 10.1109/cvpr.2017.690 |
7 | BOCHKOVSKIY A, WANG C Y, LIAO H Y M. YOLOv4: optimal speed and accuracy of object detection[EB/OL]. (2020-04-23) [2022-05-09]. . |
8 | 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. |
9 | LAW H, DENG J. CornerNet: detecting objects as paired keypoints [C]// Proceedings of the 2018 European Conference on Computer Vision, LNCS 11218. Cham: Springer, 2018: 765-781. |
10 | DUAN K W, BAI S, XIE L X, et al. CenterNet: keypoint triplets for object detection [C]// Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision. Piscataway: IEEE, 2019: 6568-6577. 10.1109/iccv.2019.00667 |
11 | GIRSHICK R, DONAHUE J, DARRELL T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation [C]// Proceedings of 2014 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2014: 580-587. 10.1109/cvpr.2014.81 |
12 | 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 |
13 | HE K M, GKIOXARI G, DOLLÁR P, et al. Mask R-CNN [C]// Proceedings of 2017 IEEE International Conference on Computer Vision. Piscataway: IEEE, 2017: 2980-2988. 10.1109/iccv.2017.322 |
14 | GE Z, LIU S T, WANG F, et al. YOLOX: exceeding YOLO series in 2021[EB/OL]. (2021-08-06) [2022-07-18]. . |
15 | LIU B Q, HUANG J Y, LIN S, et al. Improved YOLOX-S abnormal condition detection for power transmission line corridors [C]// Proceedings of the IEEE 3rd International Conference on Power Data Science. Piscataway: IEEE, 2021: 13-16. 10.1109/icpds54746.2021.9690074 |
16 | PANBOONYUEN T, THONGBAI S, WONGWEERANIMIT W, et al. Object detection of road assets using transformer-based YOLOX with feature pyramid decoder on Thai highway panorama[J]. Information, 2021, 13(1): No.5. 10.3390/info13010005 |
17 | ZHU Z W, CAO J, HAO T C, et al. Highly secure edge-intelligent electric motorcycle management system for elevators[J]. Journal of Cloud Computing, 2020, 9: No.41. 10.1186/s13677-020-00187-6 |
18 | WANG W T, XU Y P, XU Z J, et al. A detection method of electro-bicycle in elevators based on improved YOLO v4 [C]// Proceedings of the 26th International Conference on Automation and Computing. Piscataway: IEEE, 2021: 1-6. 10.23919/icac50006.2021.9594217 |
19 | GICHANE M M, BYIRINGIRO J B, CHESANG A K, et al. Digital triplet approach for real-time monitoring and control of an elevator security system[J]. Designs, 2020, 4(2): No.9. 10.3390/designs4020009 |
20 | LIN Y B, CHEN X R, ZHONG W Z, et al. Online detection system for electric bike in elevator or corridors based on multi-scale fusion [C]// Proceedings of the 4th International Conference on Advanced Electronic Materials, Computers and Software Engineering. Piscataway: IEEE, 2021: 31-34. 10.1109/aemcse51986.2021.00014 |
21 | SHENG T, FENG C, ZHUO S J, et al. A quantization-friendly separable convolution for MobileNets [C]// Proceedings of the 1st Workshop on Energy Efficient Machine Learning and Cognitive Computing for Embedded Applications. Piscataway: IEEE, 2018: 14-18. 10.1109/emc2.2018.00011 |
22 | 鲍光海,林善银,徐林森.基于改进型卷积网络的汽车高度调节器缺陷检测方法[J].仪器仪表学报, 2020, 41(2): 157-165. |
BAO G H, LIN S Y, XU L S, et al. Defect detection method for automobile height regulator based on improved convolution network[J]. Chinese Journal of Scientific Instrument, 2020, 41(2): 157-165. | |
23 | 贾鹤鸣,郎春博,姜子超.基于轻量级卷积神经网络的植物叶片病害识别方法[J].计算机应用, 2021, 41(6): 1812-1819. 10.11772/j.issn.1001-9081.2020091471 |
JIA H M, LANG C B, JIANG Z C. Plant leaf disease recognition method based on lightweight convolutional neural network[J]. Journal of Computer Applications, 2021, 41(6): 1812-1819. 10.11772/j.issn.1001-9081.2020091471 | |
24 | 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. |
25 | 王美华,吴振鑫,周祖光.基于注意力改进CBAM的农作物病虫害细粒度识别研究[J].农业机械学报, 2021, 52(4): 239-247. 10.6041/j.issn.1000-1298.2021.04.025 |
WANG M H, WU Z X, ZHOU Z G. Fine-grained identification research of crop pests and diseases based on improved CBAM via attention[J]. Transactions of the Chinese Society for Agricultural Machinery, 2021, 52(4): 239-247. 10.6041/j.issn.1000-1298.2021.04.025 | |
26 | 彭道刚,刘薇薇,戚尔江,等.基于CBAM-Res_UNet电厂高压蒸汽泄漏检测研究[J].电子测量与仪器学报, 2021, 35(12): 206-214. |
PENG D G, LIU W W, QI E J, et al. Research on leakage detection of high pressure steam in power plant based on CBAM-Res_Unet[J]. Journal of Electronic Measurement and Instrumentation, 2021, 35(12): 206-214. | |
27 | 牛瑞华,杨俊,邢斓馨,等.基于卷积注意力模块和双通道网络的微表情识别算法[J].计算机应用, 2021, 41(9): 2552-2559. 10.11772/j.issn.1001-9081.2020111743 |
NIU R H, YANG J, XING L X, et al. Micro-expression recognition algorithm based on convolutional block attention module and dual path networks[J]. Journal of Computer Applications, 2021, 41(9): 2552-2559. 10.11772/j.issn.1001-9081.2020111743 | |
28 | 吴仁彪,赵娅倩,屈景怡,等.基于CBAM-CondenseNet的航班延误波及预测模型[J].电子与信息学报, 2021, 43(1): 187-195. 10.11999/JEIT190794 |
WU R B, ZHAO Y Q, QU J Y, et al. Flight delay propagation prediction model based on CBAM-CondenseNet[J]. Journal of Electronics and Information Technology, 2021, 43(1): 187-195. 10.11999/JEIT190794 | |
29 | 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 |
30 | 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 |
31 | SELVARAJU R R, COGSWELL M, DAS A, et al. Grad-CAM: visual explanations from deep networks via gradient-based localization [C]// Proceedings of the 2017 IEEE International Conference on Computer Vision. Piscataway: IEEE, 2017: 618-626. 10.1109/iccv.2017.74 |
[1] | 姜钧舰, 刘达维, 刘逸凡, 任酉贵, 赵志滨. 基于孪生网络的小样本目标检测算法[J]. 《计算机应用》唯一官方网站, 2023, 43(8): 2325-2329. |
[2] | 詹春兰, 王安志, 王明辉. 基于通道注意力和边缘融合的伪装目标分割方法[J]. 《计算机应用》唯一官方网站, 2023, 43(7): 2166-2172. |
[3] | 蒋瑞林, 覃仁超. 基于深度可分离卷积的多神经网络恶意代码检测模型[J]. 《计算机应用》唯一官方网站, 2023, 43(5): 1527-1533. |
[4] | 刘辉, 张琳玉, 王复港, 何如瑾. 基于注意力机制和上下文信息的目标检测算法[J]. 《计算机应用》唯一官方网站, 2023, 43(5): 1557-1564. |
[5] | 杨有, 张汝荟, 许鹏程, 康慷, 翟浩. 面向民国档案印章分割的改进U-Net[J]. 《计算机应用》唯一官方网站, 2023, 43(3): 943-948. |
[6] | 张怡, 孙永荣, 赵科东, 李华, 曾庆化. 空中加油场景下的目标联合检测跟踪算法[J]. 《计算机应用》唯一官方网站, 2022, 42(9): 2893-2899. |
[7] | 张新宇, 丁胜, 杨治佩. 基于改进注意力机制的交通标志检测算法[J]. 《计算机应用》唯一官方网站, 2022, 42(8): 2378-2385. |
[8] | 李坤, 侯庆. 基于注意力机制的轻量型人体姿态估计[J]. 《计算机应用》唯一官方网站, 2022, 42(8): 2407-2414. |
[9] | 贺怀清, 闫建青, 惠康华. 基于深度残差网络的轻量级人脸识别方法[J]. 《计算机应用》唯一官方网站, 2022, 42(7): 2030-2036. |
[10] | 张晔, 刘蓉, 刘明, 陈明. 基于多通道注意力机制的图像超分辨率重建网络[J]. 《计算机应用》唯一官方网站, 2022, 42(5): 1563-1569. |
[11] | 董永峰, 孙跃华, 高立超, 韩鹏, 季海鹏. 基于改进一维卷积和双向长短期记忆神经网络的故障诊断方法[J]. 《计算机应用》唯一官方网站, 2022, 42(4): 1207-1215. |
[12] | 彭禹, 宋耀莲, 杨俊. 基于数据增强的运动想象脑电分类[J]. 《计算机应用》唯一官方网站, 2022, 42(11): 3625-3632. |
[13] | 贾鹤鸣, 郎春博, 姜子超. 基于轻量级卷积神经网络的植物叶片病害识别方法[J]. 计算机应用, 2021, 41(6): 1812-1819. |
[14] | 胡嵽, 冯子亮. 基于深度学习的轻量级道路图像语义分割算法[J]. 计算机应用, 2021, 41(5): 1326-1331. |
[15] | 陆鑫伟, 余鹏飞, 李海燕, 李红松, 丁文谦. 基于注意力自身线性融合的弱监督细粒度图像分类算法[J]. 计算机应用, 2021, 41(5): 1319-1325. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||