Track fastener state automatic detection device
Through the combination of object detection and semantic segmentation network, the abnormal characteristic value of fastener is calculated, which solves the missed and mis-checking problems of fastener detection in the prior art, and realizes accurate detection of fastener fracture, skew and displacement, improving the Test efficiency and accuracy.
Patent Information
- Application Number
- CN202411203893.X
- 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
Existing fastener detection devices are difficult to fully detect fastener abnormalities, and are prone to missed inspection and missed inspection.
Using image data acquisition unit, sample annotation unit, object detection and semantic segmentation network, feature value calculation unit and abnormal analysis unit, through object detection box annotation and pixel-level annotation, combined with CSPDarknet backbone network and C2f structure, fasteners, sleepers and Class, position and confidence information of rails, calculate abnormal eigenvalues to judge fracture, skew and displacement.
Comprehensive detection of fastener abnormalities is achieved, the error judgment rate is reduced, and the positioning does not rely on the prior information of rails and sleepers, improves detection efficiency, and adapts to complex background changes and lighting environment changes.
Smart Images

Figure CN119048835A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of railway engineering machinery, and in particular to a device 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 track fastener status automatic detection device to solve the technical problem that the existing fastener detection device is difficult to fully detect fastener abnormalities and is very likely to cause missed detections.
[0009] In order to achieve the above-mentioned invention purpose, the present application specifically provides a technical implementation scheme of a track fastener state automatic detection device, including: an image data acquisition unit, a sample annotation unit, a target detection and semantic segmentation network, a feature value calculation unit and an abnormality analysis unit. The image data acquisition unit collects image data to obtain the original track image. The sample annotation unit performs target detection frame annotation and pixel-level annotation on the original track image, and divides it into a training set and a validation set. The training set is loaded and input into the target detection and semantic segmentation network to train the network model parameters and obtain the network model, and the generalization ability of the network model is evaluated by the validation set. Each image to be detected is input into the network model to infer the category, position and confidence information of the fastener, sleeper and rail in the image, and the semantic information of each pixel of the image is obtained by semantic segmentation. The feature value calculation unit constructs a secondary detection logic for the normal fastener combined with the detection results and semantic information of the rail and sleeper to obtain the abnormal feature value. The abnormality analysis unit calculates the fracture score according to the semantic information in the normal fastener target detection frame, and calculates the fastener skew angle and displacement distance using the relative position relationship between the fastener, rail and sleeper. Whether the abnormal characteristic value exceeds the normal range can be further judged whether the fastener has abnormal conditions including breakage, skewness, and displacement.
[0010] Furthermore, the label categories annotated in the target detection frame include: normal fasteners, missing fasteners, reverse fasteners, missing bolts, rails, sleepers and switches.
[0011] Furthermore, the pixel-level annotation categories include: background, fasteners, bolts, rails, sleepers and foreign objects.
[0012] Furthermore, the abnormal characteristic values include fracture score, skew angle and displacement distance.
[0013] 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. 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.
[0014] Furthermore, the training set is loaded into the target detection and semantic segmentation network for iterative training, the maximum number of iterations is set, and the Maosic enhancement operation is turned off after training for several epochs, while only conventional image enhancement operations including horizontal flipping, vertical flipping, and chromaticity transformation are retained. The validation set is tested once per epoch, and the 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.
[0015] Furthermore, 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 screened out from the detection frame and saved in the damage list.
[0016] Furthermore, for each normal fastener, the eigenvalue calculation unit extracts the image mask region of interest corresponding to the rectangular box of its position, sets the pixels belonging to the fastener through threshold segmentation, and divides 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. The abnormal analysis unit determines that if the number of disconnected columns > Nf, the fastener is broken, otherwise there is no break. For fasteners with fractures, the abnormal analysis unit determines 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.
[0017] Furthermore, the eigenvalue calculation unit calculates the minimum circumscribed rectangle of the region of interest to obtain a rotation angle θ. If θ>T, the abnormality analysis unit determines that the fastener is skewed, otherwise it is not skewed.
[0018] Furthermore, the eigenvalue calculation unit extracts the center C of the pixel set of the bolt category in the region of interest, selects the rail region in the detection frame, and the left and right boundaries of the rail are recorded as E1 and E2 respectively, and selects the sleeper region Rs in the detection frame, and the upper and lower boundaries of the sleeper are recorded as S1 and S2. For each fastener region Rf, the abnormal analysis unit searches for the sleeper paired with it, and if there is no paired sleeper, the longitudinal displacement of the fastener is not calculated. If the intersection-and-union ratio IOU of Rf and Rs is greater than Tr, the two are paired, otherwise they are not paired.
[0019] Further, the anomaly analysis unit comprehensively determines whether there is a lateral displacement of the fastener by combining the bolt center and the left and right boundaries of the rail, and determines whether the fastener is on the left or right side of the rail. If the lateral center coordinate of the fastener (x1 + x2) / 2 < (E1 + E2) / 2 is constructed by the eigenvalue calculation unit, the anomaly analysis unit determines that the fastener is on the left side of the rail, and vice versa. For the fastener on the left side of the rail, if F1 = (E1 - x2) < T1 and F2 = abs((x1 + x2) / 2 - c) > T2 are both established by the eigenvalue calculation unit, the anomaly analysis unit determines that the fastener has a displacement, and vice versa. For the fastener on the right side of the rail, if F3 = (x1 - E2) < T1 and F4 = abs((x1 + x2) / 2 - c) > T2 are both established by the eigenvalue calculation unit, the anomaly analysis unit determines that the fastener has a displacement, and vice versa.
[0020] Further, the anomaly analysis unit comprehensively determines whether there is a lateral displacement of the fastener by combining the bolt center and the upper and lower boundaries of the sleeper. If F5 = abs((x1 + x2) / 2 - r) > T3 or F6 = (x1 - S1) > T4 or F7 = (x2 - S2) > T5 is established by the eigenvalue calculation unit, the anomaly analysis unit determines that the fastener has a longitudinal displacement, and vice versa.
[0021] By implementing the technical solution of the automatic track fastener status detection device provided in the present application, the following beneficial effects are obtained:
[0022] (1) The automatic track fastener status detection device of the present application can achieve comprehensive detection of abnormal conditions by constructing eigenvalues, and greatly reduces the misjudgment rate through anomaly analysis;
[0023] (2) The automatic track fastener status detection device 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, turnouts, fastener missing, fastener reverse, and bolt missing through end-to-end reasoning;
[0024] (3) The automatic track fastener status detection device of the present application combines the object detection and semantic segmentation models on the basis of the yolov8 basic framework, and obtains the object detection frames and semantic information of fasteners, rails, sleepers, etc. in one inference, sharing the network feature extraction module, which improves the model inference efficiency;
[0025] (4) The automatic track fastener status detection device of the present application solves the technical problems that are difficult to detect, such as local fracture, displacement, and skew of fasteners, by obtaining the abnormal eigenvalues of fasteners;
[0026] (5) The automatic detection device for the status of rail fasteners of the present application significantly 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
[0027] 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.
[0028] Figure 1 This is a schematic block diagram of the structure of a specific embodiment of the automatic detection device for the status of rail fasteners of the present application;
[0029] Figure 2 It is a schematic block diagram of the structure of the target detection and semantic segmentation network in a specific embodiment of the automatic detection device for the state of rail fasteners of the present application;
[0030] Figure 3 This is a schematic diagram of the principle of judging the breakage of spring bars in a specific embodiment of the automatic detection device for the state of rail fasteners of the present application. Figure 1 ;
[0031] Figure 4 This is a schematic diagram of the principle of judging the breakage of spring bars in a specific embodiment of the automatic detection device for the state of rail fasteners of the present application. Figure 2 ;
[0032] Figure 5 It is a schematic diagram of the principle of foreign body occlusion analysis in a specific embodiment of the automatic detection device for the status of rail fasteners of the present application;
[0033] Figure 6 It is a schematic diagram of the principle of judging the skew and displacement of fasteners in a specific embodiment of the automatic detection device for the state of rail fasteners of the present application;
[0034] Figure 7 , Figure 8 yes Figure 6 A schematic diagram of a local enlarged structure;
[0035] Fig. 9 It is a program flow chart of a specific embodiment of the method for automatically detecting the state of rail fasteners based on the device of the present application;
[0036] Fig.10 It is a flowchart of a procedure for judging abnormal fasteners in a specific embodiment of a method for automatically detecting the state of rail fasteners based on the device of the present application;
[0037] 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
[0038] For the purpose of reference and clarity, the technical terms, abbreviations or abbreviations used below are recorded as follows:
[0039] yolov8: A target price detection network;
[0040] C2f: Cross Stage Partial Network Fusion, a fusion structure of features at different levels;
[0041] Epoch: An Epoch represents a complete training iteration on the entire training dataset;
[0042] mAP: short for mean average precision;
[0043] ROI: short for region of interest;
[0044] Maosic: An image sample augmentation method;
[0045] abs: Abbreviation for absolute value operation.
[0046] 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.
[0047] As attached Figure 1 To Attachment Fig.10 As shown, a specific embodiment of the automatic detection device for 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.
[0048] The specific embodiments of the present application provide an efficient and robust automatic detection device for the status of rail fasteners, which can adapt to the complex and changeable railway line environment and maintain a high detection efficiency while ensuring the detection effect.
[0049] Example 1
[0050] As attached Figure 1As shown, an embodiment of the automatic detection device 10 of the state of rail fasteners 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 by the verification set. 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 reasoning may include normal fasteners, turnouts, missing fasteners, reverse fasteners, missing bolts and other categories. 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.
[0051] 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. Abnormal feature values include fracture score, skew angle and displacement distance.
[0052] Construct the yolov8 target detection and semantic segmentation network model NET, as shown in the attached Figure 2As shown in the figure, the feature extraction part of the target detection and semantic segmentation network 3 uses CSPDarknet (a deep neural network model for computer vision tasks) as the backbone network, and uses the C2f (Cross Stage Partial Network Fusion) structure in the feature fusion layer to obtain the gradient flow, which is then output to the detection head and segmentation head. The input image size of the network model is 1280 (which can be an integer multiple of 32). 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.
[0053] Load the training set and input the target detection and semantic segmentation network 3 for iterative training. Set the maximum number of iterations (epoch = 300). After training for several (e.g., 10) 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 in 1 epoch iteration (traversing all training samples), record the mAP (mean Average Precision) information of the validation set, and save the model parameters with the highest mean average precision to the local disk.
[0054] 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.
[0055] 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:
[0056] For each normal fastener, the feature value calculation unit 4 extracts the image mask ROI (Region Of Interesting) corresponding to its position rectangular frame, 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 4As 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. The abnormality analysis unit 5 determines that 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 with a break, the abnormality analysis unit 5 determines 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.
[0057] The feature value calculation unit 4 calculates the minimum circumscribed rectangle of the region of interest and obtains the rotation angle θ. If θ>T (set to 15° in this embodiment), the abnormality analysis unit 5 determines that the fastener is skewed, otherwise it is not skewed, and T is the angle threshold.
[0058] As attached Figure 6 and attached Figure 7 As shown, the eigenvalue calculation unit 4 extracts the center C (r, c) of the pixel set of the bolt category in the region of interest, and selects the rail area in the detection frame, and the left and right boundaries of the rail are recorded as E1 and E2 respectively. The sleeper area Rs (x1, y1, x2, y2) is selected in the detection frame, and the upper and lower boundaries of the sleeper are recorded as S1 and S2. For each fastener area Rf (x1, y1, x2, y2), the abnormal analysis unit 5 searches for the sleeper paired with it. If there is no paired sleeper, the longitudinal displacement of the fastener is not calculated. If the intersection over union ratio IOU (Intersection Over Union) of Rf and Rs>Tr (set to 0.2 in this embodiment), the two are paired, otherwise they are not paired, and Tr is the threshold.
[0059] The abnormal analysis unit 5 comprehensively judges whether there is lateral displacement of the fastener by combining the bolt center and the left and right boundaries of the rail. The specific strategy is as follows: Figure 6 and attached Figure 8As shown in the figure, it is determined whether the fastener is on the left or right side of the rail. If the lateral center coordinate of the fastener (x1 + x2) / 2 < (E1 + E2) / 2 is constructed by the eigenvalue calculation unit 4, the anomaly analysis unit 5 determines that the fastener is on the left side of the rail, and vice versa. For the fastener on the left side of the rail, if 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 both established by the eigenvalue calculation unit 4, the anomaly analysis unit 5 determines that the fastener has displacement, and vice versa. For the fastener on the right side of the rail, if 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 both established by the eigenvalue calculation unit 4, the anomaly analysis unit 5 determines that the fastener has displacement, and vice versa.
[0060] The anomaly analysis unit 5 comprehensively determines whether the fastener has 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 by the eigenvalue calculation unit 4, the anomaly analysis unit 5 determines that the fastener has longitudinal displacement, and vice versa.
[0061] Embodiment 1 of the present application specifically gives a technical solution of an automatic detection device for the state of track fasteners, having the following technical advantages:
[0062] 1) For the technical problem that it is difficult to detect abnormal conditions such as local fracture, displacement, and skew of fasteners in Embodiment 1, a secondary detection logic is constructed for the detection results and semantic information of normal fasteners combined with rails and sleepers to obtain abnormal eigenvalues, which are composed of fracture scores, skew angles, and displacement distances; the fracture score is calculated according to the semantic information in the detection frame of normal fasteners, 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 of difficult detection of local fracture, displacement, and skew of fasteners is solved by obtaining the abnormal eigenvalues of fasteners, and at the same time, the false positive rate is greatly reduced by adding foreign object occlusion analysis;
[0063] 2) For the technical problem of slow processing speed of the dual model in Embodiment 1, the object detection and semantic segmentation models are combined on the basis of the yolov8 basic framework, and the object detection frames and semantic information of fasteners, rails, sleepers, etc. are obtained by one inference, and the network feature extraction module is shared at the same time, improving the model inference efficiency;
[0064] 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.
[0065] Example 2
[0066] As attached Fig. 9 As shown, an embodiment of a method for automatically detecting the state of a rail fastener based on the device described in Example 1 specifically includes the following steps:
[0067] S1) collecting image data to obtain an original orbital image;
[0068] 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;
[0069] 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 and obtain the network model, and evaluating the generalization ability of the network model through the validation set;
[0070] 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;
[0071] 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.
[0072] Among them, the label categories of the target detection frame annotation further include: normal fastener, missing fastener, reverse fastener, missing bolt, rail, sleeper and turnout. The pixel-level annotation categories further include: background, fastener, bolt, rail, sleeper and foreign matter. The abnormal feature values further include fracture score, skew angle and displacement distance.
[0073] The feature extraction part of the target detection and semantic segmentation network 3 further uses CSPDarknet as the backbone network, and further uses the C2f structure in the feature fusion layer to obtain the gradient flow, and then outputs it to the detection head and the segmentation head. In step S4), the input image size of the network model is an integer multiple of 32, the detection frame 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.
[0074] Step S3) further comprises:
[0075] The training set is loaded into the target detection and semantic segmentation network 3 for iterative training, the maximum number of iterations is set, and the Maosic enhancement operation is turned off after training for several epoch iterations, and only conventional image enhancement operations including horizontal flipping, vertical flipping, and chromaticity transformation are retained. The validation set is tested once in one epoch iteration, and the 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.
[0076] Step S4) further comprises:
[0077] 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.
[0078] The normal fasteners are combined with the inspection results and semantic information of rails and sleepers to construct secondary inspection logic to obtain abnormal feature values, as shown in the attached figure. Fig.10 The judgment strategy is shown. The specific process is described as follows:
[0079] Step S5) further comprises:
[0080] For each normal fastener, extract the image mask region of interest 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 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 starting point and ending point of the discontinuity, and calculate the number of disconnected columns = ending point - starting point. Determine if the number of disconnected columns > Nf, then the fastener is broken; otherwise, there is no break. For the fasteners with breakage, determine 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 the 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. Among them, Nf, Nm, and Tm are all their respective thresholds.
[0081] Step S5) further includes:
[0082] 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, it is not skewed.
[0083] Step S5) further includes:
[0084] 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, record the left and right boundaries of the rail as E1 and E2 respectively, and screen out the sleeper region Rs in the detection frame. 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, 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.
[0085] Step S5) further includes:
[0086] 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.
[0087] Step S5) further includes:
[0088] By combining the bolt center and the upper and lower boundaries of the sleeper, it is comprehensively judged whether the fastener has lateral displacement. If the structure F5=abs((x1+x2) / 2-r)>T3 or F6=(x1-S1)>T4 or F7=(x2-S2)>T5 is established, it is judged that the fastener has longitudinal displacement, otherwise there is no longitudinal displacement.
[0089] In the description of this application, it should be noted that when an element is referred to as being "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 being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] By implementing the technical solution of the track fastener status automatic detection device described in the specific embodiment of the present application, the following technical effects can be produced:
[0094] (1) The automatic detection device for the state of rail fasteners described in the specific embodiment of the present application can realize comprehensive detection of abnormal situations by constructing characteristic values, and greatly reduce the misjudgment rate by performing abnormality analysis;
[0095] (2) The automatic detection device for the status of rail fasteners 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;
[0096] (3) The automatic detection device for the state of rail fasteners described in the specific embodiment of the present application combines target detection with the semantic segmentation model on the basis of the yolov8 basic framework, obtains the target detection frame and semantic information of fasteners, rails, sleepers, etc. at one time, and shares the network feature extraction module, thereby improving the model reasoning efficiency;
[0097] (4) The automatic detection device for the state of rail fasteners described in the specific embodiment of the present application solves the technical problems of difficult detection of local breakage, displacement, and skew of fasteners by obtaining abnormal characteristic values of fasteners;
[0098] (5) The automatic detection device for the status of rail fasteners 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.
[0099] 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.
[0100] 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 device for automatically detecting the state of rail fasteners, characterized in that: include: 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) acquires image data to obtain an 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 network model parameters and obtain a network model, 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 the detection results and semantic information of normal fasteners combined with rails and sleepers to obtain abnormal feature values; The abnormality analysis unit (5) calculates a fracture score based on semantic information in a normal fastener target detection frame, and calculates a fastener skew angle and displacement distance based on the relative position relationship between the fastener, rail and sleeper; and further determines whether the fastener has an abnormality including fracture, skewness and displacement by determining whether the abnormal characteristic value exceeds a normal range.
2. The automatic detection device for rail fastener status 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 automatic detection device for 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 automatic detection device for rail fastener status according to claim 3 is characterized in that: The abnormal characteristic values include fracture score, skew angle and displacement distance.
5. The automatic detection device for 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 (3) uses CSPDarknet as the backbone network, and adopts 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; the input image size of the network model is an integer multiple of 32, the detection frame 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 automatic detection device for the state of rail fasteners according to claim 5, characterized in that: The training set is loaded and input into the target detection and semantic segmentation network (3) for iterative training. The maximum number of iterations is set. After training for several epochs, 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 per epoch, and the mean average precision information of the validation set is recorded. At the same time, the model parameters with the highest mean average precision are saved to the local disk.
7. The automatic detection device for the state of rail fasteners according to claim 1, 2, 3, 4 or 6, characterized in that: 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, missing fasteners, reverse fasteners, missing bolts, rails, sleepers and switches respectively; the segmentation head obtains an image mask with pixel values of 0, 1, 2, 3, 4, and 5, representing the background, fasteners, bolts, rails, sleepers and foreign objects respectively; the damage categories of missing fasteners, reverse fasteners and missing bolts are screened out from the detection frames and saved in the damage list.
8. The automatic detection device for the state of rail fasteners according to claim 7, characterized in that: For each normal fastener, the eigenvalue calculation unit (4) extracts the region of interest of the image mask corresponding to its position rectangular frame, sets the pixels belonging to the fastener through threshold segmentation, and divides the region of interest into Sub-region 1 and Sub-region 2; it judges whether the white pixels in the sub-region are continuous. If they are continuous, it is normal; otherwise, it records the start and end points of the discontinuity, and calculates the number of disconnected columns = end - start; the anomaly analysis unit (5) judges that if the number of disconnected columns > Nf, the fastener is broken; otherwise, there is no break; for the fastener with a break, the anomaly analysis unit (5) judges whether there is foreign object coverage at the break point by calculating the number and proportion of foreign object pixels between the start and end points of the break in the region of interest. If the foreign object pixels > Nm or the proportion > Tm, this fastener break judgment is filtered out as a false detection; where Nf, Nm, and Tm are all their respective thresholds.
9. The automatic detection device for the state of rail fasteners according to claim 8, characterized in that: The eigenvalue calculation unit (4) calculates the minimum bounding rectangle of the region of interest to obtain the rotation angle θ; if θ > T, the anomaly analysis unit (5) judges that the fastener is skewed; otherwise, there is no skew.
10. The automatic detection device for the state of rail fasteners according to claim 8, characterized in that: The eigenvalue calculation unit (4) extracts the center C of the pixel set of the category of bolts in the region of interest, filters out the rail region in the detection frame, and records 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 recorded 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 > Tr, the two are paired; otherwise, they are not paired.
11. The automatic detection device for the state of rail fasteners according to any one of claims 8 to 10, characterized in that: The anomaly analysis unit (5) comprehensively judges whether the fastener has 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) < (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 F1 = (E1 - x2) < T1 and F2 = abs((x1 + x2) / 2 - c) > T2 constructed by the eigenvalue calculation unit (4) are both established, the anomaly analysis unit (5) judges that the fastener has displacement; otherwise, there is no displacement; for the fastener on the right side of the rail, if F3 = (x1 - E2) < T1 and F4 = abs((x1 + x2) / 2 - c) > T2 constructed by the eigenvalue calculation unit (4) are both established, the anomaly analysis unit (5) judges that the fastener has displacement; otherwise, there is no displacement.
12. The automatic detection device for the state of rail fasteners according to any one of claims 8 to 10, characterized in that: The abnormality analysis unit (5) comprehensively determines whether the fastener has lateral displacement by combining the bolt center and the upper and lower boundaries of the sleeper; if F5=abs((x1+x2) / 2-r)>T3 or F6=(x1-S1)>T4 or F7=(x2-S2)>T5 constructed by the characteristic value calculation unit (4) is established, then the abnormality analysis unit (5) determines 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
Game machine
JP2016127967A
Cited By
Railway fastener abnormal type matching method and system
CN119293524A
A railway fastener abnormal type matching method and system
CN119293524B
Track line induction board vehicle-mounted dynamic detection system
CN120707960A
Visual detection method, system and device for breakage of elastic strip of track fastener
CN120765943A
