# DWPIs: Dynamic-Weight Parallel Instance and Skeleton Network for Railway Centerline Detection
## 4 Experiments and Analysis
### Ablation Experiments  
This paper investigates and compares the following five aspects in our methods:  
**Threshold function. ** To improve the process of inference using a model that only requires a few epochs of training, a threshold function is added after the original sigmoid function to simplify the features. We compare the inference results with and without a threshold function, in which the threshold is \(1-10^{-1}\), \(1-10^{-3}\), \(1-10^{-5}\) and \(1-10^{-7}\). As shown in Figure 7, the inference achieves significant improvement through the addition of a threshold function. The inference results are good enough when the threshold value increases to \(1-10^{-7}\) which is ultimately chosen as our threshold. As expected, the skeleton of each railway becomes more obvious and the F-score is much higher than the inference result without our threshold function, as shown in Table 2.  
Figure 7: Comparison of the results of with and without our threshold function during the inference process. The first row: input images. The second row: results without our threshold function. The other rows: results with our threshold function and the thresholds are \(1-10^{-1},1-10^{-3}\), \(1-10^{-5}\), and \(1-10^{-7}\), respectively. **Backbone. ** According to previous research, the best backbone for SOLOv2 is ResNet, and Inception-v3 is the best for AdaLSN. To further compare the impact of the backbone, this paper trains SOLOv2 (only for the instance-segmentation branch), AdaLSN with a fixed architecture (only for the skeleton-detection branch), and our dynamic-weight parallel instance and skeleton network with different backbones, including ELAN-based backbone, Inception-v3, ResNet-50 and ResNet-101. Table 3 shows the evaluation metrics for only the instance-segmentation branch. As demonstrated, the network using the ELAN-based backbone achieves a higher mAP compared to the networks that use other backbones. The network achieves a 3.56% mAP improvement over ResNet-50, indicating that the ELAN-based architecture is the optimal choice among them for the instance-segmentation branch. As shown in Table 4, the ELAN-based backbone does not achieve the best F-score compared to the networks using other backbones, for only the skeleton-detection branch. However, the main target of changing the backbone is to improve the detection results of the instance-segmentation branch. Therefore, this paper pays more attention to the metrics of the instance-segmentation network and our parallel network. The evaluation metrics for our novel network are shown in Table 5. The \(W_{mean}\) of the ELAN-based backbone network is 0.06 smaller than that of the Inception-v3 backbone network, which is mainly due to the smaller AP. However, as shown in Table 3, the mAP of the ELAN-based backbone network is larger. The different results may because the weight of the instance-segmentation branch is always less than one in our network. Therefore, this paper still uses the ELAN-based backbone for more epochs of the training. \begin{table}
\begin{tabular}{c c} \hline \hline
**Network** & **F-Score** \\ \hline Inception-v3 & 48.8 \\ ResNet-50 & 35.8 \\ ResNet-100 & 37.0 \\ ELAN-based & 48.2 \\ ELAN+SimAM & 47.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of backbone and attention module for skeleton-detection network. \begin{table}
\begin{tabular}{c c} \hline \hline
**Inference** & **mAP** \\ \hline Sigmoid function & 1.18 \\ Sigmoid function + threshold function & 51.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of with and without threshold function.