A pantograph slide plate wear state detection method based on deep learning
Patent Information
- Application Number
- CN202410319101.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-03-20
AI Technical Summary
[0005]本申请提供了一种基于深度学习的受电弓滑板磨损状态检测方法,解决了现有的列车受电弓状态检测方法存在功能单一、检测精度低、检测效率低的技术问题
[0017]本申请的有益效果为:本申请通过采用深度学习模型对第一图像进行分割,并且将分割后的图像对齐,进行拼接的方法,提高了检测精度;本申请将受电弓滑板的左侧图像和右侧图像拼接后,再进行检测,将检测的工作量减半,提高了检测效率。
Smart Images

Figure CN118396928B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pantograph sliding plate damage detection technology, and in particular to a deep learning-based method for detecting the wear state of pantograph sliding plates. Background Technology
[0002] During train operation, the pantograph contactor is constantly in high-speed motion. Any minor damage to the pantograph-catenary system, such as excessive wear, stepped wear, gaps, or grooves in the contactor contactor, not only affects the train's normal power supply but also causes arcing, further exacerbating the wear of the contactor contactor and the overhead contact line. Simultaneously, it generates radio interference, leading to pantograph-catenary failures and causing significant losses and impacts on rail transit operations. Therefore, online monitoring of the pantograph's condition, understanding the wear patterns of the contactor contactor, and monitoring its surface condition and attitude are crucial for ensuring normal locomotive operation and power grid safety.
[0003] Currently, the traditional method for detecting key parameters of the pantograph contact plate on trains uses 2D cameras to acquire images. However, due to limitations in the field of view and detection direction, a large number of cameras and supplementary lighting are usually required, making system installation and maintenance complex. This technology typically acquires two-dimensional images of the pantograph contact plate using a CCD array, extracts the carbon contact plate edges through edge extraction and morphological image processing methods, and detects wear and remaining wear of the carbon contact plate through camera calibration. However, this method not only has low detection accuracy but also cannot detect defects such as contact plate chips or grooves, or pantograph attitude. In some scenarios, cameras are set up on both sides of the pantograph contact plate, obtaining images of both sides. However, the same pantograph contact plate requires detection twice, on the left and right sides, increasing detection time and reducing efficiency.
[0004] In summary, existing methods for detecting the condition of train pantographs suffer from low detection accuracy and low detection efficiency. Summary of the Invention
[0005] This application provides a deep learning-based method for detecting the wear condition of pantograph contact plates, which solves the technical problems of existing train pantograph condition detection methods, such as limited functionality, low detection accuracy, and low detection efficiency.
[0006] The technical solution adopted in this application is as follows:
[0007] A deep learning-based method for detecting the wear condition of a pantograph slider includes:
[0008] Images of the pantograph slider are acquired, and edge detection is performed on the acquired pantograph slider images to obtain the first image;
[0009] A deep learning model is used to segment the first image to obtain a mask image of the pantograph skateboard;
[0010] The mask images of the pantograph slide plate are stitched together to obtain a second image;
[0011] The upper and lower edge data of the pantograph slide plate in the second image are obtained. The lower edge data of the pantograph slide plate is fitted by the least squares method to obtain the fitted lower edge data.
[0012] Based on the upper edge data and the fitted lower edge data of the pantograph slide, the distances between all edge points at the bottom and top of the pantograph slide are calculated to obtain the wear status of the pantograph slide.
[0013] In one feasible implementation, the method further includes:
[0014] Obtain the original thickness of the pantograph slide plate, and record the maximum distance from the bottom to the top of the pantograph slide plate as the point of minimum wear;
[0015] The ratio d of the minimum wear point of the pantograph slider to the original thickness of the pantograph slider. n Plot the wear curve of the pantograph slider.
[0016] In one feasible implementation, the method further includes: determining whether the ratio of the minimum wear point of the pantograph slide plate to the original thickness of the pantograph slide plate is less than a preset threshold; if so, the pantograph slide plate is determined to be severely worn; if not, the pantograph slide plate is determined to be slightly worn.
[0017] The beneficial effects of this application are as follows: This application improves the detection accuracy by using a deep learning model to segment the first image and then aligning and stitching the segmented images; This application reduces the detection workload by halving the detection workload and improves the detection efficiency by stitching the left and right images of the pantograph slide together before detection. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 This is a flowchart of a deep learning-based pantograph sliding plate wear state detection method provided in an embodiment of this application;
[0020] Figure 2 This is a schematic diagram of the structure after adding the CBAM module to the C2F module in this application;
[0021] Figure 3This is a schematic diagram showing the stitching of the left and right images provided in an embodiment of this application. Detailed Implementation
[0022] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of this application.
[0023] In modern railway systems, monitoring the condition of the pantograph contactor is crucial for ensuring the safe and stable operation of trains. The pantograph contactor is a key component for trains to obtain electrical energy from the overhead contact line, and its wear directly affects the train's operating efficiency and safety. Therefore, developing an efficient and accurate pantograph contactor wear monitoring system is of great significance.
[0024] like Figure 1 As shown, this application provides a deep learning-based method for detecting the wear state of a pantograph slider, comprising the following steps:
[0025] S0. Acquire images of the pantograph sliding plate. This application uses a line scan camera to continuously capture images along a line, which performs well in high-speed motion and can ensure that the obtained pantograph sliding plate images are clear and detailed. Further, edge detection needs to be performed on the acquired pantograph sliding plate images to extract edge information in the images. The image that has undergone edge detection is used as the first image. Through edge detection, we can obtain the contour information of the pantograph sliding plate, which provides a basis for subsequent segmentation and fitting operations.
[0026] S1. Use a deep learning model to segment the first image, separate the pantograph skateboard from the background, and obtain the mask image of the pantograph skateboard.
[0027] S2. Stitch together the mask images of the pantograph sliding plate to obtain a second image;
[0028] S3. Obtain the upper edge data and lower edge data of the pantograph slide in the second image, and use the least squares method to fit the lower edge data of the pantograph slide to obtain the fitted lower edge data.
[0029] S4. Based on the upper edge data and the fitted lower edge data of the pantograph contact plate, calculate the distances between all edge points at the bottom and top of the contact plate to obtain the wear condition of the contact plate. These distance data directly reflect the degree of wear of the contact plate. By comparing and analyzing the distance data, we can assess the wear condition of the contact plate, providing strong support for train maintenance and upkeep.
[0030] In some embodiments, during step S0, when acquiring images of the pantograph slide plate, after acquiring images of the pantograph slide plate through a line scan camera, other images that do not contain the pantograph slide plate in the original acquired images are filtered out, and finally 208 images are taken from the left and right sides, for a total of 416 images, with an image size of 2048*2048 and a depth map with 1 channel.
[0031] A line scan camera consists of a row of closely spaced photosensitive elements, typically linear photodiodes or photosensitive sensors. These elements capture light with extremely high precision and sensitivity, converting the light signal into an electrical signal to generate an image. This linear arrangement of photosensitive elements gives line scan cameras a significant advantage in scanning speed, enabling them to quickly capture image information of the target object. This application, by arranging the line scan camera along a line and continuously capturing images of the pantograph slider, ensures that the obtained pantograph slider images are clear and detailed.
[0032] In some embodiments, step S0, which involves performing edge detection on the pantograph slider image using the Canny operator, includes:
[0033] Canny edge detection works by performing a differentiation operation on the image; however, this differentiation process is highly sensitive to noise. Therefore, the first step is to use a Gaussian smoothing filter to reduce image noise. In short, this involves associating the current pixel with its surrounding pixels, applying a two-dimensional Gaussian distribution formula to obtain a convolution kernel with Gaussian weights, and then normalizing the weights of the convolution kernel. This process achieves image denoising. The two-dimensional Gaussian distribution formula is as follows:
[0034]
[0035] Where, σ 2 Let Variance be the variance.
[0036] The second step involves using the Soble operator to calculate the gradient G and the gradient direction θ of the denoised image along the x and y directions. Since any pixel has only adjacent pixels in the up, down, left, right, and diagonal directions, non-maximum suppression is applied to the denoised image based on the range of θ.
[0037] If -22.5° < θ < 22.5° or 157.5° < θ < 202.5°, then compare it with the two pixels to the left and right. If the pixel is the maximum value, then keep it; otherwise, set it to 0.
[0038] Similarly, if 67.5° < θ < 112.5° or 247.5° < θ < 292.5°, then compare with the two pixels above and below;
[0039] If 22.5° < θ < 67.5° or 202.5° < θ < 247.5°, then compare with the top left and bottom right pixels;
[0040] If 112.5° < θ < 157.5° or 292.5° < θ < 347.5°, then compare with the bottom left and top right pixels.
[0041] Below S x and S y These are the Soble operators for the horizontal and vertical directions, respectively. The expressions and calculation formulas for the gradient magnitude G1 and gradient direction θ are as follows:
[0042]
[0043] G x =S x ·IG y =S y ·I
[0044]
[0045] Among them, G x Let G be the gradient in the x-direction. y G1 is the gradient in the y-direction, G1 is the gradient magnitude, and θ is the gradient direction.
[0046] The third step involves using high and low thresholds to reduce false edges in the image after non-maximum suppression. If the amplitude of a pixel exceeds the high threshold, the pixel is retained as an edge pixel; if the amplitude of a pixel is less than the low threshold, the pixel is excluded and its value is set to 0; if the amplitude of a pixel is between the two thresholds, it is classified as an edge point or a non-edge point based on connectivity, that is: if the pixel is adjacent to a pixel determined to be an edge, it is determined to be an edge point; otherwise, it is a non-edge point.
[0047] In some embodiments, this application improves the deep learning model used in step S1, as follows:
[0048] In the field of deep learning, model expressiveness is one of the key factors in evaluating its performance. To improve model expressiveness, this application proposes a scheme to add a CBAM (Convolutional Block Attention Module) module to the C2f module. CBAM is an effective attention mechanism that adaptively adjusts the model's focus by analyzing information in both channel and spatial dimensions, thereby further improving model performance. This application adds a CBAM module to the C2f module to enhance the expressiveness of deep learning models. CBAM consists of two modules: a channel attention module and a spatial attention module, which calculate the weights of the corresponding channel importance and spatial importance, respectively, thereby achieving adaptive adjustment of the feature map. Figure 2 Here is a diagram of the C2f module after adding CBAM:
[0049] The channel attention module first performs max pooling and average pooling on the feature map of size (C, W, H) to reduce its size to (C, 1, 1). This is done to capture global information for each channel. Then, convolution is performed to reduce the number of channels by a factor of 16, followed by a ReLU function to add non-linearity. Finally, convolution is performed again to restore the number of channels. The output value is normalized to between 0 and 1 using the Sigmoid function. The final output, out = avg_out + max_out, represents the importance weights of the channels. These weights can be used to adjust the contribution of each channel in the original feature map.
[0050] The spatial attention module focuses on analyzing the spatial information of each point in the feature map. It first obtains the maximum and average values of all dimensions for each point in the corresponding plane of the feature map, then concatenates them along the channel direction to obtain a (2*W*H) feature map. Next, it performs convolution, keeping W and H constant while reducing the channel dimension to 1. After passing through a sigmoid function, it obtains the weights indicating the spatial importance of each point. These weights can be used to adjust the contribution level of each point in the original feature map.
[0051] The original first image is multiplied by the channel attention weights and spatial attention weights respectively to obtain the result after adding the CBAM module.
[0052] In this way, we can not only retain the useful information in the original feature map, but also adaptively adjust the feature map according to the importance weights of the channel and space, thereby improving the performance of the deep learning model.
[0053] In step S1, a deep learning model is used to segment the image and separate the pantograph slider from the background. Semantic segmentation models such as U-Net, Mask R-CNN, or DeepLab can be used. These models perform well in image segmentation tasks.
[0054] A deep learning model is used to segment the first image, separating the pantograph slider from the background to obtain a mask image of the pantograph slider. This includes the following steps:
[0055] S11. Data preparation: Prepare an image dataset containing the pantograph slide and background (i.e., the first image mentioned in step S0), and create a corresponding mask image for each image to label the position of the pantograph slide.
[0056] S12. Model Selection: Choose an improved deep learning segmentation model. Select an appropriate model architecture based on actual needs and dataset size.
[0057] S13. Model Training: Train the selected deep learning model using the prepared dataset. By feeding the input image to the model and comparing it with the corresponding mask image, the model will gradually learn to segment the pantograph skateboard from the background.
[0058] S14. Model Inference: After training, the model can be used to infer new images. Inputting an image into the model will generate a mask image in which the pantograph slider is segmented.
[0059] Step S1 also includes converting the segmented pantograph slider region into a binary mask image. Typically, the pantograph slider region is set to white (or another specific color), while the background region is set to black.
[0060] In some embodiments, step S2, stitching together the mask image of the pantograph trolley, includes:
[0061] Photography typically requires capturing a frontal image of the pantograph's pantograph slider for image processing. However, due to practical limitations, such as the difficulty of mounting the camera at the front, side-view photography remains a viable solution. Side-view images cannot be processed directly; a transmission transformation is needed on the pantograph slider's mask image to shift the perspective to the front. This application utilizes the side-view photography method, which involves setting up a calibration board during photography. In subsequent processing, the coordinates of four points on the calibration board are marked, and a transmission transformation is used to convert the side image into a frontal image.
[0062] Transmission transformation refers to the transformation that utilizes the collinearity of the perspective center, image point, and target point, and rotates the projection plane (perspective plane) around the trace line (perspective axis) by a certain angle according to the law of perspective rotation, thereby disrupting the original projection ray beam while maintaining the unchanged geometric shape of the projection on the projection plane.
[0063] When processing pantograph slider images, transmission transformation can be performed by following these steps:
[0064] Step 1: Feature Point Extraction: In the side-view image, select several key feature points on the pantograph's sliding plate, such as the four corners or easily identifiable edge points. These feature points will play a crucial role in the subsequent transformation process.
[0065] The second step is to establish correspondences: In the ideal frontal image (which can be obtained through a CAD model or other means), find the points that correspond to the feature points in the side image. These corresponding points will be used to construct the transformation matrix.
[0066] The third step is to calculate the transformation matrix: using the extracted feature points and their correspondences, the transmission transformation matrix is calculated using mathematical methods (such as the least squares method). This matrix describes the geometric transformation relationship from the side image to the front image.
[0067] The method for calculating the transmission transformation matrix is as follows:
[0068]
[0069] Where (u, v) are the coordinates of the original image, w takes a value of 1, and a 00 a 01 a 02 a 10 a 11 a 12 a 20 a 21 , where are the transformation parameters, which can be customized as needed. (x = x` / z`, y = y` / z`) are the results after the transmission transformation. The matrix following the above formula is called the transmission transformation matrix. T1 represents a linear transformation of the image, T2 represents a translation of the image, and T3 represents a projective transformation of the image. 22 It is usually set to 1.
[0070] Step 4: Apply the transformation matrix: Apply the calculated transformation matrix to the side-view image to obtain the frontal image after the perspective transformation.
[0071] Step 5: Post-processing and optimization: Perform necessary post-processing on the transformed image, such as cropping and smoothing filtering, to improve image quality. Simultaneously, the transformation parameters can be adjusted as needed to optimize the transformation effect.
[0072] In practice, when selecting the frontal view of the left and right sides of the pantograph slide in the mask image of the pantograph slide, only fragments of pantograph wear information can be extracted. Therefore, the edges of the left and right frontal views are aligned first, that is, the left and right images of the pantograph slide are aligned, and then the two images are stitched together.
[0073] First, detection is performed vertically upwards from the bottom right corner of the left image and the bottom left corner of the right image, respectively (that is, for the left image, detection starts from the bottom right corner and proceeds vertically upwards, checking each pixel sequentially until the bottom left corner of the left image is reached; for the right image, detection starts from the bottom left corner and proceeds vertically upwards, checking each pixel sequentially until the bottom right corner of the right image is reached). If, during the detection process, the grayscale value (range 0-255) of a pixel at coordinates (x, y) differs by 50 from the grayscale values of 10 pixels along the y-axis upwards, then that coordinate is defined as the dividing point (i.e., a pixel at the bottom edge of the pantograph slide).
[0074] In practical implementation, considering that the image may contain noise, this application reduces the number of pixels to be detected upwards from 10 to 7. That is, as long as 7 out of 10 upward pixels meet the condition of grayscale value difference of 50, the pixel is determined to be a point on the lower edge of the pantograph slide.
[0075] After determining the lower edge of the pantograph slider, calculate the height and width of the left and right images respectively, obtaining the maximum height value and the sum of the width values of the left and right images. Then, start creating a new image. The new image is black, its height is the maximum height of the left and right images, and its width is the sum of the widths of the left and right images. The number of channels in this new image should be the same as the number of channels in the mask image.
[0076] like Figure 3 As shown in the figure, taking the example where the height of the left image is greater than the height of the right image, since this application defaults to the top left corner as the zero point of the image, the left image is pasted to the top left of the image, that is, the starting coordinate position is (0, 0). The right image is pasted after the left image, that is, the coordinates of the top left corner of the right image in the new image are: (x left +1,0), the coordinates of the bottom left corner of the right image in the new image are: (x left +1,y right ).
[0077] For the coordinates above, let X left Let x be the width of the left image. Since the starting position is (0, 0), the x-coordinate of the top right edge point of the left image is represented as x. left =X left-1; y left This represents the ordinate of the bottom left edge point of the original left-side image; y right This represents the ordinate of the bottom left edge point of the original right-side image; (x left ,y left ), (x right ,y right These are the coordinates of the bottom right corner of the left image and the bottom left corner of the right image, respectively. After stitching, x... right =x left +1, the coordinates of the bottom right corner of the image on the right are (x right +x left ,y right After stitching the left and right images together, the remaining portion is displayed as a black background, and the parts outside the image are deleted (i.e., not displayed). Finally, a large image containing all the pantograph skateboards is obtained. This image can be used for subsequent analysis, processing, or visualization. Compared to traditional methods that only determine the grayscale of the pixels at the detection location, the stitching method used in this application achieves better results.
[0078] When the height of the right image is greater than the height of the left image, the same method applies as described above, and will not be elaborated further.
[0079] In some embodiments, step S3, which involves fitting the lower edge data of the pantograph sliding plate using the least squares method to obtain the fitted lower edge data, includes:
[0080] The segmentation of the lower edge of the pantograph slide is uneven; in reality, the bottom of the pantograph slide does not contact the conductor and is therefore essentially intact. Therefore, this application uses the least squares method to fit the lower edge of the pantograph slide into a straight line. Fitting the lower edge data of the pantograph slide using the least squares method is typically done to obtain a smooth curve or straight line to approximate the position of the lower edge of the slide. The least squares method is a mathematical optimization technique that finds the best function match for the data by minimizing the sum of squared errors.
[0081] In practical implementation, this application assumes that the fitted straight line is y = b, and the coordinates of the lower edge of the pantograph image are y = b. i Using the least squares formula, we need to find the minimum value of b, that is:
[0082]
[0083] Setting the partial derivative of the above equation to 0, we obtain the optimal solution for parameter b.
[0084]
[0085] In some embodiments, obtaining the wear condition of the pantograph slider in step S4 includes:
[0086] This application determines whether the pantograph needs to be replaced by comparing the area of least wear with the original thickness of the pantograph slide plate.
[0087] First, the original thickness of the pantograph plate is recorded by referring to a table or by manual measurement, and the maximum distance from the bottom to the top of the pantograph plate is recorded as the point of minimum wear.
[0088] Next, calculate the distance d = |yb| between all edge points at the bottom and top of the pantograph slide, where y is the ordinate of the upper edge and b is the coordinate of the lower edge of the pantograph slide after fitting a straight line obtained in step S3. In other words, d is the vertical distance between the corresponding edge points at the bottom and top of the pantograph slide.
[0089] Furthermore, to visually represent the wear and tear on the skateboard, the thickness of the skateboard is normalized based on the intact section of the skateboard (i.e., the section with the least wear):
[0090]
[0091] Where, d max It is the maximum distance from bottom to top (that is, the original thickness of the pantograph slide).
[0092] And determine the ratio d of the minimum wear point of the pantograph slide plate to the original thickness of the pantograph slide plate. n If the wear level is less than a preset threshold, the pantograph slider is determined to be severely worn; otherwise, it is determined to be slightly worn. In practice, the preset threshold is set to 0.75, meaning if d... n A value less than 0.75 indicates severe wear, while a value greater than or equal to 0.75 indicates slight wear. To facilitate staff in determining whether the pantograph slide plate needs to be replaced, unworn pantograph slide plates are also classified as slightly worn, meaning they do not require replacement.
[0093] Finally, based on all the calculated d n Draw the wear curve of the skateboard.
[0094] This application improves detection accuracy by segmenting the first image using a deep learning model and then aligning and stitching the segmented images together. Furthermore, by stitching the left and right images of the pantograph slide together before detection, this application halves the detection workload and improves detection efficiency.
[0095] It is readily understood that, based on the several embodiments provided in this application, those skilled in the art can combine, split, or reorganize the embodiments of this application to obtain other embodiments, none of which exceed the protection scope of this application.
[0096] The above detailed embodiments further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A method for detecting the wear condition of a pantograph slider based on deep learning, characterized in that, include: Images of the pantograph slider are acquired, and edge detection is performed on the acquired pantograph slider images to obtain the first image; A deep learning model is used to segment the first image to obtain a mask image of the pantograph skateboard; The mask images of the pantograph slide plate are stitched together to obtain a second image; The upper and lower edge data of the pantograph slide plate in the second image are obtained. The lower edge data of the pantograph slide plate is fitted by the least squares method to obtain the fitted lower edge data. Based on the upper edge data and the fitted lower edge data of the pantograph slide, the distances between all edge points at the bottom and top of the pantograph slide are calculated to obtain the wear status of the pantograph slide.
2. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 1, characterized in that, The method further includes: Obtain the original thickness of the pantograph slide plate, and record the maximum distance from the bottom to the top of the pantograph slide plate as the point of minimum wear; The ratio d of the minimum wear point of the pantograph slider to the original thickness of the pantograph slider. n Plot the wear curve of the pantograph slider.
3. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 2, characterized in that, The method further includes: determining the ratio d of the minimum wear point of the pantograph sliding plate to the original thickness of the pantograph sliding plate. n If the wear level is less than a preset threshold, the pantograph slide plate is determined to be severely worn; otherwise, it is determined to be slightly worn.
4. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 1, characterized in that, The edge detection of the acquired pantograph trolley image includes: A Gaussian smoothing filter is used to reduce noise in the image of the pantograph slide to obtain a third image; The Soble operator is used to calculate the gradient G and the direction θ of the gradient G along the x-axis and y-axis of the third image. Non-maximum suppression is then applied to the third image based on the magnitude of θ to obtain the fourth image. Set high and low thresholds for pixels in the fourth image. If a pixel's amplitude is greater than the high threshold, then retain that pixel as an edge pixel; if a pixel's amplitude is less than the low threshold, then set that pixel to 0.
5. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 4, characterized in that, If a pixel's amplitude is greater than the low threshold but less than the high threshold, then the pixel's status as an edge pixel is determined based on its connectivity with pixels identified as edge pixels.
6. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 5, characterized in that, If a pixel is adjacent to a pixel identified as an edge, then the pixel is an edge pixel; otherwise, the pixel is a non-edge pixel.
7. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 1, characterized in that, Stitching together the mask images of the pantograph spool includes: Based on the mask image of the pantograph trolley, select the left and right images of the pantograph trolley; Calculate the height and width of the left and right images respectively, and obtain the maximum height value and the sum of the width values of the left and right images; Create a new image, the new image is black, the height is the maximum height value, and the width is the sum of the width values of the left image and the right image; Paste the left image into the upper left of the new image, with the left image coinciding with the left and top edges of the new image; Paste the right image to the right of the left image, with the left edge of the right image coinciding with the right edge of the left image, and the top edge of the right image coinciding with the top edge of the new image.
8. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 1, characterized in that, The step of obtaining the lower edge data of the pantograph slide in the second image includes: starting from the lower right corner of the left image and the lower left corner of the right image, respectively, detecting the gray value of each pixel and the gray values of n pixels vertically upwards from that pixel. If there exists a pixel whose gray value at coordinates (x, y) and the gray values of n pixels vertically upwards from that pixel have a difference greater than 50, then the coordinates (x, y) of that pixel are taken as one of the pixels on the lower edge of the pantograph slide.
9. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 7, characterized in that, Based on the mask image of the pantograph sliding device, select the left and right images of the pantograph sliding device, including: A transmission transformation is performed on the mask image of the pantograph slider. From the transformed mask image, the left and right images of the pantograph slider are selected.
10. The method for detecting the wear state of a pantograph slider based on deep learning as described in claim 7, characterized in that, After stitching the left and right images together in the new image, delete the remaining parts of the new image excluding the left and right images.