# Underground Mine Road Detection Using Deep Learning Technique
## Materials and Methods
### Unified Attention Fusion Module (LAFM)  
Underground mine roads are the most irregular of unstructured roads, and are affected by light, water, potholes, etc., making it difficult to achieve accurate identification of underground mine roads. Aiming at the problem of low recognition accuracy of underground mine roads, this study uses a unified attention fusion module to enrich the fusion feature representation through spatial and channel attention fusion, thereby improving the recognition accuracy of the model. As shown in Figure 7, the UAFM utilizes an attention module to generate the weight \(\alpha\), and fuses the input features with \(\alpha\) through Mul and Add operations. The input features are denoted as F\({}_{\text{high}}\) and F\({}_{\text{low}}\). F\({}_{\text{high}}\) is the output of the  
Figure 5: STDC Network.  
Figure 6: STDC network structure.  
deep module, and \(\mathrm{F_{low}}\) is the corresponding module of the encoder with the same number of channels.  
The UAFM uses a bilinear interpolation operation to upsample \(\mathrm{F_{high}}\) to the same size as \(\mathrm{F_{low}}\), and the upsampled feature is denoted as \(\mathrm{F_{up}}\). Then, the attention module takes \(\mathrm{F_{up}}\) and \(\mathrm{F_{low}}\) as input and generates the weight \(\alpha\). After obtaining the attention weights, Mul operations are performed on \(\mathrm{F_{up}}\) and \(\mathrm{F_{low}}\), respectively. Finally, the UAFM performs the Add operation on the attention-weighted features and outputs the fusion features, calculated as follows:  
\[\mathrm{F_{up}}=\mathrm{Upsample}\Big{(}\mathrm{F_{high}}\Big{)} \tag{3}\]  
The spatial attention module, shown in Figure 8, exploits the inter-spatial relationship to generate a weight that represents the importance of each pixel in the input feature.  
Given input features, \(\mathrm{F_{up}}\in\mathrm{R^{C\times H\times W}}\) sum, 4 features are first generated by averaging and maximizing operations along the channel axis, where the dimension is \(\mathrm{R^{1\times H\times W}}\). Then, these 4 features are concatenated onto one feature. For the concatenated features, convolution and sigmoid operations are applied to the output \(\alpha\in\mathrm{R^{1\times H\times W}}\). The calculation formula of the spatial attention module is as follows:  
\[\mathrm{F_{cat}} =\mathrm{Concat}\big{(}\mathrm{Mean}\big{(}\mathrm{F_{up}}\big{)},\mathrm{Max}\big{(}\mathrm{F_{up}}\big{)}, \tag{4}\] \[\mathrm{Mean}(\mathrm{F_{low}}),\mathrm{Max}(\mathrm{F_{low}}) \big{)}\] \[\alpha=\mathrm{Sigmoid}(\mathrm{Conv}(\mathrm{F_{cat}}))\]  
Figure 9 shows the channel attention module. The key to the channel attention module is to use the relationship between channels to generate a weight. For this weight, each channel of the input feature is important. The proposed channel attention module uses the average and max pooling to compress the spatial dimension of the input features.  
Figure 8: Spatial Attention Module.  
Figure 7: Unified Attention Fusion Module.  
This process generates 4 features using dimension \(\mathrm{R}^{\mathrm{C}\times 1\times 1}\). These 4 features are then concatenated along the channel axis, and convolution and sigmoid operations are performed to produce a weight \(\alpha\in\mathrm{R}^{\mathrm{C}\times 1\times 1}\). The formula is expressed as follows:  
\[\begin{array}{c}\mathrm{F}_{\mathrm{cat}}=\mathrm{Concat}\big{(}\mathrm{AvgPool }\big{(}\mathrm{F}_{\mathrm{up}}\big{)},\mathrm{MaxPool}(\mathrm{F}_{\mathrm{up }}),\\ \mathrm{AvgPool}(\mathrm{F}_{\mathrm{low}}),\mathrm{MaxPool}(\mathrm{F}_{ \mathrm{low}}))\\ \alpha=\mathrm{Sigmoid}(\mathrm{Conv}(\mathrm{F}_{\mathrm{cat}}))\end{array} \tag{5}\]