基于改进YOLOv5s的水面漂浮小目标检测算法

A detection algorithm for small surface floating objects based on improved YOLOv5s

  • 摘要:
    目的 针对无人船视角下的水面漂浮瓶识别易出现错检、漏检等问题,基于YOLOv5s算法,提出一种改进的YOLOv5s水面漂浮小目标检测算法。
    方法 对原始数据集Flow-Img进行数据增强和扩充,从而避免模型出现过拟合的现象;为了提高深度学习模型对极小目标的检测精度,在YOLOv5s的3个检测层的基础上,增加1个极小目标检测层,同时去掉用于大目标的检测头,避免数据不均衡带来的先验框分配问题;接着,在骨干网络中增加CBAM注意力模块,以解决模型在水面漂浮瓶检测任务中目标特征信息捕捉能力不足的问题;最后引入归一化 Wasserstein 距离(NWD)的回归损失函数,将IoU损失函数和NWD损失函数进行加权组合,形成一个综合的回归损失函数,从而进一步提高对水面漂浮瓶识别的准确率和精度。
    结果 实验结果表明,所提算法在水面漂浮瓶检测时mAP@0.5值达到95.7%,比原始YOLOv5s算法的mAP@0.5提升了2.6%,mAP@0.95提升了4.5%,同时,模型参数量下降了61.9%。
    结论 在实现轻量化的同时使得水面漂浮瓶检测结果更加准确,为水面小型漂浮物的检测提供了重要的技术参考。

     

    Abstract:
    Objective To address the challenges of false detection and missed detection in identifying floating bottles on the water surface in unmanned surface vehicle applications, this study proposes an improved small floating object detection algorithm based on YOLOv5s.
    Method  First, data augmentation was performed on the Flow-Img dataset to expand the data and avoid model overfitting. Second, to enhance detection accuracy of the deep learning model for extremely small objects, an additional detection layer was introduced beyond the original three in YOLOv5s, while the detection head for large objects was removed to avoid anchor box allocation issues caused by data imbalance. Third, the CBAM (Convolutional Block Attention Module) was incorporated into the backbone network to address the limited feature extraction capability for detecting floating bottles on the water surface. Finally, the Normalized Wasserstein Distance (NWD) regression loss function was introduced and combined with the IoU loss function in a weighted manner to construct a comprehensive regression loss function, further enhancing detection accuracy for floating bottles on the water surface.
    Results Experimental results show that the proposed algorithm achieves a mAP@0.5 of 95.7% in detecting floating bottles on the water surface. Compared to the original YOLOv5s, the improved model increases mAP@0.5 by 2.6%, mAP@0.95 by 4.5%, and reduces the number of parameters by 61.9%.
    Conclusion  While maintaining a lightweight architecture, it delivers more accurate detection results for surface floating bottles, offering a valuable technical reference for small floating object detection on the water surface.

     

/

返回文章
返回