## 4 Conclusions  
Real-time monitoring of abnormal liquid surface in the casting mold requires a high level of concentration from the production personnel. Leveraging advancements in computer vision, this work introduces a two-stage method based on image segmentation for calculating the liquid surface area in casting molds, providing a new visual solution for detecting aluminum leakage in deep well casting. First, given the dearth of datasets in this domain, this work constructed a dataset of liquid levels in the distribution plate utilizing production process videos for image annotation. In the stage of data preprocessing, techniques such as region extraction, Gaussian filtering, and image augmentation were employed to tackle challenges related to non-target regions, substantial noise, and complexities in data annotation within the images. Second, to improve casting mold liquid surface segmentation accuracy, an improved DeepLabV3+ model was proposed using a casting mold liquid surface image dataset; we demonstrated that the proposed model surpasses other models, reaching a Mean Intersection over Union (_MIoU_) score of 91.88% and an inference speed of 55.05 FPS. Third, this work introduces a method for calculating liquid surface area based on OpenCV, which involves accumulating segmented liquid surface pixels to represent the liquid surface area.  
Furthermore, a metric for liquid surface area change is proposed, and an abnormal threshold is determined using the IQR method based on data from aluminum leakage casting and normal casting. This approach addresses the challenge of quantifying changes in liquid surface area during aluminum leakage. Experimental validation shows that the proposed method can effectively identify aluminum leakage with an accuracy of 95.5%.  
Conceptualization, J.Y. and X.L.; methodology, X.L.; software, X.L.; validation, X.L.; formal analysis, X.Z. and X.L.; investigation, J.Y. and X.L.; resources, J.Y.; data curation, J.Y. and X.L.; writing--original draft preparation, J.Y., X.Z. and X.L.; writing--review and editing, X.Z. and X.L.; visualization, X.Z. and X.L.; supervision, J.Y. and X.Z.; project administration, J.Y.; funding acquisition, J.Y. and X.Z. All authors have read and agreed to the published version of the manuscript.  
This paper was supported by Guangdong Province Technology Commission Development Project: Research and Demonstration Application Project of Intelligent and Trustworthy Safety Production Supervision System Model in Industry and Trade Industry, under Grant Number 2022440002001110.  
Not applicable.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Index** & **Results** \\ \hline _Accuracy_ & 95.5\% \\ _FAR_ & 8.3\% \\ _MAR_ & 12.0\% \\ \hline \hline \end{tabular}
\end{table}
Table 5: Validation of threshold effectiveness for casting mold liquid surface area change.  
Data Availability Statement: Two datasets were used in this study. One is a public dataset (VOC dataset), which is available at [[http://host.robots.ox.ac.uk/pascal/VOC/voc2007/index.html](http://host.robots.ox.ac.uk/pascal/VOC/voc2007/index.html)]([http://host.robots.ox.ac.uk/pascal/VOC/voc2007/index.html](http://host.robots.ox.ac.uk/pascal/VOC/voc2007/index.html)) (accessed on 17 May 2024), and the other is not publicly available due to confidentiality.  
The authors declare no conflicts of interest.