| As an important part of agricultural production activities,weed control has always been the key research direction of researchers in related fields.Traditional weeding methods mostly use pesticide spraying,physical eradication and other methods,which are relatively inefficient.With the rapid development of information technology,automatic weeding equipment will be more and more suitable for agricultural production.Real weed scenes have complex and similar backgrounds,highly similar shapes and colors.In addition,sunlight and shading(soil,rain,fog,shadow)under natural conditions have also become important factors that affect the identification of weeds by machines.Therefore,how to effectively identify weeds is the key to the practical application of automatic weeding equipment.Traditional machine learning methods based on manually extracted features are no longer suitable for now increasingly large-scale practical data applications,while deep learning-based recognition methods such as deep convolutional neural networks can automatically learn discriminative features from the original input images and apply them to downstream classifiers,which have obvious advantages over traditional methods.However,the deep convolutional neural network also has its limitations.Its translation invariance based on the calculation of the convolutional neural operator makes the deep convolutional network better at obtaining local information but ignoring the global information.In addition,the inductive bias characteristic of the convolutional neural network is not suitable to solve the current weed identification task in farmland with high fine-grained characteristics.Based on this,this paper proposes an attention calculation method based on target box area guidance,which simultaneously captures the global information and local information of the image.First detect the bounding boxes of the objects in the image,and then use these object boxes as the query Q and the different patches in the original input image to do self-attention calculation,which can avoid the negative effects of similar backgrounds as much as possible.And the boxes of different sub-regions of the same object can enhance the expression of shape and color features during the learning process of the model.Further,this paper proposes a weed recognition model based on region-guided attention.On the public data set DeepWeeds,the experimental comparison and analysis are carried out with the current popular deep convolutional neural networks and ViT.The method in this paper performs the best among all 10 methods,and the experimental results demonstrate the effectiveness of the proposed model.In order to intuitively show the effect of weed identification,this paper designs and develops a simple weed identification system,which is based on the flexible and lightweight Flask framework to realize the back end of the system,based on vue.js to realize the front-end page of the system,and uses Element UI as the front-end style library,the overall style of the system is simple and beautiful. |