|
pp. 935-952
S&M4356 Research paper https://doi.org/10.18494/SAM5789 Published: February 27, 2026 Large Language Model-guided Data Augmentation for You Only Look Once Version 8-based Printed Circuit Board Defect Detection: Novel Human–AI Codesign Approach [PDF] Wei-Hong Lee, Chih-Cheng Chen, and Jin Jiang (Received June 5, 2025; Accepted February 9, 2026) Keywords: printed circuit board (PCB) inspection, You Only Look Once version 8 (YOLOv8), data augmentation, large language model (LLM), image quality, automated optical inspection (AOI)
Automated optical inspection (AOI) systems empowered by deep learning are increasingly deployed in smart manufacturing, yet their performance remains vulnerable to real-world imaging distortions such as extreme illumination, blur, and composite artifacts. In this study, we introduce a novel large language model (LLM)-guided data augmentation framework that leverages a human–AI codesign approach to systematically enhance detection robustness in You Only Look Once version 8 (YOLOv8)-based printed circuit board (PCB) defect inspection. Specifically, we employ GPT-4o-mini to analyze class-wise error patterns from a baseline YOLOv8s model trained on a public PCB-defect dataset. While the baseline achieved high accuracy on pristine images [mean average precision (mAP) at an intersection-over-union (IoU) threshold of 0.50, mAP@50 = 97.7%], its performance dropped markedly under five synthetic perturbations, including Gaussian blur (31.6%), motion blur, and extreme brightness. To mitigate these vulnerabilities, we provide the LLM with structured error statistics; in return, it generates a machine-readable augmentation protocol encompassing brightness shifts, exposure modulation, and realistic blur variants, expanding the training dataset by approximately 2.5× without altering the model architecture or hyperparameters. Fine-tuning the model for 25 additional epochs yields substantial improvements across all distortion scenarios, achieving 94.9% mAP@50 on Gaussian blur (+63.3%), 49.4% on composite distortions (+30.1%), and 16.4% on motion blur (+8.6%). Notably, the performance on pristine inputs also improves (99.0% mAP@50), and inference latency remains constant at 19.5 ms per 800 × 800 px frame, confirming zero runtime penalty. These findings validate the efficacy of integrating LLMs as adaptive codesign agents for data-centric vision optimization, offering a scalable and generalizable strategy for resilient AOI in Industry 4.0 environments. Our study contributes to the advancement of sensors and related materials by enhancing the application of optical sensing concepts in machine-learning-driven PCB defect detection, where sensors like high-resolution cameras capture images prone to distortions; the LLM framework improves detection reliability, offering scalable strategies for Industry 4.0 sensing environments.
Corresponding author: Jin Jiang![]() ![]() This work is licensed under a Creative Commons Attribution 4.0 International License. Cite this article Wei-Hong Lee, Chih-Cheng Chen, and Jin Jiang, Large Language Model-guided Data Augmentation for You Only Look Once Version 8-based Printed Circuit Board Defect Detection: Novel Human–AI Codesign Approach, Sens. Mater., Vol. 38, No. 2, 2026, p. 935-952. |