Abstract:Apples have become one of the most popular fruits in the world, and the annual production of apples in China has continued to increase. However, there are certain diseases in the growth process of apple trees, which will affect the quality and yield of apples, resulting in economic losses of fruit farmers. Therefore, in view of the problem that apple leaf diseases have diverse forms and dense distribution, resulting in low detection accuracy, an improved YOLO v7 model was proposed to accurately detect apple leaf diseases. Firstly, bidirectional feature pyramid network (BiFPN) was used to replace the original feature fusion method in YOLO v7 to improve the model’s detection ability of different scale diseases on apple leaves. Secondly, after the ELAN and E-ELAN modules of YOLO v7, an efficient channel attention mechanism (ECA) was added to enhance the ability of the model to extract features of apple leaves disease and improve detection accuracy. Finally, the loss function of YOLO v7 was changed to the SIOU loss function to accelerate the convergence speed of the model. Experimental results showed that the improved YOLO v7 model had a precision of 89.4%, a recall rate of 81.5%, a mean average precision ([email protected]) of 90.5%, and a mean average precision ([email protected]) of 62.1%. Compared with the original YOLO v7 model, they were increased by 4.9, 5.2, 3.5, and 4.6 percentage points, respectively. Compared with the Faster R-CNN, SSD, YOLO v3, YOLO v5s, and YOLO v7 models, the [email protected] of improved YOLO v7 model was increased by 40.9, 20.3, 4.0, 2.3 and 3.5 percentage points, respectively, and the single image detection speed reached 12ms. The research can provide a feasible technical means for accurately detecting apple leaf diseases.