Method and device for detecting dynamic geometric parameters of a catenary and electronic equipment
By segmenting catenary images using a deep learning instance segmentation model and extracting the equations of guide lines and straight lines, the problem of insufficient detection accuracy of catenary geometric parameters in complex scenarios is solved, and high-precision detection is achieved under low-pixel and low-contrast conditions.
Patent Information
- Application Number
- CN202210133799.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-11
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-02-11
AI Technical Summary
Existing technologies struggle to accurately detect the geometric parameters of overhead contact lines in complex scenarios, especially when image quality deteriorates against backgrounds such as tunnels, bridges, mountains, and buildings, resulting in insufficient detection accuracy.
A deep learning-based instance segmentation model is used to segment the catenary image, extracting instances of the pantograph slide and contact wire, and calculating the dynamic geometric parameters of the catenary using the equations of the guide line and straight line.
It improves the detection accuracy of dynamic geometric parameters of the overhead contact line under low pixel and low contrast conditions, has strong anti-interference capabilities, and can accurately identify the structure of the pantograph and overhead contact line in real time.
Smart Images

Figure CN114549440B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of railway overhead line system, in particular to an overhead line system dynamic geometric parameter detection method and device and electronic equipment. BACKGROUND
[0002] The overhead line system is a special form of power transmission line which is erected in a zigzag shape above the railway line and supplies power to electric locomotives. The electric locomotive obtains power through the overhead line system, and the relative position relationship between the pantograph and the overhead line system directly affects the current collection performance of the electric locomotive. Therefore, online detection of the geometric parameters of the overhead line system can early detect or prevent potential safety hazards in the pantograph and overhead line system.
[0003] At present, the existing technology for detecting the geometric parameters of the overhead line system mainly uses an industrial camera to obtain images of the overhead line system, and then calculates the geometric parameters of the overhead line system through traditional image processing algorithms and calibration parameters. However, the existing technology can only solve some specific image processing tasks and cannot cope with the influence of complex scenes in electrified railways on image quality. For example, the interference of complex scenes such as tunnels, bridges, mountains, buildings, and plants will cause the contrast of the image to decrease, making the detail resolution of the image worse. Therefore, the existing technology has weak anti-interference ability for complex scenes. SUMMARY
[0004] The embodiments of the present application disclose an overhead line system dynamic geometric parameter detection method and device and electronic equipment, which can effectively cope with the interference of complex scenes and improve the accuracy of real-time detection of the dynamic geometric parameters of the overhead line system.
[0005] The embodiments of the present application disclose an overhead line system dynamic geometric parameter detection method, characterized in that the method comprises:
[0006] The instance segmentation model is trained by using a sample data set, and the sample data set comprises a plurality of sample shooting images and image region annotations corresponding to pantograph slides and contact lines in each sample shooting image.
[0007] The catenary height line of the overhead line system is extracted from the pantograph slide instance.
[0008] The straight line equation of the contact line is determined according to the contact line instance.
[0009] The dynamic geometric parameters of the overhead line system are determined according to the catenary height line and the straight line equation of the contact line.
[0010] As an optional implementation, the extracting the catenary wire from the pantograph slide instance comprises:
[0011] determining the slide position coordinates of the catenary wire in the slide binary mask image corresponding to the pantograph slide instance according to the pantograph slide instance;
[0012] determining the detection area of the pantograph slide according to the slide binary mask image corresponding to the pantograph slide instance and the slide position coordinates; the detection area comprises a plurality of pixel rows containing slide pixel points;
[0013] determining the average value of the slide pixel points corresponding to the pixel rows in the detection area according to the total number of the slide pixel points included in the detection area and the total number of the pixel rows included in the detection area, and determining the quantity threshold value according to the average value of the slide pixel points;
[0014] if there are a plurality of continuous pixel rows in the detection area, and the number of slide pixel points included in each row of the plurality of continuous pixel rows is greater than the quantity threshold value, then the image position of the first row of the plurality of continuous pixel rows in the detection area is determined as the image position of the catenary wire in the slide binary mask image.
[0015] As an optional implementation, the determining the straight line equation of the catenary wire according to the catenary line instance comprises:
[0016] obtaining a gradient gray scale image from the catenary line binary mask image corresponding to the catenary line instance by using a distance transformation function;
[0017] performing binary processing on the pixel maximum values of the gradient gray scale image along a first direction and a second direction respectively, and generating corresponding binary images; the first direction is perpendicular to the second direction;
[0018] determining the straight line equation of the catenary wire according to the binary images.
[0019] As an optional implementation, the determining the straight line equation of the catenary wire according to the binary images comprises:
[0020] performing straight line detection on the binary images, and generating corresponding straight line detection results;
[0021] if the straight line parameter information included in the straight line detection result meets the parameter specification, then the straight line detection result is determined as the straight line equation of the catenary wire; if the straight line parameter information included in the straight line detection result does not meet the parameter specification, then the straight line equation of the catenary wire is determined by performing straight line fitting on the catenary line binary mask image.
[0022] As an optional implementation, before the instance segmentation of the pantograph slide plate and the contact wire in the to-be-processed photographed image is performed by using the instance segmentation model trained based on deep learning, the method further comprises:
[0023] Obtaining a sample data set;
[0024] Inputting a plurality of sample photographed images included in the sample data set into a to-be-trained instance segmentation model to obtain pantograph slide plate sample instances and contact wire sample instances output by the to-be-trained instance segmentation model;
[0025] Calculating a training loss according to the pantograph slide plate sample instances, the contact wire sample instances, and image region labels corresponding to the pantograph slide plate and the contact wire in each of the sample photographed images included in the sample data set, and adjusting weight parameters of the to-be-trained instance segmentation model according to the training loss to obtain an instance segmentation model trained based on deep learning.
[0026] As an optional implementation, the geometric parameter comprises a pull-out value of the contact wire in the photographed image; and the determination of the dynamic geometric parameter of the catenary according to the guide height line of the catenary and the straight line equation of the contact wire comprises:
[0027] When there are double-branch contact wires in the catenary, calculating a coordinate of an intersection point of the pantograph slide plate and the contact wire according to the guide height line of the catenary and the straight line equation of the contact wire;
[0028] Calculating a pull-out value and an inclination angle of each of the double-branch contact wires according to the coordinate of the intersection point;
[0029] Selecting a first contact wire having a minimum difference in the pull-out value and the inclination angle from a reference contact wire from the double-branch contact wires; the reference contact wire is a single-branch contact wire tracked before it is detected that there are the double-branch contact wires in the catenary;
[0030] Determining the pull-out value of the first contact wire as the pull-out value of the contact wire in the photographed image.
[0031] As an optional implementation, after the pull-out value of the first contact wire is determined as the pull-out value of the contact wire in the photographed image, the method further comprises:
[0032] Determining another contact wire in the double-branch contact wires other than the first contact wire as a second contact wire;
[0033] If a variation of the pull-out value of the first contact line in a recording time interval exceeds a pull-out value threshold, or a variation of the inclination angle of the first contact line in the recording time interval exceeds an angle threshold, the pull-out value of the second contact line is determined as the pull-out value of the contact line in the captured image.
[0034] The embodiment of the present application discloses a device for detecting dynamic geometric parameters of a catenary, the device comprising:
[0035] A segmentation module is configured to perform instance segmentation on a pantograph slide and a contact line in a to-be-processed captured image by using an instance segmentation model trained based on deep learning, to obtain corresponding pantograph slide instances and contact line instances.
[0036] An extraction module is configured to extract a catenary height line of the catenary from the pantograph slide instances.
[0037] A determination module is configured to determine a straight line equation of the contact line according to the contact line instances.
[0038] A parameter module is configured to determine the dynamic geometric parameters of the catenary according to the catenary height line and the straight line equation of the contact line.
[0039] The embodiment of the present application discloses an electronic device, comprising a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor realize any one of the contact net dynamic geometric parameter detection methods disclosed by the embodiments of the present application.
[0040] The embodiment of the present application discloses a computer readable storage medium, which stores a computer program, wherein the computer program makes the computer execute any one of the contact net dynamic geometric parameter detection methods disclosed by the embodiments of the present application.
[0041] Compared with the related art, the embodiment of the present application has the following beneficial effects:
[0042] The instance segmentation model trained based on deep learning is used to perform instance segmentation on the pantograph slide and the contact line in the to-be-processed captured image; the corresponding pantograph slide instances and contact line instances are generated according to the instance segmentation result, and the catenary height line and the straight line equation of the contact line are extracted therefrom; and the dynamic geometric parameters of the catenary are determined in combination with the catenary height line and the straight line equation of the contact line. It can be seen that, based on the deep learning algorithm, the instance segmentation model is used to perform instance segmentation on the captured image, and the structure of the pantograph and the catenary can still be accurately recognized under the condition that the captured image is low in pixel and low in contrast, thereby improving the accuracy of real-time detection of the dynamic geometric parameters of the catenary, effectively coping with the interference of complex scenes, and having strong anti-interference ability. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without any creative effort.
[0044] Figure 1 is a flowchart of a contact network dynamic geometric parameter detection method disclosed by an embodiment of the present application;
[0045] Figure 2 is a flowchart of another contact network dynamic geometric parameter detection method disclosed by an embodiment of the present application;
[0046] Figure 3 is a flowchart of a Mask R-CNN detection algorithm disclosed by an embodiment of the present application;
[0047] Figure 4 is a flowchart of another contact network dynamic geometric parameter detection method disclosed by an embodiment of the present application;
[0048] Figure 5 is a flowchart of another contact network dynamic geometric parameter detection method disclosed by an embodiment of the present application;
[0049] Figure 6 is a structural schematic diagram of a contact network dynamic geometric parameter detection device disclosed by an embodiment of the present application;
[0050] Figure 7 is a structural schematic diagram of an electronic device disclosed by an embodiment of the present application. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.
[0052] It should be noted that the terms “include” and “have” and any variations thereof in the embodiments of the present application and the drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device.
[0053] In the related art, the dynamic geometric parameters of the catenary can be detected by triangulation. Images of the contact wire are collected by multiple line scanning cameras, the contact wire in the images collected by the multiple cameras is positioned and matched by using image processing technology, spatial coordinate transformation and analysis calculation are performed according to camera calibration parameters, and parameters such as the height of the contact wire and the pull-out value are obtained. This scheme has high detection accuracy, but the installation of the equipment is complex, calibration is difficult, and the system cost is high.
[0054] In addition, the dynamic geometric parameters of the catenary can also be detected by laser radar measurement. The geometric position of the contact wire in the cross section is measured by scanning. Although the laser scanning radar device has a simple structure, it has the problems of low measurement speed, low measurement accuracy, and being easily affected by the environment and the reflectivity of the measured object.
[0055] For the visual measurement method based on optical imaging, although the traditional image algorithm can solve some image processing tasks in certain specific scenarios, its generalization ability and robustness are poor, and it cannot cope with the complex scenes of the catenary in electrified railways and the influence of light conditions on the quality of collected images. For example, when the collected catenary image background is a tunnel, a bridge, a mountain, a building, a plant, or in a poor light condition such as at night or in rainy weather, the traditional image algorithm cannot accurately obtain the dynamic geometric parameters of the catenary from the collected images with low pixels and low contrast.
[0056] Embodiments of the present application disclose a catenary dynamic geometric parameter detection method, device and electronic equipment, which can effectively cope with the interference of complex scenes and improve the accuracy of real-time detection of catenary dynamic geometric parameters. The following will be described in detail.
[0057] Please refer to Figure 1 , Figure 1 is a flowchart of a catenary dynamic geometric parameter detection method disclosed by embodiments of the present application. Among them, Figure 1 The catenary dynamic geometric parameter detection method described can be applied to electronic equipment such as personal computers and industrial computers, and embodiments of the present application are not limited. As Figure 1 shown, the catenary dynamic geometric parameter detection method can include the following steps:
[0058] 101. The instance segmentation model trained based on deep learning is used to perform instance segmentation on the pantograph slide and the contact wire in the to-be-processed photographed image, and the corresponding pantograph slide instance and contact wire instance are obtained.
[0059] The electronic equipment can perform instance segmentation on the pantograph slide and the contact wire in the to-be-processed photographed image by using the instance segmentation model trained based on deep learning, and obtain the corresponding pantograph slide instance and contact wire instance.
[0060] The catenary is a special form of power transmission line along the railway line, which is erected in the shape of "zigzag" in the air and supplies power to electric locomotives. It is composed of contact suspension, support device, positioning device, pillar and foundation.
[0061] The pantograph slide plate is a key component for electric locomotives to obtain power from the power supply catenary, which is installed at the uppermost part of the pantograph and directly contacts with the contact wire in the catenary.
[0062] The contact wire is an important part of the catenary, which directly transmits current to electric locomotives through friction with the pantograph slide plate on the electric locomotive, and its performance directly affects the current collection quality of electric locomotives and the safe operation of locomotives.
[0063] The to-be-processed photographed image is obtained by shooting through an industrial camera, which can be an infrared thermal imager or a visible light camera, and the specific limitation is not made. The industrial camera can be installed on the roof of the electric locomotive to collect photographed images under the pantograph-catenary operation state. Optionally, the to-be-processed photographed image can be an infrared image or a visible light image, but is not limited thereto.
[0064] The instance segmentation model trained based on deep learning is obtained by training a sample data set, which includes multiple frames of sample photographed images and image region labels corresponding to the pantograph slide plate and the contact wire in each frame of sample photographed image.
[0065] Among them, the number of frames of sample photographed images is not limited, and 6000 frames of sample photographed images can be selected as the sample data set for training the deep learning instance segmentation model, and the pantograph slide plate region and the contact wire region of all sample photographed images are labeled at the instance level. The pantograph slide plate region can be labeled by contour points, for example, labeled by polygons; the contact wire region can be labeled by a straight line with a fixed width, for example, when the image size is 640*480, the fixed width can be set to 5 pixels. Then the labeled file generated after labeling is converted into the foreground mask corresponding to the pantograph slide plate and the contact wire, and the foreground mask is used as the image region label corresponding to the pantograph slide plate and the contact wire, so as to obtain the sample data set with image region label.
[0066] Instance segmentation can frame different instances in the image by target detection method, and then label each pixel in different instance region by semantic segmentation method. Therefore, the instance segmentation method can distinguish different instances belonging to the same category, so as to accurately identify each target object in the image.
[0067] The instance segmentation model trained based on deep learning is used to perform instance segmentation on the captured image of the pantograph and the contact wire by the infrared thermal imager to obtain the pantograph instance and the contact wire instance, and the image region label corresponding to the pantograph instance and the contact wire instance, respectively. The binary mask image and the position coordinates (x, y, w, h) of the region where each pantograph instance and the contact wire instance are located are obtained through binary processing. The x and y in the position coordinates can represent the horizontal coordinate and the vertical coordinate of the center point of each pantograph instance and the contact wire instance, respectively, w can represent the width of the region, and h can represent the height of the region. The threshold value used for binary processing can be 0.5, and the specific value is not limited.
[0068] The method for detecting dynamic geometric parameters of the contact network can be to install an industrial camera or other sensors on the top of the pantograph. When the contact wire slides above the sensor, the computer processes the pulse signal generated by the sensor and outputs the corresponding geometric parameters of the contact network. The method for detecting static geometric parameters of the contact network is to detect the horizontal distance of the contact wire from the center of the line and the height from the rail surface, and then calculate the geometric parameters of the contact network by substituting the actual measurement values into the specific calculation formula. The method for measuring the static geometric parameters of the contact network is affected by factors such as measurement tool error, measurement and calculation accuracy, and is generally measured in the absence of wind or in the presence of slight wind, which cannot cope with the relative motion between the contact wire and the rail plane. The method for dynamically measuring the geometric parameters of the contact network can solve the above problems existing in the static measurement, and better reflect the dynamic relationship between the contact wire, the pantograph, the vehicle body and the line, and meet the real-time detection requirements in the industrial environment.
[0069] 102. Extracting the catenary height of the contact network from the pantograph slide plate instance.
[0070] The electronic device can determine the catenary height of the contact network according to the binary mask image corresponding to the pantograph slide plate instance and the slide plate position coordinates. As an optional implementation, the catenary height of the contact network can be determined by performing straight line detection on the binary mask image corresponding to the pantograph slide plate instance.
[0071] 103. Determining the straight line equation of the contact wire according to the contact wire instance.
[0072] The electronic device can perform straight line detection on the binary mask image corresponding to the contact wire instance, and generate the corresponding straight line detection result, so as to determine the straight line equation of the contact wire according to the straight line detection result.
[0073] 104. Determining the dynamic geometric parameters of the contact network according to the catenary height of the contact network and the straight line equation of the contact wire.
[0074] The electronic device can determine the overhead line and the straight line equation of the contact line to determine the dynamic geometric parameters of the catenary. The dynamic geometric parameters of the catenary include the overhead value of the contact line, the pull-out value, and the horizontal distance between the double-branch contact lines, but are not limited thereto.
[0075] The overhead value is a short name for the height of the contact line suspension point, which can refer to the height of the contact line from the rail plane at the suspension point. The pull-out value is the distance between the contact line at the suspension point and the center of the pantograph slide. The contact line directly contacts and rubs against the pantograph of the electric locomotive. In order to ensure reliable contact between the pantograph and the contact line, prevent the contact line from being disconnected, and ensure uniform wear of the pantograph, the contact line at the suspension point can have a certain offset from the center of the pantograph slide of the electric locomotive.
[0076] The overhead value and the pull-out value of the contact line in the captured image are determined according to the overhead line and the straight line equation of the contact line. In some embodiments, when there are double-branch contact lines at the line branch and anchor segment joints of the catenary, the horizontal distance between the double-branch contact lines in the captured image can be obtained by subtracting the horizontal coordinate value of the intersection point of the double-branch contact lines and the pantograph slide in the captured image. According to the calibration of the coordinate transformation from the captured image coordinates to the real world coordinates, the overhead value, the pull-out value of the contact line, and the horizontal distance between the double-branch contact lines in the captured image can be coordinate-transformed to obtain the dynamic geometric parameters of the catenary in the real world. The dynamic geometric parameters of the catenary in the real world can include the overhead, the pull-out value of the contact line, and the horizontal distance between the double-branch contact lines.
[0077] Due to the limitations of pixels and imaging principles, when the pantograph and the catenary are captured in a background environment with other interference, the contrast of the captured image can be reduced, and the detail resolution can be poor. The embodiments of the present application are based on a deep learning algorithm, and the captured image is segmented by an instance segmentation model. The structure of the pantograph and the catenary can still be accurately identified under conditions such as low pixels and low contrast in the captured image, thereby improving the accuracy of real-time detection of the dynamic geometric parameters of the catenary, effectively dealing with the interference of complex scenes, and having strong anti-interference ability.
[0078] It should be noted that the catenary dynamic geometric parameter detection method disclosed in the foregoing embodiments can be applied to the identification of the pantograph slide and the contact line on the catenary to calculate the overhead value and the pull-out value of the catenary. In some possible embodiments, the catenary dynamic geometric parameter detection method can also detect and locate the key components of the catenary such as the positioner, the positioning tube, the flat wrist arm, and the inclined wrist arm through the instance segmentation model trained based on deep learning, and calculate the geometric parameters of the catenary such as the slope of the positioner, the inclination angle of the wrist arm, the vertical distance of the contact line, and the inclination angle of the support rod based thereon, without limitation.
[0079] Please refer to Figure 2 ,Figure 2 is another flowchart of a method for detecting dynamic geometric parameters of a catenary according to an embodiment of the present application. As shown in Figure 2 , the method comprises the following steps:
[0080] 201. Obtain a sample data set.
[0081] The plurality of sample shooting images included in the sample data set can be obtained by an infrared thermal imager. By labeling the pantograph slide plate region and the contact wire region of all sample shooting images in the sample data set at the instance level, a sample data set with image region labels can be obtained.
[0082] 202. Input the plurality of sample shooting images included in the sample data set to a to-be-trained instance segmentation model to obtain pantograph slide plate sample instances and contact wire sample instances output by the to-be-trained instance segmentation model.
[0083] The pantograph slide plate sample instances and the contact wire sample instances are obtained by performing instance segmentation on the plurality of sample shooting images included in the sample data set by the to-be-trained instance segmentation model.
[0084] 203. Calculate a training loss according to the pantograph slide plate sample instances, the contact wire sample instances, and the image region labels corresponding to the pantograph slide plate and the contact wire in each sample shooting image included in the sample data set, and adjust the weight parameters of the to-be-trained instance segmentation model according to the training loss to obtain an instance segmentation model trained based on deep learning.
[0085] For instance segmentation of the pantograph slide plate and the contact wire, different deep learning instance segmentation models can be used. First, select a deep learning-based instance segmentation model framework. The instance segmentation model can include Mask R-CNN, YOLCAT++, PolarMask, SOLOv2, BlendMask, etc., without limitation. Divide the sample data set into a training set and a validation set, train the instance segmentation model using a model training method, adjust the weight parameters according to the training loss, and obtain a model with optimal weight parameters, thereby obtaining an instance segmentation model trained based on deep learning. The optimization method for model training can be a Stochastic Gradient Descent (SGD) algorithm or an Adaptive Moment Estimation (Adam) algorithm, but is not limited thereto; the training loss calculated can be an L1 loss, an L2 loss, a cross-entropy loss, etc., but is not limited thereto.
[0086] For example, Mask R-CNN is selected as the instance segmentation model. Please refer to Figure 3 , Figure 3is a flowchart of a Mask R-CNN detection algorithm disclosed by the embodiment of the present application. As shown in Figure 3 the Mask R-CNN detection algorithm can include the following steps:
[0087] (1) First, the OpenCV library function is used to pre-process the photographed image, convert the original image into a gray image, and reset and normalize the image size to meet the input requirements of the deep learning model;
[0088] (2) The photographed image is input into the feature extraction network ResNet50-FPN (main network and feature pyramid network) to obtain a multi-layer feature map;
[0089] (3) Different sizes of fixed number of Anchors are set for each pixel position in the multi-layer feature map, and then these regions are sent to the region proposal network (RPN) for foreground and background binary classification and position coordinate regression (x, y, w, h);
[0090] (4) The region of interest (ROI) obtained in the previous step is aligned (ROIAlign), that is, the pixel points of the input image and the feature map are first corresponded, and then the feature map and the fixed feature are corresponded;
[0091] (5) Finally, the ROIs are classified by full connection, and multi-class classification and candidate frame regression are performed to realize class prediction and bounding box prediction, and a mask (Mask) is generated by full convolution to realize mask prediction, thereby completing the instance segmentation task.
[0092] The multi-task loss function of Mask R-CNN is: L = L cls + L box + L mask , wherein L cls is the classification error, L box is the bounding box regression error, and L mask is the segmentation error. The sample data set with image region annotation is divided into a training set and a validation set, wherein the training set is set to 5000 images, and the validation set is 1000 images. The loss function L is optimized by using the back propagation and gradient descent algorithm, and the instance segmentation model is iteratively trained to obtain the optimal model weight; 100000 photographed images collected in real time by the infrared thermal imager on the electric locomotive are tested, the detection rate of the pantograph slide is 99.6%, and the detection rate of the contact line is 94.8%.
[0093] 204. The pantograph slide and the contact line in the photographed image to be processed are segmented by the instance segmentation model trained based on deep learning, to obtain corresponding pantograph slide instances and contact line instances.
[0094] 205. determining the pantograph position coordinate of the catenary conductor in the pantograph binary mask image corresponding to the pantograph slide instance according to the pantograph slide instance.
[0095] wherein the y-axis coordinate of the pantograph slide upper boundary in the pantograph binary mask image corresponding to the pantograph slide instance is the y-axis coordinate of the catenary conductor corresponding to the pantograph slide instance.
[0096] 206. determining the detection area of the pantograph slide according to the pantograph binary mask image corresponding to the pantograph slide instance and the pantograph position coordinate.
[0097] The detection area includes a plurality of pixel rows containing pantograph pixels. By obtaining the x-axis coordinate, y-axis coordinate, area width and area height of the center of the area where the pantograph slide instance is located, the detection area of the pantograph slide can be determined from the pantograph binary mask image.
[0098] 207. determining the average value of pantograph pixels corresponding to the pixel rows in the detection area according to the total number of pantograph pixels included in the detection area and the total number of pixel rows included in the detection area, and determining the quantity threshold value according to the average value of pantograph pixels.
[0099] The quantity threshold value can be the product of the average value of pantograph pixels and a proportionality coefficient, wherein the proportionality coefficient can be 1 / 2, and is not specifically limited.
[0100] 208. If there are a plurality of continuous pixel rows in the detection area, and the number of pantograph pixels included in each row of the plurality of continuous pixel rows is greater than the quantity threshold value, then the image position of the first row of the plurality of continuous pixel rows in the detection area is determined as the image position of the catenary conductor in the pantograph binary mask image.
[0101] For example, the detection area of the pantograph slide is determined according to the binary mask image corresponding to the pantograph slide instance and the pantograph position coordinate (x, y, w, h), the average value A of the number of pantograph pixels in all pixel rows in the detection area is counted, and then it is determined whether the number of pantograph pixels in each pixel row is greater than 1 / 2*A for three consecutive rows from top to bottom. If so, the position of the row is the catenary conductor.
[0102] 209. determining the straight line equation of the contact line according to the contact line instance;
[0103] 210. determining the dynamic geometric parameters of the catenary according to the catenary conductor and the straight line equation of the contact line.
[0104] In an industrial environment, the method using the embodiments of the present application can accurately identify the pantograph and the catenary in real time, and improve the accuracy of real-time detection of the dynamic geometric parameters of the catenary. The per-frame operation time of the deep learning instance segmentation model is about 10 ms. After the height detection, contact line detection, and geometric parameter calculation operations, the maximum output frame of the system is 60 fps, which can meet the real-time detection requirements in an industrial environment.
[0105] Please refer to Figure 4 , Figure 4 is another flowchart of a catenary dynamic geometric parameter detection method disclosed in the embodiments of the present application.
[0106] 401. The instance segmentation model trained based on deep learning is used to perform instance segmentation on the pantograph slide and the contact line in the to-be-processed photographed image, to obtain corresponding pantograph slide instances and contact line instances.
[0107] 402. The height line of the catenary is extracted from the pantograph slide instance.
[0108] 403. The gradient gray scale image is obtained from the contact line binary mask image corresponding to the contact line instance by using the distance transform function.
[0109] The distance transform function is used to calculate the gradient from the center to the outside of the binary mask image corresponding to the contact line instance, and the gradient is converted into a gray scale image, thereby obtaining the gradient gray scale image.
[0110] 404. The pixel maximum value in the first direction and the second direction is taken for the gradient gray scale image, and the corresponding binary image is generated.
[0111] The first direction and the second direction are perpendicular to each other. For example, the first direction can be the x-axis direction, and the second direction can be the y-axis direction. Since the binary mask image corresponding to the contact line instance output by the instance segmentation model has a certain pixel width, the image can be thinned first, so that the center of the straight line where the contact line is located can be fitted more accurately. For example, the distance transform function in OpenCV can be used to calculate the gradient from the center to the outside of the pixel point area of each contact line instance binary mask image, and the gradient is converted into a gradient gray scale image. Then, the maximum value in the x-axis (column) and the y-axis (row) is taken for the gradient gray scale image to perform binaryzation, and the binary image of the line to be fitted is obtained.
[0112] The distance transform function is used to convert the binary mask image corresponding to the contact line instance into a gradient gray scale image, and the maximum value in the x-axis (column) and the y-axis (row) is taken for the gradient gray scale image to perform binaryzation. This makes it easier to obtain the center position of the straight line where the contact line is located, and the calculated pull-out value is more accurate.
[0113] 405. Perform line detection on the binarized image and generate the corresponding line detection results.
[0114] The methods for line detection can include, but are not limited to, the Hough line detection algorithm, the Freeman line detection algorithm, and the inchworm crawling algorithm.
[0115] 406. Determine whether the line parameter information included in the line detection result conforms to the parameter specifications.
[0116] In practical applications of electrified railway overhead contact lines, the parameters of the contact wire need to be specified in conjunction with factors such as train speed and operating limits. Therefore, lines whose parameter information does not conform to the specified parameters can be excluded from the straightness test results based on pre-set parameter specifications. For example, lines that clearly do not conform to the parameter specifications can be identified by examining their length, height, angle, and other straightness parameter information.
[0117] 407. If the straight line parameter information included in the straight line detection result meets the parameter specifications, then the straight line detection result shall be determined as the straight line equation of the contact line.
[0118] For example, if the line parameter information included in the line detection result of the Hough transform of the binary image meets the parameter specifications, the line equation of the contact line can be extracted.
[0119] 408. If the straight line parameter information included in the straight line detection result does not meet the parameter requirements, the straight line equation of the contact line shall be determined by performing straight line fitting on the binarized mask image of the contact line.
[0120] The methods for fitting the straight line can include the least squares method, gradient descent method, Gauss-Newton method, etc., and are not specifically limited. For example, a straight line can be directly fitted from the binary mask image of the contact line using the least squares method, and this straight line can be determined as the linear equation of the contact line.
[0121] 409. Determine the dynamic geometric parameters of the overhead contact system based on the straight line equations of the overhead contact system's guide wires and contact wires.
[0122] This application embodiment can perform instance segmentation on captured images using an instance segmentation model, transforming the detection problem of key components of the catenary such as the pantograph slide and contact wire into a pixel-level instance segmentation problem. It also employs deep learning methods for modeling, which greatly improves the measurement accuracy of dynamic geometric parameters of the catenary and can effectively cope with interference in complex scenarios, exhibiting strong robustness.
[0123] Please see Figure 5 , Figure 5 This is a flowchart illustrating another method for detecting dynamic geometric parameters of overhead contact lines disclosed in this application.
[0124] 501. The pantograph slide and contact wire in the captured image to be processed are segmented using an instance segmentation model trained based on deep learning, resulting in corresponding pantograph slide instances and contact wire instances.
[0125] 502. Extract the overhead contact line from the pantograph sliding plate example.
[0126] 503. Determine the straight line equation of the contact line based on the contact line example.
[0127] 504. When there are two contact wires in the overhead contact system, calculate the coordinates of the intersection point of the pantograph slide and the contact wire based on the straight line equations of the overhead contact system's guide wire and the contact wire.
[0128] In some embodiments, when there is only a single contact wire in the overhead contact system, the coordinates of the intersection point between the pantograph slide and the contact wire are calculated based on the linear equations of the overhead contact system's guide wire and the single contact wire.
[0129] When there are two contact wires in the overhead contact system, the coordinates of the intersection point between the pantograph slide and each contact wire are calculated based on the overhead contact system's guide line and the straight line equation of each contact wire in the two contact wires.
[0130] It should be further explained that the contact wire elevation line extracted from the pantograph's binarized mask and the straight line equation of the contact wire determined from the contact wire's binarized mask can be mapped onto the original captured image to obtain the coordinates of the intersection point between the pantograph's pantograph and the contact wire in the captured image, and then the elevation and pull-out value of the contact wire in the captured image can be calculated.
[0131] 505. Calculate the pull-out value and tilt angle of each contact wire in the double contact wire based on the coordinates of the intersection point.
[0132] The pull-out value can be calculated using the coordinates of the intersection of the pantograph slide and each contact wire, and the tilt angle can be obtained using the angle between the contact wire and the x-axis.
[0133] 506. Select the first contact line from the two contact lines that has the smallest difference in pull-out value and tilt angle with the reference contact line.
[0134] The reference contact line is a single contact line tracked before detecting the presence of double contact lines in the catenary. It needs to be further explained that when there are double contact lines at the turnout and anchor joint of the catenary, it is necessary to determine the contact line in contact with the pantograph slide among the double contact lines, and the pulling-out value of the contact line in contact with the pantograph slide is determined as the pulling-out value of the contact line in the photographed image. The specific process can include: first, in the case of a single contact line, the pulling-out value and the inclination angle of the single contact line are recorded in real time, and the single contact line is tracked; the single contact line is determined as the reference contact line; when double contact lines appear, the pulling-out value and the inclination angle of the reference contact line tracked at the previous moment are compared with the current double contact lines respectively, and the contact line with the smallest difference in pulling-out value and inclination angle between the reference contact line is selected from the double contact lines as the first contact line in contact with the pantograph slide.
[0135] 507, determining the pulling-out value of the first contact line as the pulling-out value of the contact line in the photographed image.
[0136] 508, determining another contact line in the double contact lines except the first contact line as the second contact line.
[0137] 509, if the variation of the pulling-out value of the first contact line in the recording time interval exceeds the pulling-out value threshold, determining the pulling-out value of the second contact line as the pulling-out value of the contact line in the photographed image.
[0138] As an optional implementation, it can be judged whether the variation of the inclination angle of the first contact line in the recording time interval exceeds the angle threshold, and if the variation of the inclination angle of the first contact line in the recording time interval exceeds the angle threshold, the pulling-out value of the second contact line is determined as the pulling-out value of the contact line in the photographed image.
[0139] It needs to be further explained that when the pulling-out value or the inclination angle of the first contact line has a large change between the upper and lower moments and exceeds the corresponding threshold, it can be considered as track switching of the double contact lines, the second contact line is selected as the contact line about to be in contact with the pantograph slide, and the pulling-out value of the second contact line is determined as the pulling-out value of the contact line in the photographed image.
[0140] The catenary dynamic geometric parameter detection method based on deep learning in the embodiments of the present application can accurately extract the pantograph slide contour, can accurately distinguish contact lines, messenger wires, droppers and reinforcing wires, etc., and improves the recognition accuracy of the contact line; and has strong robustness, is not disturbed by the complex background of the catenary when shooting and the imaging quality of the image; in addition, the requirement for device performance is not high, the device is simple to install, the cost is low, and it is suitable for industrial application scenarios.
[0141] Please refer to Figure 6 , Figure 6Fig. 1 is a structural schematic diagram of a contact network dynamic geometric parameter detection device disclosed by an embodiment of the present application. The device can be applied to electronic devices such as personal computers and industrial computers, and the specific implementation is not limited. As shown in Fig. 1, the contact network dynamic geometric parameter detection device 600 can include a segmentation module 610, an extraction module 620, a determination module 630, and a parameter module 640. Figure 6
[0142] The segmentation module 610 is configured to perform instance segmentation on the pantograph slide and the contact wire in the to-be-processed photographed image by using an instance segmentation model trained based on deep learning, to obtain corresponding pantograph slide instances and contact wire instances.
[0143] The extraction module 620 is configured to extract the height guide line of the contact network from the pantograph slide instance.
[0144] The determination module 630 is configured to determine a straight line equation of the contact wire according to the contact wire instance.
[0145] The parameter module 640 is configured to determine the contact network dynamic geometric parameter according to the height guide line of the contact network and the straight line equation of the contact wire.
[0146] In one embodiment, the extraction module 620 is further configured to determine the slide position coordinates of the height guide line of the contact network in a slide binary mask image corresponding to the pantograph slide instance according to the pantograph slide instance, to determine a detection area of the pantograph slide according to the slide binary mask image corresponding to the pantograph slide instance and the slide position coordinates, to determine an average value of slide pixel points corresponding to a pixel row in the detection area according to a total number of slide pixel points included in the detection area and a total number of pixel rows included in the detection area, and to determine a quantity threshold value according to the average value of the slide pixel points; if there are a plurality of continuous pixel rows in the detection area, and the number of slide pixel points included in each row of the plurality of continuous pixel rows is greater than the quantity threshold value, then the image position of a first row of the plurality of continuous pixel rows in the detection area is determined as the image position of the height guide line of the contact network in the slide binary mask image.
[0147] In one embodiment, the determination module 630 can include an acquisition unit, a binaryzation unit, and a straight line determination unit.
[0148] The acquisition unit is configured to acquire a gradient gray image from a contact wire binary mask image corresponding to the contact wire instance by using a distance transform function.
[0149] The binaryzation unit is configured to perform binaryzation processing on the pixel maximum values in the first direction and the second direction of the gradient gray image respectively, and to generate a corresponding binary image.
[0150] The straight line determination unit is configured to determine the straight line equation of the contact wire according to the binary image.
[0151] In one embodiment, the straight line determination unit is further configured to perform straight line detection on the binary image, and generate a corresponding straight line detection result; if the straight line parameter information included in the straight line detection result meets the parameter specification, the straight line detection result is determined as the straight line equation of the contact line; if the straight line parameter information included in the straight line detection result does not meet the parameter specification, the straight line equation of the contact line is determined by performing straight line fitting on the contact line binary mask image.
[0152] In one embodiment, the overhead line dynamic geometric parameter detection device 600 further comprises a training unit.
[0153] The training unit is configured to obtain a sample data set; input a plurality of sample shooting images included in the sample data set into the instance segmentation model to be trained, to obtain the pantograph slide plate sample instance and the contact line sample instance output by the instance segmentation model to be trained; calculate a training loss according to the pantograph slide plate sample instance, the contact line sample instance, and the image region corresponding to the pantograph slide plate and the contact line in each sample shooting image included in the sample data set, and adjust the weight parameters of the instance segmentation model to be trained according to the training loss, to obtain the instance segmentation model trained based on deep learning.
[0154] In one embodiment, the parameter module 640 is further configured to, when there are double contact lines in the overhead line, calculate the intersection coordinates of the pantograph slide plate and the contact line according to the overhead line guide height line and the straight line equation of the contact line; calculate the pull-out value and the inclination angle of each contact line in the double contact lines according to the intersection coordinates; select a first contact line from the double contact lines, which has the smallest difference in the pull-out value and the inclination angle with the reference contact line; determine the pull-out value of the first contact line as the pull-out value of the contact line in the shooting image; determine another contact line in the double contact lines except the first contact line as a second contact line; if the variation of the pull-out value of the first contact line in the recording time interval exceeds the pull-out value threshold, or the variation of the inclination angle of the first contact line in the recording time interval exceeds the angle threshold, determine the pull-out value of the second contact line as the pull-out value of the contact line in the shooting image.
[0155] Please refer to Figure 7 , Figure 7 which is a structural schematic diagram of an electronic device.
[0156] As Figure 7 shown, the electronic device 700 can include:
[0157] a memory 710 storing executable program codes;
[0158] a processor 720 coupled with the memory 710;
[0159] The processor 720 invokes the executable program code stored in the memory 710 to execute any one of the contact net dynamic geometric parameter detection methods disclosed in the embodiments of the present application.
[0160] The embodiments of the present application disclose a computer readable storage medium storing a computer program, wherein the computer program is executed by the processor to enable the processor to implement any one of the contact net dynamic geometric parameter detection methods disclosed in the embodiments of the present application.
[0161] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0162] In various embodiments of the present application, it should be understood that the size of the serial number of the above processes does not mean the inevitable sequence of execution, and the execution sequence of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0163] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place, or can be distributed to multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiments of the present application.
[0164] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0165] The above integrated units, if implemented in the form of software functional units and sold or used as independent products, can be stored in a computer accessible memory. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the present application or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc., and specifically can be a processor in the computer device) to execute some or all of the steps of the above-mentioned methods of various embodiments of the present application.
[0166] Those of ordinary skill in the art can understand that all or part of the steps of the various methods of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable storage medium, including a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, a magnetic disk storage, a magnetic tape storage, or any other medium that can be used to carry or store data which can be read by a computer.
[0167] The above describes in detail the contact network dynamic geometric parameter detection method, device and electronic equipment disclosed in the embodiments of the present application. The principles and implementation modes of the present application are described by applying specific examples. The above embodiment descriptions are only used to help understand the method of the present application and its core idea. Meanwhile, for those of ordinary skill in the art, according to the idea of the present application, the specific implementation mode and application range can be changed. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for detecting dynamic geometric parameters of overhead contact lines, characterized in that, The method includes: The pantograph slide and contact wire in the captured image to be processed are segmented by an instance segmentation model trained based on deep learning, and the corresponding pantograph slide and contact wire instances are obtained. The instance segmentation model is trained using a sample dataset, which includes multiple frames of sample captured images and image region annotations corresponding to the pantograph slide and contact wire in each frame of the sample captured image. Extract the overhead contact line conductor from the pantograph sliding plate example; Determine the straight line equation of the contact line based on the example of the contact line; The dynamic geometric parameters of the contact wire are determined based on the guide lines and the linear equations of the contact wire; the geometric parameters include the pull-out value of the contact wire in the captured image; The step of determining the dynamic geometric parameters of the contact wire based on the guide line and the straight line equation of the contact wire includes: When there are two contact wires at the junction of the contact wire and the anchor section of the contact network, the pull-out value of the first contact wire is determined as the pull-out value of the contact wire in the captured image, and the other contact wire among the two contact wires besides the first contact wire is determined as the second contact wire. The first contact wire is the contact wire with the smallest difference in pull-out value and tilt angle between it and the reference contact wire. The reference contact wire is the single contact wire tracked before the existence of the two contact wires in the contact network is detected. If the change in the pull-out value of the first contact wire within the recording time interval exceeds the pull-out value threshold, or the change in the tilt angle of the first contact wire within the recording time interval exceeds the angle threshold, then the pull-out value of the second contact wire is determined as the pull-out value of the contact wire in the captured image.
2. The method according to claim 1, characterized in that, Extracting the elevation guide from the pantograph slider example includes: Based on the pantograph sliding plate example, determine the sliding plate position coordinates of the contact wire guide line in the sliding plate binarization mask image corresponding to the pantograph sliding plate example; The detection area of the pantograph skateboard is determined based on the skateboard binarized mask image corresponding to the pantograph skateboard instance and the skateboard position coordinates; the detection area includes multiple pixel rows containing skateboard pixels; The average value of the skateboard pixels corresponding to the pixel rows in the detection area is determined based on the total number of skateboard pixels in the detection area and the total number of pixel rows in the detection area, and a quantity threshold is determined based on the average value of the skateboard pixels. If there are multiple consecutive pixel rows in the detection area, and the number of skateboard pixels in each of the multiple consecutive pixel rows is greater than the number threshold, then the image position of the first row of the multiple consecutive pixel rows in the detection area is determined as the image position of the guide line of the contact wire in the skateboard binarized mask image.
3. The method according to claim 1, characterized in that, Determining the straight line equation of the contact line based on the contact line example includes: The gradient grayscale image is obtained from the contact line binary mask image corresponding to the contact line instance using the distance transformation function; The gradient grayscale image is binarized by taking the maximum pixel value along the first direction and the second direction respectively, and the corresponding binarized image is generated; the first direction and the second direction are perpendicular to each other; The equation of the straight line of the contact line is determined based on the binarized image.
4. The method according to claim 3, characterized in that, Determining the straight line equation of the contact line based on the binarized image includes: Perform line detection on the binarized image and generate the corresponding line detection results; If the straight line parameter information included in the straight line detection result meets the parameter specifications, then the straight line detection result is determined as the straight line equation of the contact line; if the straight line parameter information included in the straight line detection result does not meet the parameter specifications, then the straight line equation of the contact line is determined by performing straight line fitting on the binarized mask image of the contact line.
5. The method according to claim 1, characterized in that, Before performing instance segmentation of the pantograph slide and contact wire in the captured image to be processed using the instance segmentation model trained based on deep learning, the method further includes: Obtain the sample dataset; The multi-frame sample images included in the sample dataset are input into the instance segmentation model to be trained to obtain the pantograph skateboard sample instance and contact wire sample instance output by the instance segmentation model to be trained. The training loss is calculated based on the pantograph sliding plate sample instance, the contact wire sample instance, and the image region labels corresponding to the pantograph sliding plate and the contact wire in each frame of the sample captured image included in the sample dataset. The weight parameters of the instance segmentation model to be trained are adjusted according to the training loss to obtain the instance segmentation model trained based on deep learning.
6. The method according to claim 1, characterized in that, When there are two contact wires at the junction of the contact wire and the anchor section, determining the pull-out value of the first contact wire as the pull-out value of the contact wire in the captured image includes: When the contact wire has the double contact wire, calculate the coordinates of the intersection point of the pantograph slide and the contact wire according to the straight line equation of the contact wire and the guide line of the contact wire; Calculate the pull-out value and tilt angle of each of the two contact wires based on the coordinates of the intersection point; Select the first contact wire from the dual contact wires that has the smallest difference in pull-out value and tilt angle with the reference contact wire; The pull-out value of the first contact wire is determined as the pull-out value of the contact wire in the captured image.
7. A device for detecting dynamic geometric parameters of overhead contact lines, characterized in that, include: The segmentation module is used to segment the pantograph slide and contact wire in the captured image to be processed using an instance segmentation model trained based on deep learning, so as to obtain the corresponding pantograph slide and contact wire instances. An extraction module is used to extract the overhead contact line conductor from the pantograph sliding plate instance; The determination module is used to determine the straight line equation of the contact line based on the contact line instance; The parameter module is used to determine the dynamic geometric parameters of the contact wire based on the guide line and the straight line equation of the contact wire; the geometric parameters include the pull-out value of the contact wire in the captured image; The parameter module is also used to determine the pull-out value of the first contact wire as the pull-out value of the contact wire in the captured image when there are two contact wires at the junction of the contact wire and the anchor section of the contact network, and to determine the other contact wire in the two contact wires besides the first contact wire as the second contact wire. The first contact wire is the contact wire with the smallest difference in pull-out value and tilt angle between it and the reference contact wire. The reference contact wire is a single contact wire tracked before the existence of the two contact wires in the contact network is detected. If the change in the pull-out value of the first contact wire within the recording time interval exceeds the pull-out value threshold, or the change in the tilt angle of the first contact wire within the recording time interval exceeds the angle threshold, then the pull-out value of the second contact wire is determined as the pull-out value of the contact wire in the captured image.
8. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Real-time measurement method and device for geometric parameters of overhead line system based on single monitoring camera
CN110910443A
Pantograph online detection device and method based on cascaded neural network
CN112132789A