Aiming at the problems of unclear, difficult, and inefficient classification of traditional manual waste, and the difficulty of deploying large existing garbage classification network models, a lightweight garbage detection and classification network S-YOLOv5 is designed based on YOLOv5s. First, a garbage dataset containing 18 types of common household garbage is constructed and labeled according to the principles of garbage classification; secondly, a module combining shufflenetv2 and CoordAttention was introduced to replace the YOLOv5s backbone network, and the ReLU activation function in the shufflenet module was substituted by FReLU; finally the PANet structure was replaced by the BiFPN structure, so as to reduce the model complexity and achieve lightweight while maintaining a high mAP. The experimental results show that the size of S-YOLOv5 is only 2.6MB, which is about 1/6 of the original network size, and the mAP is 80.2%. The size of the proposed network is reduced while maintaining high accuracy, making it more suitable for deployment in smart devices.