Track fastener state automatic detection method

CN119048836APending Publication Date: 2024-11-29ZHUZHOU TIMES ELECTRONICS TECH CO LTD

Patent Information

Application Number
CN202411204779.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing fastener detection methods are difficult to comprehensively detect fastener abnormalities, and are prone to missed inspection and missed inspection.

Method used

The object detection and semantic segmentation network are adopted to build a CSPDarknet backbone network through image data acquisition and labeling, and combined with the C2f structure, object detection and semantic segmentation are carried out, and the category, location and confidence information of fasteners, sleepers and rails are obtained, and abnormal characteristics are calculated. The value is used to judge abnormal situations such as fracture, skew, and displacement, and reduce the error judgment rate through foreign object occlusion analysis.

Benefits of technology

The comprehensive detection of abnormal fasteners is achieved, the error judgment rate is reduced, the detection efficiency is improved, and it can adapt to complex background and lighting changes. It does not rely on prior information such as rails and sleepers to adapt to various asymmetric fasteners.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048836A_ABST
    Figure CN119048836A_ABST
Patent Text Reader

Abstract

The invention discloses a track fastener state automatic detection method. The method comprises the following steps: acquiring an original track image; performing target detection frame labeling and pixel-level labeling on the original track image, and dividing the original track image into a training set and a verification set; constructing a target detection and semantic segmentation network, loading a training set, inputting the training set to a network training model parameter, obtaining a network model, and evaluating the generalization ability of the network model through a verification set; inputting a to-be-detected image into the network model, reasoning to obtain category, position and confidence information of fasteners, sleepers and steel rails in the image, and obtaining semantic information of each pixel of the image through semantic segmentation; constructing secondary detection logic for the normal fasteners in combination with the detection results of the steel rails and the sleepers and semantic information to obtain abnormal characteristic values; and judging whether the fastener has abnormal conditions including fracture, deflection and displacement or not by judging whether the abnormal characteristic value exceeds a normal range or not. The method can solve the technical problems that an existing fastener detection method is difficult to comprehensively detect the abnormal condition of the fastener and is extremely easy to cause missing detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of railway engineering machinery, and in particular to a method for automatically detecting the status of rail fasteners based on computer vision technology. Background Art

[0002] In the field of railway engineering, loose fasteners usually cause rail movement, resulting in changes in track gauge, and in severe cases, train derailment accidents may occur. In order to ensure the safe transportation and operational efficiency of railways, the engineering department needs to regularly inspect key components of rail infrastructure such as fasteners. The traditional detection method is manual visual patrol inspection, which has low detection efficiency and strong subjectivity, and is very easy to miss. With the development of artificial intelligence technology, there are more and more automated inspection equipment for rail infrastructure. At present, a large number of studies on fastener status detection methods based on machine vision have been carried out at home and abroad. By installing industrial cameras on inspection vehicles and electric passenger cars, vertically downward images of rails, fasteners, roadbeds and other areas are taken, and then the image processing algorithm is used to automatically identify whether the rails and fasteners are abnormal, and then the abnormal information is recorded and transmitted to the information management center.

[0003] In the prior art, the following documents are mainly related to this application:

[0004] Prior art 1 is a Chinese invention application filed by Beijing Jiaotong University on March 12, 2018, and published on November 2, 2021, with publication number CN108573213A. The application discloses a system and method for automatic detection of defective states of track fasteners, including: a first positioning module, a second positioning module, a segmentation module, a processing module, and a detection module, which can realize automatic positioning and judgment of fasteners in different states, and solve the problem of missed detection and objective accuracy of detection results that are difficult to guarantee with traditional manual methods. The application first locates the position of the rails and sleepers, and then locates the upper, lower, left and right boundaries of the fasteners by statistically projecting the grayscale image in the horizontal and vertical directions. Finally, the Dense SIFT feature combined with SVM classification is used to determine whether the fastener is abnormal. It utilizes the prior information of the fasteners on the sleepers on both sides of the rails, but cannot adapt to the situation where there are multiple fasteners in the turnout area, and changes in the fasteners or background environment can easily cause false detections.

[0005] Prior art 2 is a Chinese invention application filed by Suzhou Lichuang Zhiheng Electronic Technology Co., Ltd. on August 8, 2022, and published on September 16, 2022, with publication number CN115063416A. The application discloses a rail fastener state detection method and system, which obtains an image of a rail fastener to be identified and inputs it into a first rail environment segmentation model and a second rail environment segmentation model to obtain the center point coordinate information and contour point coordinate information of the nut, rail and fastener; obtains a partial image of the rail fastener to be identified based on the center point and contour point coordinate information of the fastener, and inputs it into the fastener state detection model to obtain an initial predicted state; obtains state auxiliary judgment information based on the center point and contour point coordinate information of the nut, rail and fastener, and further obtains the state category of the rail fastener image to be identified. This application obtains the center point coordinate information and contour point coordinate information of the nut, rail and fastener through the first rail environment segmentation model and the second rail environment segmentation model based on the PolarMask instance segmentation algorithm, and then divides the nut into 4 sub-areas and solves the area to further determine whether there is any fastener tilt or damage, which solves the problem of dependence on the position of the sleepers. However, it is only applicable to fastener type II fasteners that are symmetrically installed with bolts, and cannot adapt to fasteners such as DTVI-2 fasteners that are asymmetrically installed with bolts, and the processing speed using dual models is slow.

[0006] Prior art 3 is a Chinese invention application filed by Southwest Jiaotong University on March 14, 2019 and published on June 28, 2019, with publication number CN109948690A. The application discloses a high-speed rail scene perception method based on deep learning and structural information. The SSD target detection algorithm is used to detect the position and category information of fasteners and shoulder guards, thereby distinguishing between ordinary tracks and turnout areas. After completing the clustering of fasteners and shoulder guards, the rail position is obtained through prior information—whether at ordinary tracks or at turnouts, the rails are fixed between the fasteners and shoulder guards. The application uses the prior information of the fasteners on the sleepers on both sides of the rails to directly obtain the fastener position through the algorithm model, but does not explain how to distinguish between abnormal fasteners and normal fasteners, and cannot adapt to the situation of multiple fasteners in the turnout area. Moreover, changes in fasteners or background environment are very likely to cause false detections.

[0007] Prior art 4 is a Chinese invention application filed by Suzhou Lichuang Zhiheng Electronic Technology Co., Ltd. on March 15, 2022, and published on June 10, 2022, with publication number CN114612833A. The application discloses a method and system for identifying rail fastener anomalies based on deep learning. The fasteners in the rail depth map are located, and the predicted frame image with the fasteners is extracted. The final category of the fastener is then identified by the fastener abnormal state recognition model. However, the application cannot be applied to abnormal situations such as partial breakage, displacement, and skewness of fasteners, and it is also very easy to cause false detection in the presence of occlusion. Summary of the invention

[0008] In view of this, the purpose of the present application is to provide a method for automatically detecting the status of rail fasteners, so as to solve the technical problems that the existing fastener detection methods are difficult to fully detect abnormal conditions of fasteners and are very likely to cause missed detections.

[0009] In order to achieve the above-mentioned invention object, the present application specifically provides a technical implementation scheme of a method for automatically detecting the status of a rail fastener, comprising the following steps:

[0010] S1) collecting image data to obtain an original orbital image;

[0011] S2) annotating the original track image with target detection boxes and pixel-level annotations, and dividing the image into a training set and a validation set;

[0012] S3) constructing a target detection and semantic segmentation network, loading the training set as input to the target detection and semantic segmentation network to train the network model parameters and obtain the network model, and evaluating the generalization ability of the network model through the validation set;

[0013] S4) inputting each image to be detected into the network model to infer the category, location and confidence information of the fasteners, sleepers and rails in the image, and obtaining the semantic information of each pixel of the image through semantic segmentation;

[0014] S5) construct a secondary detection logic for normal fasteners combined with the detection results and semantic information of rails and sleepers to obtain abnormal feature values; calculate the fracture score based on the semantic information in the normal fastener target detection frame, and calculate the fastener skew angle and displacement distance using the relative position relationship of the fastener, rail and sleeper; and further determine whether the fastener has abnormal conditions including fracture, skewness and displacement by whether the abnormal feature value exceeds the normal range.

[0015] Furthermore, the label categories annotated in the target detection frame include: normal fasteners, missing fasteners, reverse fasteners, missing bolts, rails, sleepers and switches.

[0016] Furthermore, the pixel-level annotation categories include: background, fasteners, bolts, rails, sleepers and foreign objects.

[0017] Furthermore, the abnormal characteristic values ​​include fracture score, skew angle and displacement distance.

[0018] Furthermore, the feature extraction part of the target detection and semantic segmentation network uses CSPDarknet as the backbone network, and uses the C2f structure in the feature fusion layer to obtain the gradient flow, which is then output to the detection head and the segmentation head. In the step S4), the input image size of the network model is an integer multiple of 32, the detection box output by the detection head includes the target category, position coordinates and confidence, and the segmentation head outputs a category mask with a size equal to the input size.

[0019] Further, the step S3) includes:

[0020] Load the training set and input the target detection and semantic segmentation network for iterative training. Set the maximum number of iterations. After training for several epochs, turn off the Maosic enhancement operation and only retain the conventional image enhancement operations including horizontal flipping, vertical flipping, and chromaticity transformation. Perform a validation set test once per epoch, record the mean average precision information of the validation set, and save the model parameters with the highest mean average precision to the local disk.

[0021] Further, the step S4) includes:

[0022] Each image to be detected is input into the network model loaded with model parameters for forward reasoning, and several target detection frames are obtained. The target categories correspond to normal fasteners, fastener missing, fastener reverse, bolt missing, rail, sleeper and turnout. The segmentation head obtains an image mask with pixel values ​​of 0, 1, 2, 3, 4, and 5, representing background, fastener, bolt, rail, sleeper and foreign matter respectively. Damages with categories of fastener missing, fastener reverse and bolt missing are filtered out from the detection frame and saved in the damage list.

[0023] Further, the step S5) includes:

[0024] For each normal fastener, extract the image mask region of interest corresponding to the rectangular box of its position, set the pixels belonging to the fastener through threshold segmentation, and divide the region of interest into sub-region 1 and sub-region 2. Determine whether the white pixels in the sub-region are continuous. If they are continuous, it is normal. Otherwise, record the discontinuous starting and ending points, and calculate the number of disconnected columns = end point - starting point. If the number of disconnected columns is > Nf, the fastener is broken, otherwise there is no break. For fasteners with fractures, determine whether there is foreign matter covering the fracture. By calculating the number and proportion of foreign matter pixels between the disconnected starting and ending points in the region of interest, if the foreign matter pixels > Nm or the proportion > Tm, the fastener fracture is judged as a false detection and filtered out. Among them, Nf, Nm, and Tm are their respective thresholds.

[0025] Further, the step S5) includes:

[0026] Calculate the minimum bounding rectangle of the region of interest to obtain the rotation angle θ; if θ > T, it is determined that the fastener is skewed, otherwise it is not skewed.

[0027] Further, the step S5) includes:

[0028] Extract the center C of the pixel set with the category of bolt in the region of interest, screen out the rail region in the detection frame, and record the left and right boundaries of the rail as E1 and E2 respectively. Screen out the sleeper region Rs in the detection frame, and record the upper and lower boundaries of the sleeper as S1 and S2. For each fastener region Rf, search for the paired sleeper. If there is no paired sleeper, the longitudinal displacement of the fastener is not calculated. If the intersection over union IOU of Rf and Rs > Tr, then the two are paired, otherwise they are not paired.

[0029] Further, the step S5) includes:

[0030] Comprehensively judge whether the fastener has lateral displacement by combining the bolt center and the left and right boundaries of the rail, and judge whether the fastener is on the left or right side of the rail. If the constructed lateral center coordinate of the fastener (x1 + x2) / 2 < (E1 + E2) / 2, it is judged that the fastener is on the left side of the rail, otherwise it is on the right side; for the fastener on the left side of the rail, if the constructed F1 = (E1 - x2) < T1 and F2 = abs((x1 + x2) / 2 - c) > T2 both hold, it is judged that the fastener has displacement, otherwise it has no displacement. For the fastener on the right side of the rail, if the constructed F3 = (x1 - E2) < T1 and F4 = abs((x1 + x2) / 2 - c) > T2 both hold, it is judged that the fastener has displacement, otherwise it has no displacement.

[0031] Further, the step S5) includes:

[0032] Comprehensively judge whether the fastener has lateral displacement by combining the bolt center and the upper and lower boundaries of the sleeper. If the constructed F5 = abs((x1 + x2) / 2 - r) > T3 or F6 = (x1 - S1) > T4 or F7 = (x2 - S2) > T5 holds, it is judged that the fastener has longitudinal displacement, otherwise it has no longitudinal displacement.

[0033] By implementing the technical solution of the automatic detection method for the state of track fasteners provided by the present application, the following beneficial effects are obtained:

[0034] (1) For the automatic detection method for the state of track fasteners of the present application, comprehensive detection for abnormal situations can be achieved by constructing eigenvalue, and the false judgment rate is greatly reduced by performing abnormal analysis;

[0035] (2) The automatic detection method of the rail fastener status of the present application does not rely on prior information such as rails and sleepers for fastener positioning. Abnormal information such as normal fasteners, turnouts, missing fasteners, reverse fasteners, and missing bolts are obtained through end-to-end reasoning;

[0036] (3) The automatic detection method of rail fastener status in this application combines target detection with semantic segmentation model on the basis of yolov8 basic framework, obtains target detection frames and semantic information of fasteners, rails, sleepers, etc. at one time, and shares the network feature extraction module, which improves the model reasoning efficiency;

[0037] (4) The automatic detection method of the rail fastener status of the present application solves the technical problems of local fastener breakage, fastener displacement, skewness and other difficult detection problems by obtaining the abnormal characteristic value of the fastener;

[0038] (5) The automatic detection method of the rail fastener status of the present application greatly reduces the misjudgment rate by adding foreign object occlusion analysis. It can not only adapt to complex background changes and lighting environment changes, but also maintain a high detection efficiency while ensuring the detection effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can be obtained based on these drawings without creative work.

[0040] Figure 1 This is a program flow chart of a specific embodiment of the method for automatically detecting the state of rail fasteners of the present application;

[0041] Figure 2 It is a flowchart of a procedure for judging abnormality of fasteners in a specific embodiment of the method for automatically detecting the status of rail fasteners of the present application;

[0042] Figure 3 This is a schematic diagram of the principle of judging the breakage of spring bars in a specific embodiment of the method for automatically detecting the state of rail fasteners in this application. Figure 1 ;

[0043] Figure 4 This is a schematic diagram of the principle of judging the breakage of spring bars in a specific embodiment of the method for automatically detecting the state of rail fasteners in this application. Figure 2 ;

[0044] Figure 5 It is a schematic diagram of the principle of foreign body occlusion analysis in a specific embodiment of the method for automatically detecting the state of rail fasteners of the present application;

[0045] Figure 6It is a schematic diagram of the principle of judging the skew and displacement of fasteners in a specific embodiment of the method for automatically detecting the state of rail fasteners of the present application;

[0046] Figure 7 , Figure 8 yes Figure 6 A schematic diagram of a local enlarged structure;

[0047] Fig. 9 It is a schematic block diagram of the structural composition of a specific embodiment of the automatic detection device for the state of rail fasteners based on the method of the present application;

[0048] Fig.10 It is a schematic block diagram of the structure composition of the target detection and semantic segmentation network in a specific embodiment of the automatic detection device for the state of rail fasteners based on the method of the present application;

[0049] In the figure: 1-image data acquisition unit, 2-sample annotation unit, 3-target detection and semantic segmentation network, 4-eigenvalue calculation unit, 5-abnormal analysis unit, 6-fastener, 7-rail, 8-sleeper, 9-obstruction, 10-track fastener status automatic detection device, 11-pad, 12-bolt. DETAILED DESCRIPTION

[0050] For the purpose of reference and clarity, the technical terms, abbreviations or abbreviations used below are recorded as follows:

