摘要
针对自然环境下柑橘叶片病害识别中存在的小目标检测困难、背景复杂多变及光照条件变化等问题,该研究提出了一种基于改进YOLOv5的柑橘叶片病害检测算法。首先,在模型设计中引入高像素小目标检测头H_0,通过融合深层颈部网络特征与浅层主干网络特征,增强对小目标的检测能力以及多尺度信息的融合效果。此外,为了提升模型在复杂场景中的理解力,在特征提取阶段加入了改进的CBAM(convolutional block attention module)注意力机制模块MRCBAM(multi-scale fusion residual structure convolutional block attention module)。这一模块结合多尺度残差结构,能够有效捕捉不同尺度下的特征信息,并整合浅层特征细节,从而减少背景和边缘噪声干扰,增强模型在各种光照条件下的表现。为进一步优化模型性能,采用GIoU(generalized intersection over union)作为损失函数,以实现对不同形状目标更精确的边界框回归,从而提高了在复杂背景下柑橘叶片病害的检测精度。为验证所提方法的有效性,构建了一个包含多种柑橘叶片病害类型的综合数据集,并进行了消融试验、模型性能评估和可视化分析等。试验结果显示,经过改进的YOLOv5模型在柑橘叶片病害检测任务中表现出色,其平均识别准确率、召回率、交并比阈值为0.50的平均精度均值(m AP_(50))和交并比阈值从0.50到0.95的平均精度均值(mAP_(50:95))分别达到了91.5%、90.2%、89.8%和86.7%。相比原模型,准确率提升了2.1个百分点,召回率增加了2.6个百分点,mAP_(50)和m AP_(50:95)上分别增长了1.6和1.4个百分点。这些改进提升了模型性能,为柑橘病害小目标检测的实际应用提供重要参考。
Accurate and timely detection of citrus leaf diseases is often required in natural outdoor environments,particularly for effective orchard management in sustainable agriculture.However,some challenges still remained,due mainly to the small size of disease lesions,complex backgrounds with overlapping leaves and branches,and the highly variable illumination caused by weather,shadows,and sun exposure.In this study,an improved YOLOv5-based algorithm was proposed to specifically detect the robust citrus leaf diseases under real-world conditions.Three key enhancements were introduced into the original YOLOv5 architecture:a high-resolution detection head for small targets,an advanced attention mechanism for feature refinement,and an optimized loss function for precise localization.A high-pixel small target detection head,named H0,was incorporated into the network in order to improve the detection of small disease spots,often only a few pixels in size.This head was connected to the shallow layers of the backbone that preserved the high spatial resolution.The pathological features were detected as the typically missed ones by standard detection heads.Some features were fused from both the deep neck network and the shallow backbone layers.The better performance was achieved by enhancing the multi-scale feature representation.The cross-level fusion was strengthened to recognize the small lesions for contextual awareness.The detection sensitivity was significantly improved for the early-stage diseases.Furthermore,an improved attention module,called MR-CBAM(multi-scale fusion residual structure convolutional block attention module)was introduced in the feature extraction stage,in order to enhance the discriminative power in the complex scenes.By contrast,the standard CBAM independently applied the channel and spatial attention.The MR-CBAM was integrated with a multi-scale residual block that processed input features using parallel convolutional paths at varying kernel sizes.The contextual information with different scales was captured to effectively distinguish the subtle disease patterns from background noise,such as the leaf veins or soil.The multi-scale features were then refined by the CBAM structure.Feature maps were recalibrated to emphasize the informative channels and spatial regions.The residual connection realized the stable gradient propagation,thus facilitating the training convergence and preserving fine details.The model’s robustness was significantly improved under various lighting conditions,such as overexposure or lowlight scenarios.The GIoU(generalized intersection over union)loss was adopted as the bounding box regression loss in order to achieve more accurate object localization,especially for the irregularly shaped lesions.Both the overlap and the distance between predicted and ground-truth boxes were considered to provide the more meaningful gradients during training,even when there was no intersection.High convergence and more precise bounding box predictions were obtained for accurate disease localization in cluttered environments.A citrus leaf disease dataset was constructed to validate the improved model.The citrus canker,greasy spot,and scab were collected under diverse natural conditions.The improved model was achieved in the AP(average precision),recall,mAP_(50),and mAP_(50:95) of 91.5%,90.2%,89.8%,and 86.7%,respectively.Compared with the original,there were improvements of 2.1 percentage points,2.6 percentage points,1.6 percentage points,and 1.4 percentage points,respectively.The accuracy and reliability can also offer a promising solution to the practical monitoring of citrus diseases.
作者
郑争兵
张乂邦
孙璐超
王新宽
ZHENG Zhengbing;ZHANG Yibang;SUN Luchao;WANG Xinkuan(School of Physics and Telecommunication Engineering,Shaanxi University of Science and Technology,Hanzhong 723000,China)
出处
《农业工程学报》
北大核心
2025年第21期203-211,共9页
Transactions of the Chinese Society of Agricultural Engineering
基金
国家自然科学基金项目(61601272)。