## 4 Experiments and Results
### Comparative Experiments with State-of-the-Art Methods  
The proposed AFFNet was compared with some classical and state-of-the-art segmentation networks, such as UNet, UNet++ [48], Deeplabv3+, FCN-hrnetw18 [49], PSPNet, HardNet [50], and EMANet [51]. All of the comparative experiments were conducted on the same machine and environment. Additionally, these methods were all run on the same training set using their default settings. The comparison results are shown in Table 1, and Figure 6 shows comparison results of different indicators with other models. As can be seen from Table 1, the results indicate that our proposed AFFNet outperforms other methods in terms of all of the four metrics. The bold text in the table indicates that the value is the best indicator. Specifically, compared with FCN-hrnetw18, our pro posed AFFNet showed increases of 1.12%, 0.86%, 0.15%, and 1.73% in the mIoU, Dice coefficient, mAP, and recall, respectively, on the test dataset. Meanwhile, compared with FC-HardNet70, our method showed increases of 0.89%, 0.70%, 0.11%, and 0.42% in the mIoU, Dice coefficient, mAP, and recall, respectively, on the test dataset. Several visualized segmentation results between our method and others for detecting surface defects on the NEU-seg dataset are shown in Figure 7. As can be seen from this figure, our algorithm can accurately predict the types of defect and the segmentation predictions are consistent with the ground truth labels. Specifically, the first two rows of the figure indicate that our method can more effectively suppress background interference and that it reduces false positives in non-defective areas. The last row shows that our proposed method can accurately identify defects of similar texture in different categories, even in small sizes. This capability is particularly valuable for analyzing the location and root causes of defects. In summary, our proposed method accurately segments defect areas and identifies the corresponding defect types, even in challenging scenarios such as low-contrast regions and intra-class differences. To provide a comprehensive assessment of the computational complexity of our proposed method, we calculate the model parameters, the computational complexity in terms of FLOPs, and the inference time of the network. The experimental results, which are shown in Table 2, include the number of trainable parameters, computational complexity (FLOPs), and inference time. It can be seen that AFFNet has a total of 11.42 MB trainable parameters and 25.16 GB FLOPs. Furthermore, the inference time per image of our model is 20.89 ms. These results imply that AFFNet has a superior segmentation performance and efficient inference speed. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **mIoU (\%)** & **Dice (\%)** & **mAP** & **Recall** \\ \hline FCN-8s [5] & 77.25 & 87.07 & 0.9707 & 0.8758 \\ FCN-hrnetw18 [49] & 79.82 & 88.70 & 0.9748 & 0.8712 \\ Deeplabv3+ [11] & 78.76 & 88.02 & 0.9736 & 0.8739 \\ UNet [7] & 77.40 & 87.17 & 0.9700 & 0.8786 \\ UNet++ [48] & 77.76 & 87.41 & 0.9714 & 0.8669 \\ PSPNet [9] & 78.68 & 87.41 & 0.9738 & 0.8603 \\ EMANet [51] & 78.56 & 87.25 & 0.9733 & 0.8544 \\ FC-HardNet70 [50] & 80.05 & 88.86 & 0.9747 & 0.8853 \\ AFFNet (ours) & 80.94 & 89.56 & 0.9758 & 0.8895 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison results of the surface defects segmentation performance of different networks on the NEU-seg dataset. Figure 6: Comparison results of indicators with other models.