## 4 Conclusions  
In view of the characteristics of the solidified region image collected by the online monitoring of the LPBF forming layer, and the limitations of traditional defect detection methods such as industrial CT--which is difficult to detect defects online--this paper proposed a region segmentation algorithm based on TransUNet that was used to extract the contour of the LPBF solidified region images. Then, the area and perimeter parameters of these images were measured and compared with the geometrical parameters of the slice images obtained from the CT scan to verify the contour detection effect of the proposed method. The main conclusions are as follows:  
1. For LPBF solidified region images with uneven gray scale and constantly changing size, the performance of the TransUNet model was improved by integrating the SE attention mechanism and the ASPP multi-scale feature extraction module. The _IoU_ and _Dice_ indices were improved by 1.74% and 0.94%, respectively.
2. The SA-TransUNet solidified region image segmentation model designed in this paper has excellent segmentation effect and high segmentation accuracy on the image dataset of the lattice cell, with _IoU_ reaching 94.24% and _Dice_ reaching 97.02%. Compared to other mainstream networks, more accurate segmentation results can be obtained for the contour edges of solidified region images and small-sized targets in this model.
3. The correlation analysis of the contour geometric features between the segmented images of the model and the slice images obtained from the CT scan of the formed part was conducted. The trend of area and perimeter changes was highly consistent, with [PERSON]'s correlation coefficients of 0.99 and 0.98, respectively, which proves that the solidified region image segmentation method proposed in this paper has certain application capabilities in contour detection.  
This paper initially explores the application of solidified region image edge extraction in the quality monitoring of LPBF. The improved image segmentation model has significantly enhanced the segmentation accuracy of the solidified region images in LPBF. Thisimprovement in segmentation accuracy leads to an increase in defect detection rate and reliability of quality evaluation, providing important technical support for quality control in the LPBF forming process. The proposed quality detection method based on solidified region images of the forming layer visually presents the status of the forming process, making the online monitoring results more intuitive and eliminating the need for complex signal processing. Moreover, the real-time nature of data acquisition facilitates online defect detection without the need for time-consuming offline CT scanning. This is beneficial for optimizing online quality control in the forming process and has certain engineering significance for improving production efficiency and enhancing product quality.  
Conceptualization, M.D. and X.Z.; methodology, M.D. and T.Z.; software, M.D. and G.D.; validation, M.D.; formal analysis, M.D. and X.Z.; investigation, M.D. and G.H.; resources, M.D., T.Z. and Y.T.; data curation, M.D.; writing--original draft preparation, M.D.; writing--review and editing, M.D.; visualization, M.D.; supervision, G.H. and H.G.; project administration, G.H. and X.W.; funding acquisition, X.Z. and X.W. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Key Science and Technology Project of Shaanxi Province, grant number SKJH19021303. The APC was funded by Key Science and Technology Project of Shaanxi Province.  
The datasets generated analyzed during the current study are not publicly available due to further analysis of the data being conducted but are available from the corresponding author on reasonable request.  
The authors would like to thank Key Science and Technology Project of Shaanxi Province for helpful discussions on topics related to this work.  
The authors declare no conflicts of interest.