Abstract
Automated visual inspection of Printed Circuit Boards (PCBs) is critical for modern electronics manufacturing, yet high-accuracy deep learning models often exceed the computational limits of edge devices. This paper introduces PCBDet, an ultra-efficient object detection architecture specifically optimized for identifying microscopic electronic components. By integrating the "AttendNeXt" attention-condenser backbone with a modified RetinaNet framework, PCBDet achieves a 2x inference speedup on ARM processors and a 2-4% accuracy improvement over state-of-the-art EfficientNet-based models. Our results demonstrate that specialized attention mechanisms can significantly outperform general-purpose architectures in constrained industrial environments.
Introduction
In contemporary manufacturing, a single PCB may contain thousands of components, making manual inspection prone to fatigue-induced errors and production bottlenecks. While deep learning offers a robust alternative, the "Edge" presents a significant challenge: manufacturers require high-throughput detection on hardware with limited resources, such as ARM-based embedded systems or NVIDIA Jetson modules. Existing efficient architectures often force a compromise between latency and precision. PCBDet was developed to bridge this gap, providing a model that is both more compact and faster than industry standards like EfficientNet, without sacrificing the resolution necessary to detect minute resistors and capacitors.
The PCBDet Architecture
PCBDet's performance stems from the strategic integration of two architectural paradigms designed for efficiency and precision:
- AttendNeXt Backbone: Unlike standard convolutional blocks, PCBDet utilizes "double-condensing attention condensers." These are highly efficient self-attention mechanisms tailored for TinyML applications. They allow the network to focus on critical spatial features, such as component edges, at a fraction of the computational cost required by traditional transformers or heavy CNNs.
- RetinaNet Framework: PCBDet employs a single-stage RetinaNet structure, which predicts bounding boxes and classes in a single pass. This is inherently faster than two-stage detectors like Faster R-CNN.
- Efficiency Optimizations: To further reduce the computational footprint, the authors omitted the first stage of the feature encoder during Feature Pyramid Network (FPN) construction, minimizing operations per image pass.
Dataset and Training Strategy
The model was evaluated using the FICS-PCB dataset, a comprehensive public benchmark containing 31 PCB boards with over 77,000 components. To maintain high resolution for tiny components while managing memory on edge devices, high-resolution DSLR images were processed as square patches.
Training involved pretraining on ImageNet followed by fine-tuning with Focal Loss. This loss function is essential for PCB detection as it prevents the model from being overwhelmed by background pixels, forcing it to learn the subtle differences between similar-looking components. Furthermore, freezing the first two blocks of the encoder during training allowed the model to retain low-level visual knowledge (edges and textures) while specializing higher-level blocks for PCB geometry.
Experimental Results and Discussion
PCBDet outperformed the EfficientNet-Det baseline across all critical metrics, particularly in hardware-specific latency. The model achieved a 2-4% higher mean Average Precision (mAP) on the FICS-PCB benchmark while maintaining a significantly smaller footprint.
Key performance highlights include:
- Inference Speed: PCBDet is 2x faster on ARM Cortex A72 processors and ~65% faster on NVIDIA Jetson Nano compared to EfficientNet-based competitors.
- Model Compactness: The architecture utilizes less than half the total and trainable parameters of the baseline, facilitating deployment in limited RAM environments.
- NetScore: Using the NetScore metric (balancing accuracy, parameters, and latency), PCBDet scored 28.26, more than double the 13.57 of the EfficientNet-based model.
Conclusion
PCBDet demonstrates that architectural synergy—specifically the use of specialized attention condensers—is more effective for edge-based object detection than simply scaling down general-purpose models. While currently focused on PCB components, this "double-condensing" recipe offers a blueprint for other high-performance, low-power applications such as mobile medical imaging and autonomous navigation. Future research will explore the generalizability of this architecture in more diverse and cluttered visual environments.
Summary updated