计算机与现代化 ›› 2025, Vol. 0 ›› Issue (09): 35-42.doi: 10.3969/j.issn.1006-2475.2025.09.005

• 人工智能 • 上一篇    下一篇

改进YOLOv8的轻量化垃圾分类检测

  


  1. (贵州大学大数据与信息工程学院,贵州 贵阳 550025)
  • 出版日期:2025-09-24 发布日期:2025-09-24
  • 作者简介: 作者简介:罗德艳(2002—),女,贵州大方人,硕士研究生,研究方向:计算机视觉,目标检测,E-mail: luody2002@163.com; 通信作者:徐杨(1980—),男,贵州贵阳人,副教授,博士,研究方向:数据采集,机器学习,E-mail: xuy@gzu.edu.cn。
  • 基金资助:
      基金项目:贵州省科技计划项目(黔科合支撑[2023]一般326)
     

Lightweight Garbage Classification and Detection of Improved YOLOv8


  1. (College of Big Data and Information Engineering, Guizhou University, Guiyang 550025, China)
  • Online:2025-09-24 Published:2025-09-24

摘要:
摘要:目前基于深度学习的垃圾分类检测算法通常具有大量的模型参数,这会导致存储和计算成本上升,使得在资源受限的移动设备上运行时会产生较高的计算负载。针对以上问题提出一种改进YOLOv8n的轻量化垃圾检测算法。改进算法在YOLOv8n特征提取网络模块中使用GhostNet卷积模块实现轻量化网络;采用RepConv结构重参数化改进主干网络,增强网络特征提取能力的同时减小推理阶段网络的复杂度;改进颈部网络的C2f模块,使用不同尺寸的卷积核获取多尺度特征信息,从而提高模型检测精度;利用迁移学习提高网络泛化能力,并加速模型训练提高模型的检测精度。实验结果表明,改进后的模型参数量和计算量相较于原模型分别降低了26.8%和24.7%,平均检测精度mAP50和mAP50:95分别为98.1%和93.8%。改进算法不仅减少了模型的参数量和计算量,还具有较好的检测精度,能更好地适应移动设备的需求。


关键词: 关键词:垃圾分类检测, 轻量化网络, Ghost卷积, 结构重参数, 多尺度特征融合

Abstract:
Abstract: The current garbage classification and detection algorithms based on deep learning often have a large number of model parameters, leading to increased storage and computing costs. This results in significant computational load when running on resource-constrained mobile devices. To solve the above problems, a lightweight garbage detection algorithm based on improved YOLOv8n is proposed. The improved algorithm uses the GhostNet convolution module to realize the lightweight network in the YOLOv8n feature extraction network module. The RepConv structure reparameterization is used to improve the backbone network, which enhances the backbone network’s feature extraction ability and reduces its complexity during inference stages. Additionally, the C2f module of the neck network is improved by using convolution kernels of different sizes to obtain multi-scale feature information, thereby enhancing the detection accuracy of the model. Finally, transfer learning is used to improve generalization capabilities while accelerating model training for better overall detection accuracy. The experimental results show that the improved algorithm reduces both parameter count and computation by 26.8% and 24.7%, respectively, compared with the original model while achieving average detection accuracies of mAP50 and mAP50:95 at 98.1% and 93.8%. Overall, the proposed method not only reduces model complexity but also has better detection accuracy and can better adapt to the requirements of mobile devices.

Key words: Key words: garbage classification and detection; lightweight network; Ghost convlution; structure reparameterization; multi-scale feature fusion ,

中图分类号: