LyFormer: A context-aware transformer with progressive preprocessing for accurate detection of small, dense components in SMT manufacturing

Jongpil Jeong, Jaesung Kim, Jinwoo Park, Jeong Seog Koh, Taehwi Yoon

Research output: Contribution to journalArticlepeer-review

Abstract

Accurate detection and counting of small electronic components on printed circuit boards (PCBs) are critical for ensuring product quality and operational efficiency in surface mount technology (SMT) assembly lines. In particular, reliable counting of semiconductor components inside reels using X-ray inspection is essential, as counting errors directly impact downstream manufacturing and quality assurance. However, existing YOLO-based detection frameworks, while effective in general contexts, often fail under complex SMT conditions with low contrast, high density, and noisy imagery. To address this limitation, we propose LyFormer, a YOLOv8s-based framework integrating four specialized modules: the Adaptive Multi-level Preprocessing Module (AMPM) for dynamic image preprocessing, the Spatial Relation-aware Image Segmentation Patch (SRISP) for precise localization, the Fine-grained Cue Extraction Module (FCEM) for enhancing subtle texture cues, and the Context-aware Transformer (CaT) for global–local context integration. Unlike conventional approaches such as FPN, Deformable DETR, and SAHI, LyFormer represents a modular backbone specifically designed for the low-contrast, high-density, and noise-prone characteristics of SMT X-ray imagery. Unlike prior improvements to YOLOv8s, LyFormer introduces four modules explicitly derived from SMT X-ray failure modes: AMPM integrates ROI-aware masking with contrast enhancement, going beyond global methods such as histogram equalization or Retinex; SRISP replaces SAHI's tiling with efficient relation-aware patching inside the backbone; FCEM compensates for the sensitivity of IoU and NWD to localization errors by reinforcing fine-grained cues; and CaT jointly leverages global–local context through ROI-biased attention and variable patch sizing, unlike standard Transformer-based detectors. Experiments on real-world SMT reel X-ray datasets show that LyFormer achieves a mean Average Precision ([email protected]) of 0.672, significantly surpassing the YOLOv8s baseline (0.399), while maintaining real-time performance. These results support LyFormer's accuracy, robustness, and practical value for small-object detection and counting in challenging industrial environments.

Original languageEnglish
Article number107413
JournalResults in Engineering
Volume28
DOIs
StatePublished - Dec 2025

Keywords

  • Industrial vision
  • Progressive preprocessing
  • Semiconductor reel counting
  • Small object detection
  • SMT assembly
  • Transformer
  • X-ray inspection
  • YOLOv8

Fingerprint

Dive into the research topics of 'LyFormer: A context-aware transformer with progressive preprocessing for accurate detection of small, dense components in SMT manufacturing'. Together they form a unique fingerprint.

Cite this