In recent years, deep learning-based crack detection techniques have been widely used in ground crack detection, urban street crack detection, ordinary wall crack detection, and road tunnel crack detection. However, due to the scarcity of data, crack detection in railway tunnels is temporarily rare, and at the same time, some existing railway tunnels of relatively old age have extremely limited lighting conditions, which are subject to the dark conditions in railway tunnels, as well as the structural surface noise and crack-like interferences that can cause great challenges to the identification of cracks in railway tunnels. Based on this, this paper collects images inside real-world railway tunnels, produces a dataset, and proposes a novel and effective hybrid neural network tunnel crack disease recognition iFormer Unet model, which is based on the iFormer block module that can extract high-frequency features and low-frequency features at the same time, and constructs a U-shape network consisting of an encoder, a Bottleneck, a decoder, and a jump connection U-shaped network composed of encoder, Bottleneck, decoder and jump connection. The results of 10-fold cross-validation in the experiments show that the proposed method has a relatively low misdetection rate of about 7.56%, with about 30.31M Params and 34.84G FLOPs. iFormer Unet model has the lowest misdetection rate compared to the Swin Unet and Unet models, which are 5.28% and 8.58% lower, respectively, when tested on six image categories. 5.28% and 8.58% respectively. The proposed iFormer Unet algorithm realises the automatic identification of cracks in railway tunnels under harsh environments, which provides a certain reference and basis for the maintenance of railway tunnels.