Abstract:In response to the challenges of low accuracy and large model parameters number in traditional object detection models for detecting pear leaf diseases in natural scenes, an improved model for pear leaf disease detection based on YOLOv8n was proposed. Firstly, the RepGhostNet was employed to enhance the backbone network, which utilized structural reparameterization to achieve implicit feature reuse, thereby enhancing the network's feature extraction capabilities while maintaining lightweight characteristics. Secondly, the bi-level routing attention mechanism was utilized to dynamically filter out less relevant key-value pairs at a coarse region level, thereby lowering attention to irrelevant features and increasing sensitivity to essential information, and enhancing the network's representational and feature fusion capabilities. Finally, the Inner-SIoU loss function was employed to optimize bounding box regression, accelerate model convergence and improve recognition accuracy. The results showed that the improved model effectively detected pear leaf diseases, achieving an mAP@50 score of 0.901 on the DiaMOS Plant dataset. Compared to the original model, the improved model exhibited a notable 5.6% enhancement in performance, with reduced model parameter quantity(2.4×106) and computations(7 GFLOPs), representing a 20.00% and 13.58% decrease, respectively. When compared to mainstream object detection models such as SSD, Faster-R CNN, YOLOv5n, and YOLOv8s, the enhanced model showed an increase in average precision, accompanied by reductions in both parameter and computation loads.