Abstract:To improve the accuracy of deep learning in X-ray injection molding workpiece defect detection and realize higher precision nondestructive testing, an improved YOLOv8-seg internal defect segmentation model PIS-YOLO was proposed in this paper. Firstly, to reduce the number of parameters and improve the feature fusion capability, a multi-scale feature fusion and channel number reduction HG-Net module is designed in the backbone network to replace the traditional C2f module. The iRMB_EMA attentional fusion module is further introduced to enhance the deep transmission, and the feature fusion is completed by PAN-FPN with simplified redundant connections. Meanwhile, an additional output segmentation detection head is added to capture small defects, which improves the model’s accurate recognition of small target defects and defect edges. On the self-made data set of injection molding industrial parts, HG-Net module proposed in the backbone network section achieves a 22.03% reduction in computation under the same architecture compared with C2f module. On this basis, the overall precision of the model combined with the iRMB_EMA attention fusion module and additional output detection head is improved by 2.9% and 5.7%, respectively, compared with the benchmark model, and the model is lighter and less complex.