Abstract:In the process of crop growth, real-time detection and treatment of leaf diseases is extremely important. To improve detection accuracy and reduce the waste of resources, a YOLOv8n_Leaf _Disease crop leaf disease detection model is proposed. First, using the WIoU loss function to intelligently focus on the model anchor boxes, accelerate model convergence. Next, to accommodate the size of the target being inspected, replacement of detection heads to improved model accuracy. Then, adding the MHSA attention mechanism to the backbone network, enriching the feature extraction capability of the model for images. At last, introducing DCNv2 in C2f, improve the model's ability to accurately localize input image targets. (dataset) The experimental results show that YOLOv8n_Leaf _Disease model accuracy P improved by 1.3%, recall rate R improved by 0.4%, mAP0.5% reached 83.7%, and mAP0.95% reached 69.7%. The improved YOLO v8 model can provide technical support for crop leaf disease detection.