| With the development of society,people’s living standards and material consumption levels continue to improve,leading to an increase in the production of household waste.Currently,many cities have been besieged by garbage and trapped in the problem of garbage,and garbage disposal has become one of the major problems faced by cities.At present,many places still rely on manual sorting of garbage,which is inefficient and prone to errors.In recent years,the rapid development of artificial intelligence technology has injected new vitality into various industries.The application of AI(Artificial Intelligence)technology not only facilitates people’s lives and improves the efficiency of garbage recycling,but also helps to beautify cities,protect the environment,and improve the utilization rate of recycled resources.To solve the problem of garbage classification,this article combines deep convolutional neural networks and object detection algorithms to attempt to apply deep learning based image classification algorithms to garbage detection and classification research.The main research content is as follows:This article proposes two different improvement schemes based on the YOLOv5 s model: a garbage detection algorithm based on feature fusion and attention mechanism,and a garbage detection algorithm based on lightweight network MobileNet.Firstly,in response to the issue of detection accuracy,the network is redesigned to enhance the ability of feature extraction.Introducing multi-scale detection,changing three scales to four scales,redesigning the FPN(Feature Pyramid Network)and PAN(Path-Aggregation Network)structures of the original model,drawing on the BiFPN(Bi-directional Feature Pyramid Network)feature fusion idea,adding two cross scale connected feature fusion edges to enhance the network’s feature extraction ability and also improve the network’s ability to detect small targets.To further enhance the network’s ability to extract features,the SE(Squeeze and Excitation)attention module is introduced and embedded in the Neck section of the network.Experimental data shows that the proposed algorithm YOLOv5 s FBS has an accuracy of 88.1% on the Huawei dataset,which is 4% higher than YOLOv5 s.Secondly,to address the issue of large model volume,a lightweight network is designed.Replace the original Backbone part of YOLOv5 s with a lightweight backbone feature extraction network MobileNetv3 Small,reducing the parameter and computational complexity of the algorithm;In order to ensure that the lightweight of the network will reduce the detection accuracy and better deal with the sample imbalance,the Focal Loss loss function is improved to Quality Focal Loss.Combining classification scores and position quality prediction as continuous label values reduces the problem of false positives and missed detections caused by NMS(Non-Maximum Suppresion),while smoothing the relationship between training and inference,ensuring that detection accuracy does not decrease without increasing additional computational complexity.In addition,the SE attention module has also been introduced.The experimental data shows that the YOLOv5 s MQS algorithm compresses the model size to 9.6MB without reducing the detection accuracy,which is 33.3% smaller than the original 14.4MB.In addition,the YOLOv5 s MQS algorithm significantly improves the detection speed on the CPU. |