A garbage image classification method based on improved MobileNet v2 was proposed aiming at the problems of poor real-time performance and low classification accuracy of existing garbage image classification models. A lightweight feature extraction network based on MobileNet v2 was constructed. The parameter numbers of the model were reduced by adjusting its width factor, channel and spatial attention modules were embedded in the model to enhance the network's ability to refine features, a multi-scale feature fusion structure was designed to enhance the adaptability of the network to scale, and transfer learning was used to optimize the model parameters to further improve the model accuracy. Experimental results show that the average accuracy of the algorithm on the self built dataset was 94.6%, which was 2.0%, 3.4%, 3.2%, 2.3% and 1.2% higher than that of MobileNet v2, VGG16, GoogleNet, ResNet50 and ResNet101 models, respectively. The proposed algorithm achieved good performance in two public image classification datasets, CIFAR-100 and tiny-ImageNet. The parameter numbers of the model was only 0.83 M, which was about 2/5 of the basic model. The single inference on edge device JETSON TX2 took 68 ms, which proved the improvement of inference speed and prediction accuracy.