| Pests are an important factor causing crop yield reduction and quality degradation.Rapid and accurate pest information detection is an important and prerequisite for pest control.The traditional method relies on experts and agricultural technicians to go deep into the field to"check with eyes and hands".The diagnosis result depends entirely on personal knowledge and experience,which is time-consuming,laborious,and unreliable.The intelligent pest detection methods based on deep learning are convenient,time-saving,and labor-saving,and the results are objective and reliable,which makes up for some shortcomings of traditional methods.However,the following problems still exist when applied to the actual farmland environment:in the agricultural environment,the pests are too similar to the background,which leads to low detection accuracy,especially for the detection of small object pests.Due to the limited extractable features of the target,the vulnerability to environmental interference,and the easy loss of features in information circulation,the detection effect is not good;existing models have many parameters and calculations,making it difficult to deploy to mobile devices for practical applications.In response to the above problems,this thesis carried out related research on agricultural crop pests from two aspects of model accuracy and efficiency.The specific research works are as follows:(1)An agricultural crop pest detection method based on the improved YOLOv5 was proposed.In order to solve the problem of insufficient detection accuracy caused by the difficulty of extracting pest features and insufficient semantic information of pests in the agricultural environment,detection model Pest-YOLOv5 was constructed.First,the position-sensitive feature extractor enhanced the ability to extract important features of pest areas by integrating spatial coordinate information and feature channels.Second,in order to enhance the pest semantic information,the pest feature representation in deep networks was enhanced by the weighted bidirectional feature pyramid neck connection structure.Finally,the optimized loss function was designed to improve the model’s attention to hard samples in the agricultural environment,and further enhanced the model’s ability to learn pest characteristics.The m AP50of Pest-YOLOv5 reached 70.4%and 74.1%on Agri Pest and PEST35 datasets respectively,which were 8.1%and 3.2%higher than YOLOv5.On the Agri Pest dataset,Pest-YOLOv5 outperformed YOLOv3,Faster R-CNN and other target detection models.The performance on PEST35,Pest-YOLOv5 was only next to Faster R-CNN and YOLOv8s.Experimental results showed that Pest-YOLOv5 could achieve better detection performance in agricultural environment.(2)A lightweight agricultural crop pest detection method based on an improved backbone network was proposed.In order to reduce the amount of network parameters and calculations,a lightweight agricultural crop pest detection model Lite Net was constructed.Lite Net realized the detection of pests in the agricultural environment with very few parameters and calculations,and further improved the detection accuracy.First,by improving MobileNetV3 to build a lightweight backbone network,the parameters and calculation load were effectively reduced.Second,the lightweight feature fusion module fused local and global features with very few parameters to improve the representation of the best features.Finally,the lightweight detection head significantly improved the model detection performance while greatly reducing the model complexity.Lite Net was evaluated on the Agri Pest dataset,m AP0.5reached 71.1%,the number of parameters was only 1.758M,and the number of floating-point calculations was only 6.7 GFLOPs.On the PEST35 dataset,Lite Net’s m AP0.5reached 76.7%,with only 2.234M parameters and only 8.2 GFLOPs of floating-point calculations.Compared with other lightweight models,the lightweight algorithm Lite Net proposed in this thesis achieved both lightweight model size and best detection performance,laying the foundation for model deployment.(3)A small object detection method for crop pests based on a hybrid attention mechanism was proposed.Aiming at the detection difficulties caused by environmental noise hindering the learning of small object features and the easy loss of small object features,a small object detection model Pest Lite Net was constructed for agricultural crop pests.Pest Lite Net is suitable for agricultural environment,and takes detection accuracy,model size and detection speed into account.First,the feature representation of pests was enhanced where small target features were weak through efficient channel attention to reduce noise interference.Second,the improved coordinate attention further enhanced the feature extraction capability by embedding spatial information in more important channels.Finally,the lightweight neck structure reduced parameters and computation without compromising detection performance.And the lightweight detection head further reduced the model size and significantly improved the detection performance.Pest Lite Net proposed in this thesis achieved the best detection performance on the Agri Pest dataset with a m AP0.5of 75.3%.At the same time,Pest Lite Net had the same level of parameters and calculations as the lightweight algorithms.It took 10.7 milliseconds and 54.3 milliseconds for Pest Lite Net to detect a single image in GPU and CPU environments,respectively,which was equivalent to the fastest algorithm. |