Railway fastener pixel-level detection method and device thereof

By constructing a dual-stream detection network and combining a feature enhancement module and a chain-style residual pooling module, the accuracy and robustness issues of railway fastener inspection in complex scenarios were solved, achieving high-precision pixel-level fastener inspection.

CN120782722BActive Publication Date: 2026-04-28CHANGSHA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGSHA UNIVERSITY
Filing Date
2025-06-24
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing pixel-level detection methods for railway fasteners have low accuracy and poor robustness when facing complex scenarios, and cannot effectively utilize the shape information in the mask image, resulting in poor detection performance.

Method used

A dual-stream detection network is constructed, consisting of a dual-stream encoder and a conventional single-stream decoder. It is trained using a hybrid loss function of weighted binary cross-entropy loss and Dice loss. Combined with a feature enhancement module and a chained residual pooling module, the foreground feature representation of fasteners is enhanced and the background features are suppressed, thereby achieving pixel-level detection of fasteners.

Benefits of technology

It achieves pixel-level accurate fastener detection in various complex scenarios, improves detection performance and robustness, and provides technical reference for detecting the severity of fastener defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120782722B_ABST
    Figure CN120782722B_ABST
Patent Text Reader

Abstract

The present application provides a railway fastener pixel-level detection method and device thereof. The railway fastener pixel-level detection method comprises the following steps: S1, double-flow pixel-level detection network construction: a double-flow detection network is constructed, which comprises an encoder and a decoder; wherein the encoder adopts a double-flow structure, and the decoder adopts a conventional single-flow structure; S2, double-flow pixel-level detection network training: a hybrid loss function comprising a weighted binary cross-entropy loss function and a Dice loss function is constructed. The railway fastener pixel-level detection method and device thereof provided by the present application can realize accurate fastener pixel-level detection, and for fasteners in various different complex scenes, they all have good detection performance, providing a technical reference for fastener disease severity detection and evaluation, effectively utilizing the shape information contained in the mask image, constructing a double-flow detection network comprising an original image stream and a mask image stream, for realizing accurate fastener pixel-level detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rail transit inspection equipment, and in particular to a pixel-level inspection method and apparatus for railway fasteners. Background Technology

[0002] Fasteners are a crucial component of railway systems, used to secure rails to sleepers, playing a vital role in ensuring railway transport safety. However, due to prolonged wheel-rail vibration and the influence of the external environment, fasteners can suffer from defects such as breakage and loss. Figure 1 As shown, this seriously affects railway operation safety. Therefore, regular inspection of fasteners is an essential task. To achieve fastener defect detection, non-destructive testing methods based on technologies such as vision, ultrasound, and eddy current have been widely proposed. Among them, vision-based inspection methods have received more attention and application due to their superior performance and low cost.

[0003] However, due to the severe imbalance in the number of normal and defective fastener samples, the performance of conventional visual inspection methods is significantly affected, resulting in unsatisfactory detection results. Pixel-level detection methods, on the other hand, train a segmentation model using only normal fastener samples, and then compare the pixel-level segmentation results with a standard template to ultimately detect defects, effectively solving the defect detection problem under sample imbalance. Therefore, this type of method has gradually become the mainstream approach for fastener inspection.

[0004] Currently, research on pixel-level detection of fasteners mainly relies on traditional machine learning and deep learning techniques. Regarding traditional machine learning-based detection, some researchers have proposed a method combining a bag-of-words (LBP) model and a conditional random field (CRF) for pixel-level fastener detection. This method first extracts LBP features and converts them into bag-of-words features, then uses these features in conjunction with a CRF to train the model, thereby achieving pixel-level fastener detection. Regarding deep learning-based detection, some researchers have directly used the segmentation network PSPNet and Mask R-CNN to achieve pixel-level fastener detection, achieving good results. Other researchers have employed a dual-branch network for pixel-level fastener detection. This method uses a template mask image to assist the network in learning and extracting the essential features of the fastener from the original image, thus improving the pixel-level fastener detection performance in complex scenes.

[0005] While existing methods based on traditional machine learning and deep learning can achieve pixel-level detection of fasteners, they still face the following shortcomings: First, traditional machine learning methods only focus on and utilize shallow features of the fasteners, ignoring many other available features, leading to a bias in the robustness of pixel detection in complex scenes. Furthermore, these methods are highly specific, only applicable to pixel-level detection of fasteners in specific scenarios; their detection performance will significantly decrease once external conditions such as environment and lighting change. Second, deep learning methods mainly focus on the feature information contained in the original image of the fastener, while not fully considering and utilizing the feature information contained in the mask image, resulting in pixel-level detection performance still needing improvement when facing real and complex railway scenarios.

