In recent years, 3D printing technology has become an important innovation in the manufacturing field and is widely used in industry, medicine and other fields [1][2]. Among these technologies, Fused Deposition Modeling (FDM) stands out due to its simplicity, speed, and cost-effectiveness, making it excel in areas such as rapid prototyping, personalized customization, and small-batch production [3][4]. However, during the printing process, operational faults caused by improper processing parameter settings and external disturbances, as well as health-related faults stemming from mechanical damage to the printer, often lead to destructive defects in printed parts [5–7]. With the continuous expansion of its applications, quality control and defect detection in FDM 3D printing have become one of the key issues that urgently need to be addressed [8]. Currently, most detection methods involve quality checks after printing completion, which cannot detect and identify issues in real time during the printing process. Such detection methods undoubtedly result in the wastage of time and materials.
Researchers have conducted numerous studies to address the defects occurring during the printing process, aiming to rectify issues leading to product non-conformities. In detection, non-destructive testing is a widely employed method in FDM 3D printing, where error detection mechanisms using cameras provide feasibility for remote supervision and early fault detection [9]. Bhavsar et al. [10] utilized discrete wavelet transform to analyze the differences in vibration acoustic signals of sensors during FDM 3D printing, aiming to detect the first layer filament deposition process, thereby achieving detection of first layer bonding quality. Machine learning finds extensive application in defect detection, as demonstrated by Lopes et al. [11], who employed piezoelectric microphones, support vector machines (SVMs), and neural networks for machine state monitoring in FDM 3D printing. Through signal processing and feature extraction techniques such as RMS values and spectral analysis, the study identified raw signal patterns associated with different machine conditions (such as normal operation, extruder blockages, and filament shortages). Classification using machine learning algorithms like SVMs and neural networks, alongside signal filtering, can enhance model accuracy. Zhao et al. [12] proposed a novel online inspection technique using stripe projection for 3D printing, aiming to enhance the stability and quality of additive manufacturing processes. The proposed method involves region-based defect detection, improving detection accuracy by analyzing sub-regions. By combining Voxel Cloud Connectivity Segmentation (VCCS) and Fast Point Feature Histograms (FPFH), the printing area is divided into multiple sub-regions for evaluation.
With the advancement of visual technology, defect detection methods are not limited to analyzing vibration signals on sensors alone. Li et al. [13], for instance, combined visual and sensor-based defect classification methods, monitoring sensor signals (temperature and vibration data) and interlayer images during the printing process, establishing two machine learning models, and merging their predictive results to enhance defect classification accuracy. Yean et al. [14] combined AlexNet convolutional neural networks with support vector machine (SVM) classifiers for detecting spaghetti and stringing defects, achieving desirable accuracy in defect classification. Shen et al. [15], in the printing process of a six-degree-of-freedom robotic FDM printer, altered the detection field of view using surface vectors, effectively identifying defects based on layer compression structures and introduced mathematical matrix representation of defects for detecting printing defects based on geometric shapes and area distributions.
With the advancement of 3D technology, the detection of FDM 3D printing defects has become more comprehensive. Utilizing 3D point cloud for defect detection provides detailed spatial information, enhancing defect identification. Zhao et al. [16] extracted potential defect areas using MBH and INRoPS feature descriptors, along with precise defect detection based on neighborhood point calculations, addressing the limitations of existing defect detection methods by providing more accurate and reliable results. Holzmond et al. [17] employed 3D Digital Image Correlation (3D-DIC) to transform image technology into three-dimensional data, comparing printed geometries with computer models for in-situ error detection, demonstrating the effectiveness of 3D-DIC systems in detecting local and global defects in test cases using Fused Filament Fabrication (FFF) 3D printers. Non-destructive testing using devices such as cameras enables remote supervision and early fault detection, facilitating early problem detection and resolution without destructive operations. Machine learning algorithms such as Support Vector Machines (SVMs) and neural networks effectively classify and recognize signals, enhancing detection accuracy and efficiency. Technologies like 3D point clouds provide detailed spatial information, enabling more accurate defect detection and description. However, some methods involve complex equipment and technologies, requiring specialized knowledge and skills for operation and maintenance, thus increasing implementation complexity. Some methods rely on specific equipment or environments, which may limit their applicability to practical scenarios, reducing their generality.
With the rapid development of neural networks, they have found excellent applications in detecting defects in FDM 3D printing. A multi-sensor data acquisition system is employed to collect real-time signals such as vibration, current, and sound sensors during FDM 3D printing. These captured data are then analyzed in the time domain and frequency domain to create feature vectors for training CNN models, which are subsequently used for defect detection [18]. In addition to vibration signals, image signal acquisition is more convenient, faster, and cost-effective. A diverse set of image data, including various error levels and printing geometries, is required for training CNNs to ensure the system's generalization and effectiveness [19]. To make the detection process real-time, Zhang et al. [20] proposed a method using machine vision and convolutional neural networks (CNNs) to detect multi-axis FDM printing defects. Their self-built CNN network achieved an 83.1% classification accuracy for interlayer delamination defects. Farhan et al. [21] developed a CNN-deep learning model to detect real-time defects in 3D printing, such as inconsistent extrusion, weak infill, lack of support, or sagging. Using image detection methods, neural network models have demonstrated simplicity in data collection and the ability to detect defects in printing in real time.
Deep learning methods are currently widely applied and demonstrate excellent performance in classification, object detection, and segmentation tasks. In FDM 3D printing defect detection, object detection methods are highly favored because they can identify defect types and locations. Zhang et al. [22] improved Faster R-CNN using an adaptive defect detection method based on the K-medoids clustering algorithm to detect lattice structures in CT slices of 3D printing. Xu et al. [23] replaced the backbone structure of YOLO v4 with MobileNetV2 as an improved model to recognize defects in FDM 3D printing. Paraskevoudis et al. [24] used an SSD model to analyze video clips to identify defects during the printing process, especially stringing defects. Kim et al. [25] discussed a system depth transfer learning method based on a small image dataset for monitoring spaghetti defects in Fused Deposition Modeling (FDM) printers. Image signal acquisition is more convenient and faster, and through image processing techniques, status and defect information during the printing process can be intuitively obtained. In FDM 3D printing defect detection, deep learning methods, due to their deeper network structures, achieve higher detection accuracy compared to CNN methods, and exhibit stronger generalization capabilities. Therefore, the application of deep learning methods in FDM 3D printing defect detection is highly significant.
Currently, research primarily involves collecting images of each layer of the print head during printing to determine if defects exist, or analyzing print images collected from above the printed part. However, this method has some drawbacks. Firstly, collecting detailed images of each layer, as done by Shen et al. [15], involves enhancing the image contrast using histogram equalization techniques, converting the original image to a binary image through local binary patterns, and finally applying median filtering to preserve sharp signal changes and eliminate pulse noise. After these cumbersome operations, a mathematical matrix composed of central coordinates, aspect ratio, and area distribution is introduced to represent defects. Secondly, as Kaisar et al. [26] demonstrated using images captured by a camera above the printed part, there remains an issue of only being able to detect misalignment and over-extrusion, rather than comprehensively detecting major defects during the printing process.
The proposed approach in this paper suggests capturing images directly in front of the printed part, which offers significant advantages. Firstly, it reduces the difficulty of image collection, as it doesn't require special or complex equipment installation positions—only clear images need to be captured. Secondly, capturing defect images from the front can encompass the most common defects, making it more versatile.
In FDM 3D printing, defects can be categorized into single-layer defects and overall defects [27][28]. Single-layer defects include warping, stringing, bubbling, collapsing, wrinkling, interlayer delamination, and missing filament. Overall defects encompass sagging, warping, interlayer cracking, collapsing, overheating deformation, and layer misalignment. This paper aims to research and implement a defect detection system for FDM 3D printing based on an improved detection head using YOLOv8 for object detection. The objective is to comprehend real-time printing data during the printing process and promptly address any printing issues. By detecting common printing defects, the system ensures the quality of printed parts while reducing the waste of printing time and materials. We analyzed the formation mechanisms of common defects in the FDM 3D printing process, including warping, platform detachment, layer misalignment, interlayer delamination, and stringing. We used artificially generated defect images as the training dataset and improved the detection head of YOLOv8 to enhance detection performance, achieving automatic detection and classification of surface defects in printed parts. By comparing five improved detection heads, we sought the optimal improvement scheme and demonstrated the superiority of our improvement approach over conventional target detection methods by comparing the improved model with other mainstream target detection models. Additionally, we will establish a comprehensive experimental platform to validate the effectiveness and feasibility of the proposed method and explore its application prospects in practical production.
The research findings of this paper will not only provide technical support for improving the quality and production efficiency of FDM 3D printing but also serve as a reference for defect detection issues in other similar application scenarios. It holds both theoretical and practical value.