Agricultural pests and diseases have been restricting the development of planting,agricultural diseases will lead to early defoliation of crops,weaken photosynthesis,thereby affecting crop quality,and pest outbreaks will cause serious crop yield reduction.Therefore,timely detection of diseases and pests is conducive to proposing targeted control measures,which is particularly important for improving crop yield and quality.Traditional agricultural pest identification mainly judges the diseases and pests of crop leaves through manual observation,but there are problems of less prior knowledge,strong subjectivity and low efficiency.With the continuous development of computer vision technology,its application to the detection of crop diseases and pests is an inevitable trend in the development of smart agriculture.In this paper,102agricultural pests were detected and rust diseases segmented by computer vision technology based on deep learning,and a pest detection software was developed on this basis.Firstly,aiming at the problems of high false detection rate and incomplete feature extraction caused by small differences between 102 pest species and large differences within classes,an object detection model based on lightweight attention is proposed,which increases multi-scale grouping convolution at the lower layer of the backbone network,expands the receptive field,improves the extraction of detailed features such as texture and color,designs lightweight attention to integrate features from space and channel,and introduces Focal-EIOU loss function to reduce the influence of category imbalance.Experimental results show that the detection accuracy of the improved model on the IP102 dataset is improved by 2.11%and 2.21%at m AP50and m AP@50:5:95,respectively.Secondly,in order to calculate the area of rust diseases more accurately,so as to achieve the purpose of targeted application and rational use of pesticide dose.Aiming at the blurring of boundary segmentation caused by the high similarity between disease targets and background,an instance segmentation model based on dynamic convolution is proposed.In the network,dynamic convolution is used to replace ordinary convolution to improve feature extraction ability,the maximum pooling is replaced with the Fcous structure to reduce the loss of detail information,and multi-scale features based on context information are selected for fusion to improve the boundary segmentation ability of the target.The experimental results show that the segmentation accuracy of the mask on the homemade rust dataset is improved by1.61%m AP@50:5:95.Finally,with the improved YOLOX-S model as the core,a pest detection software based on lightweight attention is designed and developed by Py Qt,which realizes many functions such as pest analysis,control measures,information storage and visualization.IP102 agricultural pest dataset is used for functional testing,and the test results show that the software can quickly and accurately detect agricultural pests and propose control measures in time.Figure[53]table[13]reference[57]... |