| With the continuous enhancement of national comprehensive strength and the increasing material needs of the people,the amount of garbage generated is also increasing.Correct garbage classification not only reduces the impact of garbage on the environment,but also brings resources and economic value.With the development of deep learning technology,it is possible to use object detection technology to detect garbage.The traditional object detection model has a huge volume,which brings great difficulty to transplant to embedded devices.Therefore,this article improves the object detection model,reduces the model volume,accelerates inference speed,and improves detection accuracy.And the model was ported to Android devices to more conveniently and quickly identify garbage,reducing the difficulty of garbage classification and improving the efficiency of household garbage classification.The main content is as follows:(1)The selection of target detection models.This article conducts a deep comparative analysis of single stage and two-stage object detection algorithms.The twostage Faster R-CNN algorithm,the one-stage SSD algorithm,and the improved YOLOV5 algorithm are selected for comparative analysis.It is found that the m AP value of the twostage algorithm is equivalent to that of the one-stage algorithm,meeting the basic requirements of object detection.However,the Faster R-CNN detection time for each image is 1.6 times that of SSD and 9.5 times that of YOLO.Therefore,the single stage target detection algorithm has strong advantages in training time,inference speed,and model size,making it more suitable for transplantation to embedded devices.(2)Improvement and optimization of YOLOV5 model.This article takes the YOLOV5 model as the research object and improves the Backone structure.It replaces Backone with feature extraction structures from Mobile Net,Shuffle Net,and Efficient Net,and obtains lightweight YOLO models with different inference speed,detection accuracy,and model size for model transplantation and selection.Replacing the original New CSPDraknet53 structure with Rep VGG structure improved the accuracy of the network,and using structural reparameterization technology accelerated the inference speed of the network.While ensuring model accuracy,the inference speed increased by 8% and the computational load decreased by 3.2%.The Neck structure has been improved by using the Bi FPN structure to enhance the fusion between different feature layers and improve the accuracy of the network,m AP@.5 An increase of 1.1 percentage points,m AP@.5.95 increased by 2 percentage points.By adjusting the size of the learning rate,the optimal learning rate suitable for this garbage classification dataset was found.The improved YOLOV5 model in this article significantly reduces the size of the model and improves its accuracy compared to YOLOV3 and YOLOV4.Compared to the YOLOV5 series,the improved YOLOV5 has a slightly larger volume than the YOLOV5 s,but there is a significant improvement in accuracy,and it has a smaller volume and higher accuracy compared to the YOLOV5 5m series.Compared with other object detection models such as Efficient Det,it was found that the improved YOLO model in this paper has advantages in both detection speed and model size.(3)Model transplantation and software design.This article uses TFLite,Torch Script,and NCNN to transplant the YOLO model into embedded devices,and comprehensively compares its deployment difficulty and detection speed,providing different porting solutions for different scenarios.Finally,the YOLO model was combined with Android software and cameras to achieve an easy to install,high-precision,and fast multiobjective garbage detection software,which is used to meet the needs of garbage classification in daily life. |