The structural health monitoring (SHM) of utility tunnels is critical for urban safety, where automated crack detection plays a vital role in early damage identification. Crack detection in utility tunnels remains challenging due to the subtle appearance of cracks and complex background interference, which often degrades the performance of general-purpose algorithms. To address this, DG-YOLOv8, a lightweight instance segmentation model enhanced with attention mechanisms, is proposed. Specifically, a Ghost module is integrated into the backbone to reduce redundancy and computational cost, while a Dynamic Head introduces a feature selection mechanism to improve adaptability. Experimental results demonstrate that DG-YOLOv8 outperforms the baseline YOLOv8, achieving a 1.6% increase in mAP50 while reducing the number of parameters, GFLOPs, and inference time by 37%, 28%, and 49.5%, respectively. The proposed DG-YOLOv8 model offers a robust and efficient intelligent solution for automated visual inspection, contributing to the development of smart SHM systems for utility tunnels.