Quantitative detection of welding spatter is not only critical for evaluating and optimizing welding energy consumption, but also significant for improving welding quality. Inspired by the welder's visual estimation of the amount of spatter, a novel welding spatter measurement method based on image segmentation is proposed. Considering the challenges of welding spatter such as small object, aggregation, and unclear boundary, four loss functions, namely, Focal loss, Dice loss, Boundary loss, and Count loss, are designed to achieve global optimization for complex welding spatter. Furthermore, for the different spatter characteristics with different optimization difficulties, a multi-loss dynamic fusion method with differential optimization capability is designed. Finally, a welding spatter segmentation dataset is established and a comprehensive ablation and comparison test of the proposed methodology is carried out. The results indicate that the proposed method has an average F1-score metric of 83.52 % and a mean intersection over union metric of 75.11 %. These findings suggest the potential for vision-based quantitative estimation of welding spatter.