Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (10): 187-195.DOI: 10.3778/j.issn.1002-8331.2210-0316

• Graphics and Image Processing • Previous Articles     Next Articles

High-Precision Garbage Detection Algorithm of Lightweight YOLOv5n

TU Chengfeng, YI Anlin, YAO Tao, HE Wenwei   

  1. 1.School of Information Science and Technology, Southwest Jiaotong University, Chengdu 611756, China
    2.Yantai Research Institute of New Generation Information Technology, Southwest Jiaotong University, Yantai, Shandong 264001, China
  • Online:2023-05-15 Published:2023-05-15

轻量化YOLOv5n的高精度垃圾检测算法

涂成凤,易安林,姚涛,贺文伟   

  1. 1.西南交通大学 信息科学与技术学院,成都 611756
    2.西南交通大学 烟台新一代信息技术研究院,山东 烟台 264001

Abstract: Aiming at the problems of the existing domestic waste detection models, such as multiple parameters, large amount of calculation, which are not suitable for deployment on mobile devices or embedded devices, and less types of garbage identification, a lightweight and high-precision optimization research is carried out for YOLOv5n target detection algorithm. Firstly, the lightweight networks ShuffleNetv2 and GhostNet are introduced on the YOLOv5n architecture to accomplish the lightweight detection network design. Secondly, the attention mechanism SE is added to enhance the feature extraction ability of the network, and the response-based knowledge distillation algorithm is introduced to improve the accuracy of localization and classification, thereby improving the detection accuracy. Experimental results show that, on the HGI-30 dataset, the optimized YOLOv5n reduces the amount of parameters and computation by 22.3% and 23.3%, and the detection accuracy mAP0.5 and mAP0.5:0.95 are increased by 1.6 percentage points and 2.6 percentage points.

Key words: YOLOv5n, lightweight network, knowledge distillation, domestic waste classification

摘要: 针对现有部署至移动设备或嵌入式设备的生活垃圾检测模型参数量多,计算量大,且识别种类较少等问题,对YOLOv5n目标检测算法进行了轻量化、高精度的优化研究。在YOLOv5n的架构上引入轻量级网络ShuffleNetv2与GhostNet实现了检测网络的轻量化;同时添加注意力机制SE增强特征提取能力,以及引入基于响应的知识蒸馏算法提升定位和分类的准确率,从而提高目标检测精度。实验结果表明,在HGI-30数据集上,优化后的YOLOv5n的参数量和计算量分别减少22.3%和23.3%,检测精度mAP0.5和mAP0.5:0.95分别增加1.6个百分点和2.6个百分点。

关键词: YOLOv5n, 轻量级网络, 知识蒸馏, 生活垃圾分类