Abstract
Fused filament fabrication (FFF) is widely used in additive manufacturing (AM), but its reliability remains limited by defects such as under-extrusion, over-extrusion, nozzle blockage, stringing, and layer displacement. Undetected failures increase material waste, production time, and manufacturing costs. This paper proposes a cost-effective, vision-guided framework for real-time defect detection and corrective control in desktop-scale FFF systems. The framework integrates RGB image acquisition, image preprocessing, deep learning-based defect detection, temporal verification, and safety-aware decision-making to support closed-loop process monitoring and intervention. A dataset of 6240 annotated images covering six classes, including normal printing, was developed and divided into training, validation, and test sets. Classical computer vision and a YOLO-based detector were evaluated using precision, recall, and F1-score, alongside computational performance and corrective-control measures. On the held-out test set, the YOLO-based detector achieved a precision of 0.89, recall of 0.84, and F1-score of 0.86, outperforming the classical baseline, which achieved 0.78, 0.65, and 0.71, respectively. The framework further incorporates defect-specific responses, including extrusion parameter adjustment, print pausing, and operator notification, with post-intervention visual verification. These results demonstrate the potential of combining low-cost visual monitoring with intelligent corrective decision-making to improve FFF process reliability. The proposed framework provides a practical foundation for more adaptive and autonomous additive manufacturing, although further validation across diverse printers, materials, and operating conditions is required.