[0006] Therefore, it is necessary to provide a pixel-level detection method and apparatus for railway fasteners to solve the above-mentioned technical problems. Summary of the Invention

[0007] This invention provides a pixel-level detection method and apparatus for railway fasteners, which solves the problems of low accuracy, inapplicability to complex scenarios, and poor robustness of traditional detection methods.

[0008] To solve the above technical problems, the pixel-level detection method for railway fasteners provided by the present invention includes the following steps:

[0009] S1. Construction of Dual-Stream Pixel-Level Detection Network: Construct a dual-stream detection network, which consists of an encoder and a decoder. The encoder adopts a dual-stream structure, while the decoder adopts a conventional single-stream structure.

[0010] S2. Training of the dual-stream pixel-level detection network: A hybrid loss function containing a weighted binary cross-entropy loss function and a Dice loss function was constructed to train the dual-stream detection network constructed above.

[0011] S3. Fastener pixel-level detection: After training the constructed dual-stream detection network using a hybrid loss function, a fastener pixel-level detection model can be obtained; relying on this model, pixel-level detection can be completed by inputting any fastener image.

[0012] Preferably, in step S1, shape information is embedded into a conventional single-stream encoder to construct a dual-stream encoder containing the original image stream and the mask image stream; wherein, the mask image stream serves as an auxiliary branch to provide shape guidance information for the original image stream; for the features extracted from the two branches, they are first interactively fused using a feature enhancement module to obtain preliminary encoded features; then, the encoded features are processed by a chained residual pooling module to filter out irrelevant background features, thereby obtaining high-quality encoded features that focus on the foreground of the fastener.

[0013] Preferably, the feature enhancement module is used to effectively interact the features of the original image stream and the mask image stream of the fastener, thereby obtaining encoded features that pay more attention to the foreground region of the fastener; the feature enhancement module consists of a cascaded channel attention module and a spatial attention module; wherein, the spatial attention module aims to enhance the activation of semantically relevant regions of the fastener by adjusting the spatial distribution of features, thereby ignoring background-irrelevant regions; firstly, the features of the fastener mask image are... Features of the original image Simultaneously input into the spatial attention module; then, Perform a 1×1 convolution operation and generate feature weights using the sigmoid function; finally, ... Multiply the calculated result element-wise with the obtained feature weights, and then combine the results with... Perform element-by-element addition.

[0014] Preferably, the channel attention module aims to dynamically adjust the weights of each channel, thereby enhancing the saliency of relevant features along the channel dimension; the output features of the spatial attention module This will be further input into the channel attention module, where shape information will be used to guide and enhance the expression of the fastener's foreground features in the channel dimension; firstly, The input is fed into the channel attention module, and then sequentially undergoes global average pooling, 1×1 convolution, and sigmoid function operations to generate channel-level feature weights; subsequently, the obtained weights are combined with... Perform element-wise multiplication.

[0015] Preferably, the chained residual pooling module is cascaded at the bottom of the dual-stream encoder. The chained residual pooling module consists of three residual pooling blocks. Each sub-module contains a max pooling layer and a convolutional layer with a kernel size of 3×3. These sub-modules are cascaded in sequence, and the output of the previous sub-module serves as the input of the next sub-module.

[0016] Preferably, the decoder uses D i ,i∈{1,2,3,4,5} represents the decoding features of each stage. Decoding feature D5 is obtained by upsampling the output features of the chained residual pooling module, while decoding features D2 to D4 are obtained by upsampling the output features of the feature enhancement module. The input of the feature enhancement module is the encoding features of the corresponding stage and the decoding features of the previous stage. Decoding feature D1 is obtained by upsampling decoding feature D2 and is finally used for fastener pixel-level detection.

[0017] This invention also provides a pixel-level inspection device for railway fasteners, comprising a main body, a mounting block fixedly connected to the top of the main body, a guide rail mounted on the bottom of the main body, a first inclined block slidably connected inside the guide rail, a connecting block mounted on the top of the first inclined block, the connecting block penetrating the main body and extending into the interior of the main body, a pushing member mounted inside the main body, one end of the pushing member being fixedly connected to the connecting block, the pushing member being used to drive the connecting block to move linearly, a vision camera mounted on the bottom of the guide rail, a protective component mounted on the bottom of the guide rail and outside the vision camera, the protective component being used to protect the vision camera, the protective component including a protective plate fixed to the bottom of the guide rail and a protective frame sliding on the bottom of the guide rail, a connecting member connected to the first inclined block mounted on the protective frame, an auxiliary displacement component mounted on the bottom of the guide rail, a U-shaped block mounted on the right side of the auxiliary displacement component, a swing arm rotatably connected to the U-shaped block, a rotary drive component mounted on the bottom of the auxiliary displacement component, a cleaning component mounted on the rotary drive component, the rotary drive component being used to drive the cleaning component to rotate and change direction.

