## 1 Introduction
When liquid aluminum leaks, the casting mold's liquid level decreases significantly, leading to a major loss in the surface area of the liquid in the mold. By identifying this particular attribute, timely warning signals can be generated to encourage operators to take immediate action, thus averting ongoing leakage of liquid aluminum. However, real-time monitoring of liquid surfaces in casting molds remains challenging, requiring innovative solutions. Machine vision technology has rapidly advanced, offering technological assistance in estimating the surface area of the casting mold's liquid. One of  
Figure 1: Schematic diagram of single-furnace casting production process. the breakthroughs is the segmentation of the liquid surface in casting molds, which is an important step in determining the area of the liquid surface in the casting mold. Currently, image segmentation algorithms can be classified into two main categories: classical and deep-learning-based semantic segmentation algorithms. Conventional techniques utilize many methods to extract region information and show strong segmentation performance. However, they suffer from issues such as the requirement for domain expertise, weak generalization ability, susceptibility to background-feature mixture, low computational efficiency, and significant sensitivity to noise [13]. Conversely, deep learning approaches utilize extensive data and strong computational powers to autonomously acquire knowledge of features and patterns from the data, resulting in a more accurate representation of the semantic information contained in images [14]. Many segmentation methods are based on deep learning, with the mainstream architecture being the encoder-decoder structure. Common algorithms include FCN [15], UNet [16], and PSPNet [17], among others. [PERSON] et al. [18] proposed a fracture segmentation method based on FCN, using synthetic seismic image data to generate the training set for seismic monitoring. [PERSON] et al. [19] proposed a residual UNet model based on a denoising encoder for tooth segmentation using X-ray images to identify damage to individual teeth. [PERSON] et al. [20] suggested an improved coal gauge image segmentation network using a modified PSPNet. Their approach facilitates rapid identification of coal gauge even under conditions of adhesion and partial occlusion, achieved by replacing the backbone network and incorporating attention mechanisms. Moreover, the DeepLab series [21; 22; 23; 24] of semantic segmentation models, introduced by Google, have gained significant recognition for their capacity to maintain intricate information and achieve exceptional segmentation results. DeepLabV3+, the latest version of this series, has been extensively utilized in several fields [25; 26; 27; 28; 29] due to its exceptional performance. Nevertheless, conventional DeepLabV3+ methods are plagued by limitations such as substantial model parameter sizes, protracted training durations, and demanding annotated data prerequisites. Consequently, they fail to fulfill the real-time and precision needs of industrial inspection [30]. Based on the previous analyses, this work introduces a two-stage casting mold liquid surface area calculation method that integrates semantic segmentation with OpenCV. This technique is utilized to identify liquid aluminum leakage. The main contributions are as follows:  
* This project specifically targets an aluminum facility in South China to address the challenges of limited datasets of casting mold liquid surface images and the expensive nature of manual annotation. A collection of casting mold photos from different time periods and casting units is gathered. Several data preparation activities are performed to create the casting mold liquid surface image dataset, such as region extraction, image annotation, and data augmentation. * The method aims to overcome the challenges of lengthy training time, high data demands, and inadequate learning of casting mold liquid surface features in traditional DeepLabV3+ models.