# A New Road Damage Detection Baseline with Attention Learning
## 4 Our Proposed Baseline with Attention Learning
### Salient Feature Learning with NAM  
According to the observation of road damage, we find that the difficulty in damage detection lies not only in the sparse distribution of key foreground pixels, but also in the fact that the bounding box contains much approximately healthy pavement. The designed attention fusion module based on edge detection may alleviate the first problem. In order to further improve road damage detection by alleviating the second problem, the network has to ignore most of the insignificant approximate features. Therefore, we directly introduced the normalization-based attention module (NAM) [33] into salient feature learning. It can exploit the contributing factors of weights to inhibit the learning of unnecessary feature weights. This can be regarded as a normalization process, and the calculation is defined in Equation (5).  
\[W_{i}=\frac{a_{i}}{\sum\limits_{j=0}^{\infty}a_{j}} \tag{5}\]  
where \(a_{i}\) denotes the scaling factor from BN, and the calculated \(W\) means the channel attention weight. It reflects the importance of different channels. If \(a_{i}\) refers to a pixel normalized scaling factor, \(W\) calculated in Equation (5) is the spatial attention weight. It represents the influence of different pixels. These two weights will help NAM suppress the weights of unnecessary features. The introduction location of NAM and the design details of the complete network are summarized in Table 2.  
In Table 2, 'AF' is the attention fusion module, and 'SFL' stands for salient feature learning module. 'C' denotes the number of channels, 'K' represents the convolutional kernel size, 'S' means the step, and 'D' refers to the dilation rate. C3 represents the double branch block. The feature maps from two branches of C3 are fused by concat. SPPF is the  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Input** & & \multicolumn{3}{c}{**1220 \(\times\) 1220 \(\times\) 3**} \\ \hline \multirow{4}{*}{**AF**} & & **RGB Branch** & **Edge Branch** \\ \cline{3-5}  & & K6-S2-C32 & & \\  & & K3-S2-C64 & & \\ \cline{2-5}  & & (K1-S1-C32)\(\times\)2 & K1-S1-C32 & \\ \cline{2-5}  & & K3-S1-C34 & & \\ \cline{2-5}  & & K1-S1-C64 & & \\ \hline \multirow{4}{*}{**SFL**} & Conv & & K3-S2-C128 & \\ \cline{2-5}  & & (K1-S1-C64)\(\times\)2 & & \\ \cline{2-5}  & & K3-S1-C64 & & \\ \cline{2-5}  & & K3-S1-C64 & & \\ \cline{2-5}  & & K3-S1-C64 & & \\ \cline{2-5}  & & K3-S1-C64 & & \\ \cline{2-5}  & & K1-S1-C128 & & \\ \cline{2-5}  & & K3-S1-C128 & & \\ \cline{2-5}  & & K1-S1-C256 & & \\ \cline{2-5}  & & K3-S2-C512 & & \\ \cline{2-5}  & & K1-S1-C256 & & \\ \cline{2-5}  & & K3-S1-C256 & & \\ \cline{2-5}  & & K3-S1-C256 & & \\ \cline{2-5}  & & K1-S1-C256 & & \\ \cline{2-5}  & & K3-S1-C256 & & \\ \cline{2-5}  & & K1-S1-C256 & & \\ \cline{2-5}  & & MaxPool2d(K5-S1) & & \\ \cline{2-5}  & & K1-S1-C512 & & \\ \cline{2-5}  & & NAM & & \\ \cline{2-5}  & & Neck & \\ \hline
**Output** & 152 \(\times\) 152 \(\times\) 42 & 76 \(\times\) 76 \(\times\) 42 & 38 \(\times\) 38 \(\times\) 42 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Design details of the proposed network.  
fast version of Spatial Pyramid Pooling. The Neck structure is consistent with that in YOLO v5 [15], and the connection with the front network is shown in Figure 5. NAM is added between SPPF and the Neck block. In this key position of forward propagation, NAM can better integrate spatial attention and channel attention. In this way, the proposed network can improve the discrimination of damage features by strengthening the learning of salient features and restraining the weight of non-salient features.