[0018] Preferably, the auxiliary displacement component includes a first fixed frame, a first sliding block is slidably connected inside the first fixed frame, a first connecting rod is installed on the first sliding block, a second inclined block is fixedly connected to the top end of the first connecting rod, the second inclined block passes through the guide rail and extends into the interior of the guide rail, the bottom end of the first connecting rod passes through the first fixed frame and is connected to the rotation drive component, a first spring is provided at the bottom of the first sliding block, and limit blocks are installed on both sides inside the first fixed frame.

[0019] Preferably, the rotary drive assembly includes a second fixed frame and a gear sleeved on the cleaning assembly. A second sliding block is slidably connected inside the second fixed frame. A second connecting rod is installed on the second sliding block. A straight toothed plate is fixedly connected to the left side of the second connecting rod. The right side of the second connecting rod passes through the second fixed frame and extends to the right side of the second fixed frame. A second spring is provided on the right side of the second sliding block.

[0020] Preferably, the cleaning assembly includes a rotating sleeve, a mounting shell is fixedly connected to the bottom of the rotating sleeve, through grooves are provided on both sides of the mounting shell, a cleaning component is inserted into the through grooves, a positioning groove is provided on the top of the cleaning component, a displacement block is slidably connected inside the mounting shell, two positioning blocks are fixedly connected to the bottom of the displacement block, an auxiliary rod is threadedly connected inside the rotating sleeve, and the auxiliary rod is rotatably connected to the displacement block.

[0021] Compared with related technologies, the pixel-level detection method and apparatus for railway fasteners provided by this invention have the following advantages:

[0022] This invention provides a pixel-level detection method and apparatus for railway fasteners, enabling precise pixel-level detection of fasteners. It exhibits excellent detection performance for fasteners in various complex scenarios, providing a technical reference for assessing the severity of fastener defects. The method effectively utilizes shape information contained in mask images to construct a dual-stream detection network comprising the original image stream and the mask image stream, achieving accurate pixel-level detection of fasteners. Based on the characteristic information contained in the original and mask images of the fasteners, information exchange is achieved through the Feature Enhancement Module (FEM) designed within the dual-stream network, and the Chain Residual Pooling Module (CRP) suppresses irrelevant background information to effectively acquire features of the foreground region of the fastener of interest, thereby improving the pixel-level detection performance. Pixel-level detection demonstrates high accuracy for fasteners in various complex track scenarios. This, to a certain extent, ensures the robustness and reliability of the constructed dual-stream detection network. Attached Figure Description

[0023] Figure 1 Example diagram of defects in railway fasteners;

[0024] Figure 2 The flowchart of the pixel-level detection method for railway fasteners provided by the present invention is shown below.

[0025] Figure 3 This outlines the overall framework for a dual-stream detection network.

[0026] Figure 4 The network structure diagram of the Feature Enhancement Module (FEM);

[0027] Figure 5 This is a diagram of the CRP network structure for the chain-like residual pooling module.

[0028] Figure 6 Visual comparison of pixel-level inspection results for different network fasteners;

[0029] Figure 7 This is a schematic diagram of the structure of the pixel-level detection device for railway fasteners provided by the present invention;

[0030] Figure 8 A front sectional view of the pixel-level detection device for railway fasteners provided by the present invention;

[0031] Figure 9 for Figure 7 A cross-sectional schematic diagram of the auxiliary displacement component shown;

[0032] Figure 10 for Figure 7 A cross-sectional schematic diagram of the rotary drive assembly shown;

[0033] Figure 11The diagram shows the usage status of the pixel-level detection device for railway fasteners. (11a) is the status diagram when the vision camera is in normal use, (11b) is the status diagram when the auxiliary displacement component drives the cleaning component to clean, and (11c) is the status diagram when the rotation drive component drives the cleaning component to change direction.

[0034] Figure 12 for Figure 10 A cross-sectional schematic diagram of the drive cleaning assembly shown;

[0035] Figure 13 for Figure 12 A magnified view of part A shown.

[0036] Numbering on the map:

[0037] 1. Main body;

[0038] 2. Installation block;

[0039] 3. Guide rail;

[0040] 4. The first inclined block;

[0041] 5. Connecting block;

[0042] 6. Pushing component;

[0043] 7. Visual camera;

[0044] 8. Protective components; 81. Protective plate; 82. Protective frame;

[0045] 9. Connectors;

[0046] 10. Auxiliary displacement component; 101. First fixed frame; 102. First sliding block; 103. First connecting rod; 104. Second inclined block; 105. First spring; 106. Limiting block;

[0047] 11. U-shaped block;

[0048] 12. Pendulum arm;

[0049] 13. Rotary drive assembly; 131. Second fixed frame; 132. Gear; 133. Second sliding block; 134. Second connecting rod; 135. Straight tooth plate; 136. Second spring.

[0050] 14. Drive cleaning assembly; 141. Rotating sleeve; 142. Mounting shell; 143. Through groove; 144. Cleaning component; 145. Positioning groove; 146. Displacement block; 147. Positioning block; 148. Auxiliary rod. Detailed Implementation

[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0052] Please refer to the following: Figure 1-6 ,in, Figure 1 Example diagram of defects in railway fasteners; Figure 2 The flowchart of the pixel-level detection method for railway fasteners provided by the present invention is shown below. Figure 3 This outlines the overall framework for a dual-stream detection network. Figure 4 The network structure diagram of the Feature Enhancement Module (FEM); Figure 5 This is a diagram of the CRP network structure for the chain-like residual pooling module.

[0053] Figure 6 A visual comparison of pixel-level inspection results for different network fasteners is provided. This invention offers a pixel-level inspection method for railway fasteners, comprising the following steps:

[0054] S1. Construction of Dual-Stream Pixel-Level Detection Network: Construct a dual-stream detection network, which consists of an encoder and a decoder. The encoder adopts a dual-stream structure, while the decoder adopts a conventional single-stream structure.

[0055] S2. Training of the dual-stream pixel-level detection network: A hybrid loss function containing a weighted binary cross-entropy loss function and a Dice loss function was constructed to train the dual-stream detection network constructed above.

[0056] The constructed hybrid loss function is defined as follows:

[0057] L hybrid-loss (p,y)=L Dice (p,y)+αL WBCE (p,y)

[0058] In the formula, p∈R h×w It is the predicted fastener mask image, y∈R h×w This represents the ground truth mask image. h and w represent the height and width of the mask image, respectively. α is a hyperparameter used to control the weights of the two loss functions. L Dice (·) represents the Dice loss function, which is defined as follows:

[0059]

[0060] In the formula, i is the i-th pixel of the mask image, and ε is a parameter to prevent the denominator from being 0.

[0061] As for L WBCE (·), which represents the weighted binary cross-entropy loss function, defined as follows:

[0062]

[0063] In the formula, β is a weighting parameter used to balance the foreground and background pixels in the fastener image;

[0064] S3. Fastener pixel-level detection: After training the constructed dual-stream detection network using a hybrid loss function, a fastener pixel-level detection model can be obtained; relying on this model, pixel-level detection can be completed by inputting any fastener image.

[0065] In step S1, shape information is embedded into a conventional single-stream encoder to construct a dual-stream encoder containing the original image stream and the mask image stream. The mask image stream serves as an auxiliary branch to provide shape guidance information to the original image stream. For the features extracted from the two branches, they are first interactively fused using a Feature Enhancement Module (FEM) to obtain preliminary encoded features. Then, these encoded features are processed by a Chained Residual Pooling Module (CRP) to further filter out irrelevant background features, ultimately yielding high-quality encoded features that focus on the foreground of the fastener.

[0066] The feature enhancement module is used to effectively interact the features of the original image stream and the mask image stream of the fastener, thereby obtaining encoded features that pay more attention to the foreground region of the fastener. The feature enhancement module consists of a cascaded channel attention module and a spatial attention module. Among them, the spatial attention module aims to enhance the activation of semantically relevant regions of the fastener by adjusting the spatial distribution of features, thereby ignoring background-irrelevant regions. This concept is highly consistent with the function of FEM (i.e., using the shape information in the fastener mask image to guide the network to focus on the foreground region in the original image of the fastener). First, the fastener mask image features are... Features of the original image Simultaneously input into the spatial attention module; then, Perform a 1×1 convolution operation and generate feature weights using the sigmoid function; finally, ... Multiply the calculated result element-wise with the obtained feature weights, and then combine the results with... By performing element-by-element addition, this operation effectively achieves the interactive fusion of the original image features of the fastener and the mask image features, thereby highlighting the feature expression of the foreground of the fastener.

[0067] Specifically, the computational process of the aforementioned spatial attention module can be formally defined as follows:

[0068]

[0069] In the formula, The spatial attention module outputs features; σ is the sigmoid function used to generate feature weights; f 1×1This is a 1×1 convolution operation; and These represent element-wise multiplication and addition, respectively.

[0070] The channel attention module aims to dynamically adjust the weights of each channel, thereby enhancing the saliency of relevant features along the channel dimension; the output features of the spatial attention module... This will be further input into the channel attention module, where shape information will be used to guide and enhance the expression of the fastener's foreground features in the channel dimension; firstly, The input is fed into the channel attention module, and then sequentially undergoes global average pooling, 1×1 convolution, and sigmoid function operations to generate channel-level feature weights; subsequently, the obtained weights are combined with... Perform element-wise multiplication.

