Abstract
Optical components are extensively used in aerospace, microelectronic equipment, precision optical measurement, laser optics and other fields. Surface defects on optical components can significantly impact system performance, necessitating specialized detection methods. However, technical challenges persist in achieving high-resolution, high-precision and efficient optical surface defect detection. To address this, we propose an improved YOLOv8-based object recognition algorithm. By incorporating the BRA attention mechanism into YOLOv8’s backbone network, multi-scale feature maps are processed to enhance adaptability to complex scenarios. Simultaneously, replacing the feature fusion module with the Context-GuideFPN module enables contextual guidance and adaptive adjustments during multi-scale feature integration without excessive computational overhead. Experimental results on our high-quality microscopic dark-field image dataset demonstrate that the enhanced BACG-YOLOv8 achieves excellent performance in optical component defect detection. The optimized network accurately extracts defect details, particularly demonstrating refined edge feature extraction while effectively suppressing noise interference. This significantly reduces detection errors and improves defect extraction accuracy.