## 3 Proposed Methods
### Highway Crack Detection Methods
#### 3.1.1 The Structure of the Proposed CrackNet  
As shown in Figure 1, the CrackNet network model is a typical encoding-decoding U-shaped architecture, divided into three parts: left-center-right. The encoder part is inspired by the VGG16 network [28]. However, only the first four layers of the VGG16 network are used, consisting of two convolutions with 64 channels of size \(3\times 3\), two convolutions with 128 channels of size \(3\times 3\), three convolutions with 256 channels of size \(3\times 3\), and three convolutions with 512 channels of size \(3\times 3\). After each convolution operation, group normalization (GN) [29] and exponential linear unit (ELU) [30] activation functions are applied to the feature map. The reason for using GN + ELU (GE) instead of BN + ReLU (BR) is that the hardware environment in this experiment is limited, and the batch size set during training is small. BN increases rapidly when the batch size is small, and GN more effectively optimizes this problem. Additionally, each convolutional layer is paired with a max-pooling layer to reduce the input size of the next layer, computation, and the number of parameters. However, this also brings certain problems, such as reducing the spatial resolution of the feature map, which is not conducive to the segmentation of boundaries and lines. Therefore, the max-pooling index is used to capture and record the boundary information of the feature map in the encoding stage when downsampling in this network. The corresponding decoding layer uses the max-pooling index to perform nonlinear upsampling to avoid the lack of boundary details during the decoding process.  
Figure 1: An illustration of the CrackNet network. The left side is the encoding part, the middle part is composed of the Skip-layer feature fusion layer, with detailed structure as in Figure 2, the MHDC module, with detailed structure as in Figure 3, and the MHSA module, with detailed structure as in Figure 4. The right side is the decoding part.  
As shown in Figure 1, the middle part of the CrackNet network is composed of the Skip-layer feature fusion layer, MHDC module, and MHSA module. The MHDC module is composed of an dilated convolutional cascade conforming to the hybrid dilated convolution (HDC) design principle [31], in which the receptive field is increased without changing the feature map size and obtains richer contextual information. The details of the MHDC and MHSA modules are explained in Sections 3.1.2 and 3.1.3, respectively. Figure 2 illustrates the structure of the Skip-layer feature fusion layer, where the feature maps of the corresponding layers of the encoder and decoder are first stitched together, and the multiple channels are then mapped to a single channel using a \(1\times 1\) convolution with a channel number of \(1\). The feature maps are then processed to the size of the input image by deconvolution and crop layers. The feature maps are generated by the MHDC module, and the MHSA module is fused in the underlying Skip-layer. After these steps, the prediction maps of each layer have the same size as the ground truth fracture image. Finally, the prediction maps of each layer are stitched together, and all the prediction maps are fused by convolution with a channel number of \(1\times 1\) to obtain a multi-scale feature fusion map, i.e., a global prediction map.  
The decoder part on the right side corresponds to the encoder part and is also divided into four layers. Each layer first goes through max-pooling upsampling and uses the max-pooling index to achieve nonlinear upsampling. After upsampling, it enters the convolution module of the layer, where the number of convolutions, the size of each convolution, and the number of channels are all consistent with the encoder convolution module of the corresponding layer. The prediction map from the last convolution of each layer is fed to the Skip-layer of the corresponding layer for fusion.