[0071] Specifically, the above calculation process can be expressed as a formula:

[0072]

[0073] In the formula, These are the output features of the channel attention module, and ReLU is the activation function. Finally, the output features of the feature enhancement module (FEM) can be obtained using the following formula:

[0074]

[0075] The chained residual pooling module is cascaded at the bottom of the dual-stream encoder. Its chained structure not only enables multi-stage feature reuse and promotes efficient gradient propagation, but also effectively suppresses redundant background features. The chained residual pooling module consists of three residual pooling blocks. Each sub-module contains a max pooling layer and a convolutional layer with a kernel size of 3×3. These sub-modules are cascaded in sequence, and the output of the previous sub-module serves as the input of the next sub-module.

[0076] Here, let F represent the input, then the processing procedure of the CRP module can be represented as follows:

[0077]

[0078] In the formula, F0 = ReLU(F), f 3×3 This is a 3×3 convolution operation.

[0079] The decoder uses D i,i∈{1,2,3,4,5} represents the decoding features of each stage. Decoding feature D5 is obtained by upsampling the output features of the chained residual pooling module, while decoding features D2 to D4 are obtained by upsampling the output features of the feature enhancement module. The input of the feature enhancement module is the encoding features of the corresponding stage and the decoding features of the previous stage. Decoding feature D1 is obtained by upsampling decoding feature D2 and is finally used for fastener pixel-level detection.

[0080] The above decoding process can be formally represented as:

[0081]

[0082] In the formula, D i F represents the decoding feature. i and FE i These represent the output features of the CRP module and the output features of the FEM module in the encoding stage, respectively. `i` represents the i-th stage of the encoding / decoding process, and `Conv` is a cascaded 3×3 convolutional layer. `f` represents the interactive operation performed using the FEM in the decoding stage.

[0083] Experimental verification

[0084] A dataset was constructed using 1675 images of fasteners in various states (normal, damaged, and missing) under different environmental conditions (oil stains, partial occlusion, and low light, etc.) collected along the railway line between Miluo and Qiaotouyi in Hunan Province, and experiments were conducted. The dataset was divided into training, validation, and test sets in a 7:1:2 ratio. It is important to note that both the training and validation sets consist of normal fastener images.

[0085] Four evaluation metrics—precision (P), recall (R), accuracy (Accuracy), and intersection over union (IoU)—were used to evaluate the experimental results. These metrics are defined as follows:

[0086]

[0087] In the formula, TP, FP, TN and FN represent the number of correctly detected foreground pixels of the fastener, the number of foreground pixels that were misdetected as background pixels, the number of correctly detected background pixels, and the number of background pixels that were misdetected as foreground pixels, respectively.

[0088] Table 1 presents a quantitative comparison of pixel-level fastener detection results using different networks. Figure 6 The results of the qualitative comparison are presented in a visual format.

[0089] Table 1. Qualitative comparison results of fastener pixel-level detection using different networks

[0090]

[0091] From the quantitative comparison results in Table 1 and Figure 6 The qualitative comparison results show that the proposed dual-stream detection network can achieve accurate pixel-level detection of fasteners in complex railway scenarios. Moreover, its detection performance is superior to other related comparison methods, indicating that the dual-stream detection network constructed in this patent has better and more reliable performance in real-world scenarios.

[0092] In addition to conducting experiments on the fastener dataset collected from railways, 1188 fastener images were further collected from subway tracks and a dataset was constructed to more fully test the performance of the dual-stream detection network.

[0093] Table 2 presents the quantitative comparison results of pixel-level detection for different networks. It can be seen that the performance of the dual-stream detection network is still better than other comparison methods, which proves that the constructed dual-stream detection network is applicable to different orbital scenarios and has strong robustness.

[0094] Table 2. Qualitative comparison results of pixel-level detection by different networks on the new fastener dataset.

[0095]

[0096] Compared with related technologies, the pixel-level detection method and apparatus for railway fasteners provided by this invention have the following advantages:

[0097] This invention enables precise pixel-level detection of fasteners, demonstrating excellent detection performance across various complex scenarios. It provides a technical reference for assessing the severity of fastener defects. By effectively utilizing the shape information contained in the mask image, a dual-stream detection network comprising the original image stream and the mask image stream is constructed to achieve precise pixel-level fastener detection. Based on the characteristic information contained in the original and mask images, information exchange is achieved through the Feature Enhancement Module (FEM) designed within the dual-stream network, and the Chained Residual Pooling Module (CRP) suppresses irrelevant background information, effectively acquiring features of the foreground region of the fastener of interest, thereby improving pixel-level detection performance. Pixel-level detection exhibits high accuracy for fasteners in various complex track scenarios. This, to a certain extent, ensures the robustness and reliability of the constructed dual-stream detection network.

