| As one of the most productive fruits in the world,the mass production of apples meets the needs of people’s lives and improves the economic efficiency of our country.However,due to the prevalence of its foliar diseases,which seriously affect the yield and quality of apples,it is of great theoretical and practical importance to detect and diagnose the disease types early to minimise the economic losses caused by the diseases.In this paper,three common types of diseases of apple foliage(cedar rust,frogeye spot and scab)are studied.The research on apple leaf disease detection is carried out in three aspects:data set pre-processing,disease image pre-processing and the establishment of disease detection models.The main work completed was as follows.(1)To address the problem of insufficient sample data in the Plant Village dataset,the sample data was expanded by rotating,horizontally and vertically mirroring a total of 730 disease images from three categories in the dataset,and the disease areas were labelled using the Labelme annotation tool.(2)To address the problems of lighting and disease spot recognition in apple leaf disease images,it is proposed that the images are first transferred into the HSV colour space so that the disease spots and leaves in the images are better highlighted and a simple segmentation of the background is achieved,the image is then processed by Retinex algorithm to make the features of the disease image easier to be identified.Based on the Faster R-CNN algorithm,the SK convolution module was added to its feature extraction network VGG16 and used global average pooling to improve the detection accuracy of the disease.The experimental results show:the network model achieves an average accuracy of 88.17%for the three diseases,but the detection rate is low,with a detection time of 2.51s for a single image,making it impossible to perform real-time detection.(3)In order to achieve real-time detection,and for the characteristics of disease images with large areas and small spots,it is proposed that the apple leaf disease images are firstly processed with ExG-Gray to remove the shadow influence,and then the CLAHE algorithm is used for spot Based on the YOLOv5 algorithm,both channel attention and spatial attention are incorporated into the YOLOv5 backbone network to improve the network model’s ability to extract disease features and enhance detection performance.Experimental results show:the network model achieves an average accuracy of 89%for the three diseases,and the average detection time is 39ms,which is 1/6 of the detection time of the Faster R-CNN algorithm,and the detection accuracy is better than several other object detection models while ensuring high rate detection. |