Fused Deposition Modeling (FDM) is one of the most widely adopted additive manufacturing technologies due to its low cost, flexibility, and ease of use. However, achieving consistent surface quality and minimizing print failures remain major challenges because printing outcomes are highly sensitive to parameter settings such as nozzle temperature, layer height, print speed, and infill density. Conventional optimization approaches rely heavily on trial-and-error and empirical tuning, which are inefficient and ineffective and struggle to model complex nonlinear parameter interactions. This study proposes a deep learning–based framework for optimizing FDM printing parameters using Vision Transformer (ViT) and Swin Transformer models. A dataset of 500 PLA-printed samples was collected by combining surface images and numerical printing parameters through a multimodal fusion strategy. Experimental results show that the Swin Transformer achieved superior performance with an accuracy of 94.8%, surface roughness MAE of 0.033, and a failure detection rate of 97.1%. Furthermore, the proposed approach reduced surface roughness by 28.6%, print failures by 41.2%, trial-and-error time by 55%, and material usage by approximately 32%.
Nuryanto et al. (2026) studied this question.