农业大数据学报 ›› 2025, Vol. 7 ›› Issue (3): 281-293.doi: 10.19788/j.issn.2096-6369.000075

• 数据智能 •    下一篇

基于改进YOLOv8的番茄目标检测算法研究

吴丹1(), 马晓君1, 刘德胜2,*(), 宋伟1, 苏文献1   

  1. 1.佳木斯大学 机械工程学院,黑龙江佳木斯 154000,中国
    2.佳木斯大学 信息电子技术学院,黑龙江佳木斯 154000,中国
  • 收稿日期:2024-10-12 接受日期:2025-04-01 出版日期:2025-09-26 发布日期:2025-09-28
  • 通讯作者: 刘德胜,E-mail:desheng.liu@jmsu.edu.cn
  • 作者简介:吴丹,E-mail:1403688297@qq.com
  • 基金资助:
    教育部“春晖计划”合作科研项目(HZKY20220302);黑龙江省优秀青年教师基础研究项目(YQJH2023219)

Tomato Object Detection Algorithm Based on YOLOv8

WU Dan1(), MA XiaoJun1, LIU DeSheng2,*(), SONG Wei1, SU WenXian1   

  1. 1. College of Mechanical Engineering, Jiamusi University, Jiamusi 154000, China
    2. School of Information and Electronic Technology, Jiamusi University, Jiamusi 154000, China
  • Received:2024-10-12 Accepted:2025-04-01 Published:2025-09-26 Online:2025-09-28

摘要:

随着农业智能化进程的加快,基于深度学习、机器人等人工智能技术在农业生产中的应用也越来越受到关注。针对现有番茄果实识别方法在复杂环境下误识率高、定位精度低和采摘效率低等问题,本文提出了一种改进的YOLOv8网络模型,旨在提高番茄果实自动化采摘的检测精度和速度。 该网络以YOLOv8为初始模型,在其骨干网络中添加了可变形卷积模块(DCN),有效提升模型对小目标的检测精度,降低漏检率;在Neck端引入SE注意力机制模块,提高对检测目标的关注度;采用Inner-IoU损失函数来替代原有的CIoU损失函数,提高目标检测中边界框的回归精度。本研究将改进后的YOLOv8模型与SSD、YOLOv4、YOLOv5、YOLOv7网络模型对比,平均精度分别提高了7.2、6.4、6.6、7.7个百分点,改进后的YOLOv8模型较原模型的准确率提升了3.8%,召回率上升了0.6%,同时mAP@0.5和mAP@[0.5:0.95]分别提高了约2.6%和1.9%。研究表明改进的YOLOv8模型能够有效提高番茄果实的自动化采摘检测精度和速度,对实现番茄的自动化采摘具有重要意义。

关键词: 番茄, YOLOv8, 目标识别, 可变形卷积, 注意力机制

Abstract:

With the acceleration of the process of agricultural intelligence, the application of artificial intelligence technologies based on deep learning and robotics in agricultural production has attracted more and more attention. In order to solve the problems of high false recognition rate, low positioning accuracy and low picking efficiency of existing tomato fruit recognition methods in complex environments, an improved YOLOv8 network model was proposed to improve the detection accuracy and speed of automatic tomato fruit picking. The network takes YOLOv8 as the initial model, and adds the Deformable Convolution Module (DCN) to its backbone network, which effectively improves the detection accuracy of the model for small targets and reduces the missed detection rate. The SE attention mechanism module was introduced on the Neck side to improve the attention to the detection target. The Inner-IoU loss function is used to replace the original CIoU loss function to improve the regression accuracy of the bounding box in object detection. In this study, the average accuracy of the improved YOLOv8 model was increased by 7.2, 6.4, 6.6, and 7.7 percentage points compared with the SSD, YOLOv4, YOLOv5, and YOLOv7 network models, respectively, and the accuracy of the improved YOLOv8 model increased by 3.8%, the recall rate increased by 0.6%, and the mAP@0.5 and mAP@[0.5:0.95] increased by about 2.6% and 1.9%, respectively. The results show that the improved YOLOv8 model can effectively improve the accuracy and speed of automatic picking and detection of tomato fruits, which is of great significance for the realization of automatic picking of tomatoes.

Key words: tomato, YOLOv8, target recognition, deformable convolution network, attention mechanisms