A method for strawberry disease detection in real scenarios based on improved YOLOv8n
Addressing the primary issues of complex backgrounds and low detection accuracy in strawberry disease target detection under practical farming conditions,an improved YOLOv8n strawberry disease detection algorithm as YOLOV8N-SD is proposed.Images of common strawberry leaf,flower,and fruit diseases under real-world scenarios are collected and processed to construct an experimental dataset.Optimizations and improvements are made to the YOLOv8n model.The primary convolutional module is reconstructed by using multi-scale parallel computing and patch-perceptive attention,introducing the C2f-PPA module.This effectively integrates multi-scale feature information,enhancing the model's feature capturing capability.Additionally,the ADown module is incorporated to reduce information loss during downsampling,thereby improving the model's inference speed and robustness.A Task-aligned Dynamic Head(TDyH)is proposed to strengthen information exchange between the localization and classification branches.This reduces model parameters while simultaneously enhancing detection precision and accuracy.According to experimental results,the improved YOLOv8n-SD model achieves a detection accuracy of 83.7%,representing a 3.3%increase over the original YOLOv8n.Its mAP@0.5 and mAP@0.5∶0.95 scores reach 76.9%and 59.9%respectively,marking improvements of 1.6%and 2.3%compared to the baseline.This enhanced algorithm not only accurately identifies common diseases at various stages of strawberry growth but also meets the lightweight and real-time detection requirements of edge devices.