CN115908400A - Intelligent detection and positioning method for track irregularity and diseases - Google Patents
Intelligent detection and positioning method for track irregularity and diseases Download PDFInfo
- Publication number
- CN115908400A CN115908400A CN202211726114.5A CN202211726114A CN115908400A CN 115908400 A CN115908400 A CN 115908400A CN 202211726114 A CN202211726114 A CN 202211726114A CN 115908400 A CN115908400 A CN 115908400A
- Authority
- CN
- China
- Prior art keywords
- track
- irregularity
- disease
- image
- point
- 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.)
- Pending
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses an intelligent detection and positioning method for rail irregularity and diseases, which aims to solve the problems that a rail irregularity and disease monitoring system on the current market needs manual cooperation, is low in intelligentization and integration, is poor in dynamic monitoring and sensing effect, is high in labor cost and the like; on the other hand, the image target deep learning detection model is adopted to detect and position the defects such as stripping, fish scale injury, spalling, corrugation and the like on the track, so that the defects of unevenness and the defects of the track can be accurately and quickly detected and analyzed, and the problems of quick detection and positioning of the defects of the track in the running process of the track inspection vehicle are solved. Compared with manual detection, the method is more reliable, efficient and safe.
Description
Technical Field
The invention belongs to the technical field of fusion of technologies such as image processing, three-dimensional reconstruction and depth network, and particularly relates to an intelligent detection and positioning method for track irregularity and diseases.
Background
In railway operations, safety issues have always been placed in the primary position. Because the speed of the high-speed train is high in the running process, even a tiny safety accident can bring immeasurable serious consequences once the accident happens. The important guarantee of high-speed running operation is a high-smoothness track, but the smoothness of the high-speed railway track can be inevitably influenced along with the continuous increase of the impact frequency and amplitude of a high-speed train on the track structure in long-term operation, so that potential safety hazards are brought. In addition, the damage and the fracture of the rail surface caused by natural disasters and using processes are also great hidden dangers of the safety of the railway track. Therefore, the detection and positioning of the defects and the irregularity of the rail are core tasks to be solved by the high-speed railway engineering department.
In the aspect of railway track detection, the most commonly adopted large-scale track detection vehicle carries out dynamic detection only by monthly detection or quarterly detection, so that the detection cost is high, the efficiency is low, and the operation of professional persons is required; static detection is carried out by adopting a manual or orbit geometric state detector, so that the cost is low, the operation is simple, and the influence of environmental factors is easily caused; the construction and maintenance cost of the three-level control network is high, the network construction period is long, the workload is large, the skylight time is short, the measurement efficiency is low, and the low-speed railway network construction is uneconomical, so that a new detection scheme with high measurement precision and high operation speed is urgently needed.
The existing railway rail irregularity and disease monitoring system on the market has the problems of manual cooperation, low intelligentization and integration, poor dynamic monitoring and perception effects, high labor cost and the like.
Disclosure of Invention
The invention aims to provide an intelligent detection and positioning method for track irregularity and track defects, which can realize accurate and rapid detection and analysis of track defects.
The invention adopts the technical scheme that the intelligent detection and positioning method for the track irregularity and the diseases specifically comprises the following steps:
step 1, building a data positioning system and a data acquisition system on a T-shaped rail inspection vehicle, and acquiring position information { (P) of the rail inspection vehicle under a WGS84 coordinate system by using the data positioning system t ,B t ) In which P is t And B t Respectively the geodetic longitude and the dimensional value of the rail inspection vehicle at the time T, wherein T is more than or equal to 1 and less than or equal to T, and T is total acquisition time and also is the number of acquired data;
step 2, collecting a t-time orbit image sequence from three viewpoints by using a three-eye camera on a moving track inspection vehicleRespectively obtaining a left viewpoint image, a middle viewpoint image and a right viewpoint image of the track at the time t, and respectively storing the images to obtain a track image sequence;
step 3, taking the track image sequence as input, and generating a 3D point cloud of the track scene at the time t by using a three-dimensional point cloud generation methodSimultaneously get>Projection relation matrix to each viewpoint image->And &>A homography matrix is also obtained between the middle viewpoint image and the left and right viewpoint images->And &>
Step 4, taking the middle viewpoint track image of the t momentAs input, two side lines of the left track are respectively extracted by means of a straight line extraction method>And two side lines of the right track>Pick up>And &>Is greater than or equal to>Is at>Evenly sampling K points on the upper part to form a point set>Multiplied by the homography matrix between the middle and left view images>Get the left viewpoint image->On projection point set->Handle point setProjection relation matrix->And &>As an input, an open-source opencv-python library function cv2.TriangulatePoints () is called, and an output is got ^ or>Corresponding set of 3D coordinates->Extraction of Lr t 1 And Lr t 2 Central line Lr of t m At Lr, at t m K points are uniformly sampled to form a point set { pr t m,1 ,…,pr t m,k ,…,pr t m,K Get the point set { pr ] by the same method t m,1 ,…,pr t m,k ,…,pr t m,K } corresponding 3D coordinate ^ or>
Step 5, marking the track width variable as W s Extracting to assembleIn the center of each point with W s Is a cube with a side length and belongs to a scene 3D point cloud>All points in the interior constitute a point set>Wherein->Is/is>A point set extracted for the center point of the cube>Is composed ofN of (1) k Dot, N k Is->The number of the inner points is greater or less>Are respectively in>X, Y, Z coordinate of (4), (4)>An initial point cloud of a left track; in the same way, an initial point cloud @ of the right track is obtained>
Step 6, recording the variable of the track elevation as H s Performing height filtering on the initial point cloud of the left track, and performing height filtering on the point cloud of the right track by the same method; the updated left and right track point clouds obtained after filtering are respectivelyAnd &>
Step 7, carrying out point cloud on the left and right tracks at the moment tAnd { SPr t 1 ,…,SPr t k ,…,SPr t K Analyzing data, judging whether the track has irregularity, and if the track has irregularity, judging the irregularity type C t Parameter of irregularity PS t And the irregularity position P t ns Recording;
Step 9, utilizing the collected track image data to make a track disease data set, training a target detector based on stripping, fish scaling, spalling and corrugation of a track of a YOLOv7 network structure, and obtaining a track disease detection Model ill ;
Step 10, the orbit image at the time tModel for disease detection ill Py under python conditions is invoked as input with the detection program train under file path Project/yolov7, outputting a disease @>In (b) position>And a category +>Will be/are>Multiply by a homography matrix>Get->On the left viewpoint imageProjection point->To be->And &>And a 3D to 2D projection matrix +>And &>As an input, an open-source opencv-python library function cv2.TriangulatePoints () is called, and an output ^ is expressed>Corresponding 3D coordinates P t ill ;
Step 11, calculating the defect position P obtained at the time t of the rail inspection vehicle by using the same method as the step 8 t ill In 3D coordinates of (a) and (b)
The invention is also characterized in that:
the specific steps of step 4 are as follows:
step 4.1, track imageAs an input, calling Python programming language opencv-Python library function cv2.Imread () will >>Converted into a gray-scale picture->
Step 4.2, gray level mapAs an input, call Python programming language opencv-Python library function cv2.Gaussian blur () pair>Gaussian filtering is carried out to obtain a filtered image->
Step 4.3, with filtered imageFor input, call Python programming language opencv-Python library function cv2.Canny () on->Performing edge detection processing to obtain an edge image->
Step 4.4, with edge imageCall Python programming language opencv-Python library function cv2.HoughLinesP for input() Is paired and/or matched>Extracting the track line to obtain the left and right side lines of the left track>And the left and right side lines of the right track>Lr t 2 The representation form of two end points of the 4 lines is respectively Wherein it is present>Represents an endpoint closer to the camera>Representing endpoints that are farther from the camera;
step 4.5, calculating the center line of the side line of the left trackCounting/or>And &>Midpoint of two end pointsCalculate->And &>The midpoint of the two end points is->To be->And &>As input, a straight line extraction algorithm getLineEqualification () is called to get the centerline of two trajectories of the left track->I.e. the median line & (a, b, c) of the general equation>Expressed as->ax + by + c =0; obtaining the center line Lr of the two tracks of the right track by the same method t m ;
Step 4.7, set pointsThe inner points are each multiplied by a homography matrix->Get its picture at left viewpoint->The projection point set in (4)>
Step 4.8, the point set on the middle viewpoint imageProjection point set on left viewpoint image>Projection relation matrix->As an input, calling the opencv-python library function cv2.Triangulatepoints () of an open source, and outputting a 3D coordinate set ^ based on the left track>
Step 4.9, at Lr t m Uniformly sampling K points to form a point set { pr t m,1 ,…,pr t m,k ,…,pr t m,K And (6) repeating the operation of the steps 4.7-4.8, and outputting a point set { pr } t m,1 ,…,pr t m,k ,…,pr t m,K The corresponding set of 3D coordinates { Pr } t 1 ,…,Pr t k ,…,Pr t K }。
The height filtering process of the initial point cloud of the left track in the step 6 comprises the following steps:if its Z coordinate belongs to [ H ] s -△ h ,H s +△ h ]If not, then reserve, otherwise slave set +>Middle deletion, where h And allowing a change value for the track point cloud elevation.
The specific steps of step 7 are as follows:
step 7.1, calculating the point cloud of the left orbitEach sub-point in the system is collected>Wherein k represents the position of the sub-point set, to obtain an equalized left-track point cloud coordinate set ≥>Wherein-> Is collected as a point>Elevation information of the inner point clouds, i.e.>Then the elevation set of the left track point cloud is expressed as ≥>Obtaining a point cloud coordinate set { pSPr) after the right orbit equalization by using the same method t 1 ,…,pSPr t k ,…,pSPr t K H and an elevation set of right track point clouds (Hr) t 1 ,...,Hr t k ,...,Hr t K };
7.2, judging whether the track has triangular pit irregularity, and recording irregularity parameters and positions if the track has triangular pit irregularity;
7.3, judging whether the track has unevenness, and if so, recording unevenness parameters and positions;
and 7.4, judging whether the track has horizontal irregularity, and if so, recording irregularity parameters and positions.
The specific process of the step 7.2 is as follows:
step 7.2.1, calculating the point cloud elevation difference at the parallel position of the left track and the right track according to the formulaGet a set +>
Step 7.2.2, if Satisfies the condition>Or is conditional>It is then indicated that at time t of the movement of the rail vehicle there is a track crater irregularity, i.e. irregularity type C t Is equal to 1, where ε h The tolerance accuracy of the triangular pit irregularity is shown. Recording the irregularity parameter of the triangular pit>The position of the disease which is not smooth with the triangular pit is
The specific process of the step 7.3 is as follows:
step 7.3.1, respectively calculating elements in the left and right track elevation sets and the standard elevation H h The absolute difference between them is recorded as the difference between the left and right elevationCollection ofAnd &>Wherein +>△Hr t k =|Hr t k -H h |;/>
Step 7.3.2,If the condition is met>It is then indicated that at time t of the movement of the rail vehicle, there is a high or low irregularity in the left rail, i.e. irregularity type C t Equal to 2, the irregularity parameter is recorded>And uneven disease position>If the condition Δ Hr is satisfied t k ≥δ h Then, it is indicated that there is a high or low irregularity in the right track at time t of the railcar motion, i.e., irregularity type C t Equal to 2, recording the altitude irregularity parameter PS t =△Hr t k And the height irregularity defect position P t ns =pSPr t k Wherein δ h The tolerance accuracy of the unevenness is high.
The specific process of the step 7.4 is as follows:
step 7.4.1, calculating the absolute difference of the elevation of the left track and the right track according to the calculation formulaObtaining a set of absolute differences in elevation for the track/>
Step 7.4.2,If the condition is met>It is then indicated that at time t of the movement of the rail vehicle, the rail has a horizontal irregularity, i.e. irregularity type C t Equal to 3, recording the horizontal irregularity parameter>And a horizontal irregularity disease position>Wherein eta h To the allowed horizontal irregularity accuracy.
The specific steps of step 8 are as follows:
step 8.1 of calculating the unsmooth position P of the rail inspection vehicle at the t moment t Set of point cloud coordinatesMean coordinate (x) of all points in (1) t ,y t ,z t ) According to the conversion relation from the space rectangular coordinate system to the geodetic coordinate system, the (x) is converted into the (x) in the space rectangular coordinate system t ,y t ,z t ) For relative coordinates in the geodetic coordinate system>
Step 8.2, track inspection vehicle position (P) acquired by the data positioning system at the time t t ,B t ) As the absolute position of the GPS of the track, the absolute position of the GPS and the relative coordinates of the track irregularity position are summed to obtain the absolute position of the GPS with the irregularity trackWherein P is t ns =P t +wP t ns ,/>
The specific steps in step 9 are as follows:
step 9.1, selecting a target detection Yolov7 network structure for the track disease detection network structure, and modifying a configuration file YOLOv7.Yaml as follows: modifying the classification number into the classification number C of the track defects ill I.e. setting the number of classes variable nc to C ill The value is 4;
step 9.2, carrying out image acquisition on the C-type track diseases, wherein the total number of the acquired images is N s The number of the collected images of each class is
Step 9.3, the structure of the training sample is as follows: uploading the track disease image data to a data marking website, and marking the disease type and the disease detection true value frame of the track disease image on the website by using a marking tool; exporting the marked data set to a file storage path data/train by using a data set exporting function of a website after all images are marked, creating a data set configuration file data.yaml under the path data/train, and forming a track disease training data set railData by using the marked data set and the configuration file;
and 9.4, setting network training parameters in a network training file train. The method comprises the following steps that the total iteration number epoch of network training is =100, the number of images batch of network batch processing is =16, the initial learning rate lr of the network training is =0.01, the size W x H of an image input by a network is obtained, an optimizer used in the network training is set to Adam, the initial value step of a variable of the network training number is =1, a training sample data path is data/train, a training working device is set to have a decision =0, the GPU is used for training, and the output model name is yolo7.Pt;
step 9.5, defining a network loss function as:
wherein x n Denotes the score, y, for predicting the nth sample as a positive example n A label representing the nth sample, δ representing a sigmoid function;
and 9.6, running the file train in pyy in the conda environment, and performing network training when the variable step of the network training times is>=200 or network Loss function Loss less than 10 -1 And then ending the network training and outputting a track disease detection Model ill 。
The specific process of step 10 is as follows:
step 10.1, detecting the imageModel for disease detection ill Py is run under python environment as input, and outputs the detected disease type->Rectangular frame where diseases are located>WhereinIs determined as having a disease in>Middle position->Is based on the center point coordinates of>And &>Respectively represent the widths anda height;
step 10.2, according to the formula (6), utilizing the homography matrixPick up the image>Position of upper track diseaseProjected to the left viewpoint image->In the previous step, a corresponding disease position on the left viewpoint image is obtained>
Step 10.3, the position of the disease in the middle viewpoint imagePosition of disease in left viewpoint image3D to 2D projection matrix ^ er>As input, calling the open-source opencv-python library function cv2.Triangulatepoints (), and outputting the 3D coordinate ^ of the track disease ^ 5>
The invention has the beneficial effects that:
the invention relates to an intelligent detection and positioning method for track diseases and irregularity, which carries out railway image disease detection, track three-dimensional coordinate reconstruction and track irregularity geometric parameter movement measurement in a way of measuring while walking, thereby realizing the automatic intelligent detection task of the track; compare in manual detection, more reliable, high-efficient, safety can realize accurate, quick detection and analysis to track disease and irregularity.
Drawings
FIG. 1 is a schematic flow chart of the intelligent detection and positioning method for track irregularity and diseases of the present invention;
FIG. 2 is a schematic flow chart of a line extraction method based on Hough transform adopted by the present invention;
FIG. 3 is a schematic view of a process for detecting track irregularity by using a track inspection vehicle according to the present invention;
FIG. 4 is a schematic diagram of the principle of detecting the irregularity of the triangular pits of the track by the track inspection vehicle adopted by the invention;
FIG. 5 is a schematic diagram of the principle of detecting the unevenness of the track by the track inspection vehicle adopted by the invention;
FIG. 6 is a schematic diagram of the principle of detecting horizontal irregularity of a track by a track inspection vehicle adopted by the invention;
FIG. 7 is a schematic diagram of a process for solving track irregularity damage and track surface damage actual GPS positions adopted by the present invention;
fig. 8 is a track defect detection image in the embodiment of the present invention.
Detailed Description
The invention is described in detail below with reference to the drawings and the detailed description.
The deep learning theory is newly applied to various industries, and also can be applied to the aspect of rail fault detection, and rail faults are used as specific targets to train a detection model by utilizing the advanced feature extraction mechanism and the category learning capability of a deep learning network, so that the rail faults are quickly detected and positioned in the operation process of a rail inspection vehicle.
In addition, the absolute position of the track where the track is uneven and damaged is calculated by using the absolute position of the GPS of the track inspection vehicle and the relative position of the point cloud coordinates, so that accurate positioning information can be provided for railway maintenance and overhaul departments.
Based on the above, the intelligent detection and positioning method for the track irregularity and the diseases comprises the following steps:
step 1, building a data positioning system and a data acquisition system on a T-shaped rail inspection vehicle, wherein the used equipment comprises: GPS, a three-view camera, an industrial grade notebook computer and a mobile power supply, and a data positioning system is utilized to acquire the position information { (P) of the rail inspection vehicle under the WGS84 coordinate system t ,B t ) In which P is t And B t Respectively representing the geodetic longitude and the dimension value of the rail inspection vehicle at the time T, wherein T is more than or equal to 1 and less than or equal to T, and T is the total acquisition time and also is the number of acquired data;
step 2, collecting a t-time orbit image sequence from three viewpoints by using a three-eye camera on a moving track inspection vehicleRespectively a left viewpoint image, a middle viewpoint image and a right viewpoint image of the t time track, and combining->File storage paths data/ill/left, data/ill/middle and data/ill/right respectively stored in a designated drive letter (e.g., a D-drive) of the industrial grade notebook;
step 3, taking the track image sequence as input, and generating a track scene 3D point cloud at the time t by using a three-dimensional point cloud generation method (OpenMVG + PMVS)Simultaneously get>Projection relation matrix to each viewpoint image->And &>Also obtains the middle view point image and the left and right viewsHomography matrix between point images>And &>
Step 4, taking the middle viewpoint track image of the t momentAs input, two side lines of the left track are respectively extracted by means of a straight line extraction method>And two side lines of the right track>Extraction>And &>Is greater than or equal to>Is at>Up-evenly sampling K points to form a point set>Multiply by a homography matrix between the middle-view and left-view images->Get the left viewpoint image>Set of projection points on>Handle point setProjection relation matrix->And &>Calling opencv-python library function cv2.Triangulatepoints () of an open source as input, and outputting the result of ^ based on>Corresponding set of 3D coordinates +>Extraction of Lr t 1 And Lr t 2 In the midline>In or on>K points are uniformly sampled to form a point set { pr t m,1 ,…,pr t m,k ,…,pr t m,K Using the same method, a set of points { pr }is obtained t m,1 ,…,pr t m,k ,…,pr t m,K } corresponding 3D coordinate ^ or>The method comprises the following specific steps:
step 4.1, orbit imageAs an input, calling Python programming language opencv-Python library function cv2.Imread () will >>Converted into a gray-scale picture->
Step 4.2, gray level mapAs an input, call Python programming language opencv-Python library function cv2.Gaussian blur () pair>Gaussian filtering is carried out to obtain a filtered image->
Step 4.3, with filtered imageFor input, call Python programming language opencv-Python library function cv2.Canny () on->Performing edge detection processing to obtain an edge image->
Step 4.4, with edge imageTo enter, call Python programming language opencv-Python library function cv2.HoughLinesP () vs>Extracting the track line to obtain the left and right side lines of the left track>And the left side of the right trackRight two side lines Lr t 1 、Lr t 2 The representation form of two end points of the 4 lines is respectively Wherein it is present>Represents an endpoint closer to the camera>Representing endpoints that are farther from the camera;
step 4.5, calculating the center line of the side line of the left trackCounting/or>And &>Midpoint of two end pointsCounting/or>And &>The midpoint of the two end points is->Based on the point>And &>As an input, a straight line extraction algorithm getLineEquation () is called to get the midline of the two trajectories of the left track->Is the parameter (a, b, c) of the general equation of (1), i.e. the central line->Expressed as->ax + by + c =0; obtaining the central line Lr of the two tracks of the right track by the same method t m The flow of the adopted straight line extraction algorithm is shown in figure 2;
at point P 1 And P 2 The pseudo code of the straight line extraction algorithm getlineequalization () as input can be represented as:
Step 4.7, set pointsInner points are each multiplied by a homography matrix>Get its picture in left viewpoint->The projection point set in (4)>/>
Step 4.8, the point set on the middle viewpoint imageProjection point set on left viewpoint image>Projection relationship matrix>Calling opencv-python library function cv2. Triangulatinepoints () of an open source as input, and outputting a 3D coordinate set ^ based on a left track>
Step 4.9 atUniformly sampling K points to form a point set { pr t m,1 ,…,pr t m,k ,…,pr t m,K And (6) repeating the operation of the steps 4.7-4.8, and outputting a point set { pr } t m,1 ,…,pr t m,k ,…,pr t m,K } corresponding set of 3D coordinates +>
Step 5, marking the track width variable as W s Extracting to assembleIn the center of each point with W s Is a cube with a side length and belongs to a scene 3D point cloud>All points within constitute a point set>Wherein +>Is in or on>A set of points extracted for the center point of the cube>Is composed ofN of (1) k Dot, N k Is->The number of the inner points is greater or less>Are respectively based on>X, Y, Z coordinate of (4), (4)>Is the initial point cloud of the left orbit; in the same way, an initial point cloud @ of the right track is obtained>
Step 6, recording the variable of the track elevation as H s And performing height filtering on the initial point cloud of the left track:if its Z coordinate belongs to [ H ] s -△ h ,H s +△ h ]Then it is reserved, otherwise it is selected from the set->Middle deletion, where h Carrying out height filtering on the right track point cloud by the same method for the allowable change value of the track point cloud elevation; the updated left and right track point clouds obtained after filtering are respectively ^ and ^>And &>
Step 7, carrying out point cloud on the left and right tracks at the moment tAnd &>Analyzing data, judging whether the track has irregularity, and if the track has irregularity, judging the irregularity type C t Irregularity parameter PS t And the irregularity position P t ns Recording is performed as shown in fig. 3; the method comprises the following specific steps:
step 7.1, calculating the point cloud of the left orbitEach sub-point in the system is collected>Wherein k represents the position of the sub-point set, to obtain an equalized left-track point cloud coordinate set ≥>Wherein +>
Is collected as a point>Elevation information of the inner point clouds, i.e.>Then the elevation set of the left track point cloud is expressed as ≥>The same method is utilized to obtain a point cloud coordinate set which is equalized on the right track>And an elevation set of a right track point cloud>
7.2, judging whether the track has triangular pit irregularity, and recording irregularity parameters and positions if the track has triangular pit irregularity; the specific process is as follows:
step 7.2.1, calculating the point cloud elevation difference at the parallel position of the left track and the right track according to the formulaGet a set +>
Step 7.2.2, as shown in FIG. 4, if Satisfies the condition>Or is conditional>Then it is indicated that there is a track triangular pit irregularity at time t of the railcar motion, i.e., irregularity type C t Is equal to 1, wherein ∈ h Recording the irregularity parameter of the triangular pit with the tolerance deviation precision of the irregularity of the triangular pit of 5mm>Uneven disease position of triangular pit
7.3, judging whether the track has unevenness, and if so, recording unevenness parameters and positions; the specific process is as follows:
step 7.3.1, respectively calculating elements in the left and right track elevation sets and the standard elevation H h The absolute difference between the two sets is recorded as a left elevation difference set and a right elevation difference setAnd &>Wherein->△Hr t k =|Hr t k -H h |;
Step 7.3.2, as shown in figure 5,if the condition is met>It is then indicated that at time t of the movement of the rail vehicle, there is a high or low irregularity in the left rail, i.e. irregularity type C t Equal to 2, recording the irregularity parameterAnd high and lowRugged disease position->If the condition Δ Hr is satisfied t k ≥δ h Then, it is indicated that there is a high or low irregularity in the right track at time t of the railcar motion, i.e., irregularity type C t Equal to 2, recording the height irregularity parameter PS t =△Hr t k And the height irregularity defect position P t ns =pSPr t k Wherein δ h The tolerance deviation precision of the unevenness is 6mm.
And 7.4, judging whether the track has horizontal irregularity, if so, recording irregularity parameters and positions, wherein the specific process is as follows:
step 7.4.1, calculating the absolute difference of the elevation of the left track and the right track according to the calculation formulaObtaining a set of absolute differences in elevation for a track>
Step 7.4.2, as shown in figure 6,if the condition is met>It is then indicated that at time t of the movement of the rail vehicle, the rail has a horizontal irregularity, i.e. irregularity type C t Equal to 3, recording the horizontal irregularity parameterAnd a horizontal irregularity disease position>Wherein eta h Tolerance accuracy for horizontal irregularitiesThe value is 6mm.
Step 8, calculating the irregularity position P t ns Corresponding GPS positionAs shown in fig. 7; the method comprises the following specific steps:
step 8.1, calculating the unsmooth position P of the rail inspection vehicle at the t moment t Set of point cloud coordinatesMean coordinate (x) of all points in (A) t ,y t ,z t ) According to the conversion relation from the space rectangular coordinate system to the geodetic coordinate system, (x) t ,y t ,z t ) Is a relative coordinate in the geodetic coordinate system>
Step 8.2, the rail inspection vehicle position (P) acquired by the data positioning system at the time t t ,B t ) And as the GPS absolute position of the track, summing the relative coordinates of the GPS absolute position and the track unsmooth position to obtain the GPS absolute position with unsmooth trackWherein P is t ns =P t +wP t ns ,/>
Step 9, making a track disease data set by using the acquired track image data, training target detectors of stripping, fish scale injury, spalling, corrugation and the like of the track based on a YOLOv7 network structure, and obtaining a track disease detection Model ill (ii) a The method comprises the following specific steps:
step 9.1, selecting a target detection Yolov7 network structure for the track disease detection network structure, and modifying a configuration file YOLOv7.Yaml as follows: modifying the classification number into the classification number C of the track diseases ill I.e. setting the number of classes variable nc to C ill The value is 4;
wherein, the YOLOv7 network structure for target detection is the YOLOv7 network structure for general target detection proposed in an article 'YOLOv 7: exchangeable bag-of-free sections new state-of-the-art for real-time object detectors', published by Chien-Yao Wang, alexey Bochkovsky et al in 2022.
Step 9.2, carrying out image acquisition on the C-type track diseases, wherein the total number of the acquired images is N s The number of collected images of each class is
Step 9.3, the structure of the training sample is as follows: uploading the track disease image data to a data annotation website, and performing disease type and disease detection true value frame annotation on the track disease image on the website by using an annotation tool; exporting the marked data set to a file storage path data/train by using a data set exporting function of a website after all the images are marked, creating a data set configuration file data.yaml under the path data/and writing the following contents into the file:
forming a track disease training data set railData by the marked data set and the configuration file;
step 9.4, setting network training parameters in a network training file train.py: the method comprises the following steps that the total iteration number epoch of network training is =100, the number of images batch of network batch processing is =16, the initial learning rate lr of the network training is =0.01, the size W x H of an image input by a network is obtained, an optimizer used in the network training is set to Adam, the initial value step of a variable of the network training number is =1, a training sample data path is data/train, a training working device is set to have a decision =0, the GPU is used for training, and the output model name is yolo7.Pt; the specific command line code is as follows:
step 9.5, defining a network loss function as:
wherein x n Denotes the score, y, for predicting the nth sample as a positive example n A label representing the nth sample, δ representing a sigmoid function;
and 9.6, running the file train in pyy in the conda environment, and performing network training when the variable step of the network training times is>=200 or network Loss function Loss less than 10 -1 And then ending the network training and outputting a track disease detection Model ill 。
Step 10, the orbit image at the time tModel for disease detection ill Py under python conditions is invoked as input with the detection program train under file path Project/yolov7, outputting a disease @>In>And a category pick>Will->Multiply by the homography matrix pick>Get>Projection point on the left viewpoint image->To +>And &>And a 3D to 2D projection matrix +>And &>Calling opencv-python library function cv2.Triangulatepoints () of an open source as input and outputting->Corresponding 3D coordinate P t ill The specific process is as follows:
step 10.1, detecting the imageModel for disease detection ill Py is run under python environment as input, and outputs the detected disease type->The rectangular frame on which the disease is located>WhereinIs determined as having a disease in>In mid position>Is based on the center point coordinates of>And &>Respectively representing the width and the height of the rectangular detection frame;
step 10.2, according to the formula (6), using the homography matrixPick up the image>Position of upper track diseaseProjected to the left viewpoint image->In the previous step, a corresponding disease position on the left viewpoint image is obtained>
Step 10.3, the position of the disease in the middle viewpoint imagePosition of disease in left viewpoint image3D to 2D projection matrix ^ er>As an inputCalling the open-source opencv-python library function cv2.Triangulatepoints (), output 3D coordinate of a track disease ^ 4>
Step 11, calculating the disease position P obtained at the time t of the rail inspection vehicle by the same method as the step 8 t ill In 3D coordinates of (a) and (b)
The rail defect detection image is shown in fig. 8, in which (a), (b), and (c) respectively represent rail spalling, rail fracture, and rail debris.
The rail disease detection network constructed by the method of the invention is tested on the rail image set, and the detection result is objectively evaluated by adopting the following indexes:
(1) Precision (P). The ratio of the samples whose detection results are true and which are correct to all the samples detected as true is indicated.
(2) Recall (R). The ratio of the sample whose detection result is true and which is correct to the total sample which is actually true is represented.
(3) F1Score: the harmonic average of the accuracy rate and the recall rate and the comprehensive measurement of the detection performance of the model are as follows:
and (3) carrying out performance test on the rail disease model detection according to the evaluation indexes, wherein the results are shown in table 1:
TABLE 1
The rail irregularity detection performance test is carried out on the rail irregularity detection method provided by the invention, and new objective evaluation indexes are added on the basis of P, R and F1Score in evaluation indexes: accuracy (Acc), which represents the proportion of samples detected correctly to the total samples.
The performance of the track irregularity detection method provided by the invention is judged according to the evaluation indexes, and the result is shown in table 2:
TABLE 2
As can be seen from tables 1 and 2, the method of the invention can obtain more accurate detection results on the execution of track diseases and track irregularity detection tasks, and the effectiveness of the method is proved. The subjective and objective results show that the method can well detect and identify the track disease image and the track point cloud, and the detection result reflects the high efficiency and the accuracy of the method. In addition, compared with the traditional track detection method, the method realizes the rapid and accurate detection and analysis of track diseases and track irregularity on the premise that the detection precision meets the requirement, and reduces the labor cost.
Through the mode, the intelligent detection and positioning method for the track irregularity and the diseases is based on the problems that the existing track irregularity and disease monitoring system on the market needs manual cooperation, is low in intelligentization and integration, poor in dynamic monitoring and sensing effects, high in labor cost and the like, and the mobile measurement method capable of detecting and positioning the track irregularity and the diseases of the railway in a walking and detecting mode is designed to achieve accurate and rapid detection and analysis of the track irregularity and the diseases. Therefore, the invention carries out three-dimensional reconstruction on the track and detects and positions the unevenness of triangular pits, height, level and the like of the track through the elevation analysis of point cloud by collecting and analyzing the data of the trinocular camera and the GPS sensor which are arranged on the track inspection vehicle; and on the other hand, the image target deep learning detection model is adopted to detect and position the defects of stripping, fish scale injury, layer crack, corrugation and the like on the track. Compared with the traditional detection method, the track irregularity detection and positioning method based on the stereoscopic vision is fast and efficient, can save manpower and material resources to a certain extent, and can be conveniently installed on a track inspection vehicle.
Claims (10)
1. The intelligent detection and positioning method for the track irregularity and the diseases is characterized in that: the method comprises the following steps:
step 1, building a data positioning system and a data acquisition system on a T-shaped rail inspection vehicle, and acquiring position information { (P) of the rail inspection vehicle under a WGS84 coordinate system by using the data positioning system t ,B t ) In which P is t And B t Respectively representing the geodetic longitude and the dimension value of the rail inspection vehicle at the time T, wherein T is more than or equal to 1 and less than or equal to T, and T is the total acquisition time and also is the number of acquired data;
step 2, collecting a t-time orbit image sequence from three viewpoints by using a three-eye camera on a moving track inspection vehicle Respectively a left viewpoint image, a middle viewpoint image and a right viewpoint image of the t-time orbit, andrespectively storing to obtain track image sequences;
step 3, taking the track image sequence as input, and generating a 3D point cloud of the track scene at the time t by using a three-dimensional point cloud generation methodGet at the same time>Projection relation matrix to each viewpoint image->And &>A homography matrix is also obtained between the middle viewpoint image and the left and right viewpoint images->And &>
Step 4, taking the middle viewpoint track image of the t momentAs input, two side lines of the left track are respectively extracted by means of a straight line extraction method>And two side lines of the right track>Extraction>And &>In the midline>Is at>Evenly sampling K points on the upper part to form a point set>Multiplying by a homography matrix between the mid-view and left-view imagesGet the left viewpoint image->On projection point set->Set of handle pointsProjection relation matrix->And &>Calling opencv-python library function cv2.Triangulatepoints () of an open source as input, and outputting the result of ^ based on>Corresponding set of 3D coordinates->Extraction>And Lr t 2 Central line Lr of t m At Lr, at t m Evenly sampling K points on the upper part to form a point set>The same method is used to obtain the point set->Corresponding 3D coordinate->
Step 5, marking the track width variable as W s Extracting to assembleCentering on each point and using W s Is a cube with a side length and belongs to a scene 3D point cloud>All points within constitute a point set>Wherein->Is/is>A point set extracted for the center point of the cube> Is->N of (1) k Dot, N k Is->The number of inner points is greater than or equal to> Are respectively asX, Y, Z coordinate of (4), (4)>Is the initial point cloud of the left orbit; in the same way, an initial point cloud @ of the right track is obtained>
Step 6, recording the variable of the track elevation as H s Performing height filtering on the initial point cloud of the left track, and performing height filtering on the point cloud of the right track by the same method; the updated left and right track point clouds obtained after filtering are respectivelyAnd
step 7, carrying out point cloud on the left and right tracks at the moment tAnd &>Analyzing data, judging whether the track has irregularity, and if the track has irregularity, judging the irregularity type C t Irregularity parameter PS t And the unsmooth position P t ns Recording;
Step 9, making a track disease data set by using the acquired track image data, training a target detector based on stripping, fish scaling, spalling and corrugation of a track of a YOLOv7 network structure, and obtaining a track disease detection Model ill ;
Step 10, the orbit image at the time tModel for disease detection ill Py under python conditions is invoked as input with the detection program train under file path Project/yolov7, outputting a disease @>In>And a category pick>Will be/are>Multiply by a homography matrix>Get->Projection point on left viewpoint image->To be->And &>And a 3D to 2D projection matrix +>And &>As an input, an open-source opencv-python library function cv2.TriangulatePoints () is called, and an output ^ is expressed>Corresponding 3D coordinate +>
Step 11, calculating the disease position obtained at the t moment of the rail inspection vehicle by using the same method as the step 83D coordinates in (a) & r>
2. The intelligent detection and positioning method for the track irregularity and the diseases according to claim 1, characterized in that the specific steps of step 4 are as follows:
step 4.1, orbit imageAs an input, a Python programming language opencv-Python library function cv2. Immead () is called to ^ be ^ or ^ be ^ based>Conversion into a grayscale map>
Step 4.2, gray level mapAs an input, call Python programming language opencv-Python library function cv2.Gaussian blur () pair>Gaussian filtering is performed to obtain a filtered image->
Step 4.3, with the filtered imageIs input intoCalling the Python programming language opencv-Python library function cv2.Canny () pair->Performing edge detection processing to obtain an edge image->
Step 4.4, with edge imageTo enter, call Python programming language opencv-Python library function cv2.HoughLinesP () vs>Performing track line extraction to obtain left and right side lines of the left track>And the left and right side lines of the right track>The representation form of two end points of the 4 edge lines is respectively Wherein it is present>Represents an endpoint closer to the camera>Representing endpoints that are farther from the camera;
step 4.5, calculating the side line of the left trackOfCounting/or>And &>The midpoint of the two end points is->Counting/or>And &>The midpoint of the two end points is->Based on the point>And &>Respectively as input, calling a straight line extraction algorithm getLineEquation () to obtain the central line (or the line) of the two tracks of the left track>Is the parameter (a, b, c) of the general equation of (1), i.e. the central line->Is expressed as->By using the sameThe method obtains the center line Lr of the two tracks of the right track t m ;
Step 4.7, point setThe inner points are each multiplied by a homography matrix->Get its picture in left viewpoint->Projection point set in (1;)>
Step 4.8, the point set on the middle viewpoint imageProjection point set on left viewpoint imageProjection relation matrix->Calling opencv-python library function cv2. Triangulatinepoints () of an open source as input, and outputting a 3D coordinate set ^ based on a left track>
3. The intelligent detection and positioning method for the track irregularity and the disease according to claim 1, wherein the height filtering process of the initial point cloud of the left track in step 6 is as follows:if its Z coordinate belongs to [ H ] s -△ h ,H s +△ h ]If not, then reserve, otherwise slave set +>Middle deletion, where h And allowing a change value for the track point cloud elevation.
4. The intelligent detecting and positioning method for the unevenness and the diseases of the track according to claim 1, characterized in that the specific steps of step 7 are as follows:
step 7.1, calculating the point cloud of the left orbitEach sub-point in the system is collected>In which k represents the location of the sub-point set to obtain an averaged point cloud coordinate set &>Wherein-> Set of points>Elevation information of the inner point clouds, i.e.>Then the elevation set of the left track point cloud is expressed as ≥>The same method is utilized to obtain a point cloud coordinate set which is equalized on the right track>And an elevation set of a right track point cloud>
7.2, judging whether the track has triangular pit irregularity, and recording irregularity parameters and positions if the track has triangular pit irregularity;
7.3, judging whether the track has unevenness, and if so, recording unevenness parameters and positions;
and 7.4, judging whether the track has horizontal irregularity, and if so, recording irregularity parameters and positions.
5. The intelligent detection and positioning method for the track irregularity and the disease according to claim 4, characterized in that the specific process of step 7.2 is as follows:
step 7.2.1, calculating the point cloud elevation difference at the parallel position of the left track and the right track according to the formulaGet the set->
Step 7.2.2, if Satisfies the condition>Or a condition>It is then indicated that at time t of the movement of the rail vehicle there is a track crater irregularity, i.e. irregularity type C t Is equal to 1, wherein ∈ h Recording the irregularity parameter of the triangular pit for the tolerance deviation precision of the irregularity of the triangular pit>The position which is not smooth with the triangular pit is judged>
6. The intelligent detecting and positioning method for the unevenness and the diseases of the track according to claim 4, characterized in that the specific process of step 7.3 is as follows:
step 7.3.1, respectively calculating elements in the left and right track elevation sets and the standard elevation H h The absolute difference between the two is recorded as a left and right elevation difference setAnd &>Wherein +>
Step 7.3.2,If the condition is met>It is then indicated that at time t of the movement of the rail vehicle, there is a high or low irregularity in the left rail, i.e. irregularity type C t Equal to 2, the irregularity parameter is recorded>And uneven disease position>If the condition is met>It is then indicated that at time t of the movement of the rail vehicle, there is a high or low irregularity in the right rail, i.e. irregularity type C t Equal to 2, the irregularity parameter is recorded>And uneven disease position>Wherein delta h The tolerance accuracy of the unevenness is high.
7. The intelligent detecting and positioning method for the unevenness and the diseases of the track according to claim 4, characterized in that the specific process of step 7.4 is as follows:
step 7.4.1, calculating the absolute difference of the elevation of the left track and the right track according to the calculation formulaObtaining a set of absolute differences in elevation for a track>
Step 7.4.2,If the condition is met>It is indicated that there is a horizontal irregularity in the rail at time t of the movement of the rail vehicle, i.e., irregularity type C t Equal to 3, recording a horizontal irregularity parameter>And a horizontal irregularity disease position>Wherein eta h The tolerance accuracy of the horizontal irregularity. />
8. The intelligent detecting and positioning method for the unevenness and the diseases of the track according to claim 1, characterized in that the specific steps of step 8 are as follows:
step 8.1 of calculating the unsmooth position P of the rail inspection vehicle at the t moment t Set of point cloud coordinatesMean coordinate (x) of all points in (1) t ,y t ,z t ) According to the conversion relation from the space rectangular coordinate system to the geodetic coordinate system, (x) t ,y t ,z t ) Is a relative coordinate in the geodetic coordinate system>
Step 8.2, the rail inspection vehicle position (P) acquired by the data positioning system at the time t t ,B t ) And as the GPS absolute position of the track, summing the relative coordinates of the GPS absolute position and the track unsmooth position to obtain the GPS absolute position with unsmooth trackWherein->
9. The intelligent detection and positioning method for the track irregularity and the diseases according to claim 1, characterized in that the specific steps in step 9 are as follows:
step 9.1, selecting a target detection Yolov7 network structure for the track disease detection network structure, and modifying a configuration file YOLOv7.Yaml as follows: modifying the classification number into the classification number C of the track diseases ill I.e. setting the number of classes variable nc to C ill The value is 4;
step 9.2, carrying out image acquisition on the C-type track diseases, wherein the total number of the acquired images is N s The number of the collected images of each class is
Step 9.3, the structure of the training sample is as follows: uploading the track disease image data to a data marking website, and marking the disease type and the disease detection true value frame of the track disease image on the website by using a marking tool; exporting the marked data set to a file storage path data/train by using a data set export function of a website after all the images are marked, creating a data set configuration file data.yaml under the path data/train, and forming a track disease training data set railData by using the marked data set and the configuration file;
step 9.4, setting network training parameters in a network training file train.py: the method comprises the following steps that the total iteration number epoch of network training is =100, the number of images batch of network batch processing is =16, the initial learning rate lr of the network training is =0.01, the size W x H of an image input by a network is obtained, an optimizer used in the network training is set to Adam, the initial value step of a variable of the network training number is =1, a training sample data path is data/train, a training working device is set to have a decision =0, the GPU is used for training, and the output model name is yolo7.Pt;
step 9.5, defining a network loss function as:
wherein x n Represents the score, y, of predicting the nth sample as a positive example n A label representing the nth sample, δ representing a sigmoid function;
and 9.6, running the file train in py in the conda environment, and performing network training when the variable step of the network training times is used>=200 or network Loss function Loss less than 10 -1 And then ending the network training and outputting a track disease detection Model ill 。
10. The intelligent detection and positioning method for the track irregularity and the diseases according to claim 1, characterized in that the specific process of step 10 is as follows:
step 10.1, detecting the imageModel for disease detection ill Py is run under python environment as input, and outputs the detected disease type->The rectangular frame on which the disease is located>WhereinIs determined as having a disease in>Middle position->Is based on the center point coordinates of>And &>Respectively representing the width and the height of the rectangular detection frame;
step 10.2, according to the formula (6), utilizing the homography matrixImage combination>Position of an upper track disease>Projected to left viewpoint image->And obtaining the corresponding disease position on the left viewpoint image>
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211726114.5A CN115908400A (en) | 2022-12-30 | 2022-12-30 | Intelligent detection and positioning method for track irregularity and diseases |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211726114.5A CN115908400A (en) | 2022-12-30 | 2022-12-30 | Intelligent detection and positioning method for track irregularity and diseases |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115908400A true CN115908400A (en) | 2023-04-04 |
Family
ID=86476353
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211726114.5A Pending CN115908400A (en) | 2022-12-30 | 2022-12-30 | Intelligent detection and positioning method for track irregularity and diseases |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115908400A (en) |
-
2022
- 2022-12-30 CN CN202211726114.5A patent/CN115908400A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103499585B (en) | Based on noncontinuity lithium battery film defect inspection method and the device thereof of machine vision | |
CN109059775B (en) | Steel rail abrasion detection method with image edge extraction step | |
CN108189859B (en) | Method for judging two laser image characteristics as related redundant characteristics | |
CN104063873A (en) | Shaft sleeve part surface defect on-line detection method based on compressed sensing | |
CN113487533B (en) | Part assembly quality digital detection system and method based on machine learning | |
CN113506269A (en) | Turnout and non-turnout rail fastener positioning method based on deep learning | |
CN112884717A (en) | System and method for real-time workpiece surface detection and tool life prediction | |
Han et al. | A machine-learning classification approach to automatic detection of workers' actions for behavior-based safety analysis | |
CN114324401A (en) | Full-coverage type pipeline detection system based on annular multi-beam sonar | |
CN111017151B (en) | Method for positioning by using laser three-dimensional projection in ship body construction | |
CN113848209B (en) | Dam crack detection method based on unmanned aerial vehicle and laser ranging | |
Xue et al. | A high efficiency deep learning method for the x-ray image defect detection of casting parts | |
CN110672632A (en) | Tunnel disease identification method | |
CN116678368B (en) | BIM technology-based intelligent acquisition method for assembled steel structure data | |
CN115908400A (en) | Intelligent detection and positioning method for track irregularity and diseases | |
CN206019585U (en) | Rail Abrasion Detection System system | |
CN109766794B (en) | Automatic real-time road detection method and system thereof | |
CN117191781A (en) | Nondestructive testing system and method for micro array hole through hole rate of composite wallboard | |
Koch et al. | Machine vision techniques for condition assessment of civil infrastructure | |
CN115331136A (en) | Monitoring method for bridge construction | |
CN108181315B (en) | Image processing-based biscuit damage detection device and detection method | |
CN112255383A (en) | Water quality monitoring analysis system based on big data | |
CN111102932A (en) | Automatic inspection method and system for foundation pit safety | |
Delina et al. | Optimizing viscosity measurement: an automated solution with YOLOv3 | |
CN109472371B (en) | Large bridge structure operation management system and method |
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 |