-
摘要:
针对水下光学图像目标检测过程中由于水中光线衰弱严重、图像环境复杂和拍摄设备移动等造成的生物识别精度低的问题,提出了基于改进YOLOv5s的弱光水下生物目标实时检测算法YOLOv5s-underwater。针对弱光水下光线衰弱的问题,引入了限制对比度自适应直方图均衡(CLAHE)算法对输入图像进行预处理,解决了颜色失真和图像毛糙的问题。针对复杂的弱光水下图像环境,提出了快速空间金字塔池化(SPPF)模块,解决了水下物体区分度低和特征损失严重的问题。针对拍摄设备移动带来的场景和形态变化问题,提出了一种基于旋转窗口的Swin-Transformer模块,提高了模型的泛化能力。针对水下小目标,修改了网络模型结构,提高了小目标的检测能力。仿真和实验结果表明:所提算法相较于YOLOv5s检测精度提高30.7%,证明了算法的有效性。
-
关键词:
- 弱光水下生物目标 /
- YOLOv5s /
- 限制对比度自适应直方图均衡 /
- 快速空间金字塔池化 /
- 旋转窗口
Abstract:A real-time detection method of low-light underwater biological target based on improved YOLOv5s, known as YOLOv5s-underwater, was proposed to address the issue of low biometric recognition accuracy caused by the significant attenuation of light in water, the complex image environment, and the movement of shooting equipment in the process of underwater optical image target detection. Firstly, to solve the problem of weak underwater light attenuation, the contrast-limited adaptive histogram equalization (CLAHE) algorithm is introduced to preprocess the input image, which solves the problems of color distortion and image roughness. Secondly, the spatial pyramid pooling fast (SPPF) module is proposed to solve the problems of low discrimination and serious feature loss of underwater objects in the complex low-light underwater image environment. Thirdly, a Swin-Transformer module based on the spin window is proposed to improve the generalization ability of the model. Finally, the network model structure is modified to improve the detection ability of small underwater targets. Simulation and experiment prove that the proposed method improves the detection accuracy by 30.7% compared with YOLOv5s. Results from experiments support the method’s efficacy.
-
表 1 改进的YOLOv5s和YOLOv5s实验结果1
Table 1. Improved YOLOv5s and YOLOv5s experimental results 1
% 算法 精确度 平均精确度 召回率 F1 海参 海胆 扇贝 海星 水草 YOLOv5s 61.5 67.7 65.3 69.9 20.0 56.9 68.1 62.00 YOLOv5s+CLAHE 73.0 73.4 72.4 74.2 89.7 76.5 68.4 72.22 YOLOv5s+SPPF 63.8 68.1 62.9 71.4 88.7 71.0 66.9 68.89 YOLOv5s+CLAHE+SPPF 74.3 76.9 72.1 76.6 94.2 78.8 67.1 72.48 YOLOv5s+SPPF+ST 69.3 74.6 71.4 76.6 97.2 77.8 66.0 71.42 YOLOv5s+CLAHE+SPPF+ST 81.9 84.2 79.7 80.5 99.1 85.1 68.1 75.66 YOLOv5s-underwater 84.8 85.6 83.0 84.8 99.8 87.6 67.4 76.18 表 2 改进的YOLOv5s和YOLOv5s实验结果2
Table 2. Improved YOLOv5s and YOLOv5s experimental results 2
算法 $ P_m@0.5 $/% $ P_m@0.5:0.95 $/% 检测速度/
(帧·s−1)YOLOv5s 60.6 32.3 166.67 YOLOv5s+CLAHE 70.2 36.0 138.89 YOLOv5s+SPPF 68.1 35.3 247.73 YOLOv5s+CLAHE+SPPF 71.7 38.4 239.71 YOLOv5s+SPPF+ST 68.9 37.9 154.86 YOLOv5s+CLAHE+SPPF+ST 74.1 39.8 150.10 YOLOv5s-underwater 74.1 41.6 146.84 表 3 改进的YOLOv5s和其他目标检测算法实验结果1对比
Table 3. Comparison of experimental results 1 of improved YOLOv5s and other target detection algorithms
网络模型 平均精确度/% 召回率/% $ {F_1} $/% 检测速度/(帧·s−1) Faster R-CNN 40.1 16.4 23.28 20.44 SSD 37.7 14.9 21.36 30.17 Mbv2-SSD 31.4 12.5 17.88 70.16 表 4 改进的YOLOv5s和其他目标检测算法实验结果对比
Table 4. Comparison of experimental results of improved YOLOv5s and other target detection algorithms
网络模型 平均精确度/% 召回率/% $ {F_1} $/% 检测速度/(帧·s−1) CenterNet 41.9 93.38 YOLOv5m 67.1 56.7 61.46 83.33 YOLOv5l 77.7 64.0 70.19 52.63 YOLOv5x 83.1 70.9 76.52 32.26 YOLOv5s-underwater 87.6 67.4 76.18 140.84 -
[1] 李宝奇, 黄海宁, 刘纪元, 等. 基于改进SSD的水下光学图像感兴趣目标检测算法研究[J]. 电子与信息学报, 2022, 44(10): 3372-3378. doi: 10.11999/JEIT210761LI B Q, HUANG H N, LIU J Y, et al. Underwater optical image interested object detection model based on improved SSD[J]. Journal of Electronics & Information Technology, 2022, 44(10): 3372-3378 (in Chinese). doi: 10.11999/JEIT210761 [2] 金盛龙, 迟骋, 李宇, 等. 稀疏驱动自适应线谱增强的水下目标谱熵检测[J]. 声学学报, 2021, 46(6): 1059-1069. doi: 10.15949/j.cnki.0371-0025.2021.06.025JIN S L, CHI C, LI Y, et al. A supervised learning detection method with pre-processing of sparsity-based adaptive line enhancer[J]. Acta Acustica, 2021, 46(6): 1059-1069(in Chinese). doi: 10.15949/j.cnki.0371-0025.2021.06.025 [3] 徐凤强, 董鹏, 王辉兵, 等. 基于水下机器人的海产品智能检测与自主抓取系统[J]. 北京航空航天大学学报, 2019, 45(12): 2393-2402.XU F Q, DONG P, WANG H B, et al. Intelligent detection and autonomous capture system of seafood based on underwater robot[J]. Journal of Beijing University of Aeronautics and Astronautics, 2019, 45(12): 2393-2402(in Chinese). [4] ZHOU J C, ZHANG D H, ZHANG W S. Classical and state-of-the-art approaches for underwater image defogging: A comprehensive survey[J]. Frontiers of Information Technology & Electronic Engineering, 2020, 21(12): 1745-1769. [5] 董绍江, 刘伟, 蔡巍巍, 等. 基于分层精简双线性注意力网络的鱼类识别[J]. 计算机工程与应用, 2022, 58(5): 186-192.DONG S J, LIU W, CAI W W, et al. Fish recognition based on hierarchical compact bilinear attention network[J]. Computer Engineering and Applications, 2022, 58(5): 186-192(in Chinese). [6] 牛浩青, 欧鸥, 饶姗姗, 等. 改进YOLOv3的遥感影像小目标检测方法[J]. 计算机工程与应用, 2022, 58(13): 241-248.NIU H Q, OU O, RAO S S, et al. Small object detection method based on improved YOLOv3 in remote sensing image[J]. Computer Engineering and Applications, 2022, 58(13): 241-248(in Chinese). [7] WANG X H, ZHU Y G, LI D Y, et al. Underwater target detection based on reinforcement learning and ant colony optimization[J]. Journal of Ocean University of China, 2022, 21(2): 323-330. doi: 10.1007/s11802-022-4887-4 [8] OKSUZ K, CAM B C, KALKAN S, et al. Imbalance problems in object detection: A review[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021, 43(10): 3388-3415. doi: 10.1109/TPAMI.2020.2981890 [9] 周清松, 董绍江, 罗家元, 等. 改进YOLOv3的桥梁表观病害检测识别[J]. 重庆大学学报, 2022, 45(6): 121-130.ZHOU Q S, DONG S J, LUO J Y, et al. Bridge apparent disease detection based on improved YOLOv3[J]. Journal of Chongqing University, 2022, 45(6): 121-130(in Chinese). [10] REDMON J, FARHADI A. YOLOv3: An incremental improvement[EB/OL]. (2018-04-06) [2022-05-01]. https://arxiv.org/abs/1804.02767. [11] AHMAD T, CHEN X N, SAQLAIN A S, et al. EDF-SSD: An improved feature fused SSD for object detection[C]//Proceedings of the IEEE 6th International Conference on Cloud Computing and Big Data Analytics. Piscataway: IEEE Press, 2021: 469-473. [12] ZHANG Z D, TAN M L, LAN Z C, et al. CDNet: A real-time and robust crosswalk detection network on Jetson nano based on YOLOv5[J]. Neural Computing and Applications, 2022, 34(13): 10719-10730. [13] WALIA I S, KUMAR D, SHARMA K, et al. An integrated approach for monitoring social distancing and face mask detection using stacked ResNet-50 and YOLOv5[J]. Electronics, 2021, 10(23): 2996. doi: 10.3390/electronics10232996 [14] LIU Z, LIN Y, CAO Y, et al. Swin Transformer: Hierarchical vision transformer using shifted windows[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. Piscataway: IEEE Press, 2022: 9992-10002. [15] LIU S, QI L, QIN H F, et al. Path aggregation network for instance segmentation[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2018: 8759-8768.