LyFormer: A context-aware transformer with progressive preprocessing for accurate detection of small, dense components in SMT manufacturing
Year: 2025
Type: article
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. • Introduces a failure-mode-driven modular backbone for low-contrast, dense SMT X-rays. • Combines AMPM, SRISP, FCEM, and CaT for progressive enhancement and context fusion. • Achieves 0.672 [email protected] and 0.359 [email protected]:0.95 at 48.5 FPS on real SMT X-ray data. • Improves separation of overlapping, faint-boundary instances; raises small-object AP and counts. • Shows consistent gains on TinyPerson, AI-TOD, VisDrone, and COCO benchmarks.
Source: Results in Engineering
Authors: Jinwoo Park, Jeong Seog Koh, Jaesung Kim, Taehwi Yoon, Jongpil Jeong
Institution: Sungkyunkwan University
Language: English
Subfield: Industrial and Manufacturing Engineering
Field: Engineering
Domain: Physical Sciences
Open Access status: gold
Estimated APC paid: $1,940
Funder: Ministry of SMEs and Startups
Award: G4386947331
OpenAlex ID: W4414806113
