Improved MRF rail surface defect segmentation method based on fusion of clustering features
-
摘要:
针对轨面缺陷样本数量少、种类多的特点,以及在真实场景下存在迁移学习效果不稳定、阈值分割易受环境因素影响的问题,提出一种零样本的改进马尔可夫随机场轨面缺陷分割方法。对采集的数据使用Gabor函数进行处理,突出缺陷特征,降低数据维度,得到降维特征图;对处理后的特征图进行Kmeans聚类,缩减数据分布,降低反光和阴影的影响,并将聚类结果作为预分类矩阵;通过降维特征图和预分类矩阵构建改进马尔可夫随机场(MRF)双层图模型,并进行推理;根据模型推理出的预分类矩阵特征值来分析缺陷部分的局部几何结构;标记出缺陷区域,并完成缺陷分割。使用自采样数据集进行对比实验和消融实验,结果表明:所提方法在自采样数据集上的像素准确率、平均像素准确率、加权交并比、均交并比分别达到93.6%、80.7%、89.4%、68.2%,超过对比检测方法精度。
Abstract:In view of the characteristics of the small number and many types of rail defect samples, unstable transfer learning effect in real scenes, and threshold segmentation susceptible to environmental factors, an improved Markov defect segmentation method with zero samples was proposed. Firstly, the collected data was processed using Gabor functions to highlight defect features and reduce data dimensionality, resulting in a reduced dimensionality feature map. To mitigate the effects of glare and shadows, the feature map was subjected to Kmeans clustering to reduce data distribution. The clustering results were then used as a pre-classification matrix. Based on the reduced dimensionality feature map and the pre-classification matrix, a two-layer graph model of the improved Markov random field (MRF) was constructed for inference. The model analyzed the local geometric structure of the defect area by using the eigenvalues of the classification matrix inferred by the model. Finally, the defect regions were labelled, and the defect segmentation was completed. In the experimental part, a self-sampled dataset was used to draw the final conclusion through comparative and ablation experiments. The experimental results show that the proposed method achieves pixel accuracy, mean pixel accuracy, weighted intersection over union, and mean intersection over union of 93.6%, 80.7%, 89.4%, and 68.2%, respectively, on the self-sampled dataset, surpassing the accuracy of other comparative detection algorithms.
-
表 1 对比实验结果分析
Table 1. Analysis of comparison experimental results
表 2 消融实验结果分析
Table 2. Analysis of ablation experiment results
方法 Gabor处理 融合聚类特征 ICM KPA/% KMPA/% KFWIoU/% KMIoU/% KFPS MRF 47.6 42.8 42.3 26.1 0.073 方法1 √ 45.2 40.2 39.4 25.7 0.612 方法2 √ 53.8 49.7 72.8 40.7 0.469 方法3 √ 86.4 81.1 81.6 61.5 2.096 本文方法 √ √ √ 93.6 80.7 89.4 68.2 3.174 注:表中加粗部分表示评价指标达到最佳。 -
[1] 黄鹏, 郑淇, 梁超. 图像分割方法综述[J]. 武汉大学学报(理学版), 2020, 66(6): 519-531.HUANG P, ZHENG Q, LIANG C. Overview of image segmentation methods[J]. Journal of Wuhan University (Natural Science Edition), 2020, 66(6): 519-531(in Chinese). [2] CHOPRA M, PURWAR A. Recent studies on segmentation techniques for food recognition: a survey[J]. Archives of Computational Methods in Engineering, 2022, 29(2): 865-878. [3] 王国伟, 陈光武, 魏宗寿. 基于背景差分与最大熵的轨面缺陷分割[J]. 计算机系统应用, 2022, 31(10): 184-190.WANG G W, CHEN G W, WEI Z S. Rail surface defect segmentation based on background difference and maximum entropy[J]. Computer Systems and Applications, 2022, 31(10): 184-190(in Chinese). [4] 程天栋, 闵永智, 马宏锋. 基于模糊超熵与遗传算法的轨面缺陷分割算法[J]. 兰州交通大学学报, 2016, 35(6): 46-50.CHENG T D, MIN Y Z, MA H F. Rail surface defect segmentation algorithm based on fuzzy excess entropy and genetic algorithm[J]. Journal of Lanzhou Jiaotong University, 2016, 35(6): 46-50(in Chinese). [5] 曹义亲, 刘龙标. 基于缺陷比例限制的背景差分钢轨表面缺陷检测方法[J]. 计算机应用, 2020, 40(10): 3066-3074.CAO Y Q, LIU L B. Rail surface defect detection method based on background differential with defect proportion limitation[J]. Journal of Computer Applications, 2020, 40(10): 3066-3074(in Chinese). [6] 张辉, 李平, WU Q M J, 等. 基于改进马尔可夫随机场的钢轨缺陷分割[J]. 计算机工程与设计, 2020, 41(4): 1052-1061.ZHANG H, LI P, WU Q M J, et al. Rail defect segmentation based on improved Markov random field[J]. Computer Engineering and Design, 2020, 41(4): 1052-1061(in Chinese). [7] 周雯, 史天运, 李平, 等. 基于卷积神经网络的动车组行车安全图像缺陷检测与分割[J]. 铁道学报, 2019, 41(10): 76-83.ZHOU W, SHI T Y, LI P, et al. Defects detection and segmentation of operation safety image of EMU based on convolutional neural network[J]. Journal of the China Railway Society, 2019, 41(10): 76-83(in Chinese). [8] 刘俊博, 杜馨瑜, 王胜春, 等. 基于少样本学习的钢轨表面缺陷检测方法[J]. 铁道学报, 2022, 44(7): 72-79.LIU J B, DU X Y, WANG S C, et al. Rail surface defect detection method based on few-shot learning[J]. Journal of the China Railway Society, 2022, 44(7): 72-79(in Chinese). [9] 赵晨阳, 张辉, 廖德, 等. 基于注意力机制与混合监督学习的钢轨表面缺陷检测模型[J]. 计算机科学, 2022, 49(增刊2): 488-493.ZHAO C Y, ZHANG H, LIAO D, et al. Rail surface defect detection model based on attention mechanism and mixed supervised learning[J]. Computer Science, 2022, 49(Sup 2): 488-493(in Chinese). [10] 罗晖, 李健, 贾晨. 基于图像增强与改进Cascade R-CNN的钢轨表面缺陷检测[J]. 激光与光电子学进展, 2021, 58(22): 324-335.LUO H, LI J, JIA C. Rail surface defect detection based on image enhancement and improved Cascade R-CNN[J]. Laser & Optoelectronics Progress, 2021, 58(22): 324-335(in Chinese). [11] DURR O, SICK B, MURINA E. 概率深度学习: 使用Python、Kears和 TensorFlow Probability[M]. 崔亚奇, 唐田田, 但波, 译. 北京: 清华大学出版社, 2022: 3-28, 249-288.DURR O, SICK B, MURINA E. Probability deep learning: using Python, Kears and TensorFlow Probability[M]. CUI Y Q, TANG T T, DAN B, translated. Beijing: Tsinghua University Press, 2022: 3-28, 249-288(in Chinese). [12] TROMBINI M, SOLARNA D, MOSER G, et al. A goal-driven unsupervised image segmentation method combining graph-based processing and Markov random fields[J]. Pattern Recognition, 2023, 134: 109082. [13] JI Q. 概率图模型及计算机视觉应用[M]. 郭涛, 译. 北京: 机械工业出版社, 2021: 15-38, 107-131.JI Q. Probability graph model and computer vision application[M]. GUO T, translated. Beijing: Mechanical Industry Press, 2021: 15-38, 107-131(in Chinese). [14] 卢印举, 马芳, 戴曙光, 等. 融合多尺度特征的马尔可夫随机场路面裂缝分割算法[J]. 计算机辅助设计与图形学学报, 2022, 34(5): 711-721.LU Y J, MA F, DAI S G, et al. Markov random field road crack image segmentation algorithm integrating multi-scale features[J]. Journal of Computer-Aided Design & Computer Graphics, 2022, 34(5): 711-721(in Chinese). [15] ZHANG P, CAI X Y, SHI J, et al. Feature extraction of fused residual network and single target-assisted vessel image recognition of MRF grayscale information[J]. Mobile Information Systems, 2022, 2022: 1041934. [16] 吕宁, 肖剑, 高健, 等. 基于改进MRF的冲压件轮廓缺陷图像分割算法[J]. 锻压技术, 2022, 47(4): 101-109.LYU N, XIAO J, GAO J, et al. Image segmentation algorithm on contour defects for stamping part based on improved MRF[J]. Forging & Stamping Technology, 2022, 47(4): 101-109(in Chinese). [17] ZHU D C, LI J M, LI H, et al. A less-constrained sclera recognition method based on stem-and-leaf branches network[J]. Pattern Recognition Letters, 2021, 145: 43-49. [18] ZITOUNI M, AFIF M, ZRIBI M. Tweedie hidden Markov random field and the expectation-method of moments and maximisation algorithm for brain MR image segmentation[J]. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 2023, 11(1): 67-79. [19] AZIZ K A A, SARIPAN M I, SAAD F F A, et al. A Markov random field approach for CT image lung classification using image processing[J]. Radiation Physics and Chemistry, 2022, 200: 110440. [20] 崔鹏, 杨海峰, 蔡江辉, 等. 多尺度局部聚类的Kmeans-DETR目标检测方法[J]. 小型微型计算机系统, 2024, 45(5): 1136-1142.CUI P, YANG H F, CAI J H, et al. Multi-scale local clustering method for object detection based on Kmeans-DETR[J]. Journal of Chinese Computer Systems, 2024, 45(5): 1136-1142(in Chinese). [21] RAJPOOT V, DUBEY R, KHAN S S, et al. Orchard boumans algorithm and MRF approach based on full threshold segmentation for dental X-ray images[J]. Traitement Du Signal, 2022, 39(2): 737-744. [22] FILALI H, KALTI K. Image segmentation using MRF model optimized by a hybrid ACO-ICM algorithm[J]. Soft Computing, 2021, 25(15): 10181-10204. [23] RONNEBERGER O, FISCHER P, BROX T . U-Net: convolutional networks for biomedical image segmentation[EB/OL]. (2015-05-18)[2023-06-01]. https://arxiv.org/abs/1505.04597. [24] LI X L, LI Y Y, AI J Q, et al. Semantic segmentation of UAV remote sensing images based on edge feature fusing and multi-level upsampling integrated with DeepLabv3[J]. PLoS One, 2023, 18(1): e0279097. -