高级检索+

基于改进YOLOv8n的自然环境下辣椒叶片病虫害识别方法

A Method for Identifying Chili Pepper Leaf Diseases and Pests in Natural Environments Based on An Improved YOLOv8n

  • 摘要: 为提高自然环境下辣椒叶片病虫害的识别准确率,该研究提出一种基于改进YOLOv8n的辣椒叶片病虫害识别模型。首先,在骨干部分加入动态多尺度机制SK(Selective Kernel)模块,利用多尺度卷积分支与自适应选择机制增强模型对不同尺寸目标的特征表达能力。其次,将骨干部分的C2f结构替换为Biformer模块,通过区域级路由与令牌级注意力的双层机制动态筛选关键信息区域,从而减少冗余特征并提升复杂背景下的小目标检测能力。最后,采用FI-CIoU(Focal-Inner-CIoU)损失函数替换CIoU损失函数,提升检测器在小目标、遮挡目标上的训练贡献。结果表明,与原模型相比,改进后的YOLOv8n模型的准确率、召回率和平均精度均值分别提高了3.1、1.8和5.4个百分点。该研究可为辣椒病虫害的智能识别提供技术参考。

     

    Abstract: Chili pepper leaf diseases and insect pests seriously affect chili pepper yield and quality under natural cultivation conditions, while complex backgrounds, variable illumination, and small or partially occluded targets increase the difficulty of accurate identification. To improve the recognition accuracy of chili pepper leaf diseases and insect pests in natural scenes, an improved detection method based on YOLOv8n was proposed. A self-built dataset was established using images collected from major chili pepper-producing areas under different field conditions, including sunny and cloudy weather, front-light and backlight environments, and different shooting distances. The original dataset contained 1283 annotated images covering four categories, namely viral disease, epidemic disease, thrips, and green worm. To ensure an objective evaluation process and avoid data leakage, the original images were first divided into training, validation, and test sets at a ratio of 8:1:1, and data augmentation was then applied only to the training set. The augmentation strategies mainly included random flipping, random affine transformation, scaling, translation, and image blurring, which improved the diversity of training samples and enhanced the adaptability of the model to natural field conditions. On this basis, three improvements were introduced into the original YOLOv8n model. First, a Selective Kernel (SK) module was embedded into the backbone network to strengthen the feature representation ability for targets at different scales by adaptively selecting convolution branches with different receptive fields. Second, part of the C2f structure in the backbone was replaced with a Biformer module, which improved the screening of key information regions and suppressed redundant background interference through a bi-level routing attention mechanism, thereby enhancing the discrimination of disease and pest targets in complex scenes. Third, the Complete Intersection over Union (CIoU) loss was replaced with the Focal-Inner Complete Intersection over Union (FI-CIoU) loss to improve the contribution of difficult samples during bounding box regression and further enhance the localization performance for small and partially occluded targets. Experimental results showed that the improved model achieved better performance than the original YOLOv8n model on the self-built dataset. Precision increased from 63.8% to 66.9%, recall increased from 58.1% to 59.9%, and mean average precision increased from 59.7% to 65.1%, corresponding to improvements of 3.1, 1.8, and 5.4 percentage points, respectively. Visual comparison of the detection results further indicated that the improved model effectively reduced missed detections and false detections in complex natural scenes and showed better adaptability to dense leaf backgrounds, small targets, and partially occluded targets. Overall, the proposed method improved the recognition performance of chili pepper leaf diseases and insect pests under natural conditions and provided a useful technical reference for intelligent monitoring and precise management of chili pepper diseases and insect pests.

     

/

返回文章
返回