基于改进YOLOv8m的稻田害虫识别方法

    Identifying pests in rice fields using improved YOLOv8m

    • 摘要: 为解决现有基于机器视觉的稻田害虫监测过程中存在的检测速度慢、小目标检测精度低、害虫堆积遮挡时检测精度低以及样本不平衡等问题,该研究提出了一种基于改进YOLOv8m模型的稻田害虫识别方法FieldSentinel-YOLOv8。该方法首先简化了YOLOv8m模型,并用双检测头代替三检测头,以减少小目标细粒度信息的丢失,降低模型的复杂度;其次将卷积注意力模块CBAM(convolutional block attention module)添加到YOLOv8m,使模型抑制背景等一般特征信息,更加关注害虫区域,从而提高被遮挡害虫的识别准确率;最后使用Focal-CIoU Loss来替换CIoU Loss(complete intersection over union),以减少样本类别不平衡对模型精度的影响。FieldSentinel-YOLOv8模型的平均精度均值(mean average precisoin)mAP0.5为73.64%,精确率为65.43%,召回率为75.17%,检测帧率为199.88帧/s。与原模型YOLOv8m相比,FieldSentinel-YOLOv8的模型参数量从25.86 M(million)降到10.34 M,所需浮点运算数从79.10 G(1 G=109)降到62.80 G,召回率、平均精度均值和检测帧率分别提升7.05、2.72个百分点和52.73帧/s。该研究还采用Pest24数据集作为源域,自建数据集作为目标域的迁移学习方法训练FieldSentinel-YOLOv8模型,得到高精度FieldSentinelTransfer-YOLOv8模型,进一步提升模型检测性能,使用迁移学习方法后,mAP0.5再次提升3.36个百分点,达到77.00%,精确率为69.90%,召回率为77.73%。在自建数据集上进行模型对比试验,结果表明,FieldSentinel-YOLOv8模型具有较高的识别准确率及较强的鲁棒性,该模型的轻量化方法可为农业害虫的精准且快速识别提供技术参考。高精度FieldSentinelTransfer-YOLOv8模型精度的大幅提升,也表明迁移学习在农业害虫检测上提供了技术支持。

       

      Abstract: Object detection can often hold the promising potential to replace the human visual recognition in smart agriculture. However, the small target pests are still challenging to detect for three reasons. Firstly, the pests can move rapidly, which is difficult to for real-time detection. Secondly, the accuracy of the model can depend mainly on the small size, the large number of groups, the uneven distribution, and the occluded pests of each other. Finally, the imbalanced sample can make the recognition more difficult, leading to the low accuracy of detection. It is necessary to efficiently and precisely identify the numerous, unevenly distributed, complex shapes, as well as small and densely packed pests. In this study, a pest recognition (called FieldSentinel-YOLOv8) was proposed using the improved YOLOv8m model. The FieldSentinel-YOLOv8 was improved as follows. Firstly, three detection heads were replaced by two ones, in order to simplify the original YOLOv8 model. The SMO (simplify model operations) was enhanced the fine-grained features for the small targets. The floating-point operations and computational burden were also reduced to streamline the YOLOv8 model; Secondly, the convolutional block attention module (CBAM) was integrated into the YOLOv8. Thus the general feature (such as background) was suppressed to focus more on the pest regions. Thus, the accuracy of the improved model was enhanced to identify the occluded pests. Lastly, the Focal-CIoU Loss was employed to replace the CIoU Loss. The class imbalance was reduced to further improve the accuracy of detection. Many current models depend heavily on the overly idealized datasets, leading to compromise in their accuracy in actual field conditions. Pest monitoring equipment was deployed directly in the field. The datasets were collected under natural environments, indicating the accurate reflection of the real-world presence of pests. The dataset was then taken by the pest monitoring equipment. A series of comparative experiments were conducted to evaluate the performance of the FieldSentinel-YOLOv8 under identical conditions using a self-constructed dataset and various object detections. FieldSentinel-YOLOv8 algorithm also demonstrated the superior performance across most metrics. Compared with the original model, the improved model was reduced the number of parameters by 15.52 M, whereas, there was the an increase in the processing speed to 52.73 frames per second. Moreover, the mAP0.5 and recall rate of the improved model were enhanced by 2.72 and 7.05 percentage points, respectively. Furthermore, transfer learning was employed to train the FieldSentinel-YOLOv8 model, taking the Pest24 dataset as the source domain and a self-built dataset as the target domain. The trained model was then named the FieldSentinelTransfer-YOLOv8. The improved model was achieved in the better performance of detection after transfer learning. The mAP0.5 increased by 3.36 percentage points, reaching 77.00%, with the accuracy and recall rates of 69.90% and 77.73%, respectively. Therefore, the FieldSentinel-YOLOv8 can provide the valuable technical references for the accurate and rapid identification of agricultural pests. The high-precision FieldSentinelTransferYOLOv8 model after transfer learning can also offer the technical support for the detection of agricultural pests.

       

    /

    返回文章
    返回