English

智能化农业装备学报(中英文) ›› 2023, Vol. 4 ›› Issue (3): 42-49.DOI: 10.12398/j.issn.2096-7217.2023.03.005

• • 上一篇    下一篇

基于YOLOv8网络的棉蚜图像识别算法及软件系统设计

马盼1,2,3(), 杨子恒4, 万虎4, 何顺4, 黄远5, 徐胜勇1,2,3()   

  1. 1.华中农业大学工学院,湖北 武汉,430070
    2.华中农业大学深圳营养与健康研究院,深圳市,518000
    3.中国农业科学院深圳农业基因组研究所和岭南现代农业科学与技术广东省实验室深圳分中心,深圳市,518000
    4.华中农业大学植物科学技术学院,湖北 武汉,430070
    5.华中农业大学园艺林学学院,湖北 武汉,430070
  • 收稿日期:2023-05-31 修回日期:2023-08-03 出版日期:2023-08-15 发布日期:2023-08-15
  • 通讯作者: 徐胜勇
  • 作者简介:马盼,男,2003年生,湖北仙桃人;研究方向为计算机视觉。E-mail: 3201251324@qq.com
  • 基金资助:
    国家重点研发计划项目(2019YFD1001900);HZAU-AGIS交叉基金项目(SZYJY2022006);湖北省重点研发计划项目(2021BBA239);中央高校基本科研业务费专项资金资助项目(2662022YLYJ010)

A new cotton aphid image recognition algorithm and software based on YOLOv8

MA Pan1,2,3(), YANG Ziheng4, WAN Hu4, HE Shun4, HUANG Yuan5, XU Shengyong1,2,3()   

  1. 1.College of Engineering,Huazhong Agricultural University,Wuhan 430070,China
    2.Shenzhen Institute of Nutrition and Health,Huazhong Agricultural University,Shenzhen 518000,China
    3.Shenzhen Branch,Guangdong Laboratory for Lingnan Modern Agriculture,Genome Analysis Laboratory of the Ministry of Agriculture,Agricultural Genomics Institute at Shenzhen,Chinese Academy of Agricultural Sciences,Shenzhen,518000,China
    4.College of Plant Science & Technology of Huazhong Agricultural University,Wuhan 430070,China
    5.College of Horticulture & Forestry Sciences of Huazhong Agricultural University,Wuhan 430070,China
  • Received:2023-05-31 Revised:2023-08-03 Online:2023-08-15 Published:2023-08-15
  • Contact: XU Shengyong

摘要:

为解决在棉蚜种群预测与防治科研工作中人工计数难度大、效率低的问题,提出一种基于YOLO神经网络的棉蚜图像识别算法并集成为软件。首先,连续15 d使用手机拍摄人工接种的棉蚜图像,选择清晰的50张图像将其裁剪为6个子图像,再使用LabelImg软件进行人工标注得到训练集和测试集。然后,选择YOLOv5和YOLOv8系列的10种模型,训练参数设置相同(批次大小32,迭代100轮,初始学习率0.01,周期学习率0.01),使用AutoDL平台的服务器进行训练。最后,对训练好的模型进行测试,其中YOLOv8l模型综合性能表现最佳,mAP50达到了0.926。为了给用户提供方便易用的人机软件,使用PYQT5开发了软件的前端,实现了棉蚜图片的读取、计数、结果可视化和导出为Excel等功能。软件的后端采用了“拆分—检测—合并”的图像处理方式,保障了YOLO模型对小目标的检测效果。经过测试,该软件对于死棉蚜与活棉蚜计数的平均精度为0.945,展现出与人工计数相当的精度,具有较好的实用价值。该研究为棉蚜防治相关科研人员提供了一种智能化检测工具,也可为无人农场等场景中的精准作业提供关键作业信息。

关键词: 棉蚜, 计数, 图像识别, 图像处理, YOLO

Abstract:

In order to solve the problems of high difficulty and low efficiency of manual counting in scientific research of cotton aphid population prediction and control, a cotton aphid image recognition algorithm based on YOLO neural network was proposed and developed into software. First, the images of artificially inoculated cotton aphids were taken by mobile phone for 15 consecutive days, 50 clear images were selected and cut into 6 sub-images, and then the training set and test set were obtained by using LabelImg software for manual labeling. Then, 10 models from the series of YOLOv5 and YOLOv8, whose training parameters were set as the same(batch size was 32, iteration was 100 rounds, initial learning rate was 0.01, and periodic learning rate was 0.01), were selected and trained by using the server of the AutoDL platform. Finally, the trained models were tested, and the YOLOv8l model showed the best overall performance, with mAP50 reaching 0.926. In order to provide users with convenient and easy-to-use man-machine software, the front end of the software was developed by using PYQT5, to realize the functions of reading and counting of cotton aphid pictures, visualizing results and exporting results to Excel. The back end of the software adopted an image processing method of "splitting-detection-merging", which ensuring the efficient detection of YOLO model on small targets. After testing, the software had an average precision of 0.945 for counting dead cotton aphids and live cotton aphids, which was comparable to manual counting and had good practical value. This research may provide an intelligent detection tool for researchers related to cotton aphid control and also provided key operation information for precise operation in scenes such as unmanned farms.

Key words: cotton aphid, counting, image recognition, image processing, YOLO

中图分类号: