Abstract:In tunnel advance drilling for geological forecasting, the detection of defects, cracks, and seepage within borehole walls is crucial to guide safe and efficient tunneling operations. This study addresses this challenge by constructing a borehole wall defect dataset from real-world drilling images and proposing an optimized YOLOv8n-based detection model. The technical advancements are threefold:Firstly, coordinate channel-spatial convolutional module with attention mechanism:A novel module integrating coordinate attention is designed to enhance feature extraction by establishing interdependencies between channel dimensions and spatial coordinates. Secondly, rapid spatial pyramid pooling convolutional module:A lightweight hierarchical architecture is developed to improve the fusion and transmission of shallow and deep network features. Lastly, ghost convolution-enhanced C2f module:A residual-connected C2f structure incorporating ghost convolution operators is proposed to refine multi-scale feature extraction while achieving model lightweighting. Experimental results demonstrate that the proposed algorithm achieves a 5.5% improvement in mean average precision (mAP) over the baseline YOLOv8n model on the custom dataset, with a computational load reduction of 0.1 GFLOPs. Compared to state-of-the-art models such as YOLOv11 and RT-DETR, it exhibits a 7% superiority in average detection accuracy. The improved algorithm effectively enhances detection accuracy, enabling real-time, efficient, and advance forecasting, demonstrating promising prospects for engineering applications.