Defect detection algorithm of acupuncture and moxibustion needles based on improved YOLOv8
Disposable needles for acupuncture are small in size,which leads to the missing detection of tiny defects in the production process.In view of this problem,this paper proposed an improved algorithm based on YOLOv8.Firstly,the feature layer for extracting small targets was added to the Neck part to transfer richer shallow features to the added small target detection head;secondly,the SimAM attention mechanism was embedded between the backbone network and the feature fusion network to improve the accuracy and robustness of the detection;at last,the MPDIoU boundary loss function was used instead of the CIoU loss function to improve the bounding box regression performance of the network.The experimental results showed that the improved model had an average accuracy of 95.6% and a detection speed of 30.8 FPS on the dataset collected from the actual production,which was valuable for the practical application of the defect detection of needles used in acupuncture and moxibustion.