• Scopus
  • Chinese Science Citation Database (CSCD)
  • A Guide to the Core Journal of China
  • CSTPCD
  • F5000 Frontrunner
  • RCCSE
Advanced search
Chen Wanzhi, Yuan Hang. Forestry pest detection method based on improved YOLOv8n[J]. Journal of Beijing Forestry University, 2025, 47(2): 119-131. DOI: 10.12171/j.1000-1522.20240326
Citation: Chen Wanzhi, Yuan Hang. Forestry pest detection method based on improved YOLOv8n[J]. Journal of Beijing Forestry University, 2025, 47(2): 119-131. DOI: 10.12171/j.1000-1522.20240326

Forestry pest detection method based on improved YOLOv8n

More Information
  • Received Date: October 06, 2024
  • Revised Date: November 13, 2024
  • Accepted Date: December 06, 2024
  • Available Online: December 10, 2024
  • Objective 

    In response to the problem of slow speed, narrow categories, and poor detection of small-target pests in existing forestry pest detection methods, a forestry pest detection method based on the improved YOLOv8n was proposed.

    Method 

    Firstly, an efficient multi-scale cascade attention feature extraction network EfficientViT was adopted as the backbone of improved model to reduce computational complexity and enhance detection speed. Secondly, a multi-scale adaptive feature fusion module DA-C2F was constructed to improve the model’s ability to focus on and accurately identify pest targets in complex backgrounds. Additionally, a newly added small-object detection head XSH further enhanced the detection capability for small pest objects. Finally, a minimum point distance IoU loss function MPDIoU was implemented as the bounding box loss for the model, accelerating convergence speed and further improving the accuracy of pest target localization.

    Result 

    The improved model achieved a detection precision of 98.6%, recall of 95.7%, mean average precision of 98.3%, mean average precision at different thresholds (mAP50-95) of 85.6%, and an F1-score of 0.979. These metrics represented improvements of 3.9, 2.6, 2.8, 2.5 percentage points and 4.4%, respectively over the original model. The detection speed reached 95 frames per second with an improvement of 15.9%, also surpassed that of the lighter-weight model. Furthermore, in comparison with other detection models, the improved model demonstrated an increase of 11.2 percentage points in detection precision for moth pests, and exhibited superior overall performance in detection of two independent moth pest species.

    Conclusion 

    The proposed method has higher detection accuracy and faster detection speed for forestry pests, better detection accuracy for multiple categories of pests, and better generalization ability of the improved model.

  • [1]
    Zhao Z H, Yang M, Yang L M, et al. Predicting the spread of forest diseases and pests[J]. IEEE Access, 2020, 8: 199803−199812. doi: 10.1109/ACCESS.2020.3035547
    [2]
    赵严, 刘应安, 业巧林, 等. 基于深度学习的林业害虫检测优化[J]. 液晶与显示, 2022, 37(9): 1216−1227. doi: 10.37188/CJLCD.2022-0077

    Zhao Y, Liu Y A, Ye Q L, et al. Forestry pest detection based on deep learning[J]. Chinese Journal of Liquid Crystals and Displays, 2022, 37(9): 1216−1227. doi: 10.37188/CJLCD.2022-0077
    [3]
    Zha M F, Qian W B, Yi W K, et al. Lightweight YOLOv4-based forestry pest detection method using coordinate attention and feature fusion[J]. Entropy, 2021, 23: 1587−1605. doi: 10.3390/e23121587
    [4]
    Liu D Y, Lü F, Guo J, et al. Detection of forestry pests based on improved YOLOv5 and transfer learning[J]. Forests, 2023, 14: 1484−1500. doi: 10.3390/f14071484
    [5]
    王中天, 邹颖波, 吴昌霖, 等. 超越单一感知的农田害虫检测算法MRA-YOLOX[J]. 计算机工程与应用, 2024, 60(16): 206−216. doi: 10.3778/j.issn.1002-8331.2305-0318

    Wang Z T, Zou Y B, Wu C L, et al. MRA-YOLOX, for pest detecting in farmland beyond single perception[J]. Computer Engineering and Applications, 2024, 60(16): 206−216. doi: 10.3778/j.issn.1002-8331.2305-0318
    [6]
    Huang J Y, Huang Y, Huang H L, et al. An improved YOLOX algorithm for forest insect pest detection[J]. Computational Intelligence and Neuroscience, 2022, 5787554: 1−12.
    [7]
    Xie C J, Zhang J, Li R, et al. Automatic classification for field crop insects via multiple-task sparse representation and multiple-kernel learning[J]. Computers and Electronics in Agriculture, 2015, 119: 123−132. doi: 10.1016/j.compag.2015.10.015
    [8]
    Ebrahimi M A, Khoshtaghaza M H, Minaei S, et al. Vision-based pest detection based on SVM classification method[J]. Computers and Electronics in Agriculture, 2017, 137: 52−58. doi: 10.1016/j.compag.2017.03.016
    [9]
    Wang J N, Lin C T, Ji L Q, et al. A new automatic identification system of insect images at the order level[J]. Knowledge-Based Systems, 2012, 33: 102−110. doi: 10.1016/j.knosys.2012.03.014
    [10]
    Li Y, Xia C L, Lee J M. Detection of small-sized insect pest in greenhouses based on multifractal analysis[J]. Optik-International Journal for Light and Electron Optics, 2015, 126: 2138−2143. doi: 10.1016/j.ijleo.2015.05.096
    [11]
    赵辉, 黄镖, 王红君, 等. 基于改进YOLOv7的农田复杂环境下害虫识别算法研究[J]. 农业机械学报, 2023, 54(10): 246−254. doi: 10.6041/j.issn.1000-1298.2023.10.024

    Zhao H, Huang B, Wang H J, et al. Pest identification method in complex farmland environment[J]. Transactions of the Chinese Society for Agricultural Machinery, 2023, 54(10): 246−254. doi: 10.6041/j.issn.1000-1298.2023.10.024
    [12]
    姜晟, 曹亚芃, 刘梓伊, 等. 基于改进Faster RCNN的茶叶叶部病害识别[J]. 华中农业大学学报, 2024, 43(5): 41−50.

    Jiang S, Cao Y F, Liu Z Y, et al. Recognition of tea leaf diseases based on improved Faster RCNN[J]. Journal of Huazhong Agricultural University, 2024, 43(5): 41−50.
    [13]
    蒋心璐, 陈天恩, 王聪, 等. 农业害虫检测的深度学习算法综述[J]. 计算机工程与应用, 2023, 59(6): 30−44. doi: 10.3778/j.issn.1002-8331.2205-0604

    Jiang X L, Chen T E, Wang C, et al. Survey of deep learning algorithms for agricultural pest detection[J]. Computer Engineering and Applications, 2023, 59(6): 30−44. doi: 10.3778/j.issn.1002-8331.2205-0604
    [14]
    王金, 李颜娥, 冯海林, 等. 基于改进的Faster R-CNN的小目标储粮害虫检测研究[J]. 中国粮油学报, 2021, 36(9): 164−171. doi: 10.3969/j.issn.1003-0174.2021.09.027

    Wang J, Li Y E, Feng H L, et al. Detection of small target stored grain pests detection based on improved Faster R-CNN[J]. Journal of the Chinese Cereals and Oils Association, 2021, 36(9): 164−171. doi: 10.3969/j.issn.1003-0174.2021.09.027
    [15]
    候瑞环, 杨喜旺, 王智超, 等. 一种基于YOLOv4-TIA的林业害虫实时检测方法[J]. 计算机工程, 2022, 48(4): 255−261.

    Hou R H, Yang X W, Wang Z C, et al. A real-time detection method for forestry pest based on YOLOv4-TI-A[J]. Computer Engineering, 2022, 48(4): 255−261.
    [16]
    孙海燕, 陈云博, 封丁惟, 等. 基于注意力模型和轻量化YOLOv4的林业害虫检测方法[J]. 计算机应用, 2022, 42(11): 3580−3587. doi: 10.11772/j.issn.1001-9081.2021122164

    Sun H Y, Chen Y B, Feng D W, et al. Forestry pest detection method based on attention model and lightweight YOLOv4[J]. Journal of Computer Applications, 2022, 42(11): 3580−3587. doi: 10.11772/j.issn.1001-9081.2021122164
    [17]
    Cai H, Li J, Hu M, et al. EfficientViT: lightweight multi-scale attention for high-resolution dense prediction[C]//Cristina C. 2023 IEEE/CVF International Conference on Computer Vision (ICCV). Paris: IEEE, 2023: 17256−17267.
    [18]
    Ma S L, Xu Y. MPDIoU: a loss for efficient and accurate bounding box regression[J/OL]. arXiv: 2307.07662v1. [2023−07−14]. https://doi.org/10.48550/arXiv.2307.07662.
    [19]
    Liu B, Liu L Y, Zhou R, et al. A dataset for forestry pest identification[J]. Frontiers in Plant Science, 2022, 13: 1−10.
    [20]
    Varghese R, Sambath M. YOLOv8: a novel object detection algorithm with enhanced performance and robustness[C]//Curran Associates, Inc. 2024 International Conference on advances in data engineering and intelligent computing systems (ADICS). Chennai: IEEE, 2024: 1−6.
    [21]
    彭菊红, 张弛, 高谦, 等. 基于改进的YOLOv8算法的钢材缺陷检测[J/OL]. 计算机工程 [2024−07−15]. https://doi.org/10.19678/j.issn.1000-3428.00EC0069283.

    Peng J H, Zhang C, Gao Q, et al. Steel defect detection based on improved yolov8 algorithm[J/OL]. Computer Engineering [2024−07−15]. https://doi.org/10.19678/j.issn.1000-3428.00EC0069283.
    [22]
    惠卓凡, 李鹏龙, 沈烈, 等. 基于改进YOLOv8的渔港船舶进出港目标检测与统计方法[J]. 大连海洋大学学报, 2024, 39(3): 498−505.

    Hui Z F, Li P L, Shen L, et al. Detection and statistics method of ship entry and exit in a fishing port based on improved YOLOv8[J]. Journal of Dalian Ocean University, 2024, 39(3): 498−505.
    [23]
    Wang C Y, Liao H Y M, Wu Y H, et al. CSPNet: a new backbone that can enhance learning capability of CNN[C]// O’Conner L. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW). Seattle: IEEE, 2020: 1571−1580.
    [24]
    He K M, Zhang X Y, Ren S Q, et al. Spatial pyramid pooling in deep convolutional networks for visual recognition[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015, 37(9): 1904−1916. doi: 10.1109/TPAMI.2015.2389824
    [25]
    Howard A, Sandler M, Chu G, et al. Searching for mobilenetv3[C]// O’Conner L. Proceedings of the IEEE/CVF International Conference on Computer Vision. Seoul : IEEE, 2019: 1314−1324.
    [26]
    Ma N, Zhang X, Zheng H T, et al. Shufflenet v2: practical guidelines for efficient cnn architecture design[C]//Ferrari V. Proceedings of the European conference on computer vision (ECCV). Munich: EACV, 2018: 116−131.
    [27]
    廖晓辉, 谢子晨, 辛忠良, 等. 基于轻量化YOLOv5的电气设备外部缺陷检测[J]. 郑州大学学报(工学版), 2024, 45(4): 117−124.

    Liao X H, Xie Z C, Xin Z L, et al. Electrical equipment external defect detection based on YOLOv5[J]. Journal of Zhengzhou University (Engineering Science), 2024, 45(4): 117−124.
    [28]
    徐杨, 熊举举, 李论, 等. 采用改进的YOLOv5s检测花椒簇[J]. 农业工程学报, 2023, 39(16): 283−290. doi: 10.11975/j.issn.1002-6819.202306119

    Xu Y, Xiong J J, Li L, et al. Detection pepper clusters using improved YOLOv5s[J]. Transactions of the Chinese Society of Agricultural Engineering, 2023, 39(16): 283−290. doi: 10.11975/j.issn.1002-6819.202306119
    [29]
    Sanghyun W, Jongchan P, Joon Y L, et al. CBAM: convolutional block attention module[C]// Ferrari V. Proceedings of the European conference on computer vision (ECCV). Munich: EACV, 2018: 3−19.
    [30]
    Liu Y, Shao Z, Hoffmann N. Global attention mechanism: retain information to enhance channel-spatial interactions[J/OL]. arXiv: 2112.05561. [2023−07−14]. https://doi.org/10.48550/arXiv.2112.05561.
    [31]
    Farzad S, Nader A, Soroush S, et al. DAS: a deformable attention to capture salient information in CNNs[J/OL]. arXiv: 2311.12091. [2024−07−14]. https://doi.org/10.48550/arXiv.2311.12091.
    [32]
    Yu F, Koltun V, Funkhouser T. Dilated residual networks[C]// O’Conner L. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Honolulu: IEEE, 2017: 472−480.
    [33]
    赵文仓, 徐长凯, 王春鑫. 基于优化边界框回归的目标检测[J]. 高技术通讯, 2021, 31(7): 747−753. doi: 10.3772/j.issn.1002-0470.2021.07.008

    Zhao W C, Xu C K, Wang C X. Target detection based on optimized bounding box regression[J]. Chinese High Technology Letters, 2021, 31(7): 747−753. doi: 10.3772/j.issn.1002-0470.2021.07.008
    [34]
    周涛, 王骥, 麦仁贵. 基于改进YOLOv8的实时菠萝成熟度目标检测方法[J/OL]. 华中农业大学学报 [2024−07−16]. http://kns.cnki.net/kcms/detail/42.1181.S.20240422.1423.006.html.

    Zhou T, Wang J, Mai R G. Real-time object detection method of pineapple ripeness based on improved YOLOv8[J/OL]. Journal of Huazhong Agricultural University [2024−07−16]. http://kns.cnki.net/kcms/detail/42.1181.S.20240422.1423.006.html.
    [35]
    李爽, 张潇巍, 谭旭, 等. 基于深度学习的树木根系探地雷达多目标参数反演识别[J]. 北京林业大学学报, 2024, 46(4): 103−114. doi: 10.12171/j.1000-1522.20230259

    Li S, Zhang X W, Tan X, et al. Deep learning-based inverse identification of multi-target parameters for tree rooting ground-penetrating radar[J]. Journal of Beijing Forestry University, 2024, 46(4): 103−114. doi: 10.12171/j.1000-1522.20230259
    [36]
    Selvaraju R R, Cogswell M, Das A, et al. Grad-CAM: visual explanations from deep networks via gradient-based localization[C]// O’Conner L. 2017 IEEE International Conference on Computer Vision (ICCV). Venice: IEEE, 2017: 618−626.
    [37]
    张新月, 胡广锐, 李浦航, 等. 基于改进YOLOv8n的轻量化红花识别方法[J]. 农业工程学报, 2024, 40(13): 163−170.

    Zhang X Y, Hu G R, Li P H, et al. Recognizing safflower using improved lightweight YOLOv8n[J]. Transactions of the Chinese Society of Agricultural Engineering, 2024, 40(13): 163−170.
    [38]
    陈中垚. 基于YOLOv5s的林业害虫目标检测方法分析[J]. 电子技术, 2024, 53(3): 53−57.

    Chen Z Y. Analysis of forest pest target detection method based on YOLOv5s[J]. Electronic Technology, 2024, 53(3): 53−57.

Catalog

    Article views (169) PDF downloads (42) Cited by()

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return