[0098] Please see Figure 6-13The present invention also provides a pixel-level inspection device for railway fasteners, comprising a main body 1, a mounting block 2 fixedly connected to the top of the main body 1, a guide rail 3 mounted on the bottom of the main body 1, a first inclined block 4 slidably connected inside the guide rail 3, a connecting block 5 mounted on the top of the first inclined block 4, the connecting block 5 penetrating the main body 1 and extending into the interior of the main body 1, a pushing member 6 mounted inside the main body 1, one end of the pushing member 6 fixedly connected to the connecting block 5, the pushing member 6 being used to drive the connecting block 5 to move linearly, a vision camera 7 mounted on the bottom of the guide rail 3, and an anti-seepage device mounted on the bottom of the guide rail 3 and outside the vision camera 7. The protective component 8 is used to protect the vision camera 7. The protective component 8 includes a protective plate 81 fixed to the bottom of the guide rail 3 and a protective frame 82 sliding on the bottom of the guide rail 3. A connector 9 connected to the first inclined block 4 is installed on the protective frame 82. An auxiliary displacement component 10 is installed at the bottom of the guide rail 3. A U-shaped block 11 is installed on the right side of the auxiliary displacement component 10. A swing rod 12 is rotatably connected to the U-shaped block 11. A rotary drive component 13 is installed at the bottom of the auxiliary displacement component 10. A cleaning component 14 is installed on the rotary drive component 13. The rotary drive component 13 is used to drive the cleaning component 14 to rotate and change direction.

[0099] In this embodiment, the pushing component 6 includes, but is not limited to, a cylinder, an electric push rod, or a hydraulic rod;

[0100] Please see Figure 8 The protective component 8 is a combination of a protective frame 82 and a protective plate 81. The protective plate 81 is located on the left side of the vision camera 7, and the protective frame 82 is located on the right side of the vision camera 7. The left side of the protective frame 82 is open and can wrap around the vision camera 7. By moving the protective frame 82 to be close to the protective plate 81, the vision camera 7 can be sealed and protected.

[0101] In one embodiment, the U-shaped block 11 and the swing rod 12 are rotatably connected by a rotating shaft, on which a torsion spring is provided to provide a simple limiting function for the swing rod 12 and prevent it from swinging arbitrarily.

[0102] In this embodiment, the mounting block 2 is installed on the testing vehicle by means of a convenient mounting device. The mounting block 2 has mounting holes to facilitate installation.

[0103] Please see Figure 9 , Figure 11 This device has four operating states, as follows:

[0104] Please refer to it again. Figure 9 In a protective configuration, the protective frame 82, together with the protective plate 81, can enclose and protect the vision camera 7.

[0105] Please see Figure 11a) In the working state, the retraction of the pusher 6 can drive the connecting block 5 to move to the right, thereby causing the first inclined block 4 to move to the right, and then the protective frame 82 to move to the right through the connecting part 9, so that the vision camera 7 can be opened and used to collect images of the railway fasteners.

[0106] Please see Figure 11 b, in the cleaning state, the retraction of the pusher 6 can drive the connecting block 5 to continue to move to the right, thereby causing the first inclined block 4 to move to the right and push the second inclined block 104 to move downward, thereby causing the first connecting rod 103 to extend downward, thereby causing the rotation drive assembly 13 to move downward and drive the cleaning assembly 14 to move downward, so as to contact the railway fastener and clean its surface.

[0107] Please see Figure 11 c, in the reversing state of the cleaning component, the continued retraction of the pusher 6 can drive the connecting block 5 to continue moving to the right, thereby causing the first inclined block 4 to push the swing arm 12 to swing clockwise, causing the second connecting rod 134 to move to the left by the swing arm 12, thereby causing the straight tooth plate 135 to move to the left, driving the gear 132 to rotate half a turn, thereby causing the cleaning component 14 to rotate half a turn, so that the spare cleaning room 144 can be used when the commonly used cleaning component 144 is worn.

[0108] Please see Figure 9 The auxiliary displacement component 10 includes a first fixed frame 101, a first sliding block 102 slidably connected inside the first fixed frame 101, a first connecting rod 103 mounted on the first sliding block 102, a second inclined block 104 fixedly connected to the top end of the first connecting rod 103, the second inclined block 104 penetrating the guide rail 3 and extending into the interior of the guide rail 3, the bottom end of the first connecting rod 103 penetrating the first fixed frame 101 and connected to the rotation drive component 13, a first spring 105 provided at the bottom of the first sliding block 102, and limit blocks 106 installed on both sides inside the first fixed frame 101.

[0109] Specifically, the elastic force of the first spring 105 needs to meet a certain strength so that the first spring 105 will not undergo large deformation under slight vibration.

