Design of an intelligent classification system for domestic garbage based on improved YOLOv5 algorithm
-
摘要: 针对生活垃圾分类难、资源回收利用率低等问题,提出了一种基于改进的YOLOv5算法的生活垃圾智能分类系统设计策略,旨在提高生活垃圾分拣过程中对垃圾类别识别的实时性和准确性。该算法以YOLOv5为基础网络,使用GhostNet的C3Ghost模块替换原始的YOLOv5架构中的C3模块,采用了更新的损失函数SIoU,并利用Ghost卷积与CBAM注意力机制级联结构,实现了轻量化主干网络和提高模型性能的目标。实验结果表明,该算法相比YOLOv5,基础网络权重由7.111 M下降至4.039 M,每秒处理帧数从73.8帧提升至82.0帧,模型轻量化达到50%,更易于移植到移动设备上,且具有良好的鲁棒性以及检测性能。该系统应用红外感应、激光测距、图像识别、电机驱动等技术,设计了具备自动开合、破袋、分类、油水渣分离、溢满反馈等功能的智能分类垃圾箱,能够有效收集各类生活垃圾,避免接触传播病菌,提高工作效率,节省人力成本,促进物资的循环利用。Abstract: This research proposes a design strategy for an intelligent classification system for domestic garbage based on the improved YOLOv5 algorithm. The aim is to enhance both real-time and accuracy in garbage category identification during the domestic garbage sorting process, addressing the issues of difficult domestic garbage classification, low resource recycling rate, and serious environmental pollution. The algorithm uses YOLOv5 as the base network, replaces the C3 module in the original YOLOv5 architecture with the C3Ghost module of GhostNet, employs an updated loss function SIoU, and utilizes the cascade structure of the Ghost convolution combined with the CBAM attention mechanism to achieve the dual goals of lightweighting the backbone network and improving the model performance. The experimental results demonstrated that the algorithm reduced the weight of the network from 7.111 M to 4.039 M compared with the YOLOv5 base network. Additionally, it improved the frame rate from 73.8 FPS to 82.0 FPS, lightened the model by 50%, enhanced portability to mobile devices, and exhibitsed robust performance and detection capabilities. The system employs a single box with multiple points of interaction, integrating technologies such as infrared sensing, laser distance measurement, image recognition, motor drive and others to develop an intelligent classification dustbin featuring automated opening and closing, bag-breaking, sorting, separation of oil and water residue, and overflow feedback capabilities. The bin is capable of effectively handling a wide range of domestic garbage materials. It can effectively process all types of domestic garbage while preventing contact with potential pathogens and enabling intelligent garbage classification. This system not only reduces labor costs but also facilitates material recycling, thereby protecting the human ecological environment.
-
Key words:
- YOLOv5 /
- lightweight /
- attention mechanism /
- domestic garbage /
- intelligent classification
-
1 消融实验结果
1. Results of ablation experiments
模型 精度/% 召回率/% 平均精度值/% GFLOPS/s 每秒处理帧数FPS/(帧/s) 参数量 YOLOv5 80.8 77.5 83.4 16.2 73.8 7111327 YOLOv5+Ghost 76.6 68.5 73.5 8.5 69.1 3773542 YOLOv5+Ghost-CBAM 78.3 73.5 78.6 18.6 78.0 3988432 YOLOv5+Ghost-CBAM+SIoU 89.3 87.8 80.5 18.9 82.0 4039271 2 不同算法实验对比
2. Experimental comparison of different algorithms
模型 平均精度值/% GFLOPS/s 每秒处理帧数FPS/(帧/s) 参数量 YOLOv3 83.2 3.1 13.5 237957468 YOLOv4 84.8 3.3 14.7 256347894 YOLOv5 83.4 16.2 73.8 7111327 Faster R-CNN 87.1 1.8 8.0 5472334176 SSD 80.1 5.7 25.0 150213546 CenterNet 79.3 7.4 33.0 285426812 YOLOv5 + Ghost-CBAM + SIoU 80.5 18.9 82.0 4039271 -
[1] YANG Y R. Financial performance analysis and countermeasure research of China Tianying Company under the background of garbage classification[D]. Zhengzhou:North China University of Water Resources and Hydropower Power,2021. 杨薏任. 垃圾分类背景下中国天楹公司财务绩效分析及对策研究[D]. 郑州:华北水利水电大学,2021. [2] ZHANG C N. Research on the design of domestic garbage classification and recycling system and equipment[D]. Shenyang:Shenyang University of Science and Technology,2020. 张春男. 生活垃圾分类回收体系及设备设计研究[D]. 沈阳:沈阳理工大学,2020. [3] DANG H S,ZHANG C,PANG Y. Research on a rapid sorting system for industrial robots based on visual guidance[J]. Electronic Devices,2017,40(2):481-485. 党宏社,张超,庞毅. 基于视觉引导的工业机器人快速分拣系统研究[J]. 电子器件,2017,40(2):481-485. [4] FAN J H,CUI L Z. Garbage classification target detection model based on Yolo_ES[J]. Electronic Measurement Technology,2023,46(1):160-166. 范金豪,崔立志. 基于Yolo_ES的垃圾分类目标检测模型[J]. 电子测量技术,2023,46(1):160-166. [5] ZHANG R,YIN D,DING J,et al. A detection method for low-pixel ratio object[J]. Multimedia Tools and Applications,2019,78(9):11655-11674 [6] LIANG S,GU Y. A deep convolutional neural network to simultaneously localize and recognize waste types in images[J]. Waste Management,2021,126:247-257. [7] WU P B,YAO M L,WANG T,et al. Design of a garbage sorting robot based on TensorFlow[J]. Laboratory Research and Exploration,2020,39(6):117-122. 吴蓬勃,姚美菱,王拓,等. 基于TensorFlow的垃圾分拣机器人设计[J]. 实验室研究与探索,2020,39(6):117-122. [8] ZHANG Y W,LI S H,ZHANG W,et al. Design of intelligent sorting system for recyclable garbage based on machine vision[J]. Laboratory Research and Exploration,2022,41(7):98-103,107. 张月文,李松恒,张炜,等. 基于机器视觉的可回收垃圾智能分拣系统设计[J]. 实验室研究与探索,2022,41(7):98-103,107. [9] LI C X. Garbage identification and classification based on attention mechanism and convolutional neural network[D]. Taiyuan:Shanxi University,2024. 李晨曦. 基于注意力机制和卷积神经网络的垃圾识别与分类[D]. 太原:山西大学,2024. [10] ZHANG C Q. Research and development of a robotic garbage sorting system based on image processing[D]. Shanghai:Donghua University,2024. 张传庆. 基于图像处理的机器人垃圾分拣系统研究与开发[D]. 上海:东华大学,2024. [11] CAO M L,FU H,ZHU J Y. Lightweight tea bud recognition network integrating GhostNet and YOLOv5[J]. Math Biosci Eng,2022,19(12):12897-12914. [12] ARIFANDO R,ETO S,WADA C. Improved YOLOv5-based lightweight object detection algorithm for people with visual impairment to detect buses[J]. Applied Sciences,2023,13(9):5802. https://doi.org/10.3390/app13095802. [13] ZHU C Y. A YOLOv5 traffic sign target detection algorithm integrated with the attention mechanism[J]. Value Engineering,2024,43(13):113-116. 朱春燕. 融合注意力机制的YOLOv5交通标志目标检测算法[J]. 价值工程,2024,43(13):113-116. [14] LV M,SU W H. YOLOV5-CBAM-C3TR:an optimized model based on transformer module and attention mechanism for apple leaf disease detection[J]. Frontiers in Plant Science. 2024,14:1323301. [15] RAJ G D,PRABADEVI B. Steel strip quality assurance with YOLOV7-CSF:A coordinate attention and SIoU fusion approach[J]. IEEE Access,2023(11):129493-129506. [16] ZHANG Y,LI H,WANG R,et al. Constrained-SIoU:a metric for horizontal candidates in multi-oriented object detection[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing,2022,15(1):956-967. [17] LIANG J R,CHEN Z,DONG G J,et al. Research on vehicle detection methods based on the cascade structure of Ghost convolution and channel attention mechanism[J]. Journal of Tianjin University,2023,56(2):193-199. 梁继然,陈壮,董国军,等. 基于Ghost卷积和通道注意力机制级联结构的车辆检测方法研究[J]. 天津大学学报,2023,56(2):193-199. [18] ZHU X Q,LI D. Detection system based on YOLO5Face for mask wearing at the railway station[J]. Electronic Test,2021(24):50-52. 朱鑫鹏,李丹. 基于YOLO5Face在火车站口罩佩戴的检测系统[J]. 电子测试,2021(24):50-52. [19] REDMON J,FARHADI A. Yolov3:An incremental improvement[J]. ArXiv Preprint,2018,ArXiv:1804.02767. [20] REN S,HE K,GIRSHICK R,et al. FasterR-CNN:Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis& Machine Intelligence,2017,39(6):1137-1149. [21] LIU W,ANGUELOV D,ERHAN D,et al. SSD:Single shot multibox detector[C]// 2016 European Conference on Computer Vision. Amsterdam,The Netherlands,2016:21-37. [22] ZHOU X Y,WANG D Q,KRÄHENBÜHL P. Objects as Points[EB/OL]. https://arxiv.org/pdf/1904.07850.pdf.2019-04-25. [23] WANG W S,NIAN C X,ZHANG C,et al. Design of non-residential automatic garbage sorting bins based on the YOLO v5 model[J]. Environmental Engineering,2022,40(3):159-165 王文胜,年诚旭,张超 等. 基于YOLO v5模型的非住宅区自动垃圾分类箱设计[J]. 环境工程,2022,40(3):159-165. -
登录
注册
E-alert
登录
注册
E-alert
下载: