## 3 Results and Discussion
### Model Performance Comparison  
In order to verify the performance of the algorithm proposed in this paper, different algorithms are used to train and predict the solidified region image dataset of lattice structure under the same training conditions. The basic algorithm proposed in this paper is a combination of CNN and Transformer, so several mainstream segmentation algorithms based on CNN and Transformer, respectively, are selected for comparison. The comparison results are shown in Table 2.  
As can be seen from Table 2, since the types of solidified region images are relatively single, in the segmentation of these images, the \(IoU\) of these algorithms is about 90%, and the \(Dice\) is above 90%. The segmentation accuracy of PSPNet using the PPM (Pyramid pooling module) structure is relatively low. This is because the size of the segmented targets in the solidified region image is generally small. PSPNet uses a pyramid pooling structure for multi-scale feature fusion, but it may cause loss of detailed information during the pooling operation, resulting in the poor recognition of small targets. The DeepLabV3+ model using the ASPP module and the two models using Transformer architecture both exhibit better segmentation performance. The classic UNet network has a simple structure, but it still demonstrates better segmentation performance when applied to LPBF solidified region images. It can be seen that the ASPP module, Transformer model, and UNet network framework have certain advantages in image segmentation tasks. Compared with other models mentioned above, the SA-TransUNet network proposed in this paper has optimal segmentation accuracy, with \(IoU\) reaching 94.24% and \(Dice\) reaching 97.02%.  
In order to further verify the segmentation performance of the model in this article, the segmentation results of different models would be visualized. Figure 5 shows the segmentation results of each network model. The target region is cropped and enlarged to facilitate observation. From the figure, it can be seen that SA-TransUNet has an excellent segmentation effect and can accurately segment the contour shape of the solidified region images. When segmenting multiple targets, PSPNet and DeepLabV3+ network are difficult to separate different targets during prediction, and there is a serious problem of misclassifying the background among targets as entities, which is due to the small target scale and the close distance between different targets. The overall segmentation performance of Mask2 Former, Segformer, and UNet is preferable, but it is not particularly accurate for the segmentation of smaller targets. The basic outline can be segmented, but the parts with obvious edge turns are not segmented, and the segmented edges are more rounded, with a certain deviation from the original image label. In particular, the outline of the fine part framed by the red square clearly shows the superiority of the model designed in this paper compared with other models.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Method** & **PSPNet** & **DeepLabV3+** & **Mask2 Former** & **Segformer** & **UNet** & **SA-TransUNet** \\ \hline \(IoU\) (\%) & 88.18 & 91.24 & 91.82 & 92.02 & 92.37 & 94.24 \\ \(Dice\) (\%) & 93.67 & 95.28 & 95.87 & 95.85 & 96.03 & 97.02 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of recognition accuracy of each model.