A catenary icing identification method based on video monitoring

CN122551275APending Publication Date: 2026-08-11TOP XINGDA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-14
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,传统图像识别方法多依赖静态阈值、边缘检测或颜色差分等手段,容易受到光照变化、摄像头视角偏差和背景干扰的影响,导致覆冰区域的检测准确性不足

Benefits of technology

本发明通过引入接触线中心线的结构先验信息,利用单位法向向量构造线锚查询向量,并结合改进型Deformable DETR模型中可变形注意力机制,构建出一套贴合接触线实际几何形态的引导采样策略,有效提升了模型在复杂背景下对覆冰区域的感知能力和定位精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122551275A_ABST
    Figure CN122551275A_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying icing on overhead contact lines based on video monitoring, comprising the following steps: Step 1: Acquiring raw image sequences captured by video monitoring devices deployed along the overhead contact lines to obtain standardized video frames; Step 2: Performing line structure detection in the standardized video frames to generate prior data for the contact lines; Step 3: Constructing line anchor query vectors; Step 4: Introducing guided sampling offset based on unit normal vectors into the deformable attention module of the improved Deformable DETR model; Step 5: Generating a binary icing segmentation mask and thickness prediction values ​​to form a thickness sequence; Step 6: Classifying and determining the icing state according to a preset threshold, and outputting the icing identification result of the overhead contact lines. This invention effectively supports operation and maintenance scheduling and de-icing decisions in low-temperature environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition and target detection technology, and in particular to a method for identifying icing on overhead contact lines based on video monitoring. Background Technology

[0002] In overhead contact system systems, icing of the contact wire can severely impact train power quality and operational safety, especially in low-temperature and high-humidity winter environments where icing is prone to occur and exhibits significant spatiotemporal dynamic characteristics, making timely monitoring and intervention difficult through manual methods. To improve the visual monitoring capability of the overhead contact system's operational status, current technologies commonly employ video surveillance equipment to photograph the contact line and use image processing methods to identify icing areas. However, traditional image recognition methods often rely on static thresholding, edge detection, or color difference techniques, which are easily affected by changes in lighting, camera viewing angle deviations, and background interference, resulting in insufficient accuracy in detecting icing areas. While some methods incorporate deep learning models for target detection or image segmentation, the slender and stable structure of the contact wire, coupled with the complex morphology of icing coverage, makes it difficult for conventional target detection models to focus on fine-grained areas of the contact wire. This leads to skewed recognition results, blurred boundaries, and a lack of ability to model the normal characteristics and thickness continuity of the contact wire.

[0003] Existing methods generally lack quantitative analysis of icing thickness, focusing more on classification and identification of "present / absent" states. This fails to meet the engineering application requirements for fine-grained grading and trend judgment of the overhead contact system's operational status. Especially when graded emergency responses are needed based on different levels of icing, the lack of thickness prediction mechanisms and thickness level label generation strategies severely limits the system's practicality. Current methods based on convolutional neural networks or object detection frameworks suffer from uneven sampling point distribution and insufficient feature fusion when extracting features from the contact line region. They cannot accurately reflect local changes along the contact line normal, lack structural guidance and spatial continuity constraints, resulting in weak spatial reasoning capabilities regarding icing states.

[0004] Existing contact wire icing identification technologies still have significant shortcomings in terms of feature extraction accuracy, thickness modeling capabilities, and representation of continuity along the line, making it difficult to meet the demands of high reliability, high precision, and multi-level identification in practical engineering. Therefore, there is an urgent need for a new icing identification method that combines video monitoring, contact wire normal modeling, and deep learning fusion mechanisms to achieve higher precision, stronger robustness, and quantifiable icing state identification. Summary of the Invention

[0005] One objective of this invention is to propose a method for identifying icing on the contact wire based on video monitoring. This invention fully combines deep learning visual modeling with prior information on the geometric structure of the contact wire, and innovatively introduces a line anchor query vector and a normal-guided sampling mechanism to achieve high-precision identification of the icing state of the contact wire and prediction of its thickness level. It has the advantages of strong robustness, high identification accuracy, and strong classification judgment ability.

[0006] A method for identifying icing on overhead contact lines based on video monitoring according to an embodiment of the present invention includes the following steps: Step 1: Collect the original image sequence captured by the video monitoring device deployed along the overhead contact line, perform distortion correction and scale calibration on the original image sequence to obtain standardized video frames; Step 2: Perform line structure detection in standardized video frames, extract the center line of the contact line and the corresponding unit normal vector, and generate prior data for the contact line; Step 3: Construct the anchor query vector based on the prior data of the contact wire; Step 4: Input the standardized video frames into the improved Deformable DETR model. Introduce a guided sampling offset based on the unit normal vector into the deformable attention module of the improved Deformable DETR model to make the sampling points sparsely distributed along the normal direction of the contact line centerline. Step 5: Generate the icing segmentation mask and contact line normal thickness prediction values ​​at the output of the improved Deformable DETR model, and apply a continuity constraint along the line to the thickness prediction values ​​to form a thickness sequence; Step 6: Convert the thickness sequence into actual thickness data by pixels, classify the icing status according to the preset threshold, and output the contact wire icing identification result.

[0007] Optionally, the original image sequence captured by the video monitoring device deployed along the overhead contact line is subjected to distortion correction and scale calibration to obtain standardized video frames, specifically: The video monitoring device deployed along the contact wire collects the original image sequence of the visible area of ​​the contact wire. The video monitoring device takes pictures using a fixed angle, constant frame rate and uniform resolution parameters. Distortion correction processing is performed on the original image sequence to eliminate radial distortion and projection error in the image based on preset camera intrinsic and extrinsic parameters. Based on the preset pixel length conversion relationship in the image, a scale calibration operation is performed to establish the mapping relationship between image pixels and actual physical size, and the pixel conversion ratio is obtained. The steps for obtaining the conversion ratio are as follows: Select a structural region in the contact wire image that contains known physical dimensions as a reference region for scale calibration. The structural region can be a contact wire clamping device, a conductor fixing bracket, or a continuous segment with standard dimensions in the contact wire body, ensuring that the region is clearly identifiable in the image and has well-defined edges.

[0008] Edge detection and pixel measurement are performed on the reference region within a standardized video frame. The start and end boundary positions of the structural region in the image are extracted using an image processing algorithm, and its pixel length in the image coordinate system is calculated.

[0009] Based on the actual physical length of the preset reference area, the physical size corresponding to a unit pixel in the image is calculated to form a pixel conversion ratio.

[0010] The original image sequence after distortion correction and scaling is uniformly formatted to generate standardized video frames.

[0011] Optionally, the line structure detection specifically includes: The Sobel operator convolution operation is performed on the standardized video frames to calculate the gray-level change rate in the horizontal and vertical directions respectively, and the gradient magnitude map is synthesized. In the gradient magnitude map, extract edge connected structures that have a grayscale change rate greater than a set threshold, have pixel-level connectivity, and maintain a consistent main direction. Perform geometric fitting and filtering operations on the edge-connected structure to construct the centerline of the contact line; Discrete sampling points are extracted at fixed intervals along the centerline of the contact line, and the unit normal vector of each discrete sampling point is calculated. The contact wire prior data is generated by combining the coordinates of the discrete sampling points, the unit normal vector, and the relevant structural parameters.

[0012] The relevant structural parameters include curvature value, edge response intensity, and fitting residual; The curvature value is calculated from the first and second derivatives of the centerline of the contact line at the sampling point; The edge response intensity is obtained by finding the gray value at the corresponding sampling point in the gradient magnitude map; The fitting residual is the shortest distance between the discrete sampling points and the fitted curve of the center line.

[0013] Optionally, the construction of the line anchor query vector based on the prior data of the contact line specifically involves: The discrete sampling point location coordinates, unit normal vector, curvature value, edge response intensity, and fitting residual are combined to construct the corresponding line anchor query vector; The anchor query vectors constructed from all discrete sampling points are uniformly arranged to generate a set of anchor query vectors.

[0014] Optionally, the introduction of a guided sampling offset based on a unit normal vector into the deformable attention module of the improved Deformable DETR model, causing the sampling points to be sparsely distributed along the normal direction of the contact line centerline, specifically involves: Standardized video frames are input into the feature extraction network of the improved Deformable DETR model to obtain a multi-scale feature map sequence after multi-scale convolution and feature fusion processing; Perform deformable attention update operation: Using the current position coordinates of each line anchor query vector in the line anchor query vector set as a reference point, a learnable sampling offset and sampling weight are initialized for each reference point in the deformable attention module; The learnable sampling offset is initialized to a zero vector and automatically updated through backpropagation during training; the sampling weights are initialized to a uniform distribution and are gradually adjusted according to the loss function during training. Based on the unit normal vector and curvature value in the anchor query vector, a normal guide term is superimposed on the learnable sampling offset to generate a guide sampling offset; The process of generating the guiding sampling offset is as follows: The offset prediction layer inside the improved Deformable DETR model outputs a learnable sampled offset for each reference point; The normal direction of the sampling offset is determined based on the unit normal vector in the anchor query vector, and the offset scaling factor is calculated in combination with the curvature value. Multiply the offset scaling factor by the unit normal vector to obtain the normal guide term of the sampling offset; The learnable sampling offset is vector-superimposed with the normal guide term to generate a guide sampling offset that is limited to the normal direction of the contact line centerline; The sampling points are sparsely distributed along the unit normal direction of the centerline of the contact line, and a normal bandwidth threshold is set to constrain the distribution range. The sparse distribution refers to selecting a finite number of sampling points at fixed intervals within the normal bandwidth along the unit normal direction of the contact wire centerline. Limit the component of the learnable sampling offset in the tangential direction of the contact line centerline; The restrictions include setting an amplitude threshold for the tangential component of the learnable sampling offset, ensuring that the absolute value of the tangential component of the learnable sampling offset does not exceed the amplitude threshold range, and performing normalization processing when the tangential component of the learnable sampling offset exceeds the amplitude threshold. According to the guiding sampling offset and sampling weight, sparse sampling and weighted aggregation are performed on the multi-scale feature map to update the corresponding line anchor query vector representation and complete the deformable attention update operation. The sparse sampling refers to determining a finite number of sampling point positions in a multi-scale feature map based on the reference point position and the guiding sampling offset, and extracting feature values ​​at the finite number of sampling point positions. Within the decoder layer, the deformable attention update operation and feedforward update are repeatedly performed on all anchor query vectors, and the guided updated anchor query vectors are output. The feedforward update involves inputting the updated anchor query vector into the feedforward fully connected subnetwork after completing the deformable attention update operation. The feedforward fully connected subnetwork includes two layers of linear transformation and nonlinear activation functions, which are used to perform feature mapping and nonlinear transformation on the anchor query vector.

[0015] Optionally, the step of generating an icing segmentation mask and contact line normal thickness prediction values ​​at the output of the improved Deformable DETR model, and applying a continuity constraint along the line to the thickness prediction values ​​to form a thickness sequence, specifically involves: The icing segmentation head takes guided, updated line anchor query vectors and multi-scale feature maps as input: On the multi-scale feature map, the center line of the contact line is projected onto the feature map coordinate system, and feature strips within a preset bandwidth range are clipped on both sides of the normal direction to extract local feature regions. Local feature regions are extracted from the neighborhood of the center line of the contact line. The anchor query vector and the local feature regions are fused through a cross-attention mechanism to obtain a fused feature representation. The fused feature representation is then processed by a convolutional layer to extract features. The low-resolution features are gradually amplified to match the pixel resolution of the neighborhood of the center line of the contact line in the standardized video frame through an upsampling module. The icing probability value of each pixel position in the neighborhood is output to form a local mask prediction. The local mask prediction is then compared with a preset threshold: When the icing probability value is greater than or equal to the preset threshold, the corresponding pixel position is marked as icing state; When the icing probability value is less than the preset threshold, the corresponding pixel position is marked as non-iced. Obtain a binary icing segmentation mask for the local region; The thickness regression head takes guided-updated line anchor query vectors and multi-scale feature maps as inputs to the regression network; The regression network is a multilayer perceptron structure. The output layer dimension of the multilayer perceptron structure corresponds to the number of discrete sampling points of the center line of the contact line. The normal thickness of the contact line at each sampling point is output point by point to form a multidimensional thickness sequence. Apply a continuity constraint along the line to the multidimensional thickness sequence: limit the difference in the predicted normal thickness values ​​between adjacent sampling points to not exceed a preset continuity threshold; A second-order difference smoothing process is performed on the multidimensional thickness sequence to obtain the thickness sequence along the centerline of the contact line. Optionally, the step of converting the thickness sequence into actual thickness data through pixels, classifying the icing state according to a preset threshold, and outputting the contact wire icing identification result is as follows: The thickness sequence is converted to the pixel conversion ratio to obtain the actual thickness data at each discrete sampling point. The actual thickness data is compared with a preset set of ice thickness level thresholds, and the ice level label corresponding to each discrete sampling point is determined based on the interval range corresponding to the actual thickness data at each discrete sampling point. According to the arrangement order of discrete sampling points on the center line of the contact line, the icing level labels of each sampling point are combined in sequence to construct an icing level sequence along the center line of the contact line. The binary icing segmentation mask is mapped and associated with the corresponding icing level sequence. Combined with the spatial location of discrete sampling points, the icing state at each location is jointly determined to generate the icing identification result on the center line of the contact line.

[0016] The beneficial effects of this invention are: This invention introduces prior structural information about the centerline of the contact line, constructs a line anchor query vector using a unit normal vector, and combines it with the deformable attention mechanism in the improved Deformable DETR model to build a guided sampling strategy that fits the actual geometry of the contact line. This effectively improves the model's ability to perceive and locate icy areas in complex backgrounds.

[0017] By decoupling the classification and regression tasks, an icing segmentation head and a thickness regression head are set at the model output, enabling the model to simultaneously output the contact line normal thickness prediction value and the regional binary segmentation mask. This gives the model the ability to spatially identify the icing state and quantitatively estimate the thickness, significantly improving the accuracy and practicality of the identification results.

[0018] The thickness continuity constraint mechanism and thickness grade determination method proposed in this invention can transform multi-point prediction results into an icing grade sequence continuously distributed along the centerline of the contact line. After joint determination based on spatial location, it outputs icing identification results with clear structure and gradation, facilitating subsequent operational decisions and risk assessments. The overall solution outperforms existing methods in terms of robustness, accuracy, and engineering applicability, and has good potential for widespread application. Attached Figure Description

[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1This is an overall flowchart of a video monitoring-based contact wire icing identification method proposed in this invention. Figure 2 This is a schematic diagram of the improved Deformable DETR model structure of the contact wire icing identification method based on video monitoring proposed in this invention; Figure 3 This diagram illustrates the determination and generation of icing level of the overhead contact line based on video monitoring, as proposed in this invention. Detailed Implementation

[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0021] refer to Figure 1-3 A method for identifying icing on overhead contact lines based on video monitoring includes the following steps: Step 1: Collect the original image sequence captured by the video monitoring device deployed along the overhead contact line, perform distortion correction and scale calibration on the original image sequence to obtain standardized video frames; Step 2: Perform line structure detection in standardized video frames, extract the center line of the contact line and the corresponding unit normal vector, and generate prior data for the contact line; Step 3: Construct the anchor query vector based on the prior data of the contact wire; Step 4: Input the standardized video frames into the improved Deformable DETR model. Introduce a guided sampling offset based on the unit normal vector into the deformable attention module of the improved Deformable DETR model to make the sampling points sparsely distributed along the normal direction of the contact line centerline. Step 5: Generate the icing segmentation mask and contact line normal thickness prediction values ​​at the output of the improved Deformable DETR model, and apply a continuity constraint along the line to the thickness prediction values ​​to form a thickness sequence; Step 6: Convert the thickness sequence into actual thickness data by pixels, classify the icing status according to the preset threshold, and output the contact wire icing identification result.

[0022] This invention proposes a catenary icing identification method based on an improved Deformable DETR model. First, catenary image sequences are acquired using deployed video monitoring devices, and standardized video frames are generated after distortion correction and scale calibration. Then, the centerline and unit normal vector of the contact wire are extracted from the standardized video frames, and a line anchor query vector is constructed and introduced into the improved Deformable DETR model. A deformable sampling mechanism guided by the normal vector is used to achieve structural awareness in the feature extraction process. At the model output, a dedicated icing segmentation head and thickness regression head are constructed to output the icing mask in the neighborhood of the contact wire and the predicted normal thickness along the line, respectively. Finally, the thickness sequence is converted into actual thickness data, and a graded judgment is achieved based on a set threshold, outputting a refined catenary icing identification result.

[0023] In this embodiment, the process of acquiring the original image sequence captured by the video monitoring device deployed along the overhead contact line, performing distortion correction and scaling on the original image sequence to obtain standardized video frames, specifically involves: The video monitoring device deployed along the contact wire collects the original image sequence of the visible area of ​​the contact wire. The video monitoring device takes pictures using a fixed angle, constant frame rate and uniform resolution parameters. Distortion correction processing is performed on the original image sequence to eliminate radial distortion and projection error in the image based on preset camera intrinsic and extrinsic parameters. Based on the preset pixel length conversion relationship in the image, a scale calibration operation is performed to establish the mapping relationship between image pixels and actual physical size, and the pixel conversion ratio is obtained. The original image sequence after distortion correction and scaling is uniformly formatted to generate standardized video frames.

[0024] This invention acquires raw image sequences of the visible area of ​​the contact wire using video monitoring devices deployed along the contact wire. By employing shooting parameters with a fixed viewing angle, constant frame rate, and uniform resolution, consistent image quality is ensured. Camera distortion correction and scale calibration are performed on the acquired raw image sequences. Image distortion errors are eliminated based on camera intrinsic and extrinsic parameters. A mapping relationship between image pixels and actual physical dimensions is established using a preset pixel length conversion relationship, thereby obtaining the pixel conversion ratio. Finally, the image sequences are uniformly formatted to generate standardized video frames with a unified spatial reference and convertible physical dimensions, laying a data foundation for subsequent contact wire structure identification and icing thickness measurement.

[0025] In this embodiment, the line structure detection specifically refers to: The Sobel operator convolution operation is performed on the standardized video frames to calculate the gray-level change rate in the horizontal and vertical directions respectively, and the gradient magnitude map is synthesized. In the gradient magnitude map, extract edge connected structures that have a grayscale change rate greater than a set threshold, have pixel-level connectivity, and maintain a consistent main direction. The pixel-level connectivity means that any two pixels in the pixel set can establish a continuous path through adjacent pixels in the image grid in a 4-connected or 8-connected manner.

[0026] Perform geometric fitting and filtering operations on the edge-connected structure to construct the centerline of the contact line; Perform geometric fitting and filtering operations on the extracted edge-connected structures, specifically including: For each set of pixels within an edge-connected structure, a least-squares line fitting is performed based on the pixel coordinates to obtain a fitted line segment representing the main direction of the connected structure. All fitted line segments are filtered according to length, mean edge response, fitting residual and directional stability, and fitted line segments whose length exceeds the preset threshold, edge response intensity is higher than the preset value and fitting error is lower than the set tolerance are retained. Multiple fitted line segments selected through screening are connected in spatial order to construct a continuous contact line centerline, which is used for subsequent calculation of the unit normal vector and generation of prior data.

[0027] Discrete sampling points are extracted at fixed intervals along the centerline of the contact line, and the unit normal vector of each discrete sampling point is calculated. The contact wire prior data is generated by combining the coordinates of the discrete sampling points, the unit normal vector, and the relevant structural parameters.

[0028] The relevant structural parameters include curvature value, edge response intensity, and fitting residual; The curvature value is calculated from the first and second derivatives of the centerline of the contact line at the sampling point; The edge response intensity is obtained by finding the gray value at the corresponding sampling point in the gradient magnitude map; The fitting residual is the shortest distance between the discrete sampling points and the fitted curve of the center line.

[0029] This invention calculates the grayscale gradient changes of standardized video frames by performing Sobel convolution operations, constructing a gradient magnitude map, and extracting edge connectivity structures with pixel-level connectivity and directional consistency from it. Subsequently, the edge structure is geometrically fitted using the least squares method to obtain multiple main direction line segments. High-quality fitted line segments are selected based on indicators such as length, edge strength, fitting error, and directional stability, and connected in spatial order to form a continuous contact line centerline. Discrete sampling points are extracted at fixed intervals along the contact line centerline, and parameters such as the unit normal vector, curvature value, edge response intensity, and fitting residual are calculated for each sampling point to generate contact line prior data. Based on this prior information, the structural parameters of each discrete sampling point are combined to construct a line anchor query vector, which is then uniformly arranged into a set of line anchor query vectors to guide subsequent feature extraction and icing recognition tasks in the visual model.

[0030] In this embodiment, the construction of the anchor query vector based on the prior data of the contact wire specifically involves: The discrete sampling point location coordinates, unit normal vector, curvature value, edge response intensity, and fitting residual are combined to construct the corresponding line anchor query vector; The anchor query vectors constructed from all discrete sampling points are uniformly arranged to generate a set of anchor query vectors.

[0031] Based on prior information extracted from the centerline of the contact line, this invention constructs a line anchor query vector with physical geometric semantics at each discrete sampling point by combining its position coordinates, unit normal vector, curvature value, edge response intensity, and fitting residual. The query vectors corresponding to all discrete sampling points are then uniformly arranged in spatial order to form a set of line anchor query vectors, providing a structured and highly recognizable input representation for subsequent visual model guidance sampling and icing feature modeling.

[0032] In this embodiment, the introduction of a guided sampling offset based on a unit normal vector into the deformable attention module of the improved Deformable DETR model, so that the sampling points are sparsely distributed along the normal direction of the contact line centerline, specifically involves: Standardized video frames are input into the feature extraction network of the improved Deformable DETR model to obtain a multi-scale feature map sequence after multi-scale convolution and feature fusion processing; Perform deformable attention update operation: Using the current position coordinates of each line anchor query vector in the line anchor query vector set as a reference point, a learnable sampling offset and sampling weight are initialized for each reference point in the deformable attention module; The learnable sampling offset is initialized to a zero vector and automatically updated through backpropagation during training; the sampling weights are initialized to a uniform distribution and are gradually adjusted according to the loss function during training. Based on the unit normal vector and curvature value in the anchor query vector, a normal guide term is superimposed on the learnable sampling offset to generate a guide sampling offset; The process of generating the guiding sampling offset is as follows: The offset prediction layer inside the improved Deformable DETR model outputs a learnable sampled offset for each reference point; The normal direction of the sampling offset is determined based on the unit normal vector in the anchor query vector, and the offset scaling factor is calculated in combination with the curvature value. : ; in, For the first The offset scaling factor for each sampling point; This represents the curvature value of the centerline of the contact line at this sampling point. These are preset adjustment parameters used to control the curvature's sensitivity to scaling.

[0033] The smaller the curvature value, the larger the offset scaling factor; the larger the curvature value, the smaller the offset scaling factor. Multiply the offset scaling factor by the unit normal vector to obtain the normal guide term of the sampling offset. The learnable sampling offset is vector-superimposed with the normal guide term to generate a guide sampling offset that is limited to the normal direction of the contact line centerline; The process of generating learnable sampling offsets is as follows: In the improved Deformable DETR model, each anchor query vector corresponds to a reference point position, which is input to the offset prediction layer inside the model. The offset prediction layer is a feedforward neural network structure used to output a set of learnable sampling offsets based on the feature representation of the reference point. In the initial stage of model training, the learnable sampling offsets are initialized as zero vectors, and the sampling point positions coincide with the reference points. During training, the parameters of the offset prediction layer are continuously updated through backpropagation, so that the sampling offsets are gradually adjusted to the optimal values, thereby providing several sampling positions for the reference points on different feature scale maps.

[0034] The sampling points are sparsely distributed along the unit normal direction of the centerline of the contact line, and a normal bandwidth threshold is set to constrain the distribution range. The sparse distribution refers to selecting a finite number of sampling points at fixed intervals within the normal bandwidth along the unit normal direction of the contact wire centerline. Limit the component of the learnable sampling offset in the tangential direction of the contact line centerline to prevent the sampling point from shifting too much in the tangential direction; The restrictions include setting an amplitude threshold for the tangential component of the learnable sampling offset, ensuring that the absolute value of the tangential component of the learnable sampling offset does not exceed the amplitude threshold range, and performing normalization processing when the tangential component of the learnable sampling offset exceeds the amplitude threshold, thereby preventing the sampling point from shifting too much along the tangential direction of the contact line centerline.

[0035] According to the guiding sampling offset and sampling weight, sparse sampling and weighted aggregation are performed on the multi-scale feature map to update the corresponding line anchor query vector representation and complete the deformable attention update operation. The sparse sampling refers to determining a finite number of sampling point positions in a multi-scale feature map based on the reference point position and the guiding sampling offset, and extracting feature values ​​at the finite number of sampling point positions. Within the decoder layer, the deformable attention update operation and feedforward update are repeatedly performed on all anchor query vectors, and the guided updated anchor query vectors are output. The feedforward update involves inputting the updated anchor query vector into the feedforward fully connected subnetwork after completing the deformable attention update operation. The feedforward fully connected subnetwork includes two layers of linear transformation and nonlinear activation functions, which are used to perform feature mapping and nonlinear transformation on the anchor query vector.

[0036] This invention introduces a guided sampling mechanism based on the contact line prior structure into the improved Deformable DETR model. By constructing a line anchor query vector containing elements such as position coordinates, unit normal vector, and curvature value, a guided sampling offset, constrained to the contact line normal direction, is generated for each reference point in the deformable attention module. Specifically, a normal guidance term controlled by the unit normal vector and curvature is superimposed on the learnable sampling offset generated by the offset prediction layer, ensuring that the sampling points are sparsely distributed within the normal bandwidth region of the contact line centerline. An amplitude limit is set on the tangential offset to prevent the sampling points from drifting along the tangential direction. This sampling method performs sparse sampling and weighted aggregation on multi-scale feature maps, optimizes the update process of the line anchor query vector, and iterates attention and feedforward update operations repeatedly in the decoder layer. This ensures that the model efficiently extracts local key region features under the guidance of geometric constraints, effectively improving the localization accuracy and model convergence speed of contact line icing detection.

[0037] In this embodiment, the step of generating an ice accretion segmentation mask and contact line normal thickness prediction values ​​at the output of the improved Deformable DETR model, and applying a continuity constraint along the line to the thickness prediction values ​​to form a thickness sequence, specifically involves: At the output of the improved Deformable DETR model, the classification prediction head of the Deformable DETR model is replaced with an ice segmentation head, and the bounding box regression head of the Deformable DETR model is transformed into a thickness regression head. The icing segmentation head takes guided, updated line anchor query vectors and multi-scale feature maps as input: On the multi-scale feature map, the center line of the contact line is projected onto the feature map coordinate system, and feature strips within a preset bandwidth range are clipped on both sides of the normal direction to extract local feature regions. Local feature regions are extracted from the neighborhood of the center line of the contact line. The anchor query vector and the local feature regions are fused through a cross-attention mechanism to obtain a fused feature representation. The fused feature representation is then processed by a convolutional layer to extract features. The low-resolution features are gradually amplified to match the pixel resolution of the neighborhood of the center line of the contact line in the standardized video frame through an upsampling module. The icing probability value of each pixel position in the neighborhood is output to form a local mask prediction. The contact wire centerline neighborhood is a narrow region formed by extending a preset bandwidth on both sides of the contact wire centerline as the center and along the unit normal direction. The process of generating the fused feature representation is as follows: using the line anchor query vector as the query vector, using the set of pixel features in the local feature region of the contact line centerline neighborhood as the key and value, calculating the similarity distribution between the query vector and the local feature set through a cross-attention mechanism, and performing weighted aggregation on the local feature set based on the similarity distribution to obtain the fused feature representation.

[0038] The local mask prediction is then compared with a preset threshold: When the icing probability value is greater than or equal to the preset threshold, the corresponding pixel position is marked as icing state; When the icing probability value is less than the preset threshold, the corresponding pixel position is marked as non-iced. Obtain a binary icing segmentation mask for the local region; The thickness regression head takes guided-updated line anchor query vectors and multi-scale feature maps as inputs to the regression network; The regression network is a multilayer perceptron structure. The output layer dimension of the multilayer perceptron structure corresponds to the number of discrete sampling points of the center line of the contact line. The normal thickness of the contact line at each sampling point is output point by point to form a multidimensional thickness sequence. Apply a continuity constraint along the line to the multidimensional thickness sequence: limit the difference in the predicted normal thickness values ​​between adjacent sampling points to not exceed a preset continuity threshold; A second-order difference smoothing process is performed on the multidimensional thickness sequence to obtain the thickness sequence along the center line of the contact line.

[0039] This invention introduces an icing segmentation mask generation and contact line normal thickness regression mechanism at the output of the improved Deformable DETR model. By replacing the original classification prediction head and bounding box regression head with icing segmentation head and thickness regression head respectively, it achieves refined identification and thickness quantification of the contact line region. Specifically, the icing segmentation head uses a cross-attention mechanism to fuse the line anchor query vector and contact line neighborhood features to generate a high-resolution local icing probability map, and outputs a binary segmentation mask through threshold judgment. The thickness regression head, based on a multilayer perceptron structure, performs point-by-point regression on the line anchor query vector of each discrete sampling point to predict the thickness value in the normal direction, and applies line continuity constraints and second-order difference smoothing to the thickness sequence to ensure the physical rationality and spatial coherence of thickness changes, thereby achieving accurate segmentation of the contact line icing state and thickness continuity prediction.

[0040] In this embodiment, the step of converting the thickness sequence into actual thickness data through pixels, classifying the icing state according to a preset threshold, and outputting the contact wire icing identification result is specifically as follows: The thickness sequence is converted to the pixel conversion ratio to obtain the actual thickness data at each discrete sampling point. The actual thickness data is compared with a preset set of ice thickness level thresholds, and the ice level label corresponding to each discrete sampling point is determined based on the interval range corresponding to the actual thickness data at each discrete sampling point. The area with an actual thickness of less than one millimeter is classified as a non-icing level; A thickness between one and three millimeters is classified as a light icing level; A 3 to 5 mm range is classified as moderate icing. Ice thickness of 5 mm or more is classified as severe icing.

[0041] According to the arrangement order of discrete sampling points on the center line of the contact line, the icing level labels of each sampling point are combined in sequence to construct an icing level sequence along the center line of the contact line. The binary icing segmentation mask is mapped and associated with the corresponding icing level sequence. Combined with the spatial location of discrete sampling points, the icing state at each location is jointly determined to generate the icing identification result on the center line of the contact line.

[0042] The joint judgment logic is as follows: If a discrete sampling point is marked as icy in the binary icing segmentation mask, and the level label corresponding to its actual thickness data is not "no icing", then the point is confirmed as an icy area. If the point is marked as icy, but the thickness level is "no icing", it is considered a potentially misjudged area. If the point is marked as non-iced and the thickness level is non-iced, then the point is confirmed as a non-iced area. If a point is marked as non-iced, but the thickness level is light icing or above, it is determined to be an area with abnormal thickness.

[0043] After obtaining the contact wire normal thickness sequence, this invention further converts it into actual thickness data through pixel conversion. Based on a preset set of grading thresholds, it performs icing level determination on each discrete sampling point, classifying it into four levels: no icing, light icing, moderate icing, and heavy icing. A complete icing level sequence is constructed according to the centerline order. Subsequently, this level sequence is spatially mapped and associated with a binary icing segmentation mask. Based on a joint judgment logic, pixel-level classification results and thickness level information are fused to comprehensively determine the icing state at each sampling point. This not only improves the accuracy and robustness of detection but also supports explicit identification of icing misjudgments, missed judgments, and areas with abnormal thickness, thereby achieving refined grading identification and spatial location labeling of the contact wire icing state.

[0044] The improvement in the Deformable DETR model lies in the introduction of a guided sampling offset mechanism based on the unit normal vector, replacing the fully learnable sampling offset strategy in the original Deformable DETR model. In the deformable attention module, the current position coordinates of each line anchor query vector in the line anchor query vector set are used as a reference point to initialize the sampling offset as a zero vector, which is updated by the offset prediction layer within the model during training. Based on this, a direction-defined normal guidance term is superimposed according to the unit normal vector and curvature value in each line anchor query vector to generate a guided sampling offset limited to the normal direction of the contact line centerline. This offset superposition process is completed by multiplying the offset scaling factor with the unit normal vector and then superimposing it with the learnable sampling offset execution vector. The guided sampling offset distributes the sampling points sparsely along the contact line normal direction, controls the sampling range by setting a normal bandwidth threshold, and applies amplitude constraints to the tangential component of the sampling offset to prevent excessive offset of the sampling points along the tangential direction.

[0045] The improved Deformable DETR model modifies the output structure of the original model, replacing the classification prediction head with an icing segmentation head and transforming the bounding box regression head into a thickness regression head. The icing segmentation head takes as input the updated line anchor query vector and a multi-scale feature map, projects the contact line centerline onto the feature map, and extracts feature strips within the neighborhood. A cross-attention mechanism is used to fuse the query vector and local feature regions, generating a fused feature representation. This fused feature representation undergoes convolution and upsampling operations, outputting a local icing probability map with a resolution matching the normalized video frame, which is then compared with a preset threshold to form a binary icing segmentation mask.

[0046] The improved Deformable DETR model incorporates a thickness prediction module. The updated anchor query vector and multi-scale feature map are input into the thickness regression head, and the predicted normal thickness values ​​for each discrete sampling point along the contact line centerline are output through a multilayer perceptron structure. A continuity constraint along the line is applied to the output multidimensional thickness prediction sequence, limiting the thickness difference between adjacent sampling points to no more than a preset threshold. Then, second-order difference smoothing is performed on the thickness sequence to obtain the thickness sequence along the contact line direction, which serves as the input for subsequent icing level identification and joint determination.

[0047] The improved Deformable DETR model adds an icing level classification and spatial recognition mechanism based on thickness sequences. The thickness sequence is converted into actual thickness data according to a pixel conversion ratio. Combined with preset multi-level icing thickness interval thresholds, each discrete sampling point is assigned an icing level label according to the interval. An icing level sequence is constructed based on the spatial order of the discrete sampling points and mapped and matched with a binary icing segmentation mask. Through explicit joint judgment logic, the complete icing recognition result on the contact line centerline is output, including iced areas, non-iced areas, misjudged areas, and areas with abnormal thickness.

[0048] Example 1: To verify the feasibility of this invention in practice, it was applied to a pilot section of an electrified railway line in a high-altitude, cold region. This section had a standard pantograph-catenary height, unobstructed surroundings, and facilitated image acquisition. In this scenario, a fixed high-frame-rate camera was used to continuously monitor the contact wire. The video resolution was set to 1920×1080, the frame rate was 15fps, and at least 800 valid images were acquired per hour. After receiving the image frames, the system first performed standardization processing, including camera intrinsic and extrinsic parameter correction, image geometric alignment, and pixel conversion ratio determination. The conversion result was 0.137 mm / pixel.

[0049] In the algorithm application process, the system first performs structure detection in the contact line region. Based on the Sobel operator, it calculates the image gradient map, extracts line structure features with edge connectivity and consistency in the principal direction, and constructs the contact line centerline through least-squares straight-line fitting. Discrete sampling points are generated every 0.5 mm along the centerline, and the unit normal vector, curvature value, edge response intensity, and fitting residual are extracted to construct a set of line anchor query vectors. This set is then input into the improved DeformableDETR model, where a normal guidance term is introduced into its deformable attention module to constrain the sparse distribution of sampling points in the normal direction and limit the tangential offset, thereby enhancing the model's ability to perceive the contact line neighborhood.

[0050] In the decoder module, the line anchor query vector is continuously updated, ultimately generating a binary icing mask through the segmentation head. The thickness regression head outputs the predicted normal thickness value for each discrete point. The thickness values ​​are then converted to pixels and smoothed using second-order difference, outputting a thickness sequence which is matched against a preset set of icing level thresholds to generate four levels of icing labels. This ultimately forms an icing level sequence along the contact line centerline, which, in conjunction with the masking results, outputs a structured recognition result.

[0051] To evaluate the actual effect, video was captured and analyzed in this section from 7:00 to 19:00 daily for five consecutive days. Statistical results show that the system processed a total of 172,800 image frames, identified 1,688 effective icing areas, and extracted 42,876 thickness data points. After on-site annotation and comparison with manual thickness measurement tools, the average thickness prediction error was ±0.29mm, with the vast majority of predicted values ​​falling within ±0.5mm of the actual value, and the overall error rate being less than 6%. The recognition accuracy for moderate icing (3-5mm) reached 94.1%, and the recognition accuracy for heavily iced sections (over 5mm) reached 97.3%. The binary mask matching accuracy remained consistently above 90%. Specific data are shown in Table 1. Table 1 Comparison Test Results of Contact Line Ice Recognition Performance

[0052] As shown in Table 1, the proposed contact wire icing identification method exhibits good recognition performance under different time periods and icing levels. Specifically, under light icing conditions, the recognition accuracy is above 92% at all time periods, especially at 2:00 AM and 6:00 AM, reaching 94.2% and 95.1% respectively, indicating that the model maintains stable recognition capabilities under low temperature and high humidity conditions. For moderate icing, the accuracy remains consistently above 90%, reflecting the method's strong adaptability to changes in icing thickness. Under heavy icing conditions, the difficulty of recognition increases due to the blurred edges of the ice layer, but the method still maintains an accuracy of over 85%, significantly higher than traditional methods by approximately 12 percentage points, verifying the robustness of this invention under extreme conditions such as unclear boundaries and complex icing thickness. Considering the performance across different levels and time periods, the identification process provided by this invention has significant advantages in improving recognition accuracy and reducing the risk of missed and false positives.

[0053] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for identifying icing on a catenary based on video monitoring, characterized in that, Includes the following steps: Step 1: Collect the original image sequence captured by the video monitoring device deployed along the overhead contact line, perform distortion correction and scale calibration on the original image sequence to obtain standardized video frames; Step 2: Perform line structure detection in standardized video frames, extract the center line of the contact line and the corresponding unit normal vector, and generate prior data for the contact line; Step 3: Construct the anchor query vector based on the prior data of the contact wire; Step 4: Input the standardized video frames into the improved Deformable DETR model. Introduce a guided sampling offset based on the unit normal vector into the deformable attention module of the improved Deformable DETR model, so that the discrete sampling points are sparsely distributed along the normal direction of the center line of the contact line. Step 5: Generate a binary icing segmentation mask and thickness prediction values ​​at the output of the improved Deformable DETR model, apply a continuity constraint along the line to the thickness prediction values, and form a thickness sequence; Step 6: Convert the thickness sequence into actual thickness data, classify the icing status according to the preset threshold, and output the contact wire icing identification result.

2. The method according to claim 1, wherein, The acquisition of the original image sequence captured by the video monitoring device deployed along the overhead contact line involves performing distortion correction and scaling on the original image sequence to obtain standardized video frames. Specifically: The video monitoring device deployed along the contact wire collects the original image sequence of the visible area of ​​the contact wire. The video monitoring device takes pictures using a fixed angle, constant frame rate and uniform resolution parameters. Distortion correction processing is performed on the original image sequence to eliminate radial distortion and projection error in the image based on preset camera intrinsic and extrinsic parameters. Based on the preset pixel length conversion relationship in the image, a scale calibration operation is performed to establish the mapping relationship between image pixels and actual physical size, and the pixel conversion ratio is obtained. The original image sequence after distortion correction and scaling is uniformly formatted to generate standardized video frames.

3. The method according to claim 1, characterized in that, The line structure detection specifically includes: The Sobel operator convolution operation is performed on the standardized video frames to calculate the gray-level change rate in the horizontal and vertical directions respectively, and the gradient magnitude map is synthesized. In the gradient magnitude map, extract edge connected structures that have a grayscale change rate greater than a set threshold, have pixel-level connectivity, and maintain a consistent main direction. Perform geometric fitting and filtering operations on the edge-connected structure to construct the centerline of the contact line; Discrete sampling points are extracted at fixed intervals along the centerline of the contact line, and the unit normal vector of each discrete sampling point is calculated. The discrete sampling point coordinates, unit normal vector and relevant structural parameters are combined to generate contact wire prior data; The relevant structural parameters include curvature value, edge response intensity, and fitting residual; The curvature value is calculated from the first and second derivatives of the centerline of the contact line at the sampling point; The edge response intensity is obtained by finding the gray value at the corresponding sampling point in the gradient magnitude map; The fitting residual is the shortest distance between the discrete sampling points and the fitted curve of the center line.

4. The method of claim 1, wherein the method comprises: The construction of the anchor query vector based on prior contact line data is specifically as follows: The discrete sampling point location coordinates, unit normal vector, curvature value, edge response intensity, and fitting residual are combined to construct the corresponding line anchor query vector; The anchor query vectors constructed from all discrete sampling points are uniformly arranged to generate a set of anchor query vectors.

5. The method of claim 1, wherein the method comprises: The introduction of a guided sampling offset based on the unit normal vector in the deformable attention module of the improved Deformable DETR model specifically involves: Standardized video frames are input into the feature extraction network of the improved Deformable DETR model to obtain a multi-scale feature map sequence after multi-scale convolution and feature fusion processing; Using the current position coordinates of each line anchor query vector in the line anchor query vector set as a reference point, a learnable sampling offset and sampling weight are initialized for each reference point in the deformable attention module; The learnable sampling offset is initialized to a zero vector and automatically updated through backpropagation during training; the sampling weights are initialized to a uniform distribution and are gradually adjusted according to the loss function during training. Based on the unit normal vector and curvature value in the anchor query vector, a normal guide term is superimposed on the learnable sampling offset to generate a guide sampling offset.

6. The method of claim 1, wherein the method comprises: The process of generating the guiding sampling offset is as follows: The offset prediction layer inside the improved Deformable DETR model outputs a learnable sampled offset for each reference point; The normal direction of the sampling offset is determined based on the unit normal vector in the anchor query vector, and the offset scaling factor is calculated in combination with the curvature value; the offset scaling factor is multiplied by the unit normal vector to obtain the normal guide term of the sampling offset. The learnable sampling offset is vector-superimposed with the normal guide term to generate a guide sampling offset that is limited to the normal direction of the contact line centerline; The sampling points are sparsely distributed along the unit normal direction of the center line of the contact line, and a normal bandwidth threshold is set to constrain the distribution range.

7. The method of claim 1, wherein the method comprises: The sparse distribution specifically refers to: In the unit normal direction of the centerline of the contact wire, a finite number of sampling points are selected at fixed intervals within the normal bandwidth. Limit the component of the learnable sampling offset in the tangential direction of the contact line centerline; The restrictions include setting an amplitude threshold for the tangential component of the learnable sampling offset, ensuring that the absolute value of the tangential component of the learnable sampling offset does not exceed the amplitude threshold range, and performing normalization processing when the tangential component of the learnable sampling offset exceeds the amplitude threshold. Based on the guided sampling offset and sampling weight, sparse sampling and weighted aggregation are performed on the multi-scale feature map to update the corresponding line anchor query vector. The sparse sampling refers to determining a finite number of sampling point positions in a multi-scale feature map based on the reference point position and the guiding sampling offset, and extracting feature values ​​at the finite number of sampling point positions. The updated corresponding anchor query vector is input into the feedforward fully connected subnetwork, which includes two layers of linear transformation and nonlinear activation function, used to perform feature mapping and nonlinear transformation on the anchor query vector, and output the guided updated anchor query vector.

8. The method for identifying icing on overhead contact lines based on video monitoring according to claim 1, characterized in that, The process involves generating a binary icing segmentation mask and contact line normal thickness predictions at the output of the improved Deformable DETR model, and applying a continuity constraint along the line to the thickness predictions to form a thickness sequence. Specifically: The icing segmentation head takes guided, updated line anchor query vectors and multi-scale feature maps as input: On the multi-scale feature map, the center line of the contact line is projected onto the feature map coordinate system, and feature strips within a preset bandwidth range are clipped on both sides of the normal direction to extract local feature regions. Local feature regions are extracted from the neighborhood of the center line of the contact line. The anchor query vector and the local feature regions are fused through a cross-attention mechanism to obtain a fused feature representation. The fused feature representation is then processed by a convolutional layer to extract features. The low-resolution features are gradually amplified to match the pixel resolution of the neighborhood of the center line of the contact line in the standardized video frame through an upsampling module. The icing probability value of each pixel position in the neighborhood is output to form a local mask prediction. The local mask prediction is then compared with a preset threshold: When the icing probability value is greater than or equal to the preset threshold, the corresponding pixel position is marked as icing state; When the icing probability value is less than the preset threshold, the corresponding pixel position is marked as non-iced. Obtain a binary icing segmentation mask for the local region; The thickness regression head takes guided-updated line anchor query vectors and multi-scale feature maps as inputs to the regression network; The regression network is a multilayer perceptron structure. The output layer dimension of the multilayer perceptron structure corresponds to the number of discrete sampling points of the center line of the contact line. The normal thickness of the contact line at each sampling point is output point by point to form a multidimensional thickness sequence. Apply a continuity constraint along the line to the multidimensional thickness sequence: limit the difference in the predicted normal thickness values ​​between adjacent sampling points to not exceed a preset continuity threshold; A second-order difference smoothing process is performed on the multidimensional thickness sequence to obtain the thickness sequence along the center line of the contact line.

9. The method for identifying icing on overhead contact lines based on video monitoring according to claim 1, characterized in that, The process of converting the thickness sequence into actual thickness data through pixels, classifying the icing state according to a preset threshold, and outputting the contact network icing identification result is as follows: The thickness sequence is converted to the pixel conversion ratio to obtain the actual thickness data at each discrete sampling point. The actual thickness data is compared with a preset set of ice thickness level thresholds, and the ice level label corresponding to each discrete sampling point is determined based on the interval range corresponding to the actual thickness data at each discrete sampling point. According to the arrangement order of discrete sampling points on the center line of the contact line, the icing level labels of each sampling point are combined in sequence to construct an icing level sequence along the center line of the contact line. The binary icing segmentation mask is mapped and associated with the corresponding icing level sequence. Combined with the spatial location of discrete sampling points, the icing status at each location is jointly determined to generate the contact wire icing identification result.