## 3 Methodology
### Residual Atrous Spatial Pyramid Pooling (RASPP)  
We modified the ASPP module and propose the RASPP module to enlarge the receptive field and enrich the multi-scale information of feature maps. The relationship between the input features and output features can be adaptively learned by RASPP. In addition, it shortens the path of information propagation to reduce the risk of model overfitting.  
The ROI features intercepted by ROIAlign only contain feature information in the region proposals, and the information outside will be discarded regardless of whether it contains the object feature or not. However, the region proposals generated by RPN are not accurate, resulting in inaccurate ROI features, which affects subsequent classification and regression. In the case of a large receptive field, the limited defect features intercepted by ROIAlign can still contain discarded feature information outside the region proposals to ensure the subsequent accurate defect detection. Moreover, the larger receptive field also helps the RPN to capture large defects. Therefore, a RASPP module is designed to expand the receptive field and enrich multi-scale information that lays the foundation for obtaining more accurate ROI features.  
As shown in Figure 3, the input of RASPP passes through four parallel branches. The resulting outputs are then concatenated together along the channel dimension and finally fused with the input to form the output of RASPP. Convolution layers are used in three branches, and the size of the convolution kernel is (1, 3, 3). The input channel and the output channel are consistent, and the ReLU function [37] is used to activate the output. The dilation rates of the convolutional layers are set to (1, 3, 6), respectively, to capture multi-scale feature information. The stride of all dilated convolutions is 1. The padding is set to (0, 3, 6), respectively, to keep the feature map size unchanged. Global average pooling is adopted to extract global semantic information in the pooling branch. The feature vector generated after pooling is used to further extract useful information by a 1 \(\times\) 1 convolution and ReLU, then the vector is concatenated with the feature maps of the other three branches in the channel dimension after resizing. At this time, the channels of the concatenated feature maps are four times that of the RASPP input feature maps. A 1 \(\times\) 1 convolution is then used to reduce the channel dimension of the output feature maps to be consistent with the input feature maps. Finally, the refined features are linked with the input feature through a skip connect to form the final output of the RASPP module. The calculation process of RASPP is defined as follows:  
\[\begin{array}{l}F_{c1}=conv_{1}^{1}(R_{in}),\;F_{c2}=conv_{3}^{3}(R_{in})\\ F_{c3}=conv_{3}^{6}(R_{in}),\;F_{p}=conv_{1}^{1}(avgpool(R_{in}))\\ \\ F_{concat}=conv_{1}^{1}\big{(}\text{concat}\big{(}F_{c1},\;F_{c2},\;F_{c3},\;F _{p}\big{)}\big{)}\end{array} \tag{1}\]where \(R_{in}\) represents the inputs features of the RASPP module, \(F_{c*}\) represents the feature map after convolution, and \(F_{p}\) is the feature map after pooling. The \(i\) in \(con_{j}^{i}\) is the atrous rate and the \(j\) is the convolution kernel size.  
The output of the RASPP module is defined as:  
\[R_{out}=\alpha\cdot F_{concat}+R_{in} \tag{3}\]  
where \(R_{out}\) represents the output features of the RASPP module. It is noted that we multiply the concatenated feature map \(F_{concat}\) with a scale parameter \(\alpha\). Additionally, \(\alpha\) is initialized to 0 and gradually increases during the learning process to assign more weights. The RASPP module can enrich the multi-scale information of the features and increase the receptive field of the features, and also shorten the path of information flow, and enhance the robustness of the model.