基于YOLOv5s的筐装禽蛋上料机器人视觉定位方法
CSTR:
作者:
作者单位:

1.华中农业大学工学院,武汉 430070;2.农业农村部长江中下游农业装备重点实验室,武汉 430070;3.武汉软件工程职业学院(武汉开放大学),武汉 430205

作者简介:

雷杏子,E-mail: 2627179255@qq.com

通讯作者:

龚东军,E-mail:158798051@qq.com

中图分类号:

TS253.8

基金项目:

武汉市属高校产学研项目(CXY2020016);华中农业大学自主科技创新基金项目(2662020GXPY005)


A method for visually positioning loading robot of basket-packed poultry eggs based on YOLOv5s
Author:
Affiliation:

1.College of Engineering,Huazhong Agricultural University,Wuhan 430070,China;2.Ministry of Agriculture and Rural Affairs,Key Laboratory of Agricultural Equipment in Mid-Lower Yangtze River,Wuhan 430070,China;3.Wuhan Vocational College of Software and Engineering(Wuhan Open University),Wuhan 430205,China

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

    针对国内禽蛋制品加工过程中,散装蛋水中上料时筐装蛋搬运自动化程度低的问题,设计一种自动上料机器人的视觉定位方案。该方案采用YOLOv5s和图像处理相结合的方法,在复杂环境中对散装禽蛋筐进行定位识别。建立最佳分割阈值T与图像平均灰度值M之间的关系模型,使用动态阈值分割法对图像中的堆垛整体进行分割,通过堆垛最小外接矩形的长宽比区分2种筐装禽蛋堆垛类型,堆垛类型识别准确率为100%。使用YOLOv5s对堆垛顶层的单个蛋筐进行定位识别,模型识别精确率为98.48%,检测单幅图片用时为0.005 4 s。根据YOLOv5s输出的定位结果对图片进行裁剪,通过图像分割将蛋筐边框分割出来并用Canny算子检测其边缘信息,计算所有蛋筐旋转角度,平均角度误差为0.41°。结合蛋筐高度得出筐装禽蛋堆垛中所有蛋筐的位姿信息。结果表明,基于YOLOv5s和图像处理的筐装禽蛋定位方法可以准确识别出筐装禽蛋堆垛中所有蛋筐的位姿信息,该系统具有较好的鲁棒性和可行性。

    Abstract:

    A visual positioning scheme for an automatic water-based loading robot was designed to solve the problem of low automation in the water-based loading process for basket-packed eggs during the processing of poultry and egg products in China. This scheme combined YOLOv5s with methods of image processing to locate and recognize basket-packed eggs in complex environments. A relationship model between the optimal segmentation threshold T and the average grayscale value M of the image was established. The dynamic threshold segmentation method was used to segment the entire stack of eggs in the image. The two types of basket-packed egg stacks were distinguished based on the aspect ratio of the minimum bounding rectangle of the stack, with the recognition accuracy of the stack type of 100%. YOLOv5s was used to locate and identify the top egg baskets of the stack, with the recognition accuracy of the model of 98.48% and the time required to detect a single image of 0.005 4 s. The image was cropped based on the results of positioning output by YOLOv5s. The rotation angles of all egg baskets were calculated by using image segmentation to segment the bounding border of the egg baskets and detecting their edge information with the Canny operators, with an average angle error of 0.41°. The pose information of all the egg baskets in the basket-packed egg stack was obtained based on the height of the egg baskets. It is indicated that the method of positioning basket-packed eggs based on YOLOv5s and image processing can accurately identify the pose information of all egg baskets in the stack. This scheme has good robustness and feasibility, and can provide visual system technology support for the automatic loading robot of basket-packed poultry eggs.

    图1 2种堆垛类型Fig.1 Two stacking types
    图2 不同光线下的样本图像Fig.2 Sample images under different light
    图3 蛋筐定位识别流程Fig.3 Process of locating and identifying egg baskets
    图4 阈值分割(A)与形态学操作(B)结果Fig.4 Results of threshold segmentation(A) and morphological manipulation(B)
    图5 Fig.5 Segmentation effects of different thresholds
    图6 2种垛型的长宽比统计Fig.6 Results of aspect ratio statistics of two stacking types
    图7 YOLOv5s网络结构Fig.7 YOLOv5s network structure
    图8 单个蛋筐裁剪结果Fig.8 Cropping results of a single egg basket
    图9 边缘检测结果对比Fig.9 Comparison of results of edge detection
    图10 蛋筐不同摆放姿态示意图Fig.10 Schematic diagram of different placement postures of egg baskets
    图11 动态阈值分割法识别堆垛类型结果Fig.11 Dynamic threshold segmentation method to identify stacking type results
    图12 YOLOv5s模型性能评估Fig.12 YOLOv5s performance evaluation
    图13 YOLOv5s对光线较暗(A)及噪声高(B)目标识别结果Fig.13 YOLOv5s achieves recognition results for targets with low light(A) and high noise(B)
    图14 不同角度识别结果Fig.14 Results of different angle recognition
    图15 识别角度的误差分布Fig.15 Error distribution in identifying angles
    表 1 不同模型检测性能对比Table 1 Comparison of detection performance of different models
    参考文献
    相似文献
    引证文献
引用本文

雷杏子,王树才,龚东军,涂本帅,何昱廷,李传珍.基于YOLOv5s的筐装禽蛋上料机器人视觉定位方法[J].华中农业大学学报,2024,43(3):302-310

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-04-07
  • 在线发布日期: 2024-06-06
文章二维码