基于改进YOLOv8n的散养鸭蛋识别与定位

    Duck eggs recognition and localization at medium and long distances based on improved YOLOv8n

    • 摘要: 为解决鸭蛋捡拾机器人对中远距离散养鸭蛋识别困难与定位精度差等问题,该研究先以YOLOv8n原始模型为基础,采用升级模型YOLOv8n-P2添加针对小目标检测的P2检测头,使模型能够在目标特征保存更完整的大尺寸特征图中进行检测,并引入卷积模块注意力机制模块(convolutional block attention module,CBAM)与Involution内卷算子,增强特征图不同通道之间的联系,提高模型网络在通道维度上的感知能力和对小目标的检测能力。其次,在图像目标识别的基础上,提出了一种基于机器人操作系统(robot operating system,ROS)的视觉定位方法,通过机器视觉识别与坐标变换(transform,TF),实现了鸭蛋捡拾机器人搭载深度相机在运动过程中对目标鸭蛋的高精度实时视觉定位。试验结果表明,改进模型YOLOv8n-P2-CBAM-INV权重为20.80 MB,每秒浮点计算量为51.4 G,单张图像平均检测用时14.5 ms,精确率和召回率分别为98.30%和96.60%,相较于原始模型YOLOv8n,在测试集上平均精度均值提高了7.1个百分点,该模型在6.0 m距离测试,平均精度均值达到98.0%,相较于原始模型YOLOv8n提高了29.4个百分点。最后,通过在0.5~3.0 m范围的移动机器人视觉定位试验表明,该定位方法可实现移动捡蛋机器人在实验室内对中远距离鸭蛋的高精度实时运动定位,最大定位误差可控制在0.03 m以内。此改进模型可部署到移动边缘计算图像处理平台,不仅可为移动捡蛋机器人提供支持,也可为类似的自主移动采收作业机器人提供一定借鉴。

       

      Abstract: The duck egg industry has always dominated an important and indispensable position in the agricultural field. However, the huge amount of egg duck breeding has also brought some challenges to the current industry in recent years. Among them, the low-level automation is ever lagging behind to limit the production efficiency and product quality in duck and egg breeding. Furthermore, the duck eggs can be collected one by one by hand, leading to low work efficiency and high labor intensity. Manual operation cannot fully meet the large-scale production in modern agriculture. At the same time, the frequent entry and exit of breeders into duck farms has inevitably brought some hidden dangers to the health of ducks, such as various pathogens and pollutants from the external environment. This research aims to accurately identify and position the free-range duck eggs at medium and long distances in the key technology of egg collection robots. The automation and intelligence of duck egg collection were then realized using the YOLOv8n network model. A P2 detection head was also added to detect the small target. Accurate detection was achieved in the large-size feature maps that retained the more target features. The CBAM attention module was inserted at the end of the backbone network. The attention was weighted in the channel and spatial dimensions. The neural network was effectively enhanced to focus on the important features, and then suppress the interference of unnecessary features. At the same time, the Involution operator was introduced to significantly improve the detection performance for the duck eggs at medium and long distances. The traditional convolution was then modified in the channel-to-channel information exchange and receptive field. A visual positioning was proposed using ROS. The high-precision and real-time visual positioning of target duck eggs was achieved using machine vision and dynamic TF transformation when the camera was used in the moving state with the robot. The test results show that the weight of the improved model (YOLOv8n-P2-CBAM-INV) was 20.8 MB, and the floating-point operations per second were 51.4 G. The accuracy and recall rates of the improved model were 98.30% and 96.60%, respectively. The mean average precision on the test set increase 7.1 percentage points compared with the original YOLOv8n. The mean average precision of this improved model reached 98% at a distance of 6.0 m, which was increased 29.4 percentage points compared with the original model. The visual positioning test of the mobile robot was carried out to verify the range of 0.5 to 3.0 m. The high-precision and real-time motion positioning was realized at the medium and long-distance duck eggs by the mobile egg-picking robot in the laboratory. The positioning error was controlled within 0.03 m. This improved model can be deployed to the mobile edge platform of image processing. The finding can also provide support to the mobile egg-picking robots, together with the similar autonomous mobile harvesting robots.

       

    /

    返回文章
    返回