基于自注意力机制和改进YOLOv5s的小目标生物检测
DOI:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金项目(41776142)


Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    为了快速准确地检测出小目标生物(海参、扇贝、海星和海胆)在复杂水下环境的位置及所属种类,提出一种基于改进YOLOv5s的小目标生物检测算法。在特征提取阶段,引入基于多头自注意力设计的自注意力残差模块,强化网络全局建模能力的同时,强化目标特征信息;在特征融合阶段,将特征融合网络调整为添加横向连接的双向特征金字塔结构,增强网络融合不同阶段特征信息的能力;在检测阶段,舍弃大目标检测尺度并添加小目标的检测尺度,提升小目标生物的检测精度;最后,引入α–CIoU损失函数作为模型边界框回归损失函数,提高边界框回归精度,进而提高算法检测准确率。定性试验中,几乎所有肉眼可见的水产品目标都被改进模型检出,并正确标记,体现了改进算法的有效性。α值选取试验中,α值为2.0时效果最佳,平均精度均值(mAP)均优于其他值的,达到0.857,较α值为1.0时的提升了0.016。消融试验中,添加任一优化方法均会提升改进模型的检测精度,最终改进模型的mAP达0.873,较原模型的提升了0.032,模型参数量减少了26.8%,仅有5 M。对比试验中,改进模型的mAP较Faster RCNN、YOLOv3、YOLOv4、YOLOv5s、YOLOvX、SSD、NAS–FCOS、改进YOLOv5等的提升了0.020以上;改进模型在本地服务器的检测速度达139帧/s,较YOLOv5s的提升了14帧/s,略逊于以检测速度著称的SSD模型的。可见,改进模型能满足轻量和实时性要求。改进模型也成功部署到安卓移动设备中。

    Abstract:

    In order to quickly and accurately detect the location and species of small target organisms(sea cucumbers, scallops, starfish and sea urchins) in complex underwater environments, a small target organism detection algorithm based on improved YOLOv5s was designed in this study. In the feature extraction stage, a self-attention residual module based on multi-head self-attention design was introduced to enhance the global modeling ability of the network while enhancing the target feature information; in the feature fusion stage, the feature fusion network was adjusted to a bidirectional feature pyramid structure with lateral connections to enhance the network’s ability to fuse feature information at different stages; in the detection stage, the large target detection scale was discarded and the small target detection scale was added to improve the detection accuracy of small target organisms; finally, the α-CIoU loss function was introduced as the model bounding box regression loss function to improve the bounding box regression accuracy, thereby improving the algorithm detection accuracy. In the qualitative test, almost all aquatic product targets visible to the naked eye were detected and correctly marked by the improved model, which reflects the effectiveness of the improved algorithm. In the α value selection test, the best effect was achieved when the α value was 2.0, and the mean average precision(mAP) was better than other values, reaching 0.857, which was 0.016 higher than that when the α value was 1.0. In the ablation experiment, adding any optimization method increased the detection accuracy of the improved model. The mAP of the improved model finally reached 0.873, which was 0.032 higher than that of the original model, and the number of model parameters was reduced by 26.8%, only 5 M. In the comparative experiment, the mAP of the improved model was improved by more than 0.020 compared with Faster RCNN, YOLOv3, YOLOv4, YOLOv5s, YOLOvX, SSD, NAS-FCOS, and improved YOLOv5; and the detection speed of the improved model on the local server reached 139 frames/s, which was 14 frames/s higher than that of the YOLOv5s, slightly lower than that of the SSD model known for its detection speed. It could be concluded that the improved model meets the requirements of lightweight and real-time performance. The improved model was also successfully deployed on Android mobile devices.

    参考文献
    相似文献
    引证文献
引用本文

戚学通,袁红春.基于自注意力机制和改进YOLOv5s的小目标生物检测[J].湖南农业大学学报:自然科学版,2024,50(3):.

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2024-07-22
  • 出版日期: