Abstract:Aiming at the difficulty of foam size extraction in flotation process, a new flotation foam size extraction method improved YOLOv11n seg was proposed. Firstly, a Cross-Scale Feature Fusion Module (CCFM) is introduced to refine the neck structure, enhancing the model's adaptability to scale variations and its detection capability for small-scale objects. Secondly, a Mixed Local Channel Attention (MLCA) mechanism is added to integrate channel information, spatial information, and local information, thereby enhancing the network's expressive power. Finally, the Unified-IOU loss function is introduced to dynamically shift the model's attention from low-quality prediction boxes to high-quality ones, balancing training speed and detection accuracy. Experimental results show that, compared to traditional methods such as the watershed algorithm and deep learning-based Mask R-CNN, the proposed method exhibits significant advantages in segmentation accuracy and real-time performance. Compared to the baseline model YOLOv11n-seg, the optimized model achieves a 1.5% and 5.3% improvement in precision mAP@0.5 and mAP@0.5:0.95, respectively, with a 5.1% increase in recall rate, a 11.8% reduction in computation, and a 32.1% decrease in parameter count. This method offers faster detection speed and higher detection accuracy, meeting the requirements for precise extraction of flotation foam size.