Regular inspection of surface cracks in underground mine tunnel is of paramount concern for the safe operation and maintenance of underground mine. Currently, crack detection predominantly rests on manual inspection methods, which are plagued by a host of challenges, including low detection accuracy, untimely assessments, high operational risks, substantial manpower requirements, and subjectivity. In contrast, machine vision techniques based on deep learning offer an effective solution to overcome the shortcomings of manual inspections. Therefore, this study introduces a crack segmentation network called SwinV2-Unet, which is built upon a pure Transformer architecture. It utilizes Swin Transformer V2 as the feature extraction layer, incorporating cross-window interactions and dynamic perception methods to comprehensively extract crack image features. Furthermore, this crack segmentation network combines the Encoder-Decoder structure of Unet to fuse crack features of different scales, enabling the network model to achieve more precise crack image segmentation. Finally, experimental validation is conducted on a proprietary dataset of underground mine tunnel cracks. When juxtaposed with outstanding algorithms such as Unet, U2net, DeeplabV3+, and Swin-Unet, our proposed SwinV2-Unet demonstrates superior performance in crack segmentation. The evaluation metrics, including Precision, Recall, F1-score, and Intersection over Union (IoU), yield values of 0.817, 0.847, 0.832, and 0.767, respectively.