|
融合FMix及注意力层叠加态的FSC-YOLOv5s模型
|
Abstract:
在目标检测方面,针对YOLOv5s算法处理小数据集的薄弱性和局限性,设计了FSC-YOLOv5s算法。当数据采集受限时,采用数据增强方式,就可以在不增加原始数据量的基础上扩张特征点数量,为检测效果带来正向增益效果,是轻量型网络的最优化选择。首先,在数据预处理时,在原有结构基础上叠加引入一种混合样本数据增强方法FMix,用以增强数据量,能够降低小数据集对检测精度的影响。其次,对YOLOv5s算法的网络结构进行改进,在获取网络输出内容时,增加可以统一权值的SimAM无参数注意力层。无需添加额外参数量,便可以加强模型对于数据关键特征的关注。同时,在主干网络部分加入CBAM注意力层,通过学习自动提取重要特征和抑制次要特征,进一步加强对于有限数据特征量的深入学习。通过注意力机制改善重要特征的筛选能力,能够有效提升检测目标的完整性。然后,分别加入SGD、Adam、Adamw优化算法进行实验,择优选择可以提高FSC-YOLOv5s的计算效率和适应性的优化器。最后,通过实验显示,FSC-YOLOv5s在两个数据集上的mAP@.5:.95分别提高了30.3%和5.1%,验证了FSC-YOLOv5s算法的有效性。
In terms of target detection, the FSC-YOLOv5s algorithm is designed to address the weaknesses and limitations of the YOLOv5s algorithm in handling small data sets. When data acquisition is limited, the use of data augmentation can expand the number of feature points without increasing the original data volume, bringing a positive gain effect to the detection effect, which is the most optimal choice for lightweight networks. First, a mixed-sample data enhancement method FMix is introduced to enhance the data volume during data preprocessing, which can reduce the impact of small data sets on the detection accuracy. Second, the network structure of the YOLOv5s algorithm is improved by adding a SimAM parameter-free attention layer that can unify the weights when obtaining the network output content. The attention of the model to the key features of the data can be enhanced without adding an additional number of parameters. At the same time, the CBAM attention layer is added to the backbone network part to further enhance the in-depth learning of limited data features by automatically extracting important features and suppressing minor features through learning. Improving the screening ability of important features through the attention mechanism can effectively improve the integrity of detection targets. Then, it is combined with SGD, Adam, and Adamw optimization algorithms, respectively, to select optimizers that can improve the computational efficiency and adaptability of FSC-YOLOv5s selectively. Finally, the experiments showed that FSC-YOLOv5s improved the mAP50-95 by 30.3% and 5.1% on both datasets, respectively, verifying the effectiveness of the FSC-YOLOv5s algorithm.
[1] | Girshick, R., Donahue, J., Darrell, T. and Malik, J. (2014) Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation. 2014 IEEE Conference on Computer Vision and Pattern Recognition, Columbus, 23-28 June 2014, 580-587. https://doi.org/10.1109/CVPR.2014.81 |
[2] | Harris, E., Marcu, A., Painter, M., et al. (2020) Fmix: Enhancing Mixed Sample Data Augmentation.
https://doi.org/10.48550/arXiv.2002.12047 |
[3] | Yang, L., Zhang, R.Y., Li, L., et al. (2021) Simam: A Simple, Parameter-Free Attention Module for Convolutional Neural Networks. International Conference on Machine Learning. PMLR, 18-24 July 2021, 11863-11874. |
[4] | Woo, S., Park, J., Lee, J.Y., et al. (2018) Cbam: Convolutional Block Attention Module. Proceedings of the European Conference on COMPUTER Vision (ECCV), Munich, 8-14 September 2018, 3-19.
https://doi.org/10.1007/978-3-030-01234-2_1 |
[5] | Kingma, D.P. and Ba, J. (2014) Adam: A Method for Stochastic Optimization.
https://doi.org/10.48550/arXiv.1412.6980 |
[6] | Loshchilov, I. and Hutter, F. (2017) Decoupled Weight Decay Regularization.
https://doi.org/10.48550/arXiv.1711.05101 |
[7] | Gower, R.M., Loizou, N., Qian, X., et al. (2019) SGD: General Analysis and Improved Rates. International Conference on Machine Learning. PMLR, Long Beach, 9-15 June 2019, 5200-5209. |
[8] | 秦晓辉, 黄启东, 常灯祥, 等. 基于改进YOLOv5的露天矿山目标检测方法[J]. 湖南大学学报(自然科学版), 2023, 50(2): 23-30. https://doi.org/10.16339/j.cnki.hdxbzkb.2023261 |
[9] | 皇甫俊逸, 孟乔, 孟令辰, 等. 基于GhostNet与注意力机制的YOLOv5交通目标检测[J/OL]. 计算机系统应用, 2023, 32(4): 149-160. https://doi.org/10.15888/j.cnki.csa.009048, 2023-04-13. |
[10] | 易图明, 王先全, 袁威, 等. 一种基于YOLOv5s的改进装甲目标检测算法[J]. 现代信息科技, 2023, 7(5): 73-77.
https://doi.org/10.19850/j.cnki.2096-4706.2023.05.017 |
[11] | 李小军, 邓月明, 陈正浩, 等. 改进YOLOv5的机场跑道异物目标检测算法[J]. 计算机工程与应用, 2023, 59(2): 202-211. |
[12] | 谢椿辉, 吴金明, 徐怀宇. 改进YOLOv5的无人机影像小目标检测算法[J]. 计算机工程与应用, 2023, 59(9): 198-206. http://kns.cnki.net/kcms/detail/11.2127.TP.20230214.1523.050.html, 2023-04-13. |
[13] | 张智华. 基于YOLOv5的智能图像识别检测[J]. 信息技术与信息化, 2023(2): 200-203. |
[14] | 王年涛, 王淑青, 汤璐, 马丹. 基于EfficientNet-YOLOv5s的绝缘子缺陷检测[J]. 湖北工业大学学报, 2023, 38(1): 21-26. |
[15] | 朱开. 基于改进YOLOv5的交通标志识别模型[J]. 信息技术与信息化, 2023(2): 30-33. |
[16] | 张忠民, 吴泽. 基于改进YOLOv5的密集行人检测方法[J/OL]. 应用科技1-7.
http://kns.cnki.net/kcms/detail/23.1191.u.20221101.1549.002.html, 2023-04-13. |
[17] | 刘丽伟, 侯德彪, 侯阿临, 等. 基于SimAM-YOLOv4的自动驾驶目标检测算法[J]. 长春工业大学学报, 2022, 43(3): 244-250. https://doi.org/10.15923/j.cnki.cn22-1382/t.2022.3.09 |
[18] | 郭聪, 杨敏. 基于无参注意力和特征融合的图像去噪算法[J]. 计算机技术与发展, 2023, 33(2): 50-56. |
[19] | 郭玲, 于海雁, 周志权. 基于SimAM注意力机制的近岸船舶检测方法[J/OL]. 哈尔滨工业大学报, 2023, 55(5): 14-21. http://kns.cnki.net/kcms/detail/23.1235.T.20220826.1508.010.html, 2023-04-13. |
[20] | 李梓毓, 赵月爱. 改进Adam优化算法的人脸检测方法[J]. 太原师范学院学报(自然科学版), 2022, 21(4): 58-63. |
[21] | 马良荔, 李陶圆, 刘爱军, 等. 基于迁移学习的小数据集命名实体识别研究[J]. 华中科技大学学报(自然科学版), 2022, 50(2): 118-123. https://doi.org/10.13245/j.hust.220218 |
[22] | 皮洲, 奚雪峰, 崔志明, 等. 一种面向长文本小数据集自动摘要任务的数据增强策略[J]. 中文信息学报, 2022, 36(9): 46-56. |