Acta Entomologica Sinica ›› 2023, Vol. 66 ›› Issue (6): 787-796.doi: 10.16380/j.kcxb.2023.06.007

• RESEARCH PAPERS • Previous Articles     Next Articles

Detection and recognition of grooming behaviors of Bactrocera dorsalis (Diptera: Trypetidae) based on YOLO V7 and TSM model

LIU Hu1, ZHAN Wei1,*, HE Zhang-Zhang2, TANG Jian-Tao2, JIANG Zhen-Yu2, SUN Yong1,3   

  1. (1. School of Computer Science, Yangtze University, Jingzhou 434025, China; 2. Forewarning and Management of Agricultural and Forestry Pests & Hubei Engineering Technology Center, College of Agriculture, Yangtze University, Jingzhou 434025, China; 3. Jingzhou Yingtuo Technology Co., Ltd., Jingzhou 434023, China)
  • Online:2023-06-20 Published:2023-08-02

Abstract: 【Aim】 Statistical analysis and study of insect grooming behaviors are important for pest control and human health. In view that the traditional method of manually recording grooming behaviors is time-consuming and error-prone, we proposed a computer vision and deep learning-based method for the detection and recognition of grooming behaviors of the Oriental fruit fly, Bactrocera dorsalis. 【Methods】 First, we processed the B. dorsalis video data to obtain frame images, and screened 3 000 images as the training dataset. We built the YOLO V7 target detection algorithm to detect B. dorsalis target in video data, and framed the target and cropped it by video processing algorithm. Finally, we migrated the pre-training weights to the training model by transfer learning method, and recognized seven grooming behaviors (foreleg grooming, head grooming, fore-midleg grooming, mid-hindleg grooming, hindleg grooming, wing grooming and stationary) of B. dorsalis using the temporal shift module (TSM) deep learning model based on non-local attention improvement. 【Results】 The accuracy and recall rate of the original video of the B. dorsalis dataset trained by YOLO V7 target detection algorithm were 99.2% and 99.1%, respectively. Applying this research algorithm to process the video dataset, and then recognizing and counting grooming behaviors through an improved TSM model based on the non-local attention module, we got the final average accuracy of over 97% with a standard deviation of less than 3%. Compared with the other four deep learning models (I3D, R2+1D, SlowFast and Timesformer), this research method had a ~9.76% improvement in accuracy, ensuring the accuracy of B. dorsalis grooming behavior detection and recognition. 【Conclusion】 The method proposed in this study greatly reduces the time of manual observation, and ensures the accuracy of grooming behavior recognition of B. dorsalis, providing new ideas and methods for researching insect behavior and contributing to the modern development of intelligent agriculture.

Key words: Bactrocera dorsalis, grooming behavior, object detection, behavior recognition, deep learning, TSM model