[0110] In this embodiment, the inclined surface of the second inclined block 104 is located on the left side. By pushing the first inclined block 4 to the right, pressure can be applied through the inclined surface of the second inclined block 104, thereby causing the second inclined block 104 to move downward.

[0111] In this embodiment, the limiting block 106 is used to limit the first inclined block 4. When the first inclined block 4 pushes the second inclined block 104 to move downward, the second inclined block 104 abuts against the limiting block 106 and cooperates with the first inclined block 4 to achieve stability.

[0112] Please see Figure 10 The rotary drive assembly 13 includes a second fixed frame 131 and a gear 132 sleeved on the cleaning assembly 14. A second sliding block 133 is slidably connected inside the second fixed frame 131. A second connecting rod 134 is installed on the second sliding block 133. A straight toothed plate 135 is fixedly connected to the left side of the second connecting rod 134. The right side of the second connecting rod 134 passes through the second fixed frame 131 and extends to the right side of the second fixed frame 131. A second spring 136 is provided on the right side of the second sliding block 133.

[0113] Please see Figure 8 , Figure 10 When the swing arm 12 swings, it will drive the second connecting rod 134 to move to the left, and then drive the straight tooth plate 135 to move to the left, so that the gear 132 can be rotated through meshing, thereby driving the cleaning assembly 14 to rotate and change direction.

[0114] Specifically, the elastic force of the second spring 136 needs to meet a certain strength so that the second spring 136 will not undergo large deformation under slight vibration.

[0115] In this embodiment, the second spring 136 facilitates the reset of the second sliding block 133, thereby enabling the second connecting rod 134 to be reset easily.

[0116] Please see Figure 10 The tooth surface of the spur plate 135 meshes with the gear 132. By moving the spur plate 135 to the left, the rotation of the gear 132 can be controlled. The teeth on the spur plate 135 are precisely engaged with the gear 132. When the second connecting rod 134 is displaced to the maximum stroke, the spur plate 135 can drive the gear 132 to rotate half a turn.

[0117] In this embodiment, there is a step inside the second fixed frame 131 located at the second sliding block 133, which allows the right side and left side of the sliding block to have a height difference, thereby restricting the second sliding block 133 to move only to the left and preventing the gear 132 from reversing.

[0118] In one embodiment, the interior of the second fixed frame 131 is further provided with a limiting block for restricting the second sliding block 133 from moving to the right, so that the second sliding block 133 can only move to the left;

[0119] In one embodiment, the left side of the second fixing frame 131 is closed to prevent foreign objects from entering and affecting the meshing of the gear 132 and the spur plate 135.

[0120] Please see Figure 12-13The cleaning assembly 14 includes a rotating sleeve 141, with a mounting shell 142 fixedly connected to the bottom of the rotating sleeve 141. Both sides of the mounting shell 142 have through grooves 143, into which a cleaning component 144 is inserted. The top of the cleaning component 144 has a positioning groove 145. A displacement block 146 is slidably connected inside the mounting shell 142. Two positioning blocks 147 are fixedly connected to the bottom of the displacement block 146. An auxiliary rod 148 is threadedly connected to the rotating sleeve 141, and the auxiliary rod 148 is rotatably connected to the displacement block 146.

[0121] Please see Figure 10 Gear 132 is mounted on the outer surface of rotating sleeve 141, and rotating sleeve 141 is rotatably connected to second fixed frame 131.

[0122] Please refer to it again. Figure 12-13 There are two cleaning parts 144, one on the left and one on the right. The two can be switched by rotating the rotating sleeve 141, so that the cleaning part 144 can be quickly replaced after it wears out.

[0123] In this embodiment, the cleaning component 144 includes, but is not limited to, conventional cleaning items such as cleaning brushes.

[0124] Please see Figure 13 By manually rotating the auxiliary rod 148, the auxiliary rod 148 can be moved upward, thereby causing the displacement block 146 to move upward, which in turn causes the positioning block 147 to separate from the positioning groove 145, thus removing the restriction on the cleaning part 144, and the cleaning part 144 can be pulled out for replacement.

[0125] Please refer to it again. Figure 13 The through groove 143 is adapted to the cleaning component 144, and the cleaning component 144 can be stably connected when inserted into the through groove 143. The positioning block 147 is adapted to the positioning groove 145.

[0126] In this embodiment, an arc-shaped chamfer structure can be designed at the end of the positioning block 147 facing the positioning groove 145 to facilitate the docking of the positioning block 147 and the positioning groove 145.

[0127] In one embodiment, a magnetic attraction assembly is provided between the positioning block 147 and the positioning groove 145, which may include a magnetic attraction block and an adsorption block. The magnetic attraction block is installed on the positioning block 147, and the adsorption block is installed in the positioning groove 145. The two are fixed by magnetic attraction, which can achieve quick assembly and disassembly.

