| In recent years,waste classification has become an important component of China’s green development concept.Waste classification is the process of categorizing household waste based on its material or composition and implementing resourceoriented treatment.The effective implementation of waste classification can reduce pollution in the environment,such as soil,water,and air,contributing to environmental protection and ecological balance.However,due to the diverse types of waste generated in daily life,traditional manual sorting methods are inefficient and prone to errors.Therefore,this paper proposes a garbage image classification network model based on the Transformer framework using deep learning technology,aiming to assist people in better performing daily waste classification tasks.The main research contents of this paper are as follows:(1)Addressing the accuracy issue of garbage image classification models,this paper investigates convolutional neural network-based classification models,including Alex Net,VGGNet,and Res Net models.Through the study,it is found that these models have relatively low recognition accuracy on the self-made garbage classification dataset.To further improve the recognition accuracy of the garbage classification network model,this paper conducts a detailed analysis and research on the Swin Transformer model.To enhance the performance of this model,the paper integrates the ideas of SPT(Shifted Patch Tokenization)and LSA(Locality Self Attention),analyzes their optimal combination on the Swin Transformer model,and constructs an improved Swin Transformer model.Ultimately,the improved Swin Transformer model in this paper achieves an accuracy of 88.1% on the self-made garbage classification dataset,demonstrating further improvement compared to the basic Swin Transformer model.(2)Addressing the lightweight issue of the Transformer-based garbage image classification model,the Swin Transformer model constructed in this paper has a large number of parameters,which hinders its deployment in mobile scenarios.In order to achieve lightweight model deployment while maintaining high accuracy,this paper optimizes and improves the Mobile Vi T garbage classification network model,creating a lightweight garbage image classification model with high recognition accuracy.Experimental results demonstrate that compared to pure visual Transformer network models,the improved model based on Mobile Vi T in this paper reduces the number of parameters by nearly 10 times while still achieving an accuracy of 86.2%.When compared to other lightweight models such as Squeeze Net and Shuffle Net,the lightweight model constructed in this paper outperforms them in terms of accuracy in garbage classification tasks. |