## 3 Methods
### Subway Tunnel Lining Fine-Crack Enhancement Model Based on Real-ESRGAN and Migration Learning  
The metro tunnel lining surface contains numerous facilities, such as cables, pipes, fixtures, bolt holes, and grouting holes, whose textures and gray levels exhibit varying degrees of similarity to apparent defects. Directly extracting the geometric parameters of defects on a global scale is subject to significant noise interference. The improved detection algorithm for apparent defects in metro tunnel linings can obtain the relative coordinates and types of defect areas. When these coordinates are cropped in the original image, other images with simpler background complexity can be obtained. Matrix calculations can then be directly applied to these images, overcoming the impact of complex facilities on defect feature extraction calculations. However, compared with those of exfoliation and leakage, the detailed information in small-scale crack defect areas is relatively unclear. Although the background interference is low, the structure itself is not well defined, leading to some degree of error in direct geometric region extraction and calculation. This issue is addressed in this research by using image super-resolution and transfer learning methods to enhance small-crack areas, providing technical support for subsequent fine segmentation and extraction work. Image super-resolution reconstruction involves extrapolating the spectrum beyond the cutoff frequency of an image, essentially restoring a low-resolution image to a high-resolution image [37; 38]. The algorithms for this process are based on techniques such  
Figure 7: The proposed defect detection model. as interpolation [39], reconstruction [40], and deep learning [41]. Deep learning-based image super-resolution reconstruction methods use convolutional neural networks to learn the nonlinear mapping relationship between low-resolution and high-resolution images from a large number of high-quality image pairs. The learned mapping function is then applied to the input low-resolution image to obtain the corresponding high-resolution image. Compared with the other two methods, deep learning approaches offer better image detail restoration capabilities and adaptability [42; 43]. The crack regions in metro tunnel linings have many texture structures and detailed information. Therefore, Real-ESRGAN [44], which has strong texture detail feature extraction and restoration capabilities, is used in this study for image super-resolution operations. The network structure is shown in Figure 8. The generator in Real-ESRGAN adopts the same residual-in-residual dense blocks (RRDB) [45] structure as ESRGAN [46], which can better enhance the texture details and realism of the images. In the discriminator network, the U-Net [47] network structure replaces the VGG-style [48] structure. The spatial size of the feature maps output by U-Net is the same as that of the input images, and each pixel is compared with the real value to compute the difference and backpropagate the error, achieving more precise discrimination of local textures. In the calculation of the loss function, the total loss function of the model is the sum of \(L_{1}\) loss, perception loss, and GAN loss, where \(L_{1}\) loss is the sum of the absolute value of the difference between the target value and the predicted value, which indicates the average error of the predicted value, as shown in Equation (8):  
\[L_{1}=\frac{1}{n}\sum_{i=1}^{n}|f_{i}-y_{i}| \tag{8}\]  
where \(f_{i}\) represents the pixel value of the image generated by the generator, \(y_{i}\) represents the pixel value of the real image, and \(n\) is the total number of pixels. Figure 8: Real-ESRGAN network. The perception loss is extracted by feeding the SR image generated by the generator and the actual HR image into the pre-trained VGG19 network for feature extraction.