Journal of Frontiers of Computer Science and Technology ›› 2024, Vol. 18 ›› Issue (8): 2118-2129.DOI: 10.3778/j.issn.1673-9418.2307022

• Graphics·Image • Previous Articles     Next Articles

Dynamic-YOLOX: Detection Model for Apple Leaf Disease in Complex Background

SHENG Shuai, DUAN Xianhua, HU Weikang, CAO Weijie   

  1. College of Computer Science, Jiangsu University of Science and Technology, Zhenjiang, Jiangsu 212100, China
  • Online:2024-08-01 Published:2024-07-29

Dynamic-YOLOX:复杂背景下的苹果叶片病害检测模型

盛帅,段先华,胡维康,曹伟杰   

  1. 江苏科技大学 计算机学院,江苏 镇江 212100

Abstract: To address the issues of incomplete disease types and the single background of apple leaf images in the apple leaf disease dataset, this paper constructs a new dataset comprising six common apple leaf diseases with complex backgrounds. Additionally, this paper designs Dynamic-YOLOX based on YOLOX-S (you only look once X-S) for the detection of apple leaf disease, aiming to solve the problems of low accuracy, complex models, and insufficient real-time monitoring. Firstly, the ECA-SPPFCSPC (efficient channel attention cross-stage partial fast spatial pyramid pooling module) is devised and employed to replace the SPP (spatial pyramid pooling) and CSPNet (cross-stage partial network) components in the Dark5 segment of the YOLOX-S model backbone, aiming to reinforce the model ability to focus on deep semantic features, suppress irrelevant information and reduce hardware memory overhead. Secondly, the ODCSP (omni-dimensional dynamic cross-stage partial network) module is designed to replace all the CSPNet of the Dark2, Dark3, Dark4 segments in the YOLOX-S model backbone and neck network. This design enhances the model adaptability to various input features, reducing parameter and computational overhead while improving the average detection accuracy of the model. Finally, the Varifocal Loss is introduced to replace the BCEWithLogits Loss for classification confidence loss in the model to elevate the detection accuracy of dense small target diseases in apple leaves. On the homemade dataset, Dynamic-YOLOX demonstrates a relative mAP improvement of 4.54 percentage points over the original YOLOX-S model, achieving 84.63%. Simultaneously, the Params and FLOPs of the model decreases by 11.97% and 13.45%, respectively, and the detection speed reaches 44.07 FPS. Dynamic-YOLOX also exhibits a certain degree of superiority compared with mainstream apple leaf disease detection models.

Key words: apple leaf diseases, object detection, YOLOX, omni-dimensional dynamic cross-stage partial network (ODCSP), Varifocal Loss

摘要: 针对目前苹果叶片数据集的叶片病害种类不全以及图片背景单一等问题,构建了复杂背景下包括苹果叶部六种常见病害的苹果叶片病害数据集。针对目前主流苹果叶片病害检测模型检测精度不高、模型复杂和不满足实时监测等问题,提出了一种基于YOLOX-S(you only look once X-S)改进得到的复杂背景下的苹果叶片病害自适应检测模型Dynamic-YOLOX。设计并使用ECA-SPPFCSPC模块(efficient channel attention cross-stage partial fast spatial pyramid pooling module)更换YOLOX-S模型主干网络尾部Dark5中的空间金字塔池化(SPP)以及跨阶段局部网络(CSPNet)模块来增强模型关注深层语义特征、抑制无用信息的能力,并减少硬件内存开销。设计了动态跨阶段局部网络(ODCSP)模块,并用其更换YOLOX-S模型主干网络中Dark2、Dark3、Dark4部分以及颈部网络中所有的CSPNet模块,使得模型在面对不同输入特征时有更强的自适应性,在减少模型的参数量和计算量的同时提高了模型的平均检测精度。引入Varifocal Loss更换模型中分类置信度损失的BCEWithLogits Loss来提升模型对苹果叶片中密集小目标病害的检测精度。在自制数据集上Dynamic-YOLOX相对原始YOLOX-S模型的mAP提升了4.54个百分点,达到84.63%,同时模型的参数量和计算量分别下降了11.97%和13.45%,检测速度达到44.07 FPS。对比主流苹果叶片病害检测模型,Dynamic-YOLOX具有一定优越性。

关键词: 苹果叶部病害, 目标检测, YOLOX, 动态跨阶段局部网络(ODCSP), Varifocal Loss