This study proposes a method based on image segmentation for accurately identifying liquid aluminum leakage during deep well casting, which is crucial for providing early warnings and preventing potential explosions in aluminum processing. Traditional DeepLabV3+ models in this domain encounter challenges such as prolonged training duration, the requirement for abundant data, and insufficient understanding of the liquid surface characteristics of casting molds. This work presents an enhanced DeepLabV3+ method to address the restrictions and increase the accuracy of calculating liquid surface areas for casting molds. This algorithm substitutes the initial feature extraction network with ResNet-50 and integrates the CBAM attention mechanism and transfer learning techniques. The results of ablation experiments and comparative trials demonstrate that the proposed algorithm can achieve favorable segmentation performance, delivering an MIoU of 91.88%, an MPA of 96.53%, and an inference speed of 55.05 FPS. Furthermore, this study presents a technique utilizing OpenCV to accurately measure variations in the surface areas of casting molds when there are leakages of liquid aluminum. In addition, this work introduces a measurement to quantify these alterations and establish an abnormal threshold by utilizing the Interquartile Range (IQR) method. Empirical tests confirm that the threshold established in this study can accurately detect instances of liquid aluminum leakage.