The construction of beautiful rural environment is an important part of rural revitalization strategy.While the production and living standards in rural areas are improving,there are problems in rural areas such as villagers’ poor awareness of garbage management and backward garbage treatment infrastructure.Rural garbage management has become an urgent problem in the construction of beautiful countryside environment.Large amounts of garbage can pollute the soil and air,and affect the quality of water sources,which in turn affects the growth and quality of crops.Garbage piled up in the streets and fields of rural areas will affect the rural landscape and reduce the quality of the beautiful countryside.By recycling garbage,we can improve the efficiency of resource utilization,reduce the impact of garbage on the environment and bring better economic benefits to the agricultural industry.In this paper,six types of recyclable garbage,namely glass bottles,plastic bottles,metal cans,paper products,plastics and tin foil,are taken as the research objects,and a recyclable garbage identification method combined with target detection algorithm is proposed for the above six types of garbage.The main work of this paper is as follows:(1)Produce a recyclable garbage image dataset.In this study,a total of 4272 garbage images were collected from open source datasets,and then 6758 images containing recyclable garbage were obtained by data cleaning and data broadening,and they were made into a recyclable garbage image dataset containing many different environmental backgrounds.(2)To study the application of target detection algorithm in the field of recyclable garbage recognition.The recyclable garbage image dataset is trained by SSD,Faster R-CNN and YOLOv5 with five different sizes of networks,and the best overall performance of YOLOv5 m in the recyclable garbage image dataset is obtained by comparing and analyzing the mAP and FPS evaluation indexes in the experimental results.Therefore,this paper improves the small target detection effect by adding an attention mechanism.After comparing YOLOv5 m with five attention mechanisms,the experimental results show that CA attention mechanism has the best overall performance on the recyclable garbage image dataset,and the mAP is improved by 2.1% to 87.7%.Therefore,the YOLOv5 m model with the addition of CA attention mechanisms is used as the final target detection model in this study.(3)Design and implement the recyclable garbage detection system.The system adopts a front-end and back-end separated architecture,using Vue framework for the front-end and Flask framework for the back-end.The main functions of the system are image detection,video detection and zip package batch detection.After the user uploads the relevant files,the system can identify the type of recyclable garbage and show the detection results to the user.At the same time,users can view the history of detection records in the system. |