Journal of Computer Applications ›› 2022, Vol. 42 ›› Issue (11): 3580-3587.DOI: 10.11772/j.issn.1001-9081.2021122164

• ChinaVR 2021 • Previous Articles    

Forest pest detection method based on attention model and lightweight YOLOv4

Haiyan SUN, Yunbo CHEN, Dingwei FENG, Tong WANG, Xingquan CAI()   

  1. School of Information Science and Technology,North China University of Technology,Beijing 100144,China
  • Received:2021-12-24 Revised:2022-03-14 Accepted:2022-03-17 Online:2022-05-17 Published:2022-11-10
  • Contact: Xingquan CAI
  • About author:SUN Haiyan, born in 1980, Ph. D., lecturer. Her research interests include virtual reality, deep learning.
    CHEN Yunbo, born in 2001. Her research interests include virtual reality, deep learning.
    FENG Dingwei, born in 1997, M. S. candidate. His research interests include virtual reality, deep learning.
    WANG Tong, born in 1996, M. S. candidate. His research interests include virtual reality, deep learning.
    CAI Xingquan, born in 1980, Ph. D., professor. His research interests include virtual reality, human‑computer interaction, deep learning.
  • Supported by:
    Beijing Social Science Foundation of China(20YTB011)

基于注意力模型和轻量化YOLOv4的林业害虫检测方法

孙海燕, 陈云博, 封丁惟, 王通, 蔡兴泉()   

  1. 北方工业大学 信息学院,北京 100144
  • 通讯作者: 蔡兴泉
  • 作者简介:孙海燕(1980—),女,山东济宁人,讲师,博士,主要研究方向:虚拟现实、深度学习
    陈云博(2001—),女,河南郑州人,主要研究方向:虚拟现实、深度学习
    封丁惟(1997—),男,山东青岛人,硕士研究生,主要研究方向:虚拟现实、深度学习
    王通(1996—),男,山西大同人,硕士研究生,主要研究方向:虚拟现实、深度学习
    蔡兴泉(1980—),男,山东济南人,教授,博士,CCF高级会员,主要研究方向:虚拟现实、人机互动、深度学习。xingquancai@126.com
  • 基金资助:
    北京市社会科学基金资助项目(20YTB011)

Abstract:

Aiming at the problems of slow detection speed, low precision, missed detection and false detection of current forest pest detection methods, a forest pest detection method based on attention model and lightweight YOLOv4 was proposed. Firstly, a dataset was constructed and preprocessed by using geometric transformation, random color dithering and mosaic data augmentation techniques. Secondly, the backbone network of YOLOv4 was replaced with a lightweight network MobileNetV3, and the Convolutional Block Attention Module (CBAM) was added to the improved Path Aggregation Network (PANet) to build the improved lightweight YOLOv4 network. Thirdly, Focal Loss was introduced to optimize the loss function of the YOLOv4 network model. Finally, the preprocessed dataset was input into the improved network model, and the detection results containing pest species and location information were output. Experimental results show that all the improvements of the network contribute to the performance improvement of the model; compared with the original YOLOv4 model, the proposed model has faster detection speed and higher detection mean Average Precision (mAP), and effectively solves the problem of missed detection and false detection. The proposed new model is superior to the existing mainstream network models and can meet the precision and speed requirements of real?time detection of forest pests.

Key words: forest pest detection, lightweight network, attention model, loss function

摘要:

针对当前林业害虫检测方法检测速度慢、准确率较低和存在漏检误检等问题,提出一种基于注意力模型和轻量化YOLOv4的林业害虫检测方法。首先构建数据集,使用几何变换、随机色彩抖动和Mosaic数据增强技术对数据集进行预处理;其次将YOLOv4的主干网络替换为轻量化网络MobileNetV3,并在改进后的路径聚合网络(PANet)中添加卷积块注意力模块(CBAM),搭建改进的轻量化YOLOv4网络模型;然后引入Focal Loss优化YOLOv4网络模型的损失函数;最后将预处理后的数据集输入到改进后的网络模型中,输出包含害虫种类和位置信息的检测结果。实验结果表明,该网络的各项改进点对模型的性能提升都有效;相较于原YOLOv4模型,新模型的检测速度更快,平均精度均值(mAP)更高,并且能有效解决漏检和误检问题。新模型优于目前的主流网络模型,能满足林业害虫实时检测的精度和速度要求。

关键词: 林业害虫检测, 轻量化网络, 注意力模型, 损失函数

CLC Number: