English

智能化农业装备学报(中英文) ›› 2025, Vol. 6 ›› Issue (1): 41-50.DOI: 10.12398/j.issn.2096-7217.2025.01.004

• • 上一篇    下一篇

基于机器视觉与YOLO v5的裂纹蛋分拣机器人设计与试验

蔡家一1(), 刘世伟1(), 单龙祥1, 刘勇1, 沈红怡1, 王巧华1,2   

  1. 1.华中农业大学工学院,湖北 武汉,430070
    2.农业农村部长江中下游农业装备重点实验室,湖北 武汉,430070
  • 收稿日期:2024-02-01 修回日期:2024-04-04 出版日期:2025-02-15 发布日期:2025-02-15
  • 通讯作者: 刘世伟
  • 作者简介:蔡家一,男,2002年生,浙江台州人,硕士研究生;研究方向为机器视觉与算法优化。E-mail: jycai@webmail.hzau.edu.cn
  • 基金资助:
    国家自然科学基金(52005203);中央高校基本科研业务费专项基金(2662022GXQD002);电磁能技术全国重点实验室基金(61422172220507);湖北省大学生创新创业训练项目(S202310504167)

Design and experiment of cracked egg sorting robot based on machine vision and YOLO v5

CAI Jiayi1(), LIU Shiwei1(), SHAN Longxiang1, LIU Yong1, SHEN Hongyi1, WANG Qiaohua1,2   

  1. 1.College of Engineering,Huazhong Agricultural University,Wuhan 430070,China
    2.Key Laboratory of Agricultural Equipment in Mid-lower Yangtze River,Ministry of Agriculture and Rural Affairs,Wuhan 430070,China
  • Received:2024-02-01 Revised:2024-04-04 Online:2025-02-15 Published:2025-02-15
  • Contact: LIU Shiwei
  • About author:CAI Jiayi, E-mail: jycai@webmail.hzau.edu.cn
  • Supported by:
    National Natural Science Foundation of China(52005203);Fundamental Research Funds for the Central Universities(2662022GXQD002);National Key Laboratory of Electromagnetic Energy Technology Fund(61422172220507);Provincial Innovation and Entrepreneurship Training Program for Undergraduate(S202310504167)

摘要:

随着我国国民生活水平的提高,消费者对于蛋品的品质要求愈发提高。裂纹蛋的检测是蛋品在装箱出厂之前的重要环节。为解决人工分拣裂纹蛋品劳动强度高、工作量大等问题,设计了一种基于机器视觉与YOLO v5的裂纹蛋品分拣机器人。首先,通过逆运动学解算得到机械臂各舵机的转角并转换成PWM占空比,实现对三轴串联机械臂的控制;其次,利用高清120°广角摄像头作为图像采集核心,快速获取蛋品表面图像信息并对所采集的1 000张图像进行数据标注;随后,分别训练不同梯度下降批次大小下的YOLO v5模型,其中梯度下降批次大小为8的模型拥有最高的mAP,其值为98.92%;最后,在机械臂上位机主板调用该模型,对正常蛋品与裂纹蛋品进行识别判断后,开启机械臂分拣行程;此外,蛋品分拣机器人的末端拣拾机构为气动吸盘,该吸盘挂载于机械臂上,以实现对蛋品的无损吸取。经测试,该机器人对裂纹蛋品和正常蛋品的识别准确率分别达到93.33%和99.17%,平均分拣成功率达94.34%,平均分拣速率为7.55 s/个,基本满足要求。研究成果可为裂纹蛋品的筛选工作提供技术支持,为蛋品的裂纹检测与分拣提供解决方案,具有较高的现实意义。

关键词: 裂纹蛋品, YOLO v5, 机器视觉, 三轴机械臂, 智能分拣

Abstract:

With the improvement of our national living standard, consumers have higher requirements for the quality of eggs. The detection of cracked eggs is an important step before packing eggs. In order to solve the problems of high labor intensity and heavy workload in manual sorting of cracked eggs, a cracked egg sorting robot based on machine vision and YOLO v5 was designed. Firstly, the rotation Angle of each steering gear of the manipulator was obtained by inverse kinematics and converted into PWM duty cycle to realize the control of the three-axis series manipulator. Secondly, a high-definition 120° wide-angle camera was used as the image acquisition core to quickly acquire the image information of egg surface and label the 1 000 images collected. YOLO v5 models with different gradient descent batch sizes were then trained respectively,among which the model with gradient descent batch size of 8 had the highest mAP with a value of 98.92%. Finally, the model was called on the main board of the upper computer of the mechanical arm, and after the recognition and judgment of normal eggs and cracked eggs, the sorting stroke of the mechanical arm was started. In addition, the end pickup mechanism of the egg sorting robot was a pneumatic suction cup, which was mounted on the mechanical arm to achieve non-destructive absorption of eggs. The test results showed that the robot can identify the two kinds of eggs with the accuracy of 93.33% and 99.17% respectively, the average success rate of sorting is 94.34%, and the average sorting rate was 7.55 s/egg, which basically met the requirements. The research results can provide technical support for the screening of cracked eggs, and provide solutions for crack detection and sorting of eggs, which has high practical significance.

Key words: cracked egg, YOLO v5, machine vision, three-axis mechanical arm, intelligent sorting

中图分类号: