The activated sludge process is a widely used technology in wastewater treatment,where the normal state of sludge directly affects the effectiveness of sludge-water separation.The traditional image method for sludge floc analysis has many human interference factors,inaccurate segmentation,and a lack of distinction between different flocs.The accurate segmentation and identification of flocs are critical to obtain their morphological feature parameters,which directly affect the prediction results of sludge status.Therefore,this paper proposes a fine-grained segmentation method for sludge flocs based on instance segmentation.The details of the research and the innovative work are as follows:First,the video is processed using the frame difference method to extract key frames and obtain image data of the sludge floccules.The data is then processed using the Rich Crop augmentation strategy.Next,data annotation is performed to build the sludge floccules dataset for this study.Second,a sludge floc image segmentation model based on dual-attention mechanism is proposed,which utilizes the dual-attention mechanism to extract semantic information from both the spatial and channel dimensions,enhancing the model’s ability to extract fine-grained features of sludge flocs and avoiding missed detection and false detection.In the dataset constructed in this paper,the detection accuracy of this model is improved by 6.4% compared with the original Mask R-CNN model.Finally,an improved sludge floc refinement segmentation method based on Mask RCNN is proposed to improve the accuracy of floc edge segmentation.This method replaces the original semantic segmentation branch with the fine-grained segmentation module Point Rend and adds a bottom-up lateral connection network on top of the feature pyramid network to enhance the utilization of low-level feature information,thereby improving detection accuracy and mask integrity.Meanwhile,the segmentation results are further optimized by combining texture features.The experimental results show that the accuracy of sludge floc segmentation achieved by this model is 95.32%,which is superior to Mask R-CNN.Moreover,combined with the morphological and texture features of the sludge,an effective judgment of the sludge status is made.Based on the above research content,a sludge floc segmentation software system based on Py Qt5 is designed and developed,consisting of several modules such as video image processing,sludge microscopic image segmentation,parameter extraction,and model evaluation metrics,which can automatically recognize and segment sludge flocs. |