水下目标物的准确识别是保障通航安全的一项重要工作,针对现有算法对水下多类别目标存在识别精度不高的问题,本文在YOLOv5s(You Only Look Once v5s)的基础上提出对其进行改进。首先,为平衡样本间的数量,通过利用几何变化操作模拟现实发生的情况对数量较少的样本进行扩充;其次,将YOLOv5s中传统损失函数CIoU惩罚项中的反正切函数改为Sigmoid函数,加快 目标识别模型的收敛速度;最后,融合坐标注意力机制(Coordinate Attention,CA),融合后的模型能衡量每个通道信息的重要性,在关注目标位置信息的同时也不增加过多的计算量。试验结果表明:本文所提出的改进的YOLOv5s较改进前在准确率上提升了4。97%,在召回率上提高了6。20%,在类平均精度上提升了4。98%,证明本文改进的方法在工程应用上的价值。
Improved YOLOv5s Algorithm for Underwater Target Recognition by Incorporating Attention Mechanisms
Accurate identification of underwater target objects is a work to ensure the safety of navigation,for the existing algorithms for underwater multi-category targets there is the problem of recognition accuracy is not high,this paper on the basis of YOLOv5s innovatively proposed to improved it.In this paper,in order to balance the number of samples between the samples,by using random rotation,Gaussian noise,random erasure(Cutout),random brightness a series of operations to simulate the reality of the occurrence of a smaller number of samples to expand;secondly,the traditional loss function CIoU penalty term in the inverse tangent function is changed to a Sigmoid func-tion,to accelerate the convergence speed of the target recognition model;finally,the fusion of the coordinates(CA)attention mechanism,the fused model can measure the importance of each channel information,and focus on the target location information without increasing too much computation.The experimental results show that the improved YOLOv5s proposed in this paper improves 4.97%in accuracy,6.20%in recall,and 4.98%in class-averaged precision compared to the pre-improvement one,which proves the value of the improved method in this paper for engineering applications.