Abstract:At present, domestic locust monitoring is mainly based on manual monitoring, with low monitoring efficiency and inaccurate counting. In response to the above problems, the K-SSD-F algorithm, a video counting method of locusts, was proposed with the 5th instar migratory locust as the experimental object. This method can monitor the number of locusts in real time, continuously and automatically. Firstly, the KNN algorithm in the background separation method was used to extract the spatiotemporal features of the frames before and after the video; then the SSD model was trained through the labeled data, the video was detected, and the static features of the video were extracted, and the two were combined to improve the counting accuracy; finally, the frame compensation algorithm was used to recognize missing frames due to posture changes. The experimental results showed that the precision of locust identification was 97%, the recall rate was 89%, the average detection accuracy (mAP) was 88.94%, the F1 value was 92.82%, and the detection speed reached 19.78f/s. The proposed method had good robustness, which can realize real-time and automatic counting of locusts, its accuracy was better than that of other models, and it can also provide a theoretical basis for automatic identification and counting of other kinds of insects.