CN120635086B - Rail fastener elastic strip ectopic visual detection method, system and device - Google Patents
Rail fastener elastic strip ectopic visual detection method, system and deviceInfo
- Publication number
- CN120635086B CN120635086B CN202511130692.6A CN202511130692A CN120635086B CN 120635086 B CN120635086 B CN 120635086B CN 202511130692 A CN202511130692 A CN 202511130692A CN 120635086 B CN120635086 B CN 120635086B
- Authority
- CN
- China
- Prior art keywords
- bullet
- elastic strip
- fastener
- strip
- track
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/07—Target detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a method, a system and a device for detecting the ectopic vision of a spring strip of a track fastener, and relates to the technical field of track fastener detection, wherein the method comprises the steps of collecting a panoramic top view of a track; cutting the track panorama top view into unit fastener images according to preset standard fastener intervals, numbering each fastener according to the sequence of the fasteners in the track panorama top view, identifying the elastic strip and marking the positions through an elastic strip mark detection model based on the unit fastener images to obtain an anchoring frame area, performing pixel-level segmentation through an elastic strip semantic segmentation model based on the anchoring frame area to obtain an elastic strip mask, and performing geometric analysis on the elastic strip mask through a computer vision function library to obtain the rotation angle of the elastic strip. According to the scheme, the rotating angle of the elastic strip can be accurately calculated, so that railway maintenance personnel can intuitively and accurately evaluate the severity of the ectopic position, and further, a maintenance strategy can be scientifically formulated, and the scientificity and the accuracy of maintenance decision are greatly improved.
Description
Technical Field
The invention relates to the technical field of track fastener detection, in particular to a method, a system and a device for detecting the dislocation of a spring strip of a track fastener in a visual manner.
Background
With the rapid development of rail transit, railway mileage continues to increase. As a key infrastructure of a railway, the rail fastener system is extremely prone to performance degradation such as fastener loss, breakage, looseness, skew, spring strip dislocation or fatigue fracture under complex running conditions of high-frequency wheel rail friction, vibration and impact of a train. These defects not only affect ride comfort, but even more seriously threaten train operation safety and stability, and may even lead to derailment. Traditional track fastener detection mainly relies on manual inspection, but this mode has a number of drawbacks. The manual inspection labor intensity is high, the efficiency is low, the manual inspection is easily influenced by subjective judgment, the detection requirements of high frequency and high quality are difficult to meet under the conditions of shortened detection skylight period and complex geological environment, and even personal safety risks exist. Particularly for high-speed rails, timely discovery and control of fastener defects are critical to ensuring driving safety. Therefore, development of a more advanced, efficient and intelligent automatic detection method is urgently needed, so that the limitation of manual inspection is overcome, and railway operation safety is ensured.
In recent years, the deep learning technology brings breakthrough to the image detection of the high-speed railway fastener. In the paper of high-speed railway fastener elastic strip defect detection based on improved Faster R-CNN, the author proposes an elastic strip defect detection method based on improved Faster R-CNN. The method extracts the defect characteristics through a multi-layer convolutional neural network, and aims to improve the attention of the network to the defect characteristics and reduce the influence of environmental interference and imaging positioning deviation. The method comprises the steps of firstly extracting a defect characteristic diagram through a multi-layer convolutional neural network, secondly designing a region candidate network to generate a candidate region and pooling the candidate region to extract a specific defect position, and finally calculating the defect type and the accurate position by utilizing a full connection layer of a region suggestion network (RPN). The method can effectively inhibit environmental interference, enhance the characterization capability of defect characteristics and simplify the image preprocessing process. The above solution has the following drawbacks:
(1) Quantitative analysis of the degree of ectopic cannot be achieved. The method of the paper mainly focuses on the detection and classification of defects, namely judging whether the elastic strip has defects and the types of the defects. However, for the specific defect of "ectopic" of the spring, the method only recognizes that the ectopic phenomenon exists, but cannot provide accurate quantitative data of the ectopic degree, such as a specific rotation angle. This makes its application in fine maintenance and fault warning limited.
(2) The detection accuracy of the micro-ectopic is limited, and although the method claims to inhibit the environmental interference and enhance the defect characteristic characterization, the detection frame based on the area suggestion network may cause insufficient detection accuracy due to granularity limitation of characteristic extraction and area positioning when processing the micro-ectopic or slight deformation.
Disclosure of Invention
The invention aims to provide a method, a system and a device for detecting the dislocation of a spring strip of a track fastener in a visual way, so as to solve at least one of the technical problems in the prior art.
In order to solve the technical problems, the invention provides a visual detection method for the dislocation of a spring strip of a track fastener, which comprises the following steps:
And step 1, collecting a panoramic top view of the track.
In a possible embodiment, the step 1 specifically includes:
Step 11, based on two cameras (arranged at the lower part of the front end of the track detection vehicle), continuously imaging the track in a scanning shooting mode to obtain scanning images, so that sufficient overlapping areas are ensured between the scanning images of adjacent frames, and high-precision image stitching is facilitated;
Step 12, extracting characteristic points (angular points or texture features) in the scanned images through SIFT (scale invariant feature transform) and other algorithms, establishing corresponding relations among the same characteristic points of different scanned images, and calculating geometric transformation parameters;
step 13, correcting the scanned image based on geometric transformation parameters so as to eliminate image deformation and dislocation problems caused by camera motion and lens distortion;
And 14, performing (seamless) stitching fusion on the scanned images, and eliminating brightness difference and stitching gaps between the scanned images to obtain a panoramic top view of the track.
And 2, cutting the track panorama top view into (a series of) unit fastener images according to the preset standard fastener spacing, and carrying out (uniqueness) numbering on each fastener according to the sequence of the fasteners in the track panorama top view so as to facilitate subsequent fault tracking and positioning management.
And 3, identifying the bullet strip and marking the position by a bullet strip mark detection model based on the unit fastener image to obtain an anchoring frame area.
In a possible implementation manner, the bullet target detection model adopts an image target detection model so as to ensure the detection speed and the detection precision.
In a feasible implementation mode, the specific construction method of the training data set of the bullet mark detection model comprises the steps of firstly cutting out unit fastener images from an actually collected track panoramic top view, wherein the unit fastener images comprise bullet bar images in a normal state and bullet bar images in an abnormal state, the abnormal state comprises bullet bar dislocation, bullet bar (slight) deformation, bullet bar incomplete and the like, so that the diversity of the training data set can be enhanced, the generalization capability and the robustness of the model can be improved, bounding boxes (Bounding Box) marking are carried out on bullet bars in each unit fastener image, rectangular areas of the bullet bars are selected, and corresponding category labels (namely the bullet bars in different states) are distributed.
In a feasible implementation mode, the specific training method of the bullet mark detection model comprises the steps of inputting unit fastener images in training data sets into the bullet mark detection model to identify bullet marks, marking the (approximate) positions of the bullet marks through an anchoring frame, adjusting model parameters (weights and biases) based on a back propagation algorithm and an optimizer according to a loss function between a prediction result and a real mark, obtaining the bullet mark detection model capable of efficiently and accurately identifying the bullet marks and marking the positions of the bullet marks through iterative training, and providing accurate region suggestion for subsequent refined semantic segmentation, so that the problem of inefficiency when the whole image is subjected to pixel-level processing is avoided.
In a feasible implementation mode, the method for identifying the bullet mark detection model comprises the steps of firstly detecting an input image, directly generating missing information of a bullet if the bullet is not detected, outputting an anchoring frame capable of surrounding the bullet according to the (approximate) position of the bullet if the bullet is detected, and determining an anchoring frame area.
And step 4, performing pixel-level segmentation through an elastic strip semantic segmentation model based on the anchoring frame region to obtain a (high-precision) elastic strip mask, wherein the elastic strip mask can provide accurate contour information of the elastic strip, including nonstandard shape and micro deformation, different from a traditional detection frame, so that enough real geometric shape information is provided for accurate quantitative analysis of the subsequent elastic strip ectopic positions.
In one possible implementation, the elastic-strip semantic segmentation model uses U-Net as a basic framework, and introduces a channel attention mechanism (Channel Attention Mechanism) and a spatial attention mechanism (Spatial Attention Mechanism) at the same time;
The channel attention mechanism is used for learning the weights of different characteristic channels so as to enhance the response to key characteristics;
The spatial attention mechanism is for focusing on critical spatial locations within the anchor frame region.
In a feasible implementation mode, the specific construction method of the training data set of the elastic strip semantic segmentation model comprises the steps of firstly cutting out unit fastener images from an actually collected track panoramic top view, wherein the unit fastener images comprise elastic strip images in a normal state and elastic strip images in an abnormal state, the abnormal state comprises elastic strip dislocation, elastic strip (slight) deformation, elastic strip incomplete and the like, so that diversity of the training data set can be enhanced, generalization capability and robustness of the model can be improved, and then pixel-level Mask (Mask) marking is carried out on the elastic strips in each unit fastener image, and each pixel point is classified as an elastic strip or a background, so that the accurate contour of the elastic strip is sketched.
In a feasible implementation mode, the specific training method of the elastic strip semantic segmentation model comprises the steps of marking data on a pixel level mask in a training data set, inputting the elastic strip semantic segmentation model, learning how to classify each pixel as an elastic strip or a background, training a target to minimize the difference between a predicted elastic strip mask and a real elastic strip mask, taking Cross entropy loss (Cross-Entropy Loss) as a loss function, and obtaining the elastic strip semantic segmentation model capable of carrying out pixel level segmentation on the elastic strips in an anchoring frame area through iterative training, so that real geometric shape information can be provided for the accurate quantitative analysis of the elastic strip ectopic later.
And 5, performing geometric analysis on the elastic strip mask through a Computer Vision (CV) function library to obtain the rotation angle of the elastic strip.
In a possible embodiment, the specific method of geometric analysis includes:
step 51, extracting pixel point geometry representing a bullet strip boundary from a bullet strip mask to form a (continuous) bullet strip contour line;
Step 52, calculating and fitting a minimum circumscribed rectangle surrounding the contour line of the elastic strip, so that the minimum occupied space of the elastic strip can be provided, and the actual gesture of the elastic strip can be reflected through the long-side direction;
And step 53, calculating an included angle between the long side of the minimum circumscribed rectangle and a preset standard horizontal axis (or a standard fastener main axis) to obtain the rotation angle of the elastic strip.
The application also provides a track fastener elastic strip ectopic visual detection system based on the same inventive concept, which comprises a data receiving module, a data processing module and a result generating module;
The data receiving module is used for receiving the panoramic top view of the track;
The data processing module comprises a unit fastener unit, an anchoring frame unit, an elastic strip mask unit and a rotation angle unit;
The unit fastener units are used for cutting the track panorama top view into unit fastener images according to the preset standard fastener spacing;
The anchoring frame unit is used for identifying the bullet strip and marking the position through a bullet strip mark detection model based on the unit fastener image to obtain an anchoring frame area;
the elastic strip mask unit is used for carrying out pixel level segmentation through an elastic strip semantic segmentation model based on the anchoring frame area to obtain an elastic strip mask;
the rotating angle unit is used for carrying out geometric analysis on the elastic strip mask through the computer vision function library to obtain the rotating angle of the elastic strip;
The result generation module is used for sending out the result of the abnormal detection of the elastic strip, wherein the result of the abnormal detection of the elastic strip comprises the missing information and the rotation angle of the elastic strip.
The application also provides a device for detecting the abnormal position of the elastic strip of the track fastener based on the same inventive concept, which comprises a processor, a memory and a bus, wherein the memory stores instructions and data read by the processor, the processor is used for calling the instructions and the data in the memory so as to execute the method for detecting the abnormal position of the elastic strip of the track fastener, and the bus is connected with all functional components and is used for transmitting information.
In a possible embodiment, the device further comprises a camera arranged at the lower part of the front end of the track inspection vehicle for collecting a panoramic top view of the track.
By adopting the technical scheme, the invention has the following beneficial effects:
According to the method, the system and the device for detecting the ectopic visual sense of the elastic strip of the track fastener, provided by the invention, the complete outline of the elastic strip is accurately extracted by introducing the pixel-level semantic segmentation model, and the rotation angle of the elastic strip can be accurately calculated by combining with the computer visual geometric analysis. For example, conventional methods may only identify "spring strip out of position", while the present invention can be specifically quantified as "spring strip rotated 2 degrees clockwise". The quantitative analysis enables railway maintenance personnel to intuitively and accurately evaluate the severity of the dislocation, so that maintenance strategies such as preferentially repairing the severely-misplaced fasteners or carrying out predictive maintenance according to the rotation trend can be scientifically formulated, and the scientificity and the accuracy of maintenance decisions are greatly improved.
According to the scheme, the pixel-level semantic segmentation technology is adopted, so that each pixel belonging to the elastic strip can be finely identified, and the true and irregular shape of the elastic strip is depicted. Even if the elastic strip is inclined at a very small angle, the change of the contour of the elastic strip can be accurately captured by the semantic segmentation model. For example, a slightly skewed bullet might still be considered normal in target detection, but the semantic segmentation can clearly delineate its contours that deviate from the standard morphology. Based on this high-precision profile information, subsequent geometric analysis can acutely perceive and quantify these small angular deviations. The system greatly improves the detection capability of the system for early and slight faults, is beneficial to realizing earlier intervention, and avoids the evolution of small problems into serious potential safety hazards.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings which are required in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are some embodiments of the invention and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a visual detection method for the dislocation of a spring strip of a track fastener according to an embodiment of the present invention;
FIG. 2 is an illustration of an embodiment of the present invention;
FIG. 3 is a diagram showing the missing of a spring strip according to an embodiment of the present invention;
FIG. 4 is a color diagram of a detection description of an bullet logo detection model provided by an embodiment of the present invention;
FIG. 5 is a segmentation illustration diagram of a spring bar semantic segmentation model provided by an embodiment of the present invention;
FIG. 6 is a diagram of a strip mask in a strip defect state according to an embodiment of the present invention, wherein a is a diagram of a strip defect state;
FIG. 7 is a diagram of a strip mask in an out-of-position condition of a strip according to an embodiment of the present invention, wherein a is a diagram of an out-of-position condition of a strip;
FIG. 8 is a view illustrating a rotation angle according to an embodiment of the present invention;
Fig. 9 is a diagram of a visual detection system for detecting the dislocation of a spring strip of a track fastener according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, unless explicitly stated or limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected, mechanically connected, electrically connected, directly connected, indirectly connected via an intervening medium, or in communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
The invention is further illustrated with reference to specific embodiments.
It should be further noted that the following specific examples or embodiments are a series of optimized arrangements of the present invention for further explaining specific summary, and these arrangements may be used in combination or in association with each other.
Embodiment one:
as shown in fig. 1, the method for visually detecting the dislocation of the elastic strip of the track fastener provided in this embodiment includes the following steps:
And step 1, collecting a panoramic top view of the track.
Further, the step 1 specifically includes:
Step 11, based on two cameras (arranged at the lower part of the front end of the track detection vehicle), continuously imaging the track in a scanning shooting mode to obtain scanning images, so that sufficient overlapping areas are ensured between the scanning images of adjacent frames, and high-precision image stitching is facilitated;
Step 12, extracting characteristic points (angular points or texture features) in the scanned images through SIFT (scale invariant feature transform) and other algorithms, establishing corresponding relations among the same characteristic points of different scanned images, and calculating geometric transformation parameters;
Step 13, correcting the scanned image based on geometric transformation parameters so as to eliminate image deformation and dislocation problems caused by camera motion (such as shake, lateral displacement, pitching, yawing and the like) and lens distortion;
And 14, performing (seamless) stitching fusion on the scanned images, and eliminating brightness difference and stitching gaps between the scanned images to obtain a panoramic top view of the track.
And 2, cutting the track panorama top view into (a series of) unit fastener images according to the preset standard fastener spacing, and carrying out (uniqueness) numbering on each fastener according to the sequence of the fasteners in the track panorama top view so as to facilitate subsequent fault tracking and positioning management.
And 3, identifying the bullet strip and marking the position by a bullet strip mark detection model based on the unit fastener image to obtain an anchoring frame area.
Further, the bullet target detection model adopts an image target detection model (e.g., YOLOv-s) to ensure detection speed and accuracy.
The specific construction method of the training data set of the bullet mark detection model comprises the steps of firstly cutting out unit fastener images from an actually collected track panoramic top view, wherein the unit fastener images comprise bullet bar images in a normal state and bullet bar images in an abnormal state, the abnormal state comprises bullet bar dislocation, bullet bar (slight) deformation, bullet bar defect and the like, as shown in fig. 2-3, the specific diagrams of bullet bar dislocation and bullet bar defect are respectively shown, the diversity of the training data set can be enhanced, the generalization capability and the robustness of the model can be improved, and then boundary boxes (Bounding Box) are used for marking bullet bars in each unit fastener image, and rectangular areas of the bullet bars are selected and corresponding category labels (namely the bullet bars in different states) are allocated.
The specific training method of the bullet mark detection model comprises the steps of inputting a (640 x 640 pixels) unit fastener image in a training data set into the bullet mark detection model, identifying bullet bars, marking the (approximate) positions of the bullet bars through an anchoring frame, adjusting model parameters (weights and biases) based on a back propagation algorithm and an optimizer according to a loss function between a prediction result and a real mark, and obtaining the bullet mark detection model capable of efficiently and accurately identifying the bullet bars and marking the positions of the bullet bars through iterative training;
The loss function includes a classification loss and a regression loss;
the classifying loss (Classification Loss) is used for measuring the accuracy of whether the bullet strip exists in the anchor frame or not according to the bullet strip mark detection model, and specifically can select cross entropy loss for calculation;
The Regression Loss (Regression Loss) is used for measuring the fitness between the predicted anchor frame and the real anchor frame of the bullet mark detection model, and specifically may include an L1 Loss and/or an L2 Loss and/or IoU Loss;
The L1 loss is used for calculating an absolute error between the predicted anchor frame coordinates and the real anchor frame coordinates;
the L2 loss is used for calculating the relative error between the predicted anchor frame coordinates and the real anchor frame coordinates;
and IoU the loss is used for calculating the intersection ratio between the predicted anchor frame and the real anchor frame.
Further, as shown in fig. 4, the method for identifying the bullet mark detection model includes detecting an input image, directly generating missing information of a bullet if the bullet is not detected, outputting a (red) anchor frame capable of surrounding the bullet according to the (approximate) position of the bullet if the bullet is detected, and determining an anchor frame area.
And 4, as shown in fig. 5, performing pixel-level segmentation through a bullet strip semantic segmentation model based on the anchoring frame region to obtain a (high-precision) bullet strip mask, wherein the bullet strip mask can provide accurate contour information of the bullet strip, including nonstandard shape and micro deformation, unlike a traditional detection frame, so that enough real geometric shape information is provided for the subsequent accurate quantitative analysis of the bullet strip ectopic position.
Further, the elastic strip semantic segmentation model takes U-Net as a basic framework, and simultaneously introduces a channel attention mechanism (Channel Attention Mechanism) and a space attention mechanism (Spatial Attention Mechanism);
The channel attention mechanism is used for learning the weights of different characteristic channels so as to enhance the response to key characteristics;
The spatial attention mechanism is for focusing on critical spatial locations within the anchor frame region.
The specific construction method of the training data set of the elastic strip semantic segmentation model comprises the steps of firstly cutting out unit fastener images from an actually acquired track panoramic top view, wherein the unit fastener images comprise elastic strip images in a normal state and elastic strip images in an abnormal state, the abnormal state comprises elastic strip dislocation, elastic strip (slight) deformation, elastic strip incomplete and the like, as shown in fig. 6-7, wherein the graph a in fig. 6 is an elastic strip incomplete graph, the graph a in fig. 7 is an elastic strip dislocation graph, so that diversity of the training data set can be enhanced, generalization capability and robustness of the model can be improved, pixel-level Mask (Mask) marking is carried out on the elastic strip in each unit fastener image, each pixel point is classified as an elastic strip or a background, the accurate outline of the elastic strip is sketched, the graph b in fig. 6 is an elastic strip Mask graph in the elastic strip incomplete state, and the graph b in fig. 7 is an elastic strip Mask graph in the elastic strip abnormal state.
The specific training method of the elastic strip semantic segmentation model comprises the steps of inputting pixel-level mask marking data in a training data set, inputting an elastic strip semantic segmentation model, learning how to classify each pixel as an elastic strip or a background, wherein the training target is to minimize the difference between a predicted elastic strip mask and a real elastic strip mask, and taking cross entropy loss as a loss function;
the cross entropy loss may be a binary cross entropy loss The specific formula may be:
;
Wherein, the Representing the total number of pixels in the bullet bar mask image; Represent the first True labels of the pixels, 1 represents a bullet bar, and 0 represents a background; prediction of semantic segmentation model of representation elastic bar The probability that an individual pixel is a bullet.
And 5, performing geometric analysis on the elastic strip mask through a Computer Vision (CV) function library to obtain the rotation angle of the elastic strip.
Further, the specific method of geometric analysis comprises the following steps:
step 51, extracting pixel point geometry representing a bullet strip boundary from a bullet strip mask to form a (continuous) bullet strip contour line;
Step 52, calculating and fitting a minimum circumscribed rectangle surrounding the contour line of the elastic strip, so that the minimum occupied space of the elastic strip can be provided, and the actual gesture of the elastic strip can be reflected through the long-side direction;
And step 53, calculating an included angle between the long side of the minimum circumscribed rectangle and a preset standard horizontal axis (or a standard fastener main axis) to obtain the rotation angle of the elastic strip, as shown in fig. 8.
Further, in the step 52, the minimum bounding rectangle may be calculated based on a rotation stuck-at algorithm (Rotating Calipers Algorithm) by using a cv2. MinArearact () function in the OpenCV library, where the input is a bullet contour, and the output is a center point coordinate (x, y), a nominal width height (height), and a nominal rotation angle of the minimum bounding rectangle)。
Further, the step 52 further includes calculating geometric characteristic parameters of the bullet contour, and comparing with geometric characteristic parameters of a normal bullet, if the ratio is lower than the preset ratio, determining that the bullet is incomplete, and not executing the step 53;
The geometric characteristic parameters comprise the contour area of the elastic strip, the contour circumference of the elastic strip and the area ratio of the circumscribed rectangle;
the circumscribed rectangular area ratio refers to the ratio between the contour area of the elastic strip and the minimum circumscribed rectangular area of the elastic strip.
Further, in the step 53, the specific method for determining the direction of the rotation angle includes:
step 531, compare the width value and height value of the minimum bounding rectangle:
If the width value is smaller than the height value, the width value represents a short side, and the height value represents a long side;
otherwise, width value represents long side and height value represents short side;
step 532, if the width value is greater than the height value, then The value is used as the final rotation angle, if the width value is smaller than the height valueThe value obtained by adding 90 degrees is taken as the final rotation angle;
Step 533, when the minimum bounding rectangle is in a horizontal (or vertical) state, the rotation angle is defined as 0 degrees, and the long axis of the minimum bounding rectangle is defined as a standard reference axis;
step 534, based on the standard reference axis, pair The value is corrected by angle conversion to ensureThe value always represents the included angle between the long side and the standard reference axis, and then the judgment is carried out:
If it is The value is positive, which indicates that the spring strip rotates anticlockwise;
If it is The negative value indicates that the spring is rotating clockwise.
Embodiment two:
As shown in fig. 9, the embodiment provides a visual detection system for detecting the dislocation of a spring strip of a track fastener, which comprises a data receiving module, a data processing module and a result generating module;
The data receiving module is used for receiving the panoramic top view of the track;
The data processing module comprises a unit fastener unit, an anchoring frame unit, an elastic strip mask unit and a rotation angle unit;
The unit fastener units are used for cutting the track panorama top view into unit fastener images according to the preset standard fastener spacing;
The anchoring frame unit is used for identifying the bullet strip and marking the position through a bullet strip mark detection model based on the unit fastener image to obtain an anchoring frame area;
the elastic strip mask unit is used for carrying out pixel level segmentation through an elastic strip semantic segmentation model based on the anchoring frame area to obtain an elastic strip mask;
the rotating angle unit is used for carrying out geometric analysis on the elastic strip mask through the computer vision function library to obtain the rotating angle of the elastic strip;
The result generation module is used for sending out the result of the abnormal detection of the elastic strip, wherein the result of the abnormal detection of the elastic strip comprises the missing information and the rotation angle of the elastic strip.
Embodiment III:
The embodiment provides an abnormal visual detection device for a track fastener elastic strip, which comprises a processor, a memory and a bus, wherein the memory stores instructions and data read by the processor, the processor is used for calling the instructions and the data in the memory so as to execute the abnormal visual detection method for the track fastener elastic strip, and the bus is connected with all functional components and is used for transmitting information.
Further, the device also comprises a camera arranged at the lower part of the front end of the track detection vehicle and used for collecting a panoramic top view of the track.
The present solution may also be realized in a further embodiment by means of an integrated device, which may comprise corresponding modules performing each or several of the steps of the various embodiments described above. A module may be one or more hardware modules specifically configured to perform the respective steps, or be implemented by a processor configured to perform the respective steps, or be stored within a computer-readable medium for implementation by a processor, or be implemented by some combination.
The processor performs the various methods and processes described above. For example, method embodiments in the present solution may be implemented as a software program tangibly embodied on a machine-readable medium, such as a memory. In some embodiments, part or all of the software program may be loaded and/or installed via memory and/or a communication interface. One or more of the steps of the methods described above may be performed when a software program is loaded into memory and executed by a processor. Alternatively, in other embodiments, the processor may be configured to perform one of the methods described above in any other suitable manner (e.g., by means of firmware).
The device may be implemented using a bus architecture. The bus architecture may include any number of interconnecting buses and bridges depending on the specific application of the hardware and the overall design constraints. The bus connects together various circuits including one or more processors, memories, and/or hardware modules. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, external antennas, and the like.
The bus may be an industry standard architecture (ISA, industry Standard Architecture) bus, a peripheral component interconnect (PCI, PERIPHERAL COMPONENT) bus, or an extended industry standard architecture (EISA, extended Industry Standard Component) bus, etc., and may be classified as an address bus, a data bus, a control bus, etc.
It should be noted that the above embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solution described in the above embodiments may be modified or some or all of the technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present invention.
Claims (9)
1. The method for visually detecting the dislocation of the elastic strip of the track fastener is characterized by comprising the following steps of:
step 1, collecting a panoramic top view of a track;
Step 2, cutting the track panorama top view into unit fastener images according to preset standard fastener intervals;
Step 3, identifying the bullet strip and marking the position by a bullet strip mark detection model based on the unit fastener image to obtain an anchoring frame area;
Step 4, performing pixel level segmentation through the elastic strip semantic segmentation model based on the anchoring frame region to obtain an elastic strip mask;
step 5, performing geometric analysis on the elastic strip mask through a computer vision function library to obtain the rotation angle of the elastic strip;
The specific method for geometric analysis comprises the following steps:
Step 51, extracting pixel point geometry representing a bullet strip boundary from a bullet strip mask to form a bullet strip contour line;
step 52, calculating and fitting out a minimum circumscribed rectangle surrounding the elastic strip contour line;
step 53, calculating an included angle between the long side of the minimum circumscribed rectangle and a preset standard horizontal axis to obtain a rotation angle of the elastic strip;
The specific judging method of the direction of the rotation angle comprises the following steps:
step 531, compare the width value and height value of the minimum bounding rectangle:
If the width value is smaller than the height value, the width value represents a short side, and the height value represents a long side;
otherwise, width value represents long side and height value represents short side;
step 532, if the width value is greater than the height value, then The value is used as the final rotation angle, if the width value is smaller than the height valueThe value obtained by adding 90 degrees is taken as the final rotation angle;
step 533, when the minimum bounding rectangle is in a horizontal state, defining a rotation angle as 0 degrees, and defining a long axis of the minimum bounding rectangle as a standard reference axis;
step 534, based on the standard reference axis, pair The value is corrected by angle conversion to ensureThe value always represents the included angle between the long side and the standard reference axis, and then the judgment is carried out:
If it is The value is positive, which indicates that the spring strip rotates anticlockwise;
If it is The negative value indicates that the spring is rotating clockwise.
2. The method according to claim 1, wherein the step 1 specifically includes:
Step 11, continuously imaging the track based on a camera in a scanning shooting mode to obtain a scanning image;
Step 12, extracting characteristic points in the scanned images through a SIFT algorithm, establishing corresponding relations among the same characteristic points among different scanned images, and calculating geometric transformation parameters;
Step 13, correcting the scanned image based on the geometric transformation parameters;
And 14, splicing and fusing the scanned images, and eliminating brightness difference and splicing gaps among the scanned images to obtain a panoramic top view of the track.
3. The detection method according to claim 1, wherein the specific construction method of the training data set of the bullet mark detection model comprises the steps of firstly cutting out unit fastener images from an actually collected track panoramic top view, wherein the unit fastener images comprise bullet bar images in a normal state and bullet bar images in an abnormal state, marking bullet bars in each unit fastener image with a boundary frame, selecting rectangular areas of the bullet bars in a frame mode, and distributing corresponding category labels.
4. The method for detecting the bullet mark according to claim 3, wherein the specific training method for the bullet mark detection model comprises the steps of inputting unit fastener images in a training data set into the bullet mark detection model, identifying bullet bars and marking positions of the bullet bars through an anchoring frame, adjusting model parameters according to a loss function between a prediction result and a real mark based on a back propagation algorithm and an optimizer, and obtaining the bullet mark detection model for identifying the bullet bars and marking the positions of the bullet bars through iterative training.
5. The detection method according to claim 1, wherein the method for identifying the bullet mark detection model comprises the steps of firstly detecting an input image, directly generating missing information of a bullet if the bullet is not detected, outputting an anchoring frame capable of surrounding the bullet according to the position of the bullet if the bullet is detected, and determining an anchoring frame area.
6. The detection method according to claim 1, wherein the specific construction method of the training data set of the elastic strip semantic segmentation model is characterized by comprising the steps of firstly cutting out unit fastener images from an actually acquired track panoramic top view, wherein the unit fastener images comprise elastic strip images in a normal state and elastic strip images in an abnormal state, and then carrying out pixel-level mask labeling on the elastic strips in each unit fastener image, and classifying each pixel point as an elastic strip or a background.
7. The detection method according to claim 6, wherein the specific training method of the bullet semantic segmentation model comprises the steps of marking data on a pixel level mask in a training data set, inputting the bullet semantic segmentation model, learning to classify each pixel as a bullet or a background, training to minimize differences between a predicted bullet mask and a real bullet mask, taking cross entropy loss as a loss function, and obtaining a bullet semantic segmentation model for performing pixel level segmentation on the bullet in an anchoring frame area through iterative training.
8. A visual detection system for detecting the dislocation of a spring strip of a track fastener by adopting the detection method as claimed in any one of claims 1 to 7, which is characterized by comprising a data receiving module, a data processing module and a result generating module;
The data receiving module is used for receiving the panoramic top view of the track;
The data processing module comprises a unit fastener unit, an anchoring frame unit, an elastic strip mask unit and a rotation angle unit;
The unit fastener units are used for cutting the track panorama top view into unit fastener images according to the preset standard fastener spacing;
The anchoring frame unit is used for identifying the bullet strip and marking the position through a bullet strip mark detection model based on the unit fastener image to obtain an anchoring frame area;
the elastic strip mask unit is used for carrying out pixel level segmentation through an elastic strip semantic segmentation model based on the anchoring frame area to obtain an elastic strip mask;
the rotating angle unit is used for carrying out geometric analysis on the elastic strip mask through the computer vision function library to obtain the rotating angle of the elastic strip;
The result generation module is used for sending out the result of the abnormal detection of the elastic strip, wherein the result of the abnormal detection of the elastic strip comprises the missing information and the rotation angle of the elastic strip.
9. The visual detection device for the abnormal position of the elastic strip of the track fastener is characterized by comprising a processor, a memory and a bus, wherein the memory stores instructions and data read by the processor, the processor is used for calling the instructions and the data in the memory so as to execute the detection method as claimed in any one of claims 1 to 7, and the bus is connected between functional components and used for transmitting information.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202511130692.6A CN120635086B (en) | 2025-08-13 | 2025-08-13 | Rail fastener elastic strip ectopic visual detection method, system and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202511130692.6A CN120635086B (en) | 2025-08-13 | 2025-08-13 | Rail fastener elastic strip ectopic visual detection method, system and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN120635086A CN120635086A (en) | 2025-09-12 |
| CN120635086B true CN120635086B (en) | 2025-10-24 |
Family
ID=96957431
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202511130692.6A Active CN120635086B (en) | 2025-08-13 | 2025-08-13 | Rail fastener elastic strip ectopic visual detection method, system and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN120635086B (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119048836A (en) * | 2024-08-29 | 2024-11-29 | 株洲时代电子技术有限公司 | Automatic detection method for rail fastener state |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10752271B2 (en) * | 2018-11-15 | 2020-08-25 | Avante International Technology, Inc. | Image-based monitoring and detection of track/rail faults |
-
2025
- 2025-08-13 CN CN202511130692.6A patent/CN120635086B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119048836A (en) * | 2024-08-29 | 2024-11-29 | 株洲时代电子技术有限公司 | Automatic detection method for rail fastener state |
Also Published As
| Publication number | Publication date |
|---|---|
| CN120635086A (en) | 2025-09-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113822840B (en) | System and method for checking vehicle bottom | |
| EP4322106B1 (en) | Defect detection method and apparatus | |
| CN111079747B (en) | Railway wagon bogie side frame fracture fault image identification method | |
| CN118608504A (en) | A method and system for detecting component surface quality based on machine vision | |
| CN109255350B (en) | New energy license plate detection method based on video monitoring | |
| CN110261436A (en) | Rail deformation detection method and system based on infrared thermal imaging and computer vision | |
| CN120318234B (en) | Method and system for rapidly detecting visual defects of square power battery shell | |
| CN101110101A (en) | Image recognition method and device | |
| CN120689330A (en) | A PCB board defect detection method and system based on image recognition | |
| CN120355688B (en) | A machine vision-based intelligent detection method and system for surface defects of artificial boards | |
| CN113962929A (en) | Photovoltaic cell assembly defect detection method and system and photovoltaic cell assembly production line | |
| CN112508911A (en) | Rail joint touch net suspension support component crack detection system based on inspection robot and detection method thereof | |
| CN118247234A (en) | A method and system for detecting point-shaped hot spots of photovoltaic modules based on local difference measurement | |
| CN119205747A (en) | Railway fastener anomaly detection method and system based on computer vision | |
| CN116958052A (en) | Printed circuit board defect detection method based on YOLO and attention mechanism | |
| CN119888379A (en) | Deep learning-based slab surface quality detection system and method | |
| CN119785001A (en) | Deep learning-based photovoltaic panel dust deposition identification and cleaning auxiliary system and method | |
| CN119152397A (en) | Unmanned aerial vehicle power line image line equipment defect labeling method | |
| CN120635086B (en) | Rail fastener elastic strip ectopic visual detection method, system and device | |
| CN120507362B (en) | A method and system for full appearance inspection of the inner wire solder of automobile brake hose joints | |
| JP2006155126A (en) | Vehicle number recognition device | |
| CN120259290A (en) | A method and system for detecting loose bolts of rail vehicles | |
| CN119125165B (en) | Welding defect detection method, detection system, electronic equipment and storage medium | |
| Yang et al. | A novel applicable shadow resistant neural network model for high-efficiency grid-level pavement crack detection | |
| CN118883576A (en) | A road automatic inspection method and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |