基于改进YOLO v8n的双目视觉自动套杯奶牛乳头空间定位方法
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

河北省重点研发计划项目(19227213D)


Binocular Vision-based Spatial Positioning Method for Cow Automatic Teat-cup-attachment Utilizing Improved YOLO v8n
Author:
Affiliation:

Fund Project:

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

    奶牛挤奶时人工套杯劳动强度大、生产效率低,而自动套杯成本较高,对中小型养殖场来说存在一定经济负担。为满足中小型养殖场需求,针对挤奶器快速准确自动套杯工作中挤奶环境复杂、奶牛乳头形态各异等问题,本文提出了一种基于改进YOLO v8n的双目视觉定位新方法,能够实现对奶牛乳头的准确检测和快速定位。将YOLO v8n的CSPDarknet主干网络替换为轻量级的FasterNet主干网络、在颈部网络构建P2特征层、在Detect部分与C2f部分添加EMA注意力机制,提高了模型对奶牛乳头的检测精度与速度。利用RANSAC算法对SURF特征点进行优化,减少了乳头与乳房相似导致的不匹配问题。基于改进YOLO v8n模型,结合双目视觉获取奶牛乳头的三维空间信息。在自制数据集上进行消融试验和对比试验,结果表明,改进YOLO v8n模型的mAP@0.5为98.62%,精确率为97.23%,召回率为96.69%,与原始YOLO v8n模型相比,各项指标分别提高2.17、3.28、3.65个百分点;参数量和帧率分别为原始YOLO v8n模型的0.55、2.31倍,显著提升了模型的检测性能。经统计分析,奶牛乳头定位的平均绝对偏差为0.0117m,方差为0.0001m2,标准差为0.0119m,能够满足下一阶段挤奶器自动套杯要求。

    Abstract:

    Manual teat-cup-attachment is labor-intensive and has low production efficiency, while automatic attachment involves higher costs, posing a certain economic burden for small and medium-sized dairy farms. To meet the needs of these farms and address challenges such as the complex milking environment and varying teat morphologies in rapid and accurate automatic teat-cup-attachment for milking machines, a novel binocular vision positioning method was proposed based on an improved YOLO v8n. This method enabled accurate detection and rapid localization of cow teats. The CSPDarknet backbone network of YOLO v8n was replaced with the lightweight FasterNet backbone network, a P2 feature layer was constructed in the neck network, and an EMA attention mechanism was added to the Detect and C2f sections, enhancing the model’s detection accuracy and speed for cow teats. The RANSAC algorithm was employed to optimize SURF feature points, reducing mismatches caused by the similarity between teats and udders. Based on the improved YOLO v8n model, binocular vision was used to acquire three-dimensional spatial information of cow teats. Ablation and comparative experiments conducted on a self-built dataset showed that the improved YOLO v8n model achieved a mAP@0.5 of 98.62%, a precision of 97.23%, and a recall of 96.69%, representing improvements of 2.17, 3.28, and 3.65 percentage points, respectively, compared with that of the original YOLO v8n model. The parameter count was reduced to approximately half, and the frame rate was increased by a factor of 2.31, significantly enhancing the model’s detection performance. Statistical analysis revealed that the average absolute deviation of teat positioning was 0.0117m, with a variance of 0.0001m2 and a standard deviation of 0.0119m, meeting the requirements for the next stage of automatic teat cup attachment in milking machines.

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

王娟,李梦洁,刘雅举,付鑫培,李斯睿.基于改进YOLO v8n的双目视觉自动套杯奶牛乳头空间定位方法[J].农业机械学报,2025,56(11):560-571. WANG Juan, LI Mengjie, LIU Yaju, FU Xinpei, LI Sirui. Binocular Vision-based Spatial Positioning Method for Cow Automatic Teat-cup-attachment Utilizing Improved YOLO v8n[J]. Transactions of the Chinese Society for Agricultural Machinery,2025,56(11):560-571.

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-07-24
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2025-11-10
  • 出版日期:
文章二维码