[0051] yolov8: A target price detection network;

[0052] C2f: Cross Stage Partial Network Fusion, a fusion structure of features at different levels;

[0053] Epoch: An Epoch represents a complete training iteration on the entire training dataset;

[0054] mAP: short for mean average precision;

[0055] ROI: short for region of interest;

[0056] Maosic: An image sample augmentation method;

[0057] abs: Abbreviation for absolute value operation.

[0058] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0059] As attached Figure 1 To Attachment Fig.10 As shown, a specific embodiment of the method for automatically detecting the status of rail fasteners of the present application is given, and the present application is further described below in conjunction with the drawings and specific embodiments.

[0060] The specific embodiments of the present application provide an efficient and robust method for automatic detection of rail fastener status, which can adapt to the complex and changeable railway line environment and maintain a high detection efficiency while ensuring the detection effect.

[0061] Example 1

[0062] As attached Figure 1 As shown, an embodiment of the method for automatically detecting the state of rail fasteners of the present application specifically includes the following steps:

[0063] S1) collecting image data to obtain an original orbital image;

[0064] S2) annotating the original track image with target detection boxes and pixel-level annotations, and dividing the image into a training set and a validation set;

[0065] S3) constructing a target detection and semantic segmentation network 3, loading the training set into the target detection and semantic segmentation network 3 to train the network model parameters P and obtain the network model NET, and evaluating the generalization ability of the network model through the validation set;

[0066] S4) Each image I to be detected is input into the network model to infer the category, position and confidence information of the fasteners, sleepers and rails in the image, and the semantic information of each pixel of the image is obtained by semantic segmentation; the fastener category information obtained by network inference may include normal fasteners, turnouts, fastener missing, fastener reverse, bolt missing and other categories;

[0067] S5) A secondary detection logic is constructed for normal fasteners combined with the detection results and semantic information of rails and sleepers to obtain abnormal feature values. The fracture score is calculated based on the semantic information in the normal fastener target detection frame, and the skew angle and displacement distance of the fastener are calculated using the relative position relationship between the fastener, rail, and sleeper. Whether the abnormal feature value exceeds the normal range is further judged whether the fastener has abnormal conditions including fracture, skew, and displacement, and the misjudgment caused by the fastener being covered is removed through occlusion analysis.

[0068] Among them, the label categories of the target detection box annotation B1 further include: normal fasteners, missing fasteners, reverse fasteners, missing bolts, rails, sleepers and switches, which are represented by 0, 1, 2, 3, 4, 5, and 6 respectively. The categories of pixel-level annotation B2 further include: background, fasteners, bolts, rails, sleepers and foreign objects, which are represented by 0, 1, 2, 3, 4, and 5 respectively. 80% of the samples from the target detection box annotation B1 and the pixel-level annotation B2 are divided as training sets, and 20% of the samples are divided as validation sets. Abnormal feature values ​​further include fracture scores, skew angles, and displacement distances.

[0069] Construct the YOLOv8 target detection and semantic segmentation network model NET. The feature extraction part of the target detection and semantic segmentation network 3 further uses CSPDarknet (a deep neural network model for computer vision tasks) as the backbone network. In the feature fusion layer, the C2f (Cross Stage Partial Network Fusion) structure is further used to obtain the gradient flow, and then output to the detection head (Detection Head) and the segmentation head (Segment Head). In step S4), the input image size of the network model is 1280 (which can be an integer multiple of 32), and the detection frame output by the detection head includes the target category, position coordinates (x1, y1, x2, y2) and confidence. The segmentation head outputs a category mask with a size equal to the input size.

[0070] Step S3) further comprises:

[0071] The training set is loaded into the target detection and semantic segmentation network 3 for iterative training, and the maximum number of iterations is set (epoch=300 in this embodiment). After training for several (e.g., 10) epoch iterations, the Maosic enhancement operation is turned off, and only conventional image enhancement operations including horizontal flipping, vertical flipping, and chromaticity transformation are retained. The validation set is tested once in 1 epoch iteration (traversing all training samples), and the mAP (mean Average Precision) information of the validation set is recorded, and the model parameters with the highest mean average precision are saved to the local disk.

[0072] Step S4) further comprises:

[0073] Each image to be detected is input into the network model loaded with model parameters for forward reasoning, and several target detection frames are obtained. The target categories correspond to normal fasteners, fastener missing, fastener reverse, bolt missing, rail, sleeper and turnout. The segmentation head obtains an image mask with pixel values ​​of 0, 1, 2, 3, 4, and 5, representing background, fastener, bolt, rail, sleeper and foreign matter respectively. Damages with categories of fastener missing, fastener reverse and bolt missing are filtered out from the detection frame and saved in the damage list.

[0074] The normal fasteners are combined with the detection results and semantic information of rails and sleepers to construct secondary detection logic to obtain abnormal feature values, as shown in the attached figure. Figure 2 The judgment strategy is shown. The specific process is described as follows:

[0075] Step S5) further comprises:

[0076] For each normal fastener, extract the image mask ROI (Region Of Interesting) corresponding to its position rectangle, as shown in the attached figure. Figure 3 The shaded area shown is the mask of the area where a single fastener is located. The pixels belonging to the fastener are set to 255 through threshold segmentation. Figure 4 As shown, the region of interest is divided into sub-region 1 and sub-region 2. The blob analysis algorithm is used to determine whether the white pixels in the sub-region are continuous. If they are continuous, it is normal. Otherwise, the discontinuous start and end points are recorded, and the number of disconnected columns is calculated as end point-starting point. If the number of disconnected columns is greater than Nf (set to 3 in this embodiment), the fastener is broken. Otherwise, there is no break. For fasteners that are broken, it is determined whether there is a foreign object (such as an attached Figure 5 The cover 9) shown in FIG. Figure 5 As shown in the figure, 6 is a fastener, 7 is a rail, 8 is a sleeper, 9 is a shield, 11 is a pad, and 12 is a bolt. By calculating the number and ratio of foreign object pixels between the disconnection start and end in the region of interest, if the number of foreign object pixels>Nm (set to 50 in this embodiment) or the ratio>Tm (set to 0.3 in this embodiment), the fastener break is judged as a false detection and filtered out. Among them, Nf, Nm, and Tm are their respective thresholds.

[0077] Step S5) further comprises:

[0078] The minimum circumscribed rectangle of the region of interest is calculated to obtain the rotation angle θ. If θ>T (set to 15° in this embodiment), it is determined that the fastener is skewed, otherwise it is not skewed, and T is the angle threshold.

[0079] Step S5) further comprises:

[0080] As shown in the attached Figure 6 and the attached Figure 7 As shown, the center C(r,

[0081] c) of the set of pixels of the bolt category is extracted in the region of interest. The rail region is filtered out in the detection frame, and the left and right boundaries of the rail are denoted as E1 and E2 respectively. The sleeper region Rs(x1, y1, x2, y2) is filtered out in the detection frame, and the upper and lower boundaries of the sleeper are denoted as S1 and S2. For each fastener region Rf(x1, y1, x2, y2), search for the paired sleeper. If there is no paired sleeper, the longitudinal displacement of the fastener is not calculated. If the intersection over union (IOU) of Rf and Rs is greater than Tr (set to 0.2 in this embodiment), then the two are paired; otherwise, they are not paired.

[0082] Step S5) further includes:

[0083] Comprehensively judge whether the fastener has a lateral displacement by combining the bolt center and the left and right boundaries of the rail. The specific strategy is as shown in the attached Figure 6 and the attached Figure 8 As shown, and judge whether the fastener is on the left or right side of the rail. If the constructed lateral center coordinate of the fastener (x1 + x2) / 2 < (E1 + E2) / 2, then judge that the fastener is on the left side of the rail; otherwise, it is on the right side. For the fastener on the left side of the rail, if both F1 = (E1 - x2) < T1 (the threshold T1 is set to 5 in this embodiment) and F2 = abs((x1 + x2) / 2 - c) > T2 (the threshold T2 is set to 100 in this embodiment) are established, then judge that the fastener has a displacement; otherwise, it has no displacement. For the fastener on the right side of the rail, if both F3 = (x1 - E2) < T1 (the threshold T1 is set to 5 in this embodiment) and F4 = abs((x1 + x2) / 2 - c) > T2 (the threshold T2 is set to 100 in this embodiment) are established, then judge that the fastener has a displacement; otherwise, it has no displacement.

[0084] Step S5) further includes:

[0085] Comprehensively judge whether the fastener has a lateral displacement by combining the bolt center and the upper and lower boundaries of the sleeper. If F5 = abs((x1 + x2) / 2 - r) > T3 (the threshold T3 is set to 90 in this embodiment) or F6 = (x1 - S1) > T4 (the threshold T4 is set to -20 in this embodiment) or F7 = (x2 - S2) > T5 (the threshold T5 is set to -20 in this embodiment) is established, then judge that the fastener has a longitudinal displacement; otherwise, it has no longitudinal displacement.

[0086] Embodiment 1 of the present application specifically provides a technical solution for a method for automatically detecting the status of a track fastener, which has the following technical advantages:

[0087] 1) Example 1 aims at the technical problem that it is difficult to detect abnormal conditions such as local breakage, displacement and skew of fasteners. A secondary detection logic is constructed for normal fasteners in combination with the detection results and semantic information of rails and sleepers to obtain abnormal feature values, which are composed of a breakage score, a skew angle and a displacement distance. The breakage score is calculated based on the semantic information in the normal fastener detection frame, and the skew angle and displacement distance of the fastener are calculated using the relative position relationship between the fastener, rail and sleeper. The problem that it is difficult to detect local breakage, displacement and skew of fasteners is solved by obtaining the abnormal feature values ​​of fasteners, and the misjudgment rate is greatly reduced by adding foreign body occlusion analysis.

[0088] 2) Example 1 addresses the technical problem of slow dual-model processing speed by combining target detection with semantic segmentation model on the basis of yolov8, obtaining target detection frames and semantic information of fasteners, rails, sleepers, etc. at one time, and sharing the network feature extraction module at the same time, thereby improving the model reasoning efficiency;

[0089] 3) Example 1 uses the prior information of fasteners on the sleepers on both sides of the rails, but cannot adapt to the situation of multiple fasteners in the turnout area, and changes in fasteners or background environment can easily cause false detection. The fastener positioning is achieved without relying on prior information such as rails and sleepers. Through end-to-end reasoning, abnormal information such as normal fasteners, turnsouts, missing fasteners, reverse fasteners, and missing bolts is obtained, which solves the problem of fastener detection relying on the position of sleepers and can adapt to various asymmetric fasteners.

[0090] Example 2

[0091] As attached Fig. 9As shown, an embodiment of a track fastener state automatic detection device 10 based on the method described in Example 1 of the present application specifically includes: an image data acquisition unit 1, a sample annotation unit 2, a target detection and semantic segmentation network 3, a feature value calculation unit 4 and an abnormality analysis unit 5. The image data acquisition unit 1 collects image data to obtain the original track image. The sample annotation unit 2 performs target detection frame annotation and pixel-level annotation on the original track image, and divides it into a training set and a verification set. The training set is loaded and input into the target detection and semantic segmentation network 3 to train the network model parameters P and obtain the network model NET, and the generalization ability of the network model is evaluated through the verification set. Each image to be detected is input into the network model to infer the category, position and confidence information of the fasteners, sleepers and rails in the image, and the semantic information of each pixel of the image is obtained through semantic segmentation. The feature value calculation unit 4 constructs a secondary detection logic for normal fasteners combined with the detection results and semantic information of rails and sleepers to obtain abnormal feature values. The abnormal analysis unit 5 calculates the fracture score based on the semantic information in the normal fastener target detection frame, and calculates the skew angle and displacement distance of the fastener based on the relative position relationship between the fastener, rail and sleeper. It further determines whether the fastener has abnormal conditions including fracture, skew and displacement by whether the abnormal feature value exceeds the normal range, and removes the misjudgment caused by the fastener being covered by occlusion analysis.

[0092] The label categories of the target detection box annotation B1 include: normal fastener, missing fastener, reverse fastener, missing bolt, rail, sleeper and turnout, which are represented by 0, 1, 2, 3, 4, 5, and 6 respectively. The categories of pixel-level annotation B2 include: background, fastener, bolt, rail, sleeper and foreign matter, which are represented by 0, 1, 2, 3, 4, and 5 respectively. 80% of the samples from the target detection box annotation B1 and the pixel-level annotation B2 are divided as training sets, and 20% of the samples are divided as validation sets. The abnormal feature values ​​further include fracture scores, skew angles, and displacement distances.

[0093] Construct the yolov8 target detection and semantic segmentation network model NET, as shown in the attached Fig.10 As shown in the figure, the feature extraction part of the target detection and semantic segmentation network 3 uses CSPDarknet as the backbone network, and the C2f structure is used in the feature fusion layer to obtain the gradient flow, which is then output to the detection head and the segmentation head. The input image size of the network model is 1280. The detection frame output by the detection head includes the target category, position coordinates and confidence. The segmentation head outputs a category mask with the same size as the input size.

[0094] Load the training set and input the target detection and semantic segmentation network 3 for iterative training. Set the maximum number of iterations. After training for several epochs, turn off the Maosic enhancement operation and only retain the conventional image enhancement operations including horizontal flipping, vertical flipping, and chromaticity transformation. Test the validation set once per epoch, record the mAP information of the validation set, and save the model parameters with the highest mean average precision to the local disk.

[0095] Each image I to be detected is input into the network model NET loaded with model parameters P for forward reasoning, and several target detection frames are obtained. The target categories 0, 1, 2, 3, 4, 5, and 6 correspond to normal fasteners, fastener missing, fastener reverse, bolt missing, rail, sleeper, and turnout, respectively. The segmentation head obtains an image mask with pixel values ​​of 0, 1, 2, 3, 4, and 5, representing background, fastener, bolt, rail, sleeper, and foreign matter, respectively. Damages of the categories of fastener missing, fastener reverse, and bolt missing are screened out from the detection frame and saved in the damage list.

[0096] The normal fasteners are combined with the detection results and semantic information of rails and sleepers to construct secondary detection logic to obtain abnormal feature values. The specific instructions are as follows:

[0097] For each normal fastener, the feature value calculation unit 4 extracts the image mask ROI region of interest corresponding to the rectangular box of its position, and sets the pixels belonging to the fastener through threshold segmentation. The region of interest is divided into sub-region 1 and sub-region 2. It is determined whether the white pixels in the sub-region are continuous. If they are continuous, it is normal. Otherwise, the discontinuous starting point and end point are recorded, and the number of disconnected columns is calculated = end point - starting point. The abnormal analysis unit 5 determines that if the number of disconnected columns is > Nf, the fastener is broken, otherwise there is no break. For fasteners with fractures, the abnormal analysis unit 5 determines whether there is foreign matter covering the fracture. By calculating the number and proportion of foreign matter pixels between the disconnected starting point and end point in the region of interest, if the foreign matter pixels > Nm or the proportion > Tm, the fastener fracture is judged as a false detection and filtered out. Among them, Nf, Nm, and Tm are their respective thresholds.

[0098] The feature value calculation unit 4 calculates the minimum circumscribed rectangle of the region of interest to obtain the rotation angle θ. If θ>T, the abnormality analysis unit 5 determines that the fastener is skewed, otherwise it is not skewed.

[0099] The eigenvalue calculation unit 4 extracts the center C of the pixel set of the bolt category in the region of interest, filters out the rail region in the detection frame, and marks the left and right boundaries of the rail as E1 and E2 respectively. The sleeper region Rs is filtered out in the detection frame, and the upper and lower boundaries of the sleeper are marked as S1 and S2. For each fastener region Rf, the anomaly analysis unit 5 searches for the paired sleeper. If there is no paired sleeper, the longitudinal displacement of the fastener is not calculated. If the intersection over union IOU of Rf and Rs is > Tr, the two are paired; otherwise, they are not paired, where Tr is the threshold value.

