## 2 Principle of the Crack Detection and Lifetime Prediction Model  
### Architecture of MSE-Faster R-CNN  
Figure 1 depicts the overall structure of MSE-Faster R-CNN. The MSE-Faster R-CNN consists of two modules: the Regional Proposal Network (RPN) and the Multi-scale Fast R-CNN detector (see Figure 1). RPN is a fully convolutional network for efficiently generating region proposals with a wide range of scales and aspect ratios. Region proposals are rectangular regions which contain candidate cracks. MSE-Faster R-CNN detector is used to refine the proposals. The RPN and the MSE-Faster R-CNN detector share the same convolutional layers, allowing for joint training. The MSE-Faster R-CNN runs through the CNN only once for the entire input image and then refines crack proposals. Due to the sharing of convolutional layers, it is possible to use a deep CNN network for generating high quality crack proposals. As a small size structure, the crack can easily lose detail in the process of feature extraction. Considering that the detailed information of the low-level convolution output is more abundant than that of the high-level convolution output, VGG-19 [30] is selected as the pre-training network, and three segments of convolution layers are selected and max-pooled to obtain feature maps of different scales.  
Figure 1: The flow chart of internal crack detection using MSE-Faster R-CNN.  
Figure 1 shows the flow of internal crack detection using MSE-Faster R-CNN. The input image is firstly sent to the vgg-19 network for feature extraction. Different scales of feature maps are obtained after convolution, max-pooling and Relu activation layer. These feature maps are then input into the RPN network. Several ROIs, which are rectangular anchor frames selected by NMS that may be crack areas, will be obtained. Considering that the crack will have a significant temperature effect on the surrounding area, the ROIs regions are expanded in this paper, as Figure 1 shows. By fusing the expanded feature maps with different scales, the feature expression ability of the network can be strengthened. This enhanced and fused feature map will be input to the convolution layer and the three fully connected layers. The final crack diagnosis result and anchor frame position will be obtained through softmax classification and L\({}_{1}\)-smooth regression discriminant function.  
However, since the crack has characteristics of various shapes and sizes, when the input image scale is large, the resolution of the feature image becomes smaller after multiple down-sampling. Although the ROI becomes larger, the detailed features will be lost, and the utilization of semantic information obtained by multi-scale receptive field is low. To solve the above problem, this paper enhances the fusion of multi-scale feature images. The high-dimensional convolution features are refined and input into the low-dimensional feature map. Then the features are fused to avoid misleading the positioning and recognition tasks caused by a large number of complex context relations. Thus, the useful information around the object is significantly enhanced. In this way, the structure can integrate the features of receptive fields from different sizes, increase the receptive field and make full use of the contextual semantic information of the object, thus improving the sensitivity to the internal cracks in the coating.