| China has a large population and the output of kitchen waste is among the top in the world.After recycling,kitchen waste can be used as fertilizer and feed.But kitchen waste often mixes with some foreign bodies such as plastic bottles,plastic bags,cans,metal and glass products and so on.Before recycling kitchen waste,foreign bodies should be sorted out.If foreign bodies are sorted manually,it is not only inefficient,but also bad working environment will affect the health of staff.The foreign bodies in kitchen waste can be detected by computer vision technology and the location information can be transmitted to the robot arm,which can realize the uninterrupted sorting of foreign bodies with high working efficiency and low cost.This thesis studies the technology related to the sorting of foreign bodies in kitchen waste,establishes datasets for sorting foreign bodies in kitchen waste,and studies the algorithm for sorting foreign bodies in kitchen waste.The main research contents of this thesis are as follows:1.Firstly,the research background and significance of this subject are investigated,and the difficulties in sorting kitchen waste foreign bodies are analyzed according to the actual situation.Then the camera calibration and hand-eye calibration of the manipulator are carried out to obtain the internal parameter matrix,external parameter matrix and distortion parameters of the camera,so as to realize the conversion from pixel coordinates to world coordinates.2.Secondly,the synthetic dataset and the real dataset are established,and the distribution of length,width and aspect ratio of the ground truth of the simulated dataset and the real dataset are counted.The anchor suitable for the synthetic dataset and the real dataset are calculated using K-means clustering algorithm and differential evolution algorithm,and the anchor comparison experiment is carried out.Finally,the anchor generated by K-means clustering algorithm is selected.3.Then,in order to increase the generalization ability of the model and improve the robustness of the model,data enhancement strategies are introduced before model training,including random fuzzy,median fuzzy,image gray-scale,adaptive histogram equalization,random changes in the brightness and contrast of input images and so on.In order to reduce the influence of occlusion on the sorting of kitchen waste foreign bodies,cutout technology was introduced.The accuracy of synthetic dataset is 0.975,and the accuracy of real dataset is 0.916.4.Finally,the YOLOv5 detection algorithm based on the coordinate attention mechanism and Swin Transformer Block is designed.The accuracy of the model with the coordinate attention mechanism added after the fourth C3 module is 0.983 in the synthetic dataset.The accuracy of the model with the addition of coordinate attention mechanism and Swin Transformer Block is 0.935 on the real dataset. |