Abstract:The composite piece is the core cutting unit of the PDC drill bit, and its automatic detection technology is the basis of the automatic repair technology of the composite piece. This paper proposes a PDC drill bit composite piece detection method based on the improved YOLOv7. Based on YOLOv7, the conventional convolution is replaced with depth-separable convolution, which reduces the amount of parameters and computing cost. As the SimAM attention mechanism is introduced, the method can derive 3D attention weights from neurons without additional parameters and also improve the expressive ability of convolutional neural networks. SPPCSPC is replaced with SPPFCSPC, which improves the speed while ensuring that the receptive field remains unchanged. The priori frames of K-means++ algorithm clusters are adopted and a heuristic algorithm is applied to locate defective composite pieces. Experimental results show that compared with the original YOLOv7 model, the mAP of the proposed algorithm is increased by 2.75%, the number of parameters reduced by about 80%, and the inference speed increased by 9.12 f/s. It also has greater advantages than other algorithms and can realize industrial applications of composite piece detection.