Rail multi-defect cascade detection and positioning visualization method based on ultrasonic signals
Patent Information
- Application Number
- CN202611090467.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-22
AI Technical Summary
[0003]鉴于此,本发明的主要目的在于提供基于超声波信号的钢轨多缺陷级联检测与定位可视化方法,以解决现有钢轨缺陷检测方法在多类缺陷混叠工况下漏检率高、核伤等高风险缺陷易漏报、检测结果缺乏认知不确定性度量以及缺陷定位与可视化不直观的问题
[0014]采用以上技术方案,本发明产生了以下有益效果:其一,采用二分类门控网络快速筛查与多类别分类网络精细判别的级联架构,仅对疑似缺陷片段执行精细判别,在保证识别能力的同时降低整体运算开销,便于在嵌入式探伤设备上实时运行;其二,在特征图之上附加跨通道相干性虚拟通道,并融合多通道统计特征,有助于区分多通道同向响应的真实缺陷与单通道孤立伪反射,提升缺陷识别的准确性;其三,借助证据深度学习输出认知不确定性指标,并在满足联合触发条件时启动核伤补救门控复核流程,对高风险核伤依据物理可观测特征二次确认,降低核伤漏报;其四,以全局最优分配方式对候选框二次筛选,兼顾归属置信程度与拟合质量,提升缺陷定位精度;其五,输出结构化告警信息与缺陷可视化图像,兼顾机器读取与人工复核,提升检测结果的可解释性与实用性。
Smart Images

