| With the rapid development of our country’s economy,the output of garbage is also increasing.How to deal with garbage efficiently is bound to become an important topic of sustainable development,and garbage classification is one of the most important links,however,there are still some problems in the implementation of waste classification,such as the insufficient knowledge of waste classification and the virtual garbage bin.Based on this background,this thesis mainly aims at the optimization and improvement of the classification garbage bin recognition algorithm in public places.This thesis uses YOLOV5 algorithm to train garbage classification model,and uses CSDN blogger’s self-made garbage data set about 10000 pieces,six categories.The data processing and algorithm improvement in the thesis use OS,Pandas,numpy and other methods in Python programming.Labelimg was used to re-annotate the data for errors in the data,and additional data enhancements were performed for some categories of data for the problem of data imbalance,it includes coordinate-based transform,HSV transform,Mosaic transform,Mixup image fusion,Copy paste segmentation and fill.After that,a series of improvements are made to the training model: the loss function is improved to deal with the situation that the target size is different and the height and width are different in the training model,according to the choice of the learning rate,the cosine annealing learning rate and the multi-stage attenuation learning rate are combined to make the learning rate decay in a certain regularity,in order to improve the detection efficiency and reduce the hardware requirement,the lightweight network is used instead of the main network.The improved model improves the detection efficiency and accuracy of the algorithm on the one hand,and reduces the hardware requirements of the algorithm in practical applications on the other hand,making it more feasible. |