Algorithm for Detecting Fruit and Vegetable Leaf Diseases Based on Improved YOLO v7
In order to improve the precise localization ability of small features of fruit and vegetable leaf lesions and reduce model complexity,a fruit and vegetable leaf disease detection algorithm based on improved YOLO v7 is proposed.Firstly,a Convolutional Block Attention Module(CBAM)attention mechanism module is added to the backbone feature extraction network of the YOLO v7 model to enhance the model's effective ability in extrac-ting similar features in the early stages of disease;secondly,the original Path Aggregation Network(PANet)structure is replaced with Asymptotic Feature Pyramid Network(AFPN)to support non adjacent level direct in-teraction,which improves detection performance and makes the model lightweight;finally,replace the CIOU loss function of the original YOLO v7 with the XIOU loss function.The experimental results show that the improved YOLO v7 algorithm can effectively detect fruit and vegetable leaf diseases and pests,with an average accuracy of 96.4%,which is 13.2,0.9,1.3,and 18.7 percentage points higher than YOLO v3,YOLO v5s,YOLO v7,and SSD models,respectively.Compared with the YOLO v7 network model size,it reduces by 22.4MB.The proposed method provides an effective technical support for precise detection of fruit and vegetable leaf diseases and pests.
diseases and pestsimage recognitionYOLO v7feature pyramidloss functionlightweight