Figure CN122591824B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ultrasonic technology, specifically relating to a method for cascade detection and visualization of multiple defects in rails based on ultrasonic signals. Background Technology
[0002] Under long-term dynamic loads from trains and environmental factors, rails are prone to developing core damage, bolt hole cracks, and other types of cracks. Among these, core damage, located inside the rail head, is insidious in its development and poses a serious threat, being one of the main causes of rail breaks. Ultrasonic testing, which uses multi-angle transducers to emit ultrasonic waves into the rail body and receive the echoes, converts the reflected echoes from different channels into damage point data with mileage, depth, and reflection intensity, exporting it as text. This is currently the mainstream method for in-service rail inspection. However, relying on manual segment-by-segment interpretation of flaw detection data is inefficient and highly subjective, making it difficult to avoid missed detections and misjudgments on long lines. Threshold-based or traditional machine learning-based discrimination methods rely on manually designed features, are insufficiently adaptable to conditions with multiple types of defects overlapping, and have scarce core damage samples, easily being overwhelmed by other strongly reflective defects and missed. Conventional depth detection methods often directly regress defect boxes from single-frame images, failing to integrate coherent information from multi-channel reflections. This makes it difficult to distinguish between genuine strong defects and single-channel pseudo-reflections, and the fitting of detection boxes for adjacent defects is not accurate enough. Furthermore, they lack cognitive uncertainty measures for the confidence level of the judgment results and lack structured alarms and intuitive visualizations for on-site applications, making it difficult to meet the actual needs of rail defect detection in terms of accuracy, interpretability, and positioning precision. Summary of the Invention
[0003] Therefore, the main objective of this invention is to provide a method for cascade detection and visualization of multiple defects in rails based on ultrasonic signals, in order to solve the problems of high false negative rate, easy underreporting of high-risk defects such as nuclear damage, lack of cognitive uncertainty measurement in detection results, and unintuitive defect location and visualization in existing rail defect detection methods.
[0004] The technical solution adopted in this invention is as follows: The method for cascade detection and visualization of multiple defects in rails based on ultrasonic signals includes the following three steps: Step 1: Parse the text-formatted inspection data exported by the ultrasonic flaw detection equipment for rails, and construct feature maps, statistical features, and cross-channel coherence virtual channels; Step 2: The current window segment is screened through a binary classification gating network to obtain suspected defective segments; the evidence deep learning output layer of a multi-class classification network outputs four evidence values for the suspected defective segments, corresponding to the nuclear damage category, screw hole crack category, other crack category, and normal category; the four evidence values determine four attribution strength values and a cognitive uncertainty index; when the cognitive uncertainty index and the nuclear damage category attribution strength value simultaneously meet the joint triggering condition, the nuclear damage remediation gating review process is initiated to determine the final category of the suspected defective segment; Step 3: Generate a set of candidate boxes for suspected defect segments belonging to the final defect category using a defect detector; construct an allocation cost matrix using the set of damage points within the suspected defect segments and the candidate box set; under two set marginal constraints, minimize the allocation share matrix by adding the sum of the products of the allocation share matrix and the allocation cost matrix to the entropy regularization term; for each candidate box, calculate the corresponding average allocation cost based on the allocation share matrix, and divide the candidate box's belonging strength value by the corresponding average allocation cost to obtain the selection score; select the candidate box with the highest selection score as the optimal original coordinate box, convert it into an image display coordinate box through coordinate mapping, and output alarm information and defect visualization image.
[0005] Furthermore, in step 1, after parsing the text-formatted detection data, multi-channel damage point information, window parameter information, and mileage information are obtained. Each damage point records four data items: the channel number of the physical channel it belongs to, the vertical mileage position, the horizontal depth position, and the reflection intensity value. The feature map uses the vertical mileage position as the horizontal axis and the horizontal depth position as the vertical axis. Each physical channel damage point is projected onto the corresponding feature channel layer. The vertical mileage position is discretized into pixel horizontal coordinates according to the set mileage resolution, and the horizontal depth position is discretized into pixel vertical coordinates according to the set depth resolution. When multiple damage points are mapped to the same pixel position, the value of this pixel position is the maximum value among the reflection intensity values of these damage points.
[0006] Furthermore, in step 1, the statistical features output four values for each physical channel within the current window segment: damage point density, mean reflection intensity, variance of reflection intensity, and longitudinal continuity. The damage point density is calculated by dividing the total number of damage points in the corresponding physical channel by the area of the current window segment. The mean reflection intensity is the arithmetic mean of the reflection intensity values of all damage points in the corresponding physical channel. The variance of reflection intensity is the arithmetic mean of the squares of the differences between the reflection intensity values of each damage point in the corresponding physical channel and the mean reflection intensity. The longitudinal continuity is the total length of a continuous segment in the corresponding physical channel where damage points exist at adjacent mileage positions. The degree is divided by the vertical length of the current window segment; the cross-channel coherence virtual channel is an independent channel layer attached to the feature map. The value of each pixel position is determined as follows: the numerator is the absolute value of the sum of the reflection intensity values of this pixel position in each physical channel, the denominator is the square root of the sum of the squares of the reflection intensity values of this pixel position in each physical channel multiplied by the square root of the number of physical channels, and then a set small positive number to prevent zeroing is added. The smaller value between the quotient obtained by dividing the numerator by the denominator and 1 is taken as the value of this pixel position; when the reflection intensity values of all physical channels are equal to 0, the value of this pixel position is set to 0.
[0007] Furthermore, in step 2, the binary classification gating network takes feature maps, statistical features, and cross-channel coherence virtual channels as inputs and outputs two binary classification attribution strength values for the current window segment, corresponding to the defect state and the normal state respectively. When the binary classification attribution strength value of the defect state is greater than that of the normal state, the current window segment is determined to be a suspected defect segment. The multi-class classification network includes a backbone encoder and an evidence deep learning output layer. The backbone encoder includes a convolutional feature extraction module, a channel attention module, and a spatial attention module. After encoding the feature map, statistical features, and cross-channel coherence virtual channels of the suspected defect segment, it outputs an encoding vector. The nuclear injury category spatial attention activation map of the suspected defect segment is generated as follows: the spatial attention feature map with multiple channel components output by the spatial attention module is taken. For each channel component of the spatial attention feature map, the parameter value corresponding to this channel component in the parameter vector of the linear mapping layer of the evidence deep learning output layer is multiplied element by element to obtain the corresponding nuclear injury category response map. The response maps of each nuclear injury category are accumulated along the channel dimension, and the accumulated result is used as the nuclear injury category spatial attention activation map of the suspected defect segment.
[0008] Furthermore, the evidence deep learning output layer transforms the encoding vector through a linear mapping layer and a Softplus activation function, outputting four evidence values that fall within the range of zero to positive infinity. Each of the four evidence values is incremented by 1 to obtain four Dirichlet intensity parameters, corresponding to the nuclear damage category, the screw hole crack category, the other crack category, and the normal category, respectively. The sum of the four Dirichlet intensity parameters yields the total intensity of the suspected defect fragment. The evidence value corresponding to each category is divided by the total intensity, and the quotient is used as the intensity value of the suspected defect fragment belonging to this category. The number of categories, 4, is divided by the total intensity, and the quotient is used as the cognitive uncertainty index of the suspected defect fragment.
[0009] Furthermore, the joint triggering condition is as follows: the cognitive uncertainty index is greater than the set uncertainty triggering threshold, and the attribution strength value of the suspected defective fragment in the nuclear damage category is greater than the set nuclear damage triggering threshold. When the joint triggering condition is met, the suspected defective fragment is determined as a candidate for nuclear damage hard positive sample and enters the review process of nuclear damage remediation gating. In other cases, the category corresponding to the maximum value among the four attribution strength values is taken as the final category of the suspected defective fragment. The review process of nuclear damage remediation gating is as follows: three review values are extracted for the nuclear damage hard positive sample candidate, in the following order: the cross-channel coherence virtual channel. The criteria for determining the nuclear injury category include: the maximum coherence metric, the vertical continuity metric in the statistical features, and the percentage of contiguous patches on the nuclear injury category spatial attention activation map. A range for nuclear injury coherence, a range for nuclear injury continuity, and a threshold for the percentage of contiguous patches in nuclear injury attention are set. If the maximum coherence metric falls within the nuclear injury coherence range, the vertical continuity metric falls within the nuclear injury continuity range, and the percentage of contiguous patches is greater than the threshold for the percentage of contiguous patches in nuclear injury attention, the final candidate category for a hard positive nuclear injury sample is changed to the nuclear injury category. In other cases, the final candidate category for a hard positive nuclear injury sample is the category corresponding to the maximum value among the four attribution strength values.
[0010] Furthermore, in step 2, for suspected defect segments whose final category is screw hole crack, based on the longitudinal position distribution of the damage points within the suspected defect segment relative to the screw hole location feature points, a subdivision label for cracks above or below the screw hole is output; the screw hole location feature points are determined as follows: when the text-formatted detection data contains a screw hole marker field, the screw hole location feature points are obtained from the screw hole marker field; when the text-formatted detection data does not provide a screw hole marker field, the center position of the cluster of damage points with the highest reflection intensity value within the suspected defect segment is taken as the screw hole location feature point.
[0011] Furthermore, in step 3, when the final category of the suspected defective segment is normal, the alarm output and visualization output of the suspected defective segment are suppressed; when the final category is nuclear damage, screw hole crack, or other crack categories, the suspected defective segment enters the defect detector's localization process, using the final category as the segment category label for each damage point within the suspected defective segment; each candidate box output by the defect detector records four data items, namely, the longitudinal start and end position interval, the lateral depth position interval, the candidate box category, and the candidate box intensity value in the original ultrasonic coordinate system; the damage point set consists of all damage points within the suspected defective segment; each row of the cost matrix corresponds to one damage point in the damage point set, and each column corresponds to the candidate box set. For each candidate box, the allocation cost between the damaged point in the row and the candidate box in the column is taken. The allocation cost is obtained by summing three normalized cost components: the first normalized cost component is the smaller of the quotient of the absolute value of the distance between the vertical mileage position of the corresponding damaged point and the center point of the vertical start and end position interval of the corresponding candidate box divided by the vertical length of the current window segment and 1; the second normalized cost component is the smaller of the quotient of the absolute value of the distance between the horizontal depth position of the corresponding damaged point and the center point of the horizontal depth position interval of the corresponding candidate box divided by the depth range length of the current window segment and 1; the third normalized cost component is the category consistency cost, which is 0 when the category label of the corresponding damaged point fragment is the same as the category of the corresponding candidate box, and 1 when they are different.
[0012] Furthermore, the allocation share matrix and the allocation cost matrix have the same number of rows and columns. Each element of the allocation share matrix represents the share allocated from the corresponding damaged point in the row to the corresponding candidate box in the column. The two marginal constraints are as follows: The first marginal constraint is that the sum of the elements in each row of the allocation share matrix equals the reflection intensity value of the corresponding damaged point in that row divided by the sum of the reflection intensity values of all damaged points in the damaged point set; the second marginal constraint is that the sum of the elements in each column of the allocation share matrix equals the belonging intensity value of the corresponding candidate box in that column divided by the sum of the belonging intensity values of all candidate boxes in the candidate box set; when the sum of the reflection intensity values of all damaged points in the damaged point set is equal to 0, the target value of the first marginal constraint is the reciprocal of the total number of damaged points; when the sum of the belonging intensity values of all candidate boxes in the candidate box set is equal to 0, the target value of the second marginal constraint is the reciprocal of the total number of candidate boxes. When the number of candidate boxes in the candidate box set is equal to 0, the solution process is skipped, and the outer rectangle of the set of damaged points in the suspected defect segment under the original ultrasonic coordinate system is used as the backup original coordinate box. The backup original coordinate box is output as the optimal original coordinate box. The entropy regularization term is the sum of the products of the set entropy regularization parameter and each element of the allocation share matrix and its natural logarithm. The allocation share matrix is solved by the Sinkhorn iteration method: each element of the kernel matrix is obtained by taking the negative number of the corresponding element of the allocation cost matrix, dividing it by the entropy regularization parameter, and then taking the natural exponent. The kernel matrix is used as the initialization matrix. In each iteration, each row is normalized according to the first marginal constraint, and then each column is normalized according to the second marginal constraint. The iteration stops when the maximum change of each element in two adjacent iterations is less than the set convergence threshold, and the final allocation share matrix is obtained.
[0013] Furthermore, for each candidate box, the selection score is calculated in two steps: Step 1, the average allocation cost is the sum of the products of each element in the corresponding column of the final allocation share matrix and the corresponding element in the allocation cost matrix, divided by the sum of the sum of each element in the corresponding column of the final allocation share matrix and the set small positive number for zero prevention and removal; Step 2, the selection score is the candidate box's belonging strength value divided by the average allocation cost and the set small positive number for zero prevention and removal; The optimal original coordinate box is converted into an image display coordinate box according to the preset mapping relationship between the original ultrasonic coordinate system and the image display coordinate system. The image display coordinate box is superimposed on the defect visualization image in the form of a rectangle, and the final category label of the suspected defect segment is attached to the side of the rectangle; For suspected defect segments whose final category is screw hole crack, the subdivision label of crack above screw hole or crack below screw hole is attached to the side of the rectangle; The final category label, subdivision label and image display coordinate box together constitute the alarm information and defect visualization image and are output.
[0014] By adopting the above technical solutions, this invention achieves the following beneficial effects: First, by employing a cascaded architecture of rapid screening using a binary classification gating network and refined discrimination using a multi-class classification network, refined discrimination is performed only on suspected defect segments, reducing overall computational overhead while ensuring recognition capabilities, facilitating real-time operation on embedded flaw detection equipment; Second, by adding a cross-channel coherence virtual channel on top of the feature map and fusing multi-channel statistical features, it helps distinguish between real defects with multi-channel co-directional responses and isolated pseudo-reflections in a single channel, improving the accuracy of defect identification; Third, by leveraging evidence-based deep learning to output cognitive uncertainty indicators and initiating a flaw remediation gating review process when joint triggering conditions are met, high-risk flaws are reconfirmed based on physically observable features, reducing false negatives; Fourth, by using a globally optimal allocation method to perform secondary screening of candidate boxes, balancing the confidence level of attribution and the quality of fitting, improving the accuracy of defect localization; Fifth, by outputting structured alarm information and visual defect images, balancing machine reading and manual review, improving the interpretability and practicality of the detection results. Attached Figure Description
[0015] Figure 1 This is a schematic diagram illustrating the relationship between the cross-channel coherence value and the number of non-zero channels at the current pixel position, as provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating how the evidence deep learning output layer, provided in an embodiment of the present invention, converts evidence values into attribution strength values and cognitive uncertainty indicators. Figure 3 A schematic diagram of the determination region on the numerical plane of cognitive uncertainty index and nuclear injury category attribution intensity for the joint triggering conditions provided in the embodiments of the present invention; Figure 4 A schematic diagram of the convergence curves for solving the allocation share matrix using the Sinkhorn iterative method under different entropy regularization parameters provided in this embodiment of the invention; Figure 5 This is a geometrical diagram illustrating the mismatch between the vertical and horizontal depth positions of the damaged points and the candidate boxes in the allocation cost matrix provided in an embodiment of the present invention. Detailed Implementation
[0016] The method for cascade detection and location visualization of multiple defects in rails based on ultrasonic signals includes the following three steps: Step 1: Parse the text-formatted inspection data exported by the ultrasonic flaw detection equipment for rails, and construct feature maps, statistical features, and cross-channel coherence virtual channels; Step 2: The current window segment is screened through a binary classification gating network to obtain suspected defective segments; the evidence deep learning output layer of a multi-class classification network outputs four evidence values for the suspected defective segments, corresponding to the nuclear damage category, screw hole crack category, other crack category, and normal category; the four evidence values determine four attribution strength values and a cognitive uncertainty index; when the cognitive uncertainty index and the nuclear damage category attribution strength value simultaneously meet the joint triggering condition, the nuclear damage remediation gating review process is initiated to determine the final category of the suspected defective segment; Step 3: Generate a set of candidate boxes for suspected defect segments belonging to the final defect category using a defect detector; construct an allocation cost matrix using the set of damage points within the suspected defect segments and the candidate box set; under two set marginal constraints, minimize the allocation share matrix by adding the sum of the products of the allocation share matrix and the allocation cost matrix to the entropy regularization term; for each candidate box, calculate the corresponding average allocation cost based on the allocation share matrix, and divide the candidate box's belonging strength value by the corresponding average allocation cost to obtain the selection score; select the candidate box with the highest selection score as the optimal original coordinate box, convert it into an image display coordinate box through coordinate mapping, and output alarm information and defect visualization image.
[0017] Ultrasonic flaw detection equipment for rails generally refers to rail inspection equipment equipped with multi-channel ultrasonic probe groups. Each physical channel within the equipment corresponds to a set of ultrasonic transducers with a specific incident angle. Common configurations include 0° channels, 37° channels, and 70° channels. Transducers with different incident angles exhibit differentiated response characteristics to nuclear flaws, bolt hole cracks, and other cracks. During continuous movement along the rail, the internal signal processing unit performs threshold discrimination on the raw ultrasonic echoes, extracting reflection points exceeding the threshold as damage points. These points are then organized sequentially according to timestamps and mileage codes, and finally exported as a test file in text format. In a typical deployment, the total number of physical channels... , This indicates the total number of physical channels equipped by the current ultrasonic flaw detection equipment for rails. This value can be adjusted according to the equipment model. The number of physical channels on the inspection vehicle used on some high-speed lines can reach 12 or even more.
[0018] The text-formatted detection data is a multi-column text file organized by rows, typically with the extension .txt or .csv, and field separators are tabs or commas. The file header contains several rows of header information, recording metadata such as the detection start mileage, detection end mileage, sampling frequency, incident angle parameters for each physical channel, and window length, collectively constituting window parameter information and mileage information. Each row in the file body corresponds to a damage point, with fields including channel number, vertical mileage position, horizontal depth position, and reflection intensity value. The text-formatted detection data is parsed line by line, skipping the header section, then splitting each row into fields by separators. The channel number is converted to an integer, and the vertical mileage position and horizontal depth position are converted to floating-point numbers (in millimeters). The reflection intensity value is typically normalized to a certain value. The logarithmic decibel value of the numerical range. In another implementation, the reflection intensity value is directly provided by the rail ultrasonic flaw detection equipment in raw voltage dimensions, and then normalized according to the equipment calibration curve. The analysis process simultaneously performs field missing value checks, outlier removal, and unit normalization. Outlier removal uses a hard truncation method based on reasonable upper and lower limits of physical dimensions; for example, the longitudinal mileage position must fall within the current detection mileage range, and the lateral depth position must fall within... Records outside the millimeter range are considered abnormal and discarded.
[0019] The length of rails obtained through continuous testing can reach tens or even hundreds of kilometers, making direct processing of the entire section of testing data impractical in engineering. The current window segment is a fixed-length data segment extracted along the longitudinal mileage direction. In one feasible implementation, the longitudinal length of the current window segment... The value is set to 10 meters, and the overlapping sliding is performed with an adjacent window segment step size of 5 meters. This ensures that the probability of the defect point being located in the center or near the center of the window is guaranteed, while also controlling the data redundancy between adjacent window segments. Selectable values also include 5 meters, 20 meters, or 25 meters or 100 meters (aligned with the standard rail length), depending on the longitudinal dimension of the defect to be identified and computational resource constraints. The lateral depth range of the current window segment generally covers the entire rail cross-sectional depth, denoted as... The typical value is 200 mm. Each current window segment corresponds to a complete set of multi-channel damage point information, as well as corresponding window parameter information and mileage information. The subsequent construction of feature maps, statistical features, and cross-channel coherence virtual channels are all performed for the current window segment.
[0020] Let the mileage resolution be millimeters per pixel, depth resolution is millimeters per pixel, in a typical implementation millimeters / pixel mm / pixel, the overall shape of the feature map corresponding to the current window segment is The corresponding parameter values are as follows: ,in This indicates a floor operation, rounding down to the nearest integer, which is the largest integer not exceeding the value within the parentheses. Each physical channel corresponds to a feature channel layer in the feature map, and all feature channel layers share the same horizontal and vertical pixel grids, forming an alignment on the tensor structure.
[0021] For each damage point, locate it to the corresponding characteristic channel layer according to the channel number of its physical channel, and determine its longitudinal mileage position. and lateral depth position The pixel coordinates are calculated using the following discretization method: pixel x-coordinate. Pixel ordinate , This represents the x-coordinate of the pixel corresponding to the damage point on the horizontal pixel grid of the feature map. This represents the vertical pixel coordinate of the damage point on the vertical pixel grid of the feature map. The corresponding feature channel layer is located in... The element at the location is updated to the reflection intensity value of the damaged point.
[0022] In actual rail flaw detection operations, multiple damage points may be mapped within the same pixel grid of the same physical channel. When multiple mapped damage points exist at the same pixel location, a strategy is adopted to take the maximum value based on the reflection intensity:
[0023] in Indicates the first Each feature channel layer at pixel location The element value, Represents the physical channel index and , Indicates mapping to the first Pixel positions of each feature channel layer The The reflection intensity value of each damaged point This represents the index of the mapped damage point at the same pixel location. This indicates the operation of taking the maximum value. The pixel position mapped to by the undamaged point is set to 0. The feature map is filled with 0 throughout during the initialization phase, and the reflection intensity value is only written to the pixel position where there is a mapping.
[0024] In an optional implementation, when the dynamic range of the reflection intensity at the damaged point spans several orders of magnitude, with Writing the original reflection intensity value instead of the actual reflection intensity value helps to compress the dynamic range. Represents the common logarithm with base 10; when multiple damage points with extremely uneven reflection intensity coexist at the same pixel location, the 95th percentile value is used instead of the maximum value to suppress interference from single-point abnormal reflections; when the number of physical channels is large (e.g., In the deployment of ), physical channels with adjacent incident angles can be grouped and merged to reduce the number of feature channel layers. The merging method is to select the maximum value of the reflection intensity within the same group.
[0025] Statistical features are calculated independently for each physical channel within the current window segment, outputting four values: damage point density, mean reflection intensity, variance of reflection intensity, and longitudinal continuity. These four values collectively characterize the reflection features of the current window segment on the corresponding physical channel from four different dimensions: distribution, intensity, fluctuation, and morphology. Let the current window segment contain the... A total of physical channels are mapped to One damage point, Indicates the first The total number of damage points in each physical channel within the current window segment; assuming the area of the current window segment... Taking the aforementioned typical values as an example Square millimeters.
[0026] Damage point density value The calculation method is the first The total number of damage points in each physical channel within the current window segment divided by the area of the current window segment:
[0027] It represents the density of reflection points in space.
[0028] Mean reflection intensity The calculation method is the first All physical channels The arithmetic mean of the reflection intensity values of each damaged point:
[0029] Characterizes the overall level of reflectance intensity. Indicates the first Within the first physical channel The reflection intensity value of each damaged point This represents the index of the damage point within the physical channel and .
[0030] Variance of reflection intensity The calculation method is the arithmetic mean of the squares of the differences between each reflection intensity value and the mean reflection intensity:
[0031] It characterizes the degree of dispersion of the reflection intensity values within the same physical channel.
[0032] The longitudinal continuity value reflects the degree of continuous extension of the reflection points along the longitudinal direction of the same physical channel. In the... The feature channel layer is scanned column by column along the vertical pixel grid, recording continuous segments in which all adjacent pixel columns contain non-zero elements. Let the th... The number of pixel columns spanned by each consecutive segment is , For continuous segment index and , Indicates the first The total number of consecutive segments within the current window segment for each physical channel. Vertical continuity value. The calculation method is as follows:
[0033] The value falls within between.
[0034] against The boundary case, i.e., the first No damage points are mapped in the current physical channel within the current window segment. and Set all to 0; The value is naturally 0; since there are no non-zero elements in this case. It is also naturally 0.
[0035] In an optional implementation, Replace it with the total number of damaged points divided by the longitudinal length of the current window segment, i.e., the number of damaged points per meter. This method measures damage points per meter, which is suitable for different engineering measurement preferences. The variance of reflection intensity can be replaced with the standard deviation of reflection intensity. It maintains the same dimension as the average reflection intensity; in determining the longitudinal continuity value, discontinuities spanning 1 to 2 empty pixel columns are still considered continuous to improve robustness to sampling non-uniformity.
[0036] Cross-channel coherence virtual channels are used to characterize the coherence of reflection intensity values between physical channels at the pixel grid level. They are added as an additional independent channel layer to the feature map, allowing subsequent classification stages to directly utilize cross-channel correlation information. The cross-channel coherence virtual channels are perfectly aligned with the corresponding feature channel layers of each physical channel on the pixel grid, resulting in a tensor shape for the entire feature map that... Each channel layer is expanded to One channel layer.
[0037] Cross-channel coherence virtual channel at pixel position element value The calculation is divided into two parts: the numerator and the denominator. Each physical channel is located at the pixel position. The element values on are denoted as follows: Small positive numbers excluding zero are denoted as Typical values .
[0038] molecular For each physical channel at the pixel position The absolute value of the sum of the element values:
[0039] This indicates the operation of taking the absolute value.
[0040] denominator For each physical channel at the pixel position The square root of the sum of the squares of the element values, and the number of physical channels. The product of the square roots, plus the small positive numbers excluding zero. :
[0041] This represents the arithmetic square root operation.
[0042] Cross-channel coherence virtual channel at pixel position element value Take the smaller value between the quotient obtained by dividing the numerator by the denominator and 1:
[0043] This indicates that the smaller value is selected during the operation.
[0044] The geometric meaning of the above calculation method is: to The element values of the physical channels at the same pixel position are considered as 3D real space A vector , Indicates pixel position The corresponding reflection intensity vector, This represents the transpose of a vector; it also takes... Let be a vector in which all components are equal to 1, then we have , , Let L2 be the norm of a vector, which is the square root of the sum of the squares of its components. According to the Cauchy-Schwarz inequality, the absolute value of the inner product of any two vectors is no more than the product of their L2 norms. Therefore, the quotient obtained by dividing the numerator by the denominator must mathematically fall on the inequality. Within the numerical range. Introduced in China The purpose of this operation is to eliminate accumulated errors in floating-point arithmetic and ensure that element values strictly fall within the range required for engineering implementation. Within the numerical range.
[0045] The engineering meaning of the cross-channel coherence virtual channel element value is as follows: when the reflection intensity values of each physical channel at the same pixel location are consistent in direction and approximately the same intensity... A value close to 1 indicates strong coherence and a higher probability of corresponding to a real defect; when only a few physical channels exhibit reflection and the reflection intensity of the remaining channels is close to 0, Significantly lower than 1, close to The magnitude of represents weak coherence, corresponding to a higher probability of single-channel pseudo-reflection; when the reflection intensity values of all physical channels are equal to 0, Strictly set to 0 to avoid ambiguous interpretations of all-zero positions in subsequent stages.
[0046] For the zero boundary case where the reflection intensity values of all physical channels are equal to 0, the molecule denominator The quotient is mathematically equal to 0, requiring no additional logical branch mathematically; however, to ensure clarity and readability in engineering implementation, this situation is explicitly determined and directly expressed in the embodiment. The value is assigned to 0.
[0047] In an optional implementation, prevent the removal of small positive numbers with zero. Available to The value is taken within the range. Another way to construct a cross-channel coherence virtual channel is to use the ratio of the mean to the standard deviation of the reflection intensity values of each physical channel as the coherence measure. However, this method has low sensitivity to the directional consistency between the reflection intensity values of each channel and is not as effective as the normalized summation form in characterizing strong directional consistency defects such as nuclear damage.
[0048] At this point, the current window segment is represented as a shape. Feature map and shape The statistical characteristics. Taking the aforementioned typical parameter values as an example, the shape of the feature map is as follows: The shape of the statistical feature tensor is There are a total of 36 values. These two values together constitute the input for the current window segment to the subsequent binary classification gating network and multi-class classification network. It should be noted that the number of physical channels of the ultrasonic flaw detection equipment for rails described in this specification... Vertical length of the current window segment Horizontal depth range of the current window segment Mileage resolution Depth resolution And prevent zero small positive numbers All parameters are adjustable. In actual deployment, they should be jointly optimized based on the type of rail track (ordinary track, high-speed track, heavy-haul track), the model of the detection equipment, the minimum longitudinal scale of the defect to be identified, and the computing hardware capabilities. A set of feasible value combinations verified in engineering is as follows: , millimeters millimeters millimeters / pixel millimeters / pixel .
[0049] like Figure 1 As shown, the cross-channel coherence value changes with the increase of the number of non-zero channels at the same pixel position in the current window segment. The horizontal axis represents the number of non-zero channels at that pixel position, and the vertical axis represents the corresponding cross-channel coherence value, which falls between 0 and 1. With 9 physical channels, the coherence value is approximately 0.333 when only a single channel has a reflection, corresponding to isolated reflection or pseudo-reflection of a single channel. When all channels are in the same direction and have comparable intensity, the coherence value approaches 1.000, corresponding to a true strong defect with a consistent multi-channel response. The nuclear damage remediation gating uses a nuclear damage coherence range close to 1, which allows for the distinction between true defects and single-channel pseudo-reflections.
[0050] The binary classification gating network, as a pre-screening step in cascaded detection, first removes the parts that are obviously in a normal state from the massive current window segments with a relatively small computational cost, and only sends the current window segments that are screened as suspected defective segments into the multi-class classification network for fine discrimination.
[0051] Binary classification gating networks take feature maps, statistical features, and cross-channel coherence virtual channels as inputs. In a typical deployment, the binary classification gating network employs a lightweight structure of 3 convolutional layers and 2 fully connected layers: the first convolutional layer uses 16... The convolution kernel has a stride of 2; the second convolutional layer uses 32 kernels. The convolution kernel has a stride of 2; the third convolutional layer uses 64 kernels. The convolution kernel has a stride of 2; each convolutional layer is followed by a ReLU activation function and batch normalization. The ReLU activation function is defined as follows: ,in This represents the input value of the activation function. This indicates the operation of taking the larger value. Three convolutional layers followed by one global average pooling operation yields a 64-dimensional feature vector; the statistical features are then flattened to obtain... The vector, taking the aforementioned typical parameter values as an example, is 36-dimensional; the two are concatenated and fed into two fully connected layers, with the intermediate layer having a dimension of 32 and the output layer having a dimension of 2. The overall parameter count of the binary classification gating network is controlled within 100,000, enabling real-time screening of hundreds of current window segments per second on an embedded platform.
[0052] The output of the binary classification gating network is two binary classification attribution strength values, denoted as follows: and , This represents the binary classification strength value indicating whether the current window segment belongs to the defect state. This represents the binary classification strength value indicating whether the current window segment belongs to the normal state. The sum of both values is always equal to 1. It is obtained by applying Softmax normalization to the output of the last layer of the two fully connected layers. Softmax normalization is defined as... , Represents the input vector. Represents the first input vector. One portion, represents the natural constant. When At that time, that is If the current window segment is deemed a suspected defective segment, it will be sent to the multi-class classification network; otherwise, it will be considered a normal state and no further processing will be performed.
[0053] During the training phase of the binary classification gating network, binary labels of "containing defects" and "not containing defects" are used in the labeled dataset, and the standard binary cross-entropy loss function is selected. Considering that the number of normal window segments is much greater than that of defective window segments, the loss terms of the two classes of samples in the loss function are reweighted during training. For example, the loss term of defective samples is multiplied by a coefficient proportional to the inverse of the sample proportion, or normal window segments are undersampled and defective window segments are oversampled at the data level. The decision threshold of the binary classification gating network can be lowered from the default 0.5 to 0.3 or even 0.2 to increase the recall rate. The specific reduction range is determined by combining the recall rate on the field-calibrated dataset and the computing power budget.
[0054] Suspected defect fragments identified through the binary classification gating network are fed into a multi-class classification network. The multi-class classification network consists of a backbone encoder and an evidence deep learning output layer connected in series. The backbone encoder encodes the feature map, statistical features, and cross-channel coherence virtual channel of the suspected defect fragments, outputting an encoding vector. The evidence deep learning output layer maps the encoding vector to four evidence values, corresponding to the nuclear damage category, screw hole crack category, other crack category, and normal category, respectively.
[0055] The backbone encoder internally comprises three cascaded processing modules: a convolutional feature extraction module, a channel attention module, and a spatial attention module. The convolutional feature extraction module employs a standard structure with four convolutional layers and max pooling, with a uniform kernel size. The number of channels is 32, 64, 128, and 256 respectively. Each convolutional layer is followed by a ReLU activation function and batch normalization. One insertion is performed after every two convolutional layers. Max pooling is used for spatial downsampling. The shape of the aforementioned typical feature map is used. For example, the output tensor of the convolutional feature extraction module is denoted as... , This represents the output feature tensor of the convolutional feature extraction module. 256 represents the number of output channels, and 250 and 12 correspond to the number of spatial dimensions in the vertical and horizontal directions, respectively. It represents the set of real numbers.
[0056] In the specific calculations of the channel attention module, for Performing global average pooling along the spatial dimension yields 3D channel descriptor ; The channel weight vector is generated by passing through two fully connected layers (with a middle dimension of 16, ReLU activation function, and Sigmoid activation function in the output layer). The Sigmoid activation function is defined as follows: , The input values of the activation function are represented by the channel weight vector and... Multiplying each channel along the channel dimension yields the channel-attention-modulated feature tensor. , Indicates the channel descriptor. Represents the channel weight vector. This represents the feature tensor modulated by the channel attention module.
[0057] In the specific calculations of the spatial attention module, for Taking the maximum and average values along the channel dimension respectively, we obtain two images with the following shapes. The feature maps are stitched together according to the channel dimension to form a shape. The tensor; this tensor passes through 1 layer Convolution combined with Sigmoid activation results in an output shape of... Spatial weight map; spatial weight map and Pixel-wise multiplication along the spatial dimension yields the feature tensor modulated by the spatial attention module. , This is the spatial attention feature map, which has 256 channel components.
[0058] Spatial attention feature map Performing global average pooling along the spatial dimension yields a 256-dimensional vector, which is then compared with the vector obtained by flattening statistical features. 128-dimensional vector concatenation, followed by two fully connected layers (intermediate dimension 128, output dimension 128). , (Taking 64) yields the encoded vector. , This represents the encoded vector that is finally output by the backbone encoder. This represents the dimension of the encoded vector.
[0059] The output layer of evidence deep learning will encode vectors The data is further mapped to four evidence values, consisting of a linear mapping layer concatenated with a Softplus activation function. The parameters of the linear mapping layer are represented as a weight matrix. With bias vector , and All of them learn through backpropagation during the training phase. The The row corresponds to the first The parameter vectors of each category are denoted as . ,Right now , This represents the transpose of a vector. This indicates that the linear mapping layer corresponds to the first... The parameter vectors of each category, The four categories, in order, are: nuclear damage, screw hole crack, other cracks, and normal. (Output of the linear mapping layer) Calculate as follows:
[0060] This represents the output vector of the linear mapping layer. The Softplus activation function is defined as follows: , Represents the natural logarithm. Evidence value. Obtained in the following manner:
[0061] Indicates the first Evidence values corresponding to each category Represents the output vector of the linear mapping layer The first in Each component. Softplus is strictly greater than 0 and continuously differentiable throughout the entire real number field, making the evidence value... It exhibits good gradient backpropagation properties within the numerical range, avoiding getting stuck in the dead zone during training; at the same time, Softplus... When the value is large, the growth tends to be linear. When the value is small, it tends to 0 but is strictly greater than 0, making the evidence value easier to control in terms of magnitude and avoiding the dual risks of numerical overflow and gradient vanishing.
[0062] 4 evidence points were obtained. Subsequently, four Dirichlet intensity parameters are derived through the standard parameterization of the Dirichlet distribution:
[0063] Indicates the first The Dirichlet intensity parameters corresponding to each category. The Dirichlet distribution, as the conjugate prior of the multinomial distribution, requires its probability density function parameters to be strictly greater than 0; using... The method ensures , and make hour This corresponds to a uniformly distributed prior state of "no evidence," which is semantically consistent with "regressing to the prior when no beliefs have been accumulated" in Subjective Logic theory.
[0064] The total intensity of the suspected defect segment is obtained by summing the four Dirichlet intensity parameters. :
[0065] This represents the total intensity of the suspected defective segment, reflecting the total amount of evidence accumulated by the multi-class classification network for the suspected defective segment.
[0066] Evidence value for each category Divide by total strength The resulting quotient is used as the numerical value of the attribution strength of the suspected defective segment in that category. :
[0067] This indicates that the suspected defective segment is in the first... The strength of belonging to each category. (Strength of belonging value) Within the Subjective Logic framework, corresponding to "belief quality," a quantitative characterization of multi-class classification networks determines that suspected defective segments indeed belong to the first category. The degree of belief in each category.
[0068] Number of categories 4 divided by total strength The resulting quotient serves as an indicator of cognitive uncertainty for suspected defective segments. :
[0069] This represents an index of cognitive uncertainty regarding suspected defective segments. Based on the definition, the following identity can be directly verified:
[0070] That is, the sum of the four attribution strength values and the cognitive uncertainty index is always equal to 1, together constituting a complete "subjective judgment" of the category to which the suspected defective segment belongs. In engineering practice, this transformation is specifically manifested as follows: when a multi-class classification network has strong discriminative power for suspected defective segments, a certain... Significantly large, corresponding big, big, Approaching 1, Approaching 0; conversely, when a multi-class classification network lacks criteria for identifying suspected defective segments, 4 They are all relatively small. Approaching 4, all Both are close to 0. Approaching 1. Cognitive uncertainty index Therefore, it can quantitatively characterize the extent to which the network lacks understanding of the samples.
[0071] like Figure 2 As shown, the evidence deep learning output layer converts the four evidence values obtained from the encoding vector transformation into Dirichlet strength parameters, category-specific strength values, and a cognitive uncertainty index. These four evidence values correspond to the nuclear damage category, the screw hole crack category, the other crack category, and the normal category, respectively. Each evidence value is incremented by 1 to obtain the corresponding Dirichlet strength parameter, and the sum of all strength parameters yields the total strength. The category-specific strength value is the corresponding evidence value divided by the total strength, and the cognitive uncertainty index is the number of categories (4) divided by the total strength. The sum of the four category-specific strength values and the cognitive uncertainty index is always equal to 1. A smaller evidence value results in a lower total strength and a higher cognitive uncertainty index.
[0072] The loss function for the output layer of evidence-based deep learning during the training phase takes the following form:
[0073] This represents the total loss of the evidence-based deep learning; This represents the first element in the one-hot encoded label vector of the true category. There are 1 component, meaning the component corresponding to the true category is 1 and the other 3 components are 0; This represents the derivative of the Digamma function, which is the logarithmic Gamma function; The weighted coefficients of the Kullback-Leibler divergence term are typical in training scheduling. Incrementing linearly from 0 to 1; This represents the modified Dirichlet intensity parameter vector obtained by setting the true class-corresponding component of the four Dirichlet intensity parameters to 1 while keeping the other three components unchanged. Represents the Dirichlet distribution; This represents a vector in which all components are equal to 1. This represents the Kullback-Leibler divergence between two distributions. This represents the distribution separator within the divergence operator. The first term of the loss function encourages the network to accumulate more evidence on the true classes, while the second term penalizes the network for accumulating evidence on the false classes, thus prompting... By regressing to a uniform distribution, compared to traditional cross-entropy, this loss function explicitly constrains the reasonable distribution of cognitive uncertainty indicators, enabling the network to proactively provide high values for samples with insufficient training data coverage. Output the results, rather than forcibly assigning a high-confidence category.
[0074] Each suspected defective segment, after being processed by the evidence deep learning output layer of a multi-class classification network, yields four attribution strength values. With 1 cognitive uncertainty indicator There are a total of 5 values.
[0075] Next, we proceed to the judgment stage of the joint triggering condition. In the rail defect classification system, core damage is the most severe form of internal rail defect. Once it expands, it may cause major traffic safety accidents such as rail fracture. The tolerance for missed core damage detection in engineering is extremely low. However, as a relatively rare category, core damage often has insufficient sample coverage in labeled datasets. Multi-class classification networks may encounter a boundary situation where "the model identifies suspected core damage but with low confidence" for some core damage whose morphology slightly deviates from the training distribution. In this case, the model has a significant bias towards the core damage category and also expresses significant cognitive uncertainty. If the category corresponding to the maximum value among the four attribution intensity values is directly used as the final category, such boundary samples are very likely to be incorrectly classified into other crack categories or other categories because the attribution intensity value of the core damage category is not absolutely dominant, resulting in missed core damage detection. To compensate for this boundary situation, a joint triggering condition is introduced: the cognitive uncertainty index. Greater than the set uncertainty trigger threshold Furthermore, the numerical strength of the suspected defective fragment's attribution to the nuclear damage category. Greater than the set nuclear damage trigger threshold ,Right now
[0076] This represents the uncertainty trigger threshold, typically set to 0.3 in this example. This represents the nuclear damage trigger threshold, typically set to 0.2 in the examples. This represents the numerical strength of the suspected defective fragment's attribution to the nuclear damage category. Index 1 corresponds to the nuclear damage category in the aforementioned order. When both conditions are met, the joint triggering condition is considered met, and the suspected defective fragment is determined as a candidate for a hard positive nuclear damage sample and enters the review process of the nuclear damage remediation gating. When either of the two conditions is not met, the category corresponding to the maximum value among the four attribution strength values of the suspected defective fragment is directly taken as the final category of the suspected defective fragment.
[0077] like Figure 3 As shown, the joint triggering condition divides the judgment region on a plane with the nuclear damage category attribution strength value as the horizontal axis and the cognitive uncertainty index as the vertical axis. The horizontal dashed line corresponds to the nuclear damage triggering threshold, and the vertical dashed line corresponds to the uncertainty triggering threshold. When the cognitive uncertainty index is greater than the uncertainty triggering threshold and the nuclear damage category attribution strength value is greater than the nuclear damage triggering threshold, the suspected defect fragment falls into the joint triggering region, is judged as a nuclear damage hard positive sample candidate, and enters the nuclear damage remediation gating review process; when it falls outside this region, the category corresponding to the maximum value among the four attribution strength values is directly taken as the final category.
[0078] and The specific values are jointly optimized based on the field calibration dataset: scanning on the calibration dataset. For each combination, the nuclear defect recall rate and the remediation gating activation rate are calculated. The combination with the highest nuclear defect recall rate and the highest remediation gating activation rate is selected.
[0079] The review process for nuclear damage remediation gating involves introducing a "physically observable prior" that complements the multi-class classification network to conduct secondary confirmation of nuclear damage hard positive sample candidates.
[0080] The review process for nuclear damage remediation gating specifically includes the extraction of three review values and the simultaneous determination of three conditions.
[0081] The first verification value is the maximum coherence metric value of the nuclear damage hard positive sample candidate on the cross-channel coherence virtual channel. The element values of the window segment corresponding to the candidate nuclear-damaged hard positive sample are scanned within the corresponding region of the cross-channel coherence virtual channel, and the maximum value is taken.
[0082] This represents the maximum coherence metric value; This represents the set of pixel coordinates within the corresponding region of a candidate nuclear-damaged hard positive sample on a cross-channel coherence virtual channel; Indicates the cross-channel coherence virtual channel in pixel coordinates The element value at that position; Indicates in set Internal Maximum value operation.
[0083] The second verification value is the longitudinal continuity value of the nuclear damage hard positive sample candidates in the statistical characteristics. . Extracted from statistical features, specifically taking the longitudinal continuity values of each physical channel. The maximum value in, i.e.
[0084] This represents the vertical continuity value of nuclear damage hard positive sample candidates in the statistical features; Indicates the first The longitudinal continuity value of each physical channel is defined by the description of statistical characteristics in step 1; This represents the physical channel index. It takes the maximum value of the vertical continuity values for each physical channel. The third verification value is the percentage of contiguous samples among the nuclear injury hard positive candidate samples on the nuclear injury category spatial attention activation map. Generate the percentage of contiguous areas Previously, it was necessary to first generate a spatial attention activation map of nuclear damage categories for suspected defective fragments.
[0085] The generation method of the spatial attention activation map for nuclear damage categories is as follows. Spatial attention feature map. It has 256 channel components, and the parameter vector corresponding to the nuclear damage category in the linear mapping layer of the evidence deep learning output layer. Dimensions The two dimensions are not directly aligned; the backbone encoder internally... arrive The process also involves one global average pooling and two fully connected layers for dimensionality reduction. To construct a clear mapping from the spatial attention feature map to the nuclear injury category response map, the embodiment equivalently merges the two fully connected layers after global average pooling of the backbone encoder with the linear mapping layer in the evidence deep learning output layer. Specifically, these three linear transformations can be mathematically equivalently merged into one overall linear transformation that directly maps from 256 dimensions to 4 dimensions. The parameter vector corresponding to the nuclear injury category in the merged linear transformation is denoted as... , This represents the parameter vector corresponding to the nuclear damage category in the merged linear transformation. The Each component is denoted as , Indicates the channel component index and , and The Each channel component has a one-to-one semantic correspondence.
[0086] For each channel component of the spatial attention feature map, the parameter vector corresponding to the nuclear damage category in the merged linear transformation. The parameter values corresponding to this channel component are multiplied element-wise to obtain the nuclear damage category response map corresponding to this channel component. The spatial attention feature map... Each channel component is denoted as The corresponding nuclear damage category response diagram Obtained in the following manner:
[0087] The first spatial attention feature map One channel component; Indicates the first Response diagram of nuclear damage category corresponding to each channel component; Represents the response diagram of nuclear damage categories In pixel coordinates The element value at that position; The first spatial attention feature map Each channel component at pixel coordinates The element value at that position; Represents the vertical coordinate of a pixel and ; Represents the horizontal coordinate of a pixel and .
[0088] The nuclear damage category response maps corresponding to each channel component are accumulated along the channel dimension, and the accumulated result is used as the nuclear damage category spatial attention activation map of the suspected defect fragment. :
[0089] Spatial attention activation map representing nuclear damage categories of suspected defective fragments; Spatial attention activation graph representing nuclear injury categories In pixel coordinates The element value at that location.
[0090] Spatial attention activation graph of nuclear injury categories Qualitatively reflects the spatial distribution that multi-class classification networks focus on when determining nuclear damage categories: The larger the value, the stronger the pixel coordinate. The greater the contribution to the network's determination of the nuclear damage category, the better; conversely, The smaller the value, or even if it is negative, the better it represents the pixel coordinate. The smaller the contribution to the determination of nuclear injury category.
[0091] Spatial attention activation graph of nuclear damage categories Calculate the percentage of contiguous areas The process is as follows. First, [the process is as follows]. Perform maximum value normalization to obtain , This represents the normalized spatial attention activation map for nuclear damage categories. The value falls within Numerical range. Set the activation threshold. In the examples, the typical value is 0.5. Based on this, spatial attention is activated for the entire nuclear injury category. Figure 2 The regions are valued as active regions (with a value of 1) and inactive regions (with a value of 0). An 8-connectivity label is applied to the active regions to obtain several connected regions. , Indicates the total number of connected components; Indicates the first There are 1 connected region. The number of pixels in each connected region is denoted as . , The cardinality of the set, i.e., the number of elements. The quotient, calculated by dividing the number of pixels in the largest connected region by the sum of the number of pixels in all connected regions, is used as the percentage of contiguous areas. :
[0092] This indicates the percentage of contiguous areas; the value falls within... Numerical range. Approximately 1 indicates that spatial attention is focused on a single connected region to characterize nuclear injury categories; near The spatial attention representing nuclear injury categories is dispersed across multiple connected regions. The activation region is an empty set (i.e.,...). No element is greater than In the boundary case of ), If the value is set to 0, it will be treated as "not meeting the threshold condition for the proportion of contiguous areas" in subsequent judgments.
[0093] The simultaneity of the three conditions is determined as follows. Let the range of nuclear injury coherence be... The continuity range of nuclear damage is The threshold for the proportion of nuclear injury attention clusters is Typical values in the embodiments are: , , , , The three conditions are as follows: , , When all three conditions are met, the final category of the nuclear injury hard positive sample candidate is changed to the nuclear injury category; when any one of the three conditions is not met, the category corresponding to the maximum value among the four attribution intensity values of the nuclear injury hard positive sample candidate is taken as the final category of the nuclear injury hard positive sample candidate.
[0094] The nuclear damage coherence range is expressed as a closed interval rather than a unilateral lower limit, primarily due to observations made in engineering practice. Special scenarios where the value is strictly equal to 1: These scenarios often correspond to the synchronous or calibration signals emitted by ultrasonic flaw detection equipment for rails causing a full-channel unidirectional response across multiple physical channels. Although the signal source exhibits extremely high coherence across channel dimensions, it is not a real defect physically. Upper limit of closed interval. A processing method that is slightly less than 1 or exactly 1 can both preserve the coverage of true strongly coherent nuclear defects and exclude equipment synchronization signal sources when necessary. The range of longitudinal continuity values is also given in the form of closed intervals. Taking 1.0 does not actually constitute an upper limit constraint, and in engineering practice, it is generally assumed that no upper limit is set.
[0095] After the above process is completed, each suspected defective fragment is assigned a final category, which is taken from a set. Nuclear damage category, screw hole crack category, other crack category, normal category This serves as the basis for determining the location and visualization output in the subsequent step 3.
[0096] In optional implementations, the number of convolutional layers in the binary classification gating network can be adjusted from 2 to 5 layers, and the number of channels and kernel size in each layer can be jointly optimized; the backbone encoder can be a lightweight network with ResNet-18, MobileNetV3, or EfficientNet-B0 as its backbone to adapt to different computing budgets and deployment platforms; the channel attention module can be replaced with a Squeeze-and-Excitation structure or an Efficient Channel Attention structure; the spatial attention module can be replaced with the spatial attention substructure in the Convolutional Block Attention Module; and the Softplus activation function in the evidence deep learning output layer can be replaced with... In form, This represents a small positive number that is protected against zero; a typical value is... To avoid gradient backpropagation interruption caused by evidence values being strictly 0 in the early stages of training; the extraction order of the three verification values in the defect correction gating verification process is completely equivalent in engineering and can be flexibly adjusted according to computational resource constraints; uncertainty trigger threshold. Nuclear damage trigger threshold The nuclear damage coherence range, nuclear damage continuity range, and nuclear damage attention contiguous area ratio threshold are all adjustable parameters. In actual deployment, they should all be systematically and jointly calibrated in conjunction with the labeled dataset. In another implementation, the nuclear damage remediation gating review process can be extended to other high-risk defect categories (such as severe transverse cracks, railhead peeling, etc.). By independently setting the coherence range, continuity range, and attention contiguous area ratio threshold for the target category, a "high-risk category remediation gating" system covering multiple high-risk defects can be constructed.
[0097] Each suspected defect fragment obtained in step 2 is assigned a final category. When the final category belongs to any of the following categories: nuclear damage, screw hole crack, or other crack, the suspected defect fragment enters the localization process in step 3. When the final category is normal, the alarm output and visualization output of the suspected defect fragment are suppressed, and it is not sent to the defect detector, nor is any annotation superimposed on the defect visualization image.
[0098] The defect detector employs a lightweight, single-stage detector fine-tuned using a rail defect dataset. In a typical deployment, an anchor-box-based single-stage detector is chosen as the skeleton, with inputs consisting of feature maps, statistical features, and splicing tensors of cross-channel coherence virtual channels for suspected defect segments. The defect detector uses the final category of the suspected defect segment as a priori category constraint, outputting predicted bounding boxes only on the detection branches corresponding to the final category, thus avoiding noisy candidate boxes generated by detection branches inconsistent with the final category.
[0099] To simultaneously consider the fitting quality of candidate boxes to underlying physically observable points and the confidence level of the candidate boxes themselves, a "globally optimal allocation between the damage point set and the candidate box set" approach is introduced to perform a secondary screening of candidate boxes. Each candidate box records four data points, which are, in order, the longitudinal start and end position intervals in the original ultrasonic coordinate system. Lateral depth position range Category of candidate boxes And candidate box belonging strength value .in, Indicates the first The vertical starting position of each candidate box Indicates the first The vertical end position of each candidate box ; Indicates the first The starting position of the lateral depth of each candidate box (on the side closest to the rail surface). Indicates the first The lateral depth termination position of each candidate box (near the bottom surface of the rail). All four coordinates are in millimeters. Taken from set Nuclear damage category, screw hole crack category, other crack categories ; The scalar value of the output of the classification branch corresponding to the defect detector after Sigmoid normalization falls within... Numerical range. The set of candidate bounding boxes corresponding to the entire suspected defective segment is denoted as . , Indicates the total number of candidate boxes. Represents a set The Middle One candidate box, .
[0100] The set of damaged points consists of all damaged points within the suspected defective segment, denoted as . , Indicates the total number of damage points. Represents a set The Middle One damage point, . No. The attributes of each damage point include the longitudinal mileage location obtained from step 1. (millimeters), lateral depth position (millimeters) and reflection intensity values Simultaneously, the final category of the suspected defective segment is used as the segment category label for the damaged point. . After assignment, the set All damaged points share the same fragment category label, which is consistent with the final category of the suspected defective fragment.
[0101] Allocation Cost Matrix Each row corresponds to a set One damage point in the data, each column corresponds to a set. One candidate box in the matrix, matrix element Indicates the first The first injury point and the first The allocation of cost among candidate boxes semantically characterizes "the allocation of cost among candidate boxes". The damage point belongs to the first The degree of mismatch between "candidate boxes". It represents the set of real numbers. It is obtained by summing three normalized cost components. These three normalized cost components characterize the degree of mismatch from three independent physical dimensions: vertical position, horizontal depth position, and category consistency. They are denoted as... , , .
[0102] The first normalized cost component describes the mismatch between the damaged point and the candidate box in the vertical direction, and is calculated as follows:
[0103] in Indicates the first The longitudinal mileage location of each damage point Indicates the first The center point of the vertical start and end position interval of each candidate box Indicates the vertical length of the current window segment. This indicates the absolute value operation. This indicates the operation of taking the smaller value. (Divide by) This causes the longitudinal position mismatch to be mapped from millimeter-dimensional to dimensionless values, and the numerical range naturally falls within... Nearby; when the damage point is located near the center of the candidate box When the value is close to 0, and the damage point is far from the center of the candidate box and approximately half a window segment away... Approaching 0.5, in the extreme case of an outlying point where the distance exceeds the window segment length. quilt The operation is truncated to 1 to avoid the cost component being pushed far beyond 1 due to occasional outliers, which would affect the relative magnitudes of the three terms.
[0104] The second normalized cost component describes the mismatch between the damaged point and the candidate box in the horizontal depth, and is calculated as follows:
[0105] in Indicates the first The lateral depth of each damage point Indicates the first The center point of the horizontal depth position range of each candidate box This indicates the depth range of the current window segment.
[0106] like Figure 5 As shown, the positional mismatch between the damaged point and the candidate box in the cost allocation matrix is characterized by two distances in the vertical mileage direction and the horizontal depth direction. In the figure, candidate boxes are represented by dashed lines, damaged points by dots, and the center points of the vertical start and end intervals and the horizontal depth intervals of the candidate boxes are marked. The first normalized cost component corresponds to the absolute value of the distance between the damaged point's vertical mileage position and the vertical center point of the candidate box, and the second normalized cost component corresponds to the absolute value of the distance between the damaged point's horizontal depth position and the horizontal depth center point of the candidate box. Both are normalized by the vertical length and depth range length of the current window segment, respectively; the larger the distance, the larger the corresponding cost component.
[0107] The third normalization cost component is the category consistency cost, which is determined as follows:
[0108] in Indicates the first Fragment category labels for each damaged point Indicates the first The category to which each candidate box belongs. The third normalized cost component takes a binary discrete value of 0 or 1. Even if the damaged point and the candidate box are spatially close, if the category labels are inconsistent, the cost should still be considered to be the maximum value of the matching cost.
[0109] Distribute the cost value It is obtained by summing the three normalized cost components:
[0110] Theoretically, the value of falls within Numerical range; in actual engineering, the vast majority of valid (damage point, candidate box) pairs Falling Within.
[0111] After constructing the allocation cost matrix, the allocation share matrix is introduced. As a decision variable. and Having the same number of rows Number of columns Matrix elements Indicates the first The first damage point towards the first The share allocated to each candidate box .
[0112] The objective of solving the share allocation matrix is as follows:
[0113] in This represents the final allocation share matrix. Let the variable be the one that minimizes the objective function. Represents the natural logarithm. This represents the entropy regularization parameter. The solution process is subject to two marginal constraints:
[0114]
[0115] The first marginal constraint stipulates that the sum of the elements in each row of the allocation share matrix is equal to the reflection intensity value of the corresponding damage point in that row divided by the sum of the reflection intensity values of all damage points in the damage point set; Indicates the first The reflection intensity value of each damaged point Indicates the summation index The reflection intensity value corresponding to the damaged point, This represents the sum of the reflection intensity values of all damaged points in the damaged point set. The second marginal constraint stipulates that the sum of the elements in each column of the allocation share matrix is equal to the candidate box's assigned intensity value for that column divided by the sum of the assigned intensity values of all candidate boxes in the candidate box set. Indicates the first The candidate box belonging strength value. Indicates the summation index The candidate box belonging strength value corresponding to the candidate box. This represents the sum of the attribution strength values of all candidate boxes in the candidate box set.
[0116] Solving the strictly optimal transport problem directly without entropy regularization is a linear programming problem with a solution complexity of approximately [missing information]. Number of damage points With the number of candidate boxes However, when the value is large, it lacks real-time performance. An entropy regularization term is introduced. Afterwards, the objective function becomes a strictly convex function, and the problem has a unique globally optimal solution; it can also be solved quickly using the Sinkhorn iterative method, with a complexity of O(n log n) for each iteration. In typical rail engineering scenarios The scale ranges from tens to hundreds. When the number of variables is in the range of several to tens, convergence can be achieved in milliseconds with only tens of iterations. The entropy regularization term also introduces a "soft allocation" property— When the value is large, the allocation share matrix tends to be evenly distributed, tolerating more noise; When the value is small, the allocation share matrix tends to be sparsely distributed, approaching the strictly optimal transmission solution. One engineering-verified feasible value is... The specific values are determined by scanning and optimizing the on-site calibration dataset, and the selectable range is as follows: .
[0117] Three types of boundary cases require separate handling. First, the case where the sum of the reflection intensity values of all damaged points in the set of damaged points equals 0—in this case, the denominator of the right-hand side of the first boundary constraint is 0, making normalization based on reflection intensity values impossible. This boundary case corresponds to the degenerate scenario where "the reflection intensity values of all damaged points within the suspected defect segment are recorded as 0," which in engineering often stems from instantaneous decoupling between the probe and the track surface or truncation of reflection intensity values during the upstream analysis stage. For this boundary case, the target value of the sum of the elements in each row of the allocation share matrix is set to the total number of damaged points. The reciprocal of, that is Semantically, this corresponds to "the uniform contribution between the damaged point and the reflection intensity when they cannot be distinguished." Secondly, in the case where the sum of the intensity values of all candidate boxes in the candidate box set equals 0—using a symmetrical approach, the target value of the sum of the elements in each column of the allocation share matrix is set as the total number of candidate boxes. The reciprocal of, that is Third, the number of candidate boxes in the candidate box set. The case where the value equals 0—in this case, the defect detector does not output any candidate boxes for the suspected defect segment. This is usually because the defect scale of the suspected defect segment is outside the detector's training distribution, or the detector's confidence threshold is too high, causing all candidate boxes to be rejected. For this boundary case, the solution process is skipped, and the circumscribed rectangle of the set of damage points within the suspected defect segment in the original ultrasonic coordinate system is used as the backup original coordinate box, denoted as . , This indicates the spare original coordinate frame. Indicates the index on the set of damaged points. Take the minimum value. Indicates the index on the set of damaged points. Take the maximum value. The spare original coordinate frame is directly used as the optimal original coordinate frame output, ensuring that the process can still provide a reliable location frame based on physically observable points even when the defect detector output degrades.
[0118] In the non-boundary case, the Sinkhorn iterative method is used to solve for the allocation share matrix. First, the negative of each element of the allocation share matrix is taken and divided by the entropy regularization parameter. Then, the natural exponent is taken to obtain the kernel matrix. :
[0119] in Representing the kernel matrix The Middle Line 1 Column elements, This represents the natural exponential function. The kernel matrix serves as the initialization matrix for the share allocation matrix, denoted by the initial iteration... , This represents the value of the allocation share matrix in the 0th iteration.
[0120] Each iteration consists of two sub-steps: first, normalizing each row according to the first marginal constraint; and then, normalizing each column according to the second marginal constraint. Let the first... The allocation share matrix at the start of each iteration is denoted as . First, apply the first marginal constraint to... Normalize each row:
[0121] Indicates the first Intermediate results of the allocation share matrix after row normalization and before column normalization in round iterations. Indicates the current allocation share matrix. Sum of row elements. Then apply the second marginal constraint. Normalize each column:
[0122] Indicates the first End of round of iteration, number of iterations The allocation share matrix at the start of each iteration. Indicates the first Round allocation share matrix The sum of the column elements. The two sub-steps are performed alternately, so that the allocation share matrix precisely satisfies the first and second marginal constraints in each iteration.
[0123] The iteration termination condition is that the maximum change in the share distribution matrix between two adjacent iterations is less than a set convergence threshold, i.e.:
[0124] in This represents the convergence threshold; a typical value in the example is [value to be filled in]. ; In the matrix The maximum value after taking the absolute value of all elements. The resulting allocation share matrix after termination is denoted as the final allocation share matrix. To prevent convergence in extreme cases, a maximum number of iterations is also set. The typical value is 200 iterations. Once the maximum number of iterations is reached, the process will be forcibly terminated regardless of whether the convergence threshold condition is met.
[0125] like Figure 4 As shown, when using the Sinkhorn iterative method to solve the allocation share matrix, the maximum change in each element between adjacent iterations decreases as the number of iterations increases. The vertical axis represents this maximum change on a logarithmic scale, and the horizontal axis represents the number of iterations. A smaller entropy regularization parameter results in a sharper allocation but relatively slower convergence; a larger entropy regularization parameter results in a smoother allocation and faster convergence. Under typical engineering conditions, the maximum change drops below the set convergence threshold after several iterations, stopping the iteration and indicating that the solution process can converge stably.
[0126] Obtain the final allocation share matrix. Then, a selection score is calculated for each candidate box in the candidate box set. The selection score is calculated in the following two steps. Step 1, calculate the score for each candidate box. Average allocation cost per candidate box :
[0127] in Indicates the first The average cost per candidate box; Represents the final allocation share matrix The Middle Line 1 Column elements; Represents the distribution cost matrix The Middle Line 1 Column elements; This represents the th element in the final allocation share matrix. The sum of the products of each element in the column and the corresponding element in the allocation cost matrix; This represents the final allocation share matrix. The sum of the elements in the column; This represents a small positive number excluding zero; in the example, the value is [value to be filled in]. . Physically, this corresponds to "a weighted average cost with allocation share as the weight," reflecting the first... The overall fitting quality of each candidate box to the underlying damage points—damage points with larger allocation shares correspond to smaller allocation costs. Smaller values indicate the first The candidate boxes fit the received damage points well; otherwise... Larger values indicate poorer fit quality.
[0128] Step 2, calculate the... The selection score of each candidate box :
[0129] in Indicates the first The selection score of each candidate box, Indicates the first The candidate box belonging strength value. Optimal score. The confidence information of the candidate box itself is fused with the fitting quality information of the underlying damage points into a single scalar: the candidate box assignment strength value. The larger the value, the more evenly the cost is distributed. The smaller, The larger; conversely, The smaller. (Two places) The addition of (the denominator of the average allocation value and the denominator of the selection score) prevents the division-to-zero anomaly in two degenerate cases: "all allocation shares are concentrated in other candidate boxes" and "the average allocation value is strictly 0". This makes the entire selection score calculation numerically unconditionally robust.
[0130] Optimal original coordinate frame Defined as the candidate box with the highest selection score, i.e.:
[0131] in This represents the optimal original coordinate frame. This represents the index of the candidate box corresponding to the highest selection score. This represents the independent variable that maximizes the objective function. Inherit four data points from the selected candidate box: vertical start and end position range, horizontal depth position range, candidate box category, and candidate box belonging strength value.
[0132] The optimal original coordinate frame is located in the original ultrasonic coordinate system, with the coordinate axes consisting of the vertical mileage position and the horizontal depth position, both in millimeters. The defect visualization image is located in the image display coordinate system, with the coordinate axes consisting of the pixel x-axis and pixel y-axis, in pixels. The preset mapping relationship between the two coordinate systems is based on the mileage resolution described in step 1. and depth resolution The only certainty:
[0133] in This indicates the floor function; This represents the x-coordinate of the starting vertical position in the image display coordinate system (pixel coordinates). This represents the x-coordinate of the pixels corresponding to the vertical termination position in the image display coordinate system. This represents the pixel ordinate of the starting position of the horizontal depth in the image display coordinate system. This represents the pixel ordinate of the horizontal depth termination position in the image display coordinate system. The image display coordinate system corresponding to the optimal original coordinate box is denoted as . Four of the position coordinates are derived from the optimal original coordinate frame. The corresponding coordinates are obtained by transforming according to the above mapping relationship.
[0134] Display the image coordinate frame as a rectangle overlaid on the defect visualization image. The outline width of the rectangle is 2 to 3 pixels, and the outline color is differentiated according to the final category: the nuclear damage category uses a red outline to indicate the highest priority, the screw hole crack category uses an orange outline, and other crack categories use a yellow outline. Next to the rectangle, there is a text indicating the final category of the suspected defect fragment, with a font size of 12 to 16 pixels, and the label text is consistent with the outline color.
[0135] For suspected defect segments ultimately categorized as screw hole cracks, a subdivision label indicating either a crack above or below the screw hole is attached to the side of the rectangular frame. This subdivision label is provided by the subdivision determination process for screw hole crack categories in step 2, reflecting the longitudinal positional distribution characteristics of the damaged points within the suspected defect segment relative to the screw hole location feature points. Specifically, let the longitudinal mileage position of the screw hole location feature point be... The average longitudinal mileage of the damaged points within the suspected defective segment is denoted as . ; Output detailed labels for cracks above screw holes. Output detailed labels for cracks below the screw hole. According to the set rules, it is classified into either the crack above the screw hole or the crack below the screw hole (in one embodiment, it is classified into the crack above the screw hole by default).
[0136] The alarm information and defect visualization image are composed of the final category label, sub-label, and image display coordinate frame. The alarm information is output to the upper-level scheduling system in the form of structured data, and the fields include the mileage interval where the suspected defective segment is located, the final category, the sub-label (if any), the candidate box assignment strength value, the selection score, etc.; the defect visualization image is output to local storage and remote monitoring terminal in PNG or JPEG format.
[0137] In optional implementations, in addition to anchor-box-based single-stage detectors, defect detectors can also employ Faster R-CNN, RetinaNet, FCOS, lightweight single-stage object detection networks, or even the DETR series based on the Transformer architecture; entropy regularization parameter Available Adjust within the numerical range, When the value is small, the allocation share matrix tends to be sparse, approaching the strictly optimal transport solution. This is beneficial for obtaining sharp matching relationships in scenarios with a large number of damaged points and a small number of candidate boxes. When the distribution share matrix is larger, it tends to be more uniform, which is beneficial for improving robustness in scenarios where the numerical noise of the reflection intensity at the damage point is large.
[0138] The calculation of the average allocation cost can be replaced by a ranking-weighted approach—weighting the largest allocation shares in each column and averaging them, rather than weighting all columns, to reduce the dilution effect of the smallest allocation shares on the average allocation cost. In addition to discretized raster mapping, bilinear interpolation mapping can also be used for coordinate system mapping to mitigate the jagged edges caused by rasterization; if higher image resolution is required at the engineering site, a smaller coordinate system can be redefined. and The value is selected to make the pixel grid in the image display coordinate system finer.
[0139] Convergence threshold With maximum number of iterations It is also an adjustable parameter. The range of values is between, The range of values is between; Smaller value When the value is large, the final allocation share matrix more accurately approximates the steady-state solution that strictly satisfies the two marginal constraints, but the time required for a single solution increases accordingly; in deployments with high real-time requirements, and The combination of these can achieve a balance between engineering accuracy and real-time performance.
[0140] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these specific embodiments are merely illustrative. Those skilled in the art can omit, substitute, and modify the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, combining the above method steps to perform substantially the same function and achieve substantially the same result according to substantially the same method falls within the scope of the present invention. Therefore, the scope of the present invention is defined only by the appended claims.
Claims
1. A method for cascaded detection and visualization of multiple defects in rails based on ultrasonic signals, characterized in that, It includes the following 3 steps: Step 1: Parse the text-formatted inspection data exported by the ultrasonic flaw detection equipment for rails, and construct feature maps, statistical features, and cross-channel coherence virtual channels. The cross-channel coherence virtual channel is an independent channel layer attached to the feature map. The value of each pixel position is determined as follows: the numerator is the absolute value of the sum of the reflection intensity values of this pixel position in each physical channel, the denominator is the square root of the sum of the squares of the reflection intensity values of this pixel position in each physical channel multiplied by the square root of the number of physical channels, plus a set small positive number to prevent zeroing, and the smaller value between the quotient obtained by dividing the numerator by the denominator and 1 is taken as the value of this pixel position. When the reflection intensity values of all physical channels are equal to 0, the value of this pixel position is set to 0; Step 2: The current window segment is screened using a binary classification gating network to obtain suspected defective segments. The evidence deep learning output layer of a multi-class classification network outputs four evidence values for each suspected defective segment, corresponding to the nuclear damage category, screw hole crack category, other crack category, and normal category. Each of the four evidence values is incremented by 1 to obtain four Dirichlet intensity parameters, corresponding to the nuclear damage category, screw hole crack category, other crack category, and normal category, respectively. The total intensity of the suspected defective segment is obtained by summing the four Dirichlet intensity parameters. The quotient of the evidence value corresponding to each category divided by the total intensity is used as the intensity value for which the suspected defective segment belongs to that category. The quotient of the number of categories (4) divided by the total intensity is used as the cognitive uncertainty index for suspected defective fragments. The joint triggering condition is: the cognitive uncertainty index is greater than the set uncertainty triggering threshold and the intensity value of the suspected defective fragment in the nuclear damage category is greater than the set nuclear damage triggering threshold. When the joint triggering condition is met, the suspected defective fragment is determined as a candidate for nuclear damage hard positive sample and enters the nuclear damage remediation gating review process. In other cases, the category corresponding to the maximum value among the four attribution strength values is taken as the final category of the suspected defective fragment. The nuclear damage remediation gating review process is as follows: three review values are extracted for the nuclear damage hard positive sample candidate, namely, the maximum coherence measurement value on the cross-channel coherence virtual channel, the vertical continuity value in the statistical features, and the contiguous area ratio value on the nuclear damage category spatial attention activation map; the nuclear damage coherence range, nuclear damage continuity range, and nuclear damage attention contiguous area ratio threshold are set; when the maximum coherence measurement value falls within the nuclear damage coherence range, the vertical continuity value falls within the nuclear damage continuity range, and the contiguous area ratio value is greater than the nuclear damage attention contiguous area ratio threshold, the final category of the nuclear damage hard positive sample candidate is changed to the nuclear damage category; in other cases, the final category of the nuclear damage hard positive sample candidate is taken as the category corresponding to the maximum value among the four attribution strength values. Step 3: Generate a set of candidate boxes for suspected defect fragments whose final category belongs to the defect category using the defect detector; Construct an allocation cost matrix using the set of damaged points within suspected defective segments and the set of candidate boxes; under two set marginal constraints, minimize the allocation share matrix by adding the sum of the product of the allocation share matrix and the allocation cost matrix to the entropy regularization term. For each candidate box, the corresponding average allocation cost is calculated based on the allocation share matrix. The candidate box's belonging strength value is divided by the corresponding average allocation cost to obtain the selection score. The candidate box with the highest selection score is selected as the optimal original coordinate box, which is then converted into an image display coordinate box through coordinate mapping. Alarm information and defect visualization images are output.
2. The method according to claim 1, characterized in that, In step 1, after parsing the text-formatted detection data, multi-channel damage point information, window parameter information, and mileage information are obtained. Each damage point records four data items: the channel number of the physical channel it belongs to, the vertical mileage position, the horizontal depth position, and the reflection intensity value. The feature map uses the vertical mileage position as the horizontal axis and the horizontal depth position as the vertical axis. Each physical channel damage point is projected onto the corresponding feature channel layer. The vertical mileage position is discretized into pixel horizontal coordinates according to the set mileage resolution, and the horizontal depth position is discretized into pixel vertical coordinates according to the set depth resolution. When multiple damage points are mapped to the same pixel location, the value of this pixel location is the maximum value among the reflection intensity values of these damage points.
3. The method according to claim 1, characterized in that, In step 1, the statistical features output four values for each physical channel within the current window segment: damage point density, mean reflection intensity, variance of reflection intensity, and longitudinal continuity. The damage point density is the total number of damage points in the corresponding physical channel divided by the area of the current window segment. The mean reflection intensity is the arithmetic mean of the reflection intensity values of all damage points in the corresponding physical channel. The variance of reflection intensity is the arithmetic mean of the squares of the differences between the reflection intensity values of each damage point in the corresponding physical channel and the mean reflection intensity. The longitudinal continuity is the total length of the continuous segment where damage points exist at adjacent mileage positions in the corresponding physical channel divided by the longitudinal length of the current window segment.
4. The method according to claim 1, characterized in that, In step 2, the binary classification gating network takes feature map, statistical features and cross-channel coherence virtual channel as input, and outputs two binary classification attribution strength values for the current window segment, corresponding to the defect state and the normal state respectively; when the binary classification attribution strength value of the defect state is greater than the binary classification attribution strength value of the normal state, the current window segment is judged as a suspected defect segment. The multi-class classification network consists of a backbone encoder and an evidence deep learning output layer. The backbone encoder includes a convolutional feature extraction module, a channel attention module, and a spatial attention module. It encodes the feature map, statistical features, and cross-channel coherence virtual channel of the suspected defect fragment and outputs an encoded vector. The spatial attention activation map of the nuclear injury category of the suspected defect fragment is generated as follows: the spatial attention feature map with multiple channel components output by the spatial attention module is taken. For each channel component of the spatial attention feature map, the parameter value corresponding to this channel component in the parameter vector of the corresponding nuclear injury category of the linear mapping layer of the evidence deep learning output layer is multiplied element by element to obtain the corresponding nuclear injury category response map. The response maps of each nuclear injury category are accumulated along the channel dimension, and the accumulated result is used as the spatial attention activation map of the nuclear injury category of the suspected defect fragment.
5. The method according to claim 4, characterized in that, The evidence deep learning output layer transforms the encoding vector through a linear mapping layer and a Softplus activation function, outputting four evidence values that fall within the range of zero to positive infinity.
6. The method according to claim 1, characterized in that, In step 2, for suspected defect segments whose final category is screw hole crack, based on the longitudinal position distribution of the damage points within the suspected defect segment relative to the screw hole location feature points, a subdivision label for cracks above or below the screw hole is output. The screw hole location feature points are determined as follows: when the text-formatted detection data contains a screw hole marker field, the screw hole location feature points are obtained from the screw hole marker field; when the text-formatted detection data does not provide a screw hole marker field, the center position of the cluster of damage points with the highest reflection intensity value within the suspected defect segment is taken as the screw hole location feature point.
7. The method according to claim 1, characterized in that, In step 3, when the final category of the suspected defective segment is normal, the alarm output and visualization output of the suspected defective segment are suppressed; when the final category is nuclear damage, screw hole crack, or other crack categories, the suspected defective segment enters the defect detector's localization process, using the final category as the segment category label for each damage point within the suspected defective segment; each candidate box output by the defect detector records four data items, namely, the longitudinal start and end position interval, the lateral depth position interval, the candidate box category, and the candidate box intensity value in the original ultrasonic coordinate system; the damage point set consists of all damage points within the suspected defective segment; each row of the cost matrix corresponds to one damage point in the damage point set, and each column corresponds to one damage point in the candidate box set. For each candidate box, the allocation cost between the damaged point in the row and the candidate box in the column is taken. The allocation cost is obtained by summing three normalized cost components: the first normalized cost component is the smaller of the quotient of the absolute value of the distance between the vertical mileage position of the corresponding damaged point and the center point of the vertical start and end position interval of the corresponding candidate box divided by the vertical length of the current window segment and 1; the second normalized cost component is the smaller of the quotient of the absolute value of the distance between the horizontal depth position of the corresponding damaged point and the center point of the horizontal depth position interval of the corresponding candidate box divided by the depth range length of the current window segment and 1; the third normalized cost component is the category consistency cost, which is 0 when the category label of the corresponding damaged point fragment is the same as the category of the corresponding candidate box, and 1 when they are different.
8. The method according to claim 7, characterized in that, The allocation share matrix and the allocation cost matrix have the same number of rows and columns. Each element of the allocation share matrix represents the share allocated to the corresponding candidate box in the corresponding column from the damaged point in that row. The two marginal constraints are as follows: The first constraint is that the sum of the elements in each row of the allocation share matrix equals the reflection intensity value of the corresponding damaged point in that row divided by the sum of the reflection intensity values of all damaged points in the damaged point set. The second constraint is that the sum of the elements in each column of the allocation share matrix equals the belonging intensity value of the corresponding candidate box in that column divided by the sum of the belonging intensity values of all candidate boxes in the candidate box set. When the sum of the point reflection intensity values is equal to 0, the first marginal constraint target value is the reciprocal of the total number of damaged points; when the sum of the intensity values of all candidate boxes in the candidate box set is equal to 0, the second marginal constraint target value is the reciprocal of the total number of candidate boxes; when the number of candidate boxes in the candidate box set is equal to 0, the solution process is skipped, and the circumscribed rectangle of the set of damaged points in the suspected defect segment in the original ultrasonic coordinate system is used as the backup original coordinate box, and the backup original coordinate box is output as the optimal original coordinate box; the entropy regularization term is the sum of the products of the set entropy regularization parameter and the natural logarithm of each element of the allocation share matrix; The allocation share matrix is solved using the Sinkhorn iterative method: each element of the kernel matrix is obtained by taking the negative of the corresponding element of the allocation cost matrix, dividing it by the entropy regularization parameter, and then taking the natural exponent. The kernel matrix is used as the initialization matrix. In each iteration, each row is normalized according to the first marginal constraint, and then each column is normalized according to the second marginal constraint. The iteration stops when the maximum change of each element in two adjacent iterations is less than the set convergence threshold, and the final allocation share matrix is obtained.
9. The method according to claim 8, characterized in that, For each candidate box, the selection score is calculated in two steps: Step 1, the average allocation cost value is the sum of the products of each element in the corresponding column of the final allocation share matrix and the corresponding element in the allocation cost matrix, divided by the sum of the sum of each element in the corresponding column of the final allocation share matrix and the set small positive number for zero prevention and removal; Step 2, the selection score is the candidate box's belonging strength value divided by the average allocation cost value and the set small positive number for zero prevention and removal; The optimal original coordinate box is converted into an image display coordinate box according to the preset mapping relationship between the original ultrasonic coordinate system and the image display coordinate system. The image display coordinate box is superimposed on the defect visualization image in the form of a rectangle, and the final category label of the suspected defect segment is attached next to the rectangle; For suspected defect fragments whose final category is screw hole crack, a sub-label of "crack above screw hole" or "crack below screw hole" is attached next to the rectangular frame. The alarm information and defect visualization image are composed of the final category label, sub-label, and image display coordinate frame and are output.
Citation Information
Patent Citations
Industrial product defect credible detection method based on evidence Transform and double-branch Query decoupling
CN121280814A
Auxiliary machine stress wave state monitoring and diagnosing method and system based on multi-point acquisition
CN121678854A