This project presents YOLOv8x-HICAUps, an enhanced object detection framework for accurate Printed Circuit Board (PCB) defect detection. The model is specifically designed to address the challenges of detecting small-scale defects in densely packed PCB layouts with complex backgrounds.
YOLOv8x-HICAUps integrates a HorNet backbone, Convolutional Block Attention Module (CBAM), and attention-based up-sampling to improve feature extraction, feature fusion, and small-object detection accuracy while maintaining computational efficiency.
- Proposed YOLOv8x-HICAUps framework for PCB defect detection
- HorNet-based backbone for enhanced high-order spatial feature extraction
- CBAM-based channel and spatial attention for suppressing background noise
- Attention-based up-sampling for preserving fine-grained defect features
- Optimized detection head focused exclusively on small defect targets
- High detection accuracy with reduced computational overhead
The YOLOv8x-HICAUps architecture consists of three main components:
- HorNet with C3HB modules
- Recursive gated convolutions
- Depth-wise separable convolutions for lightweight design
- CBAM-enhanced feature fusion
- Attention-based up-sampling to preserve semantic consistency
- Improved multi-scale feature aggregation
- Single small-object detection head
- Eliminates medium and large object heads to prevent feature loss
- Optimized for detecting defects smaller than 10×10 pixels
The model is evaluated on the HRIPCB dataset, a publicly available PCB defect detection benchmark.
- Total images: 693
- Image resolution: ~2777 × 2188
- Defect categories:
- Missing hole
- Open circuit
- Spur
- Short
- Spurious copper
- Mouse bite
- Train–test split: 9:1
- Framework: PyTorch
- Model: YOLOv8x with custom HICAUps modules
- Epochs: 100
- Optimizer: Adam
- Loss components:
- Bounding box regression loss
- Classification loss
- Distribution Focal Loss (DFL)
- Precision
- Recall
- Mean Average Precision (mAP@0.5)
- Mean Average Precision (mAP@0.5:0.95)
The proposed YOLOv8x-HICAUps model achieves superior performance compared to baseline detectors.
- Precision: 0.9786
- Recall: 0.9784
- mAP@0.5: 0.983
- mAP@0.5:0.95: 0.537
- Overall detection accuracy: 98.3%
The model demonstrates strong robustness and generalization across all defect categories, particularly for small and subtle defects such as spur and mouse bite.
- Programming Language: Python
- Deep Learning Framework: PyTorch
- Detection Framework: YOLOv8
- Libraries: NumPy, OpenCV
- Tools: Git, Linux
- Automated Optical Inspection (AOI)
- PCB manufacturing quality control
- Industrial defect detection systems
- Embedded and resource-constrained vision systems