An improved YOLO11-based defect detection approach for FFF 3D printing
Wenpeng Yang, Li Wu, Xinxin Li, Ernan JuTo mitigate the limitations in detection accuracy and robustness caused by illumination fluctuations, complex background interference, and the low discriminability of tiny defects in practical FFF 3D printing scenarios, this study proposes an improved model, termed YOLO11-CPF, based on the YOLO11 framework. First, the C2BAM module is designed to replace the original C2PSA structure, thereby enhancing the model’s ability to extract defect features under complex backgrounds. Second, a PUCB upsampling module is constructed to effectively preserve high-frequency details of small targets while reducing computational overhead. Third, the Focaler-PIoUv2 loss function is introduced to improve the bounding box localisation accuracy of tiny defects. A dataset covering five typical categories of FFF 3D printing defects, including cracking, layer shifting, stringing, warping, and spaghetti prints, was established to validate the effectiveness of the proposed algorithm. Experimental results demonstrate that YOLO11-CPF achieves a precision of 93.6%, recall of 82.5%, mAP50 of 90.8%, and mAP50–95 of 57.3%, representing improvements of 6.0, 1.8, 2.7, and 3.2 percentage points, respectively, compared with the baseline model. With an approximately 17.2% increase in parameter count, YOLO11-CPF improves detection accuracy while maintaining an acceptable increase in model complexity, making it suitable for defect detection tasks under the investigated FFF 3D printing conditions.