Abstract:Aiming at the problems of high training cost of two-stage network model and low detection speed of edge computing equipment attached on UAV, a real-time detection method based on the improved YOLO v4 model was proposed in order to improve the recognition accuracy and detection speed for Dendrolimus superans-infested Larix gmelinii trees. Taking the UAV images of Larix gmelinii infested by Dendrolimus superansobtained from Baiyinna Township, Huma County in the Daxing'anling District of Heilongjiang Province as data, the UAV images at 75~100m were marked with LabelImg software, and a data set of tree images infested by Dendrolimus superanswas constructed. CSPNet was applied to the Neck architecture of the YOLO v4 model, the Backbones feature extraction network—CSPDarknet53 model structure was redesigned, and SENet was added to the convolution before CSPNet optimization calculations to increase the receptive field information, making it change the depth, width, resolution and structure of the network to achieve model scaling and improve detection accuracy. Meanwhile, CSPConvs convolution was used in PANet to replace the original convolution Conv×5, and finally the prediction result was output through YOLO Head detection. After deploying the YOLO v4-CSP network model to the GPU for training, the memory of the training process was reduced to 82.7% of that before improvement. The improved model was installed on the workstation for testing. Results showed that the accuracy of tree detection was 97.50%, which was 3.4 percentage points higher than the average detection accuracy of YOLO v4, and close to 98.75% of the current mainstream two-stage framework Faster R-CNN. When attached to Jetson nano edge computing equipment, the detection speed was 4.17f/s, higher than the 1.72f/s of YOLO v4 model. Therefore, the proposed detection model based on YOLO v4-CSP can achieve balance between detection speed and detection accuracy for the Dendrolimus superans-infested Larix gmelinii trees, reduce application cost of the model, and realize real-time monitoring of forest pests when attached to UAV.