The Industrial revolution promoted the rapid development of human productivity,but the waste it produced also brought great disasters to the earth’s environment.China is also a populous country,and the output of household garbage is increasing rapidly year by year,so it is urgent to solve the garbage problem.Garbage classification is an important link to realize garbage reduction,harmless and resource utilization.This thesis creates a household garbage classification system based on deep learning,which is committed to solving the problem of garbage classification from the source of household.Through the study of various deep learning image algorithms and a large number of garbage classification experiments,Swin Transformer graph convolutional neural network is selected to build a household garbage classification system.The system consists of three parts: building garbage classification model,building Android App and nesting embedded devices.First,build a large garbage sorting dataset.The pictures of common household garbage in the life of Hebei University of Technology were collected through the camera equipment,and the web crawler technology was used to crawl the garbage pictures and part of the garbage pictures in Huawei garbage data set to build the initial data set.Through data augmentation,rotation,mirror and contrast data enhancement are used to further expand the data set.Secondly,build a garbage classification model.By transferring from natural language processing(NLP)to computer vision(CV),and comparing the advantages and disadvantages of image classification algorithms of convolutional neural network(CNN)and vision Transformer,an image classification model suitable for this topic is built.By means of transfer learning,data enhancement and network improvement,the network is optimized and improved,and high accuracy rate,accuracy rate and recall rate are obtained.In the case of higher complexity of data set,it has exceeded Huawei’s garbage classification Challenge Cup in 2019.The accuracy of 40 garbage classification reached97.63%,which exceeded 96.96%,and the number of reference only accounted for 1/4of it,while flops only accounted for 1/2.In addition,the generalization ability of the model has been verified,and it is fully applicable to all kinds of scenes in ordinary home environment.Finally,an Android port app was built,the model was transformed and quantified,and the deep learning model was successfully transplanted to the mobile Android app.Model transformation traverses NCNN,TNN and Mobile Neural Network(MNN)and other architectures,involving the development of a variety of architectures,so that it can use the cpu and gpu of mobile phone reasoning,completely get rid of the bondage of communication.The model is quantified offline through the MNN mobile terminal architecture,so that the large model can be used perfectly in the light mobile terminal devices,and the model transformation and quantization are basically without precision loss.The nesting of classification model and App was completed.Opencl acceleration and MNN optimization of the model were carried out to accelerate reasoning and improve accuracy. |