# A Lightweight Residual Model for Corrosion Segmentation with Local Contextual Information
## 4 Experiment
### Comparison with Similar Methods  
We mainly compared the proposed method with mainstream lightweight and classical semantic segmentation models. The results of the experiment are shown in Table 2. As it shows, our proposed small model performed the best, achieving the highest scores on mPA, mIoU, F1-score among the lightweight models. The volume of the model came third behind ENet [27] and CGNet [32]. The large model achieved an mIoU of 79.06 and a volume of the model of only 8.25 MB. Metal corrosion images were characterized by both continuity and localization. Continuity was reflected in the fact that corrosion areas tended to appear in patches; therefore, we directly used a large convolution kernel with higher accuracy than that used for dilated convolution. The local nature reflected in the corrosion image did not take global constraints as corrosion occurred locally and randomly. Therefore, when we kept increasing its size, the larger convolution kernel lost the localization feature, leading to a dramatic drop in segmentation accuracy. Therefore, designing a large convolution kernel that did not lose localization features is key to improving the accuracy of the metal corrosion image segmentation method. This was also demonstrated in the ablation study section, where there was an approximate parabolic relationship between algorithm accuracy and convolution kernel size. As for training, all the models converged within 300 epochs without pre-training in cases where other configurations were all the same. We found that CCNet [38] and Deeplabv3+ [10], also performed better, which proved the importance of contextual features for corrosion segmentation. SegNet [44] had a large number of parameters, but the final performance was the worst. The reason may be that SegNet [44] performed 32-fold \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Params (MB)** & **mIoU(\%)** & **mPA(\%)** & **F1-Score** & **FPS** \\ \hline ENet [27] & **1.36** & 67.79 & 80.64 & 0.766 & 43.55 \\ CCNet [32] & 1.88 & 73.32 & 85.09 & 0.820 & 12.77 \\ EDANet [34] & 2.60 & 67.49 & 80.49 & 0.761 & 21.79 \\ DABNet [48] & 2.87 & 68.89 & 79.95 & 0.779 & 46.30 \\ ContextNet [33] & 3.34 & 69.17 & 81.35 & 0.828 & **104.78** \\ ESPNet2 [29] & 4.75 & 72.13 & 83.34 & 0.798 & 38.61 \\ ERFNet [31] & 7.87 & 69.10 & 81.12 & 0.794 & 41.43 \\
**Ours-small** & 2.41 & **75.64** & **86.07** & **0.838** & 16.87 \\ \hline Deeplabv3+ [10] & 22.18 & _77.67_ & **88.96** & 0.879 & 25.58 \\ LinkNet [30] & 44.00 & 67.58 & 77.82 & 0.820 & **48.22** \\ SegNet [44] & 112.32 & 58.37 & 70.89 & 0.778 & 12.89 \\ CCNet [38] & 200.69 & 78.47 & 86.58 & **0.899** & 7.42 \\
**Ours-large** & **8.25** & **79.06** & 88.07 & 0.891 & 11.60 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison between our model and other SOTA image segmentation methods. downsampling, resulting in a large information loss. In contrast, models like CGNet [32], DABNet [48], ContextNet [33], ENet [27], ERFNet [31] performed 8-fold downsampling. Their final performances were also better compared to SegNet [44], which confirmed our conjecture. EDANet [34] performed poorly, probably because the dense, connected approach introduced redundant information. Regarding the FPS evaluation, our small model scored 16.87 while the large model scored 11.60, which met the real-time requirements of daily testing. The model capacity of both the large and small models did not exceed 10 MB, which can easily be embedded on mobile devices for corrosion segmentation. Compared with the small model, the large model required more computing power and higher accuracy. After that, we used the above models to make predictions, and the visualization results are shown in Figure 5. CGNet [32] and ContextNet [33] appeared to have discontinuous segmentation regions due to the use of dilated convolution. EDANet [34] and ENet [27] could not accurately identify the degree of corrosion area because of their weak fitting ability.