Currently,kernel detection relies mainly on the naked eye and traditional machine vision,in order to improve the speed and accuracy of kernel detection,this paper established a target detection model based on YOLOv5,trains and selects the optimal model with data collected in different environments.The experimental results showed that YOLOv5s has the lowest time complexity,with an average precision,recall and mAP@0.5 of 90.4%,85.9%and 91.4%,which achieved a ideal detection effect for dense adhe-sion targets.