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 |
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.
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.
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.
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.
|
[1] | Zhang Luyue, Liu Yanhong, Han Dongqing. Differences in growth and adaptive strategies between male and female plants of Cercidiphyllum japonicum[J]. Journal of Beijing Forestry University, 2024, 46(12): 71-81. DOI: 10.12171/j.1000-1522.20230263 |
[2] | Jin Chuan, Zha Tianshan, Jia Xin, Tian Yun, Zhou Wenjun, Yang Shuangbao, Guo Zifan. Dynamics of chlorophyll fluorescence parameters under drought condition for three desert shrub species[J]. Journal of Beijing Forestry University, 2020, 42(8): 72-80. DOI: 10.12171/j.1000-1522.20190316 |
[3] | HAN Jing, WU Yi, ZHAO Lin, AI Yun-bi, LIU Yan, GAO Rong-fu. Effects of photoperiod on the growth, flowering and chlorophyll fluorescence kinetics of forced Paeonia lactiflora.[J]. Journal of Beijing Forestry University, 2015, 37(9): 62-69. DOI: 10.13332/j.1000-1522.20140418 |
[4] | ZHAO Xi-yang, WANG Jun-hui, ZHANG Jin-feng, ZHANG Shou-gong, ZHANG Zeng-shun, MA Jian-wei, YUN Hui-ling, LI Kui-you. Variation analysis on chlorophyll fluorescence and growth traits of Catalpa bungei clones[J]. Journal of Beijing Forestry University, 2012, 34(3): 41-47. |
[5] | QIAN Yong-qiang, ZHOU Xiao-xing, HAN Lei, SUN Zhen-yuan, JU Guan-sheng. Rapid light-response curves of PSⅡ chlorophyll fluorescence parameters in the leaves of Salix babylonica, Salix ‘J172’ and Salix leucopithecia to Cd2+ stress[J]. Journal of Beijing Forestry University, 2011, 33(6): 8-14. |
[6] | CHEN Zhi-qiang, LI Qing-jian, SHI Rui-ting, ZHANG Jian-qiu, WANG Guo-zhu, ZHANG Yu-ling, LI Yue. Effects of soda salinealkaline stress on photosynthesis and growth of Nitraria sibirica[J]. Journal of Beijing Forestry University, 2011, 33(3): 31-37. |
[7] | HAO Jian-qing, LV Na, YANG Yang, LI Wen-hai, BAI Xue, ZHENG Cai-xia. Comparative study of chlorophyll fluorescence parameters and water physiological characters of heteromorphic leaves for Populus euphratica[J]. Journal of Beijing Forestry University, 2010, 32(5): 41-44. |
[8] | YING Ye-qing, GUO Jing, WEI Jian-fen, ZOU Yi-qiao, HU Dong-chun, FANG Wei.. Photosynthetic and chlorophyll fluorescent responses of Phyllostachys pubescens seedlings to water deficiency stress.[J]. Journal of Beijing Forestry University, 2009, 31(6): 128-133. |
[9] | HUANG Hua-hong, CHEN Fen-xue, TONG Zai-kang, ZHU Yu-qiu.. Photosynthetic properties and chlorophyll florescence parameters of dwarf Chinese fir.[J]. Journal of Beijing Forestry University, 2009, 31(2): 69-73. |
[10] | DUAN Ai-guo, BAO Er-jiang, ZHANG Jian-guo, HE Cai-yun, SAI Li-ke, . Dynamic laws of chlorophyll fluorescence parameters in needle leaves of different leaf ages and locations of Pinus armandii[J]. Journal of Beijing Forestry University, 2008, 30(5): 26-32. |
1. |
罗茂,关志华,颜幼春,柴莹莹,刘佳琪,张佳敏,王忠红. 模拟根际生境下青甘韭生长与品质的差异分析. 高原农业. 2025(01): 65-72+132 .
![]() | |
2. |
黄小辉,吴焦焦,王玉书,冯大兰,孙向阳. 不同供氮水平的核桃幼苗生长及叶绿素荧光特性. 南京林业大学学报(自然科学版). 2022(02): 119-126 .
![]() | |
3. |
郑伟,师筝,龙美,廖允成. 黄绿叶突变体冀麦5265yg的光合生理特性分析. 中国农业科学. 2021(21): 4539-4551 .
![]() | |
4. |
王佳敏,宋海燕,陈金艺,张静,李素慧,陶建平,刘锦春. 多年生黑麦草对干旱胁迫下喀斯特异质生境的生长响应策略. 生态学报. 2020(13): 4566-4572 .
![]() | |
5. |
王生云,陶永明,司剑华. 不同配方轻基质对鳞皮云杉生长及光合参数的影响. 浙江林业科技. 2019(02): 50-55 .
![]() | |
6. |
乐佳兴,田秋玲,吴焦焦,高岚,张文,刘芸. 无患子幼苗的生长和光合特性对重庆低山丘陵区不同生境的响应. 北京林业大学学报. 2019(06): 75-85 .
![]() | |
7. |
戴前莉,黄小辉,黄馨,唐龙波,朱恒星. 不同生境条件下凤丹生长及光合特性比较. 西南大学学报(自然科学版). 2018(09): 53-58 .
![]() | |
8. |
陶永明,司剑华. 不同轻基质配方对川西云杉幼苗生长的影响. 浙江林业科技. 2017(04): 66-70 .
![]() |