[0128] The working principle of the pixel-level detection method and device for railway fasteners provided by this invention is as follows:

[0129] In use, the retraction of the pusher 6 causes the connecting block 5 to move to the right, which in turn causes the first inclined block 4 to move to the right. This, in turn, causes the protective frame 82 to move to the right via the connecting member 9, opening the vision camera 7 for image acquisition of the railway fastener. The retraction of the pusher 6 causes the connecting block 5 to continue moving to the right, which in turn causes the first inclined block 4 to move to the right, pushing the second inclined block 104 downward. This causes the first connecting rod 103 to extend downward, which in turn causes the rotation drive assembly 13 to move downward, driving the cleaning assembly 14 to move downward and contact the railway fastener to clean its surface. The further retraction of the pusher 6 causes the first inclined block 4 to move further to the right, which in turn causes the swing arm 12 to swing, causing the second connecting rod 134 to move to the left. This causes the straight tooth plate 135 to move to the left, driving the gear 132 to rotate half a revolution, which in turn causes the cleaning assembly 14 to rotate half a revolution, activating the spare cleaning assembly 144.

[0130] Compared with related technologies, the pixel-level detection method and apparatus for railway fasteners provided by this invention have the following advantages:

[0131] In the unused state, the protective component 8 protects the vision camera 7 from accidental damage. In the used state, the retraction of the pusher 6 opens the protective component 8, allowing the vision camera 7 to be used normally. The continued retraction of the pusher 6 indirectly moves the cleaning component 14 downward, contacting the railway fastener and cleaning its surface to prevent the railway fastener from being covered by debris such as leaves and plastic bags, which would affect image acquisition. The further retraction of the pusher 6 indirectly rotates the cleaning component 14 half a turn, changing its direction, so that the spare cleaning component 144 can be used for cleaning. The cleaning component 144 can be rotated when it wears out, and the operation is simple and quick.

[0132] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A pixel-level inspection device for railway fasteners, characterized in that, Includes the main body; A mounting block is fixedly connected to the top of the main body, and a guide rail is installed at the bottom of the main body. A first inclined block is slidably connected inside the guide rail, and a connecting block is installed on the top of the first inclined block. The connecting block passes through the main body and extends into the interior of the main body. A pushing component is installed inside the main body, and one end of the pushing component is fixedly connected to the connecting block. The pushing component is used to drive the connecting block to move linearly. A vision camera is installed at the bottom of the guide rail, and a protective component is installed at the bottom of the guide rail and outside the vision camera. The protective component is used to protect the vision camera. The protective component includes a protective plate fixed to the bottom of the guide rail and a protective frame sliding at the bottom of the guide rail. A connecting component connected to the first inclined block is installed on the protective frame. An auxiliary displacement component is installed at the bottom of the guide rail, and a U-shaped block is installed on the right side of the auxiliary displacement component. A swing arm is rotatably connected to the U-shaped block. A rotary drive component is installed at the bottom of the auxiliary displacement component, and a cleaning component is installed on the rotary drive component. The rotary drive component is used to drive the cleaning component to rotate and change direction.

2. The pixel-level inspection device for railway fasteners according to claim 1, characterized in that, The auxiliary displacement component includes a first fixed frame, a first sliding block slidably connected inside the first fixed frame, a first connecting rod mounted on the first sliding block, a second inclined block fixedly connected to the top end of the first connecting rod, the second inclined block passing through the guide rail and extending into the interior of the guide rail, the bottom end of the first connecting rod passing through the first fixed frame and connected to the rotation drive component, a first spring provided at the bottom of the first sliding block, and limit blocks installed on both sides inside the first fixed frame.

3. The pixel-level inspection device for railway fasteners according to claim 1, characterized in that, The rotary drive assembly includes a second fixed frame and a gear sleeved on the cleaning assembly. A second sliding block is slidably connected inside the second fixed frame. A second connecting rod is installed on the second sliding block. A straight toothed plate is fixedly connected to the left side of the second connecting rod. The right side of the second connecting rod passes through the second fixed frame and extends to the right side of the second fixed frame. A second spring is provided on the right side of the second sliding block.

4. The pixel-level inspection device for railway fasteners according to claim 1, characterized in that, The cleaning assembly includes a rotating sleeve, a mounting shell is fixedly connected to the bottom of the rotating sleeve, through slots are provided on both sides of the mounting shell, a cleaning component is inserted into the through slots, a positioning slot is provided on the top of the cleaning component, a displacement block is slidably connected inside the mounting shell, two positioning blocks are fixedly connected to the bottom of the displacement block, an auxiliary rod is threadedly connected inside the rotating sleeve, and the auxiliary rod is rotatably connected to the displacement block.