[0100] The anomaly analysis unit 5 comprehensively judges whether the fastener has a lateral displacement by combining the bolt center and the left and right boundaries of the rail, and judges whether the fastener is on the left or right side of the rail. If the lateral center coordinate (x1 + x2) / 2 of the fastener constructed by the eigenvalue calculation unit 4 is < (E1 + E2) / 2, the anomaly analysis unit 5 judges that the fastener is on the left side of the rail; otherwise, it is on the right side. For the fastener on the left side of the rail, if both F1 = (E1 - x2) < T1 and F2 = abs((x1 + x2) / 2 - c) > T2 constructed by the eigenvalue calculation unit 4 hold, the anomaly analysis unit 5 judges that the fastener has a displacement; otherwise, it has no displacement. For the fastener on the right side of the rail, if both F3 = (x1 - E2) < T1 and F4 = abs((x1 + x2) / 2 - c) > T2 constructed by the eigenvalue calculation unit 4 hold, the anomaly analysis unit 5 judges that the fastener has a displacement; otherwise, it has no displacement.

[0101] The anomaly analysis unit 5 comprehensively judges whether the fastener has a lateral displacement by combining the bolt center and the upper and lower boundaries of the sleeper. If any of F5 = abs((x1 + x2) / 2 - r) > T3, F6 = (x1 - S1) > T4, or F7 = (x2 - S2) > T5 constructed by the eigenvalue calculation unit 4 holds, the anomaly analysis unit 5 judges that the fastener has a longitudinal displacement; otherwise, it has no longitudinal displacement.

[0102] In the description of the present application, it should be noted that when an element is referred to as "fixed to" or "disposed on" another element, it can be directly disposed on the other element or indirectly disposed on the other element. When an element is referred to as "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.

[0103] It should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0104] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.

[0105] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the effects and purposes that can be achieved by this application.

[0106] By implementing the technical solution of the method for automatically detecting the status of rail fasteners described in the specific embodiments of this application, the following technical effects can be achieved:

[0107] (1) The automatic detection method of the rail fastener status described in the specific embodiment of the present application can achieve comprehensive detection of abnormal situations by constructing characteristic values, and greatly reduce the misjudgment rate by performing abnormality analysis;

[0108] (2) The automatic detection method of the rail fastener status described in the specific embodiment of the present application does not rely on prior information such as rails and sleepers for fastener positioning, and obtains abnormal information such as normal fasteners, switches, missing fasteners, reverse fasteners, and missing bolts through end-to-end reasoning;

[0109] (3) The automatic detection method of the rail fastener status described in the specific embodiment of the present application combines the target detection with the semantic segmentation model on the basis of the yolov8 basic framework, obtains the target detection frame and semantic information of the fastener, rail, sleeper, etc. at one time, and shares the network feature extraction module, thereby improving the model reasoning efficiency;

[0110] (4) The automatic detection method of the rail fastener status described in the specific embodiment of the present application solves the technical problems of difficult detection such as local breakage of the fastener, displacement of the fastener, and skewness by obtaining the abnormal characteristic value of the fastener;

[0111] (5) The automatic detection method of the rail fastener status described in the specific embodiment of the present application greatly reduces the misjudgment rate by adding foreign object occlusion analysis. It can not only adapt to complex background changes and lighting environment changes, but also maintain a high detection efficiency while ensuring the detection effect.

[0112] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0113] The above is only a preferred embodiment of the present application, and does not constitute any formal limitation to the present application. Although the present application has been disclosed as above with a preferred embodiment, it is not intended to limit the present application. Any technician familiar with the art can use the above disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes, without departing from the spirit and technical solution of the present application. Therefore, any simple modification, equivalent replacement, equivalent change and modification made to the above embodiments according to the technical essence of the present application, which does not depart from the content of the technical solution of the present application, still falls within the scope of protection of the technical solution of the present application.

Claims

1. A method for automatically detecting the status of rail fasteners, characterized in that: The following steps are involved: S1) collecting image data to obtain an original orbital image; S2) annotating the original track image with target detection boxes and pixel-level annotations, and dividing the image into a training set and a validation set; S3) constructing a target detection and semantic segmentation network, loading the training set as input to the target detection and semantic segmentation network to train the network model parameters and obtain the network model, and evaluating the generalization ability of the network model through the validation set; S4) inputting each image to be detected into the network model to infer the category, location and confidence information of the fasteners, sleepers and rails in the image, and obtaining the semantic information of each pixel of the image through semantic segmentation; S5) constructing secondary detection logic for normal fasteners combined with the detection results and semantic information of rails and sleepers to obtain abnormal feature values; The fracture score is calculated based on the semantic information in the normal fastener target detection frame, and the fastener skew angle and displacement distance are calculated using the relative position relationship of the fastener, rail, and sleeper. The abnormal feature value is then used to further determine whether the fastener has abnormal conditions including fracture, skew, and displacement.

2. The method for automatically detecting the state of rail fasteners according to claim 1, characterized in that: The label categories annotated in the target detection frame include: normal fasteners, missing fasteners, reverse fasteners, missing bolts, rails, sleepers and switches.

3. The method for automatically detecting the state of rail fasteners according to claim 2, characterized in that: The pixel-level annotation categories include: background, fasteners, bolts, rails, sleepers and foreign objects.

4. The method for automatically detecting the state of rail fasteners according to claim 3, characterized in that: The abnormal characteristic values ​​include fracture score, skew angle and displacement distance.

5. The method for automatically detecting the state of rail fasteners according to any one of claims 1 to 4, characterized in that: The feature extraction part of the target detection and semantic segmentation network uses CSPDarknet as the backbone network, and uses the C2f structure in the feature fusion layer to obtain the gradient flow, which is then output to the detection head and the segmentation head; in the step S4), the input image size of the network model is an integer multiple of 32, the detection box output by the detection head includes the target category, position coordinates and confidence, and the segmentation head outputs a category mask with a size equal to the input size.

6. The method for automatically detecting the state of rail fasteners according to claim 5, characterized in that: The step S3) further comprises: Load the training set and input the target detection and semantic segmentation network for iterative training. Set the maximum number of iterations. After training for several epochs, turn off the Maosic enhancement operation and only retain the conventional image enhancement operations including horizontal flipping, vertical flipping, and chromaticity transformation. Perform a validation set test once per epoch, record the mean average precision information of the validation set, and save the model parameters with the highest mean average precision to the local disk.

7. The method for automatically detecting the state of rail fasteners according to claim 1, 2, 3, 4 or 6, characterized in that: The step S4) further comprises: Each image to be detected is input into the network model loaded with model parameters for forward reasoning to obtain several target detection frames. The target categories correspond to normal fasteners, fastener missing, fastener reverse, bolt missing, rail, sleeper and turnout respectively; the segmentation head obtains an image mask with pixel values ​​of 0, 1, 2, 3, 4, 5, representing the background, fastener, bolt, rail, sleeper and foreign matter respectively; the damage categories of fastener missing, fastener reverse and bolt missing are screened out from the detection frame and saved in the damage list.

8. The method for automatically detecting the state of rail fasteners according to claim 7, characterized in that: The step S5) further comprises: For each normal fastener, extract the region of interest of the image mask corresponding to its position rectangular box, set the pixels belonging to the fastener through threshold segmentation, and divide the region of interest into sub-region No. 1 and sub-region No. 2; judge whether the white pixels in the sub-region are continuous. If they are continuous, it is normal; otherwise, record the starting point and ending point of the discontinuity, and calculate the number of disconnected columns = ending point - starting point; judge if the number of disconnected columns > Nf, then the fastener is broken; otherwise, there is no break; for the fasteners with breakage, judge whether there is foreign object coverage at the breakage point. By calculating the number and proportion of foreign object pixels between the starting point and ending point of the disconnection in the region of interest, if the foreign object pixels > Nm or the proportion > Tm, then judge this fastener breakage as misdetection and filter it out; where Nf, Nm, and Tm are all their respective thresholds.

9. The method for automatically detecting the state of rail fasteners according to claim 8, characterized in that: The step S5) further includes: Calculate the minimum bounding rectangle of the region of interest to obtain the rotation angle θ; if θ > T, then judge that the fastener is skewed; otherwise, there is no skew.

10. The method for automatically detecting the state of rail fasteners according to claim 8, characterized in that: The step S5) further includes: Extract the center C of the pixel set with the category of bolt in the region of interest, screen out the rail region in the detection frame, and record the left and right boundaries of the rail as E1 and E2 respectively. Screen out the sleeper region Rs in the detection frame, and record the upper and lower boundaries of the sleeper as S1 and S2; for each fastener region Rf, search for its paired sleeper. If there is no paired sleeper, do not calculate the longitudinal displacement of the fastener; if the intersection over union IOU of Rf and Rs > Tr, then the two are paired; otherwise, they are not paired.

11. The method for automatically detecting the state of rail fasteners according to any one of claims 8 to 10, characterized in that: The step S5) further includes: Comprehensively judge whether the fastener has lateral displacement by combining the bolt center and the left and right boundaries of the rail, and judge whether the fastener is on the left or right side of the rail; if the constructed lateral center coordinate of the fastener (x1 + x2) / 2 < (E1 + E2) / 2, then judge that the fastener is on the left side of the rail; otherwise, it is on the right side; for the fasteners on the left side of the rail, if the constructed F1 = (E1 - x2) < T1 and F2 = abs((x1 + x2) / 2 - c) > T2 both hold, then judge that the fastener has displacement; otherwise, there is no displacement; for the fasteners on the right side of the rail, if the constructed F3 = (x1 - E2) < T1 and F4 = abs((x1 + x2) / 2 - c) > T2 both hold, then judge that the fastener has displacement; otherwise, there is no displacement.

12. The method for automatically detecting the state of rail fasteners according to any one of claims 8 to 10, characterized in that: The step S5) further includes: Comprehensively judge whether the fastener has lateral displacement by combining the bolt center and the upper and lower boundaries of the sleeper; if the constructed F5 = abs((x1 + x2) / 2 - r) > T3 or F6 = (x1 - S1) > T4 or F7 = (x2 - S2) > T5 holds, then judge that the fastener has longitudinal displacement; otherwise, there is no longitudinal displacement.

Citation Information

Patent Citations

  • Mainboard surface defect detection method based on semi-supervised learning

    CN115526847A

  • Track component detection method, terminal and storage medium

    CN115731179A

  • Railway vehicle anomaly detection method and system

    CN117557570A

  • Defect detection method and related apparatus, device, storage medium, and computer program product

    WO2022036953A1

Cited By

  • Machine vision detection method and system for railway sleeper supporting fastener missing

    CN120259291A

  • Track fastener elastic strip displacement visual detection method, system and device

    CN120635086A

  • Rail fastener spring strip ectopic visual detection method, system and device

    CN120635086B

  • Visual detection method, system and device for breakage of elastic strip of track fastener

    CN120765943A

  • Fastener assembly abnormity detection method based on machine vision

    CN121639559A