Rolov5 deep learning-based railway track identification method and system
By using yolov5 deep learning in the railway track recognition system combined with adaptive weight nonlinear curve fitting and improving the zebra optimization algorithm, the problem of turnout recognition accuracy during train automation is solved, high-precision turnout recognition and classification is achieved, and the safety and stability of the train is improved.
Patent Information
- Application Number
- CN202510241949.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-17
AI Technical Summary
During the automatic driving of the train, it is necessary to accurately identify and classify the switches in front to ensure the safe and smooth arrival of the train, but it is difficult for the existing technology to achieve this goal.
The identification method based on yolov5 deep learning is adopted, combining the adaptive weight nonlinear curve fitting algorithm for global search and an improved zebra optimization algorithm based on crazy adaptive dynamic learning factors to identify and classify the switches of railway tracks.
It realizes the precise identification and classification of railway track switches, reduces manual errors, and improves the stability and safety of train driving.
Smart Images

Figure CN120164180A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of railway track recognition, and in particular, to a method and system for recognizing railway tracks based on yolov5 deep learning. Background Art
[0002] During the running of a train, it needs to pass through turnouts of different tracks for steering and reaching the destination. Among them, the key components of the turnout include the switch rail, stock rail, and guard rail. The switch rail is an important component in the point mechanism. By moving the switch rail, the train is guided into the main line or the siding direction. The stock rail is made of a standard-section ordinary rail with a length of 12.5 m or 25 m. The main track is straight, and the side track is bent into a specified broken line or a curved shape according to the gauge of each part of the point mechanism in the factory in advance. The guard rail refers to the rail laid inside the inner side of the rail on the track that does not bear the vertical load of the wheels. It has different functions according to the laying location. The guard rail at the turnout frog is laid on the inner side of the rail opposite to the harmful space of the frog, guiding the wheels through the harmful space and avoiding hitting the tip of the crossing heart. The guard rail on the bridge can prevent the derailed vehicle from hitting the bridge or falling off the bridge; the guard rail is laid on the inner side of the inner rail on the small-radius curve to reduce the wear of the outer rail side.
[0003] However, for the automatic running of the train, it is necessary to accurately identify and classify the turnout ahead, so as to ensure that the train can reach the destination safely and smoothly. Therefore, how to accurately identify and classify the turnout of the railway track ahead to ensure the correct forward direction of the train has become an urgent problem for us to solve. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method and system for recognizing railway tracks based on yolov5 deep learning, which can not only accurately identify and classify the turnout of the railway track by combining the yolov5 deep learning detection model, but also does not require manual participation in the whole process, reducing human errors and improving the running stability and safety of the train.
[0005] To achieve the above object and other related objects, the technical solution provided by the present invention is as follows:
[0006] A method for recognizing railway tracks based on yolov5 deep learning, the method comprising:
[0007] U1. Input the image data information of the railway track collected in real time into the trained yolov5 deep learning detection model to identify and classify the switch rail, stock rail, and guard rail of the railway track, and obtain the matrix data information of the position points of the switch rail, stock rail, and guard rail of the railway track;
[0008] U2. Based on the data information of the matrix of the position points of the switch rail, stock rail and guard rail of the railway track, an adaptive weight non-linear curve fitting algorithm for global search is used to fit the contour lines of the switch rail, stock rail and guard rail of the railway track, and the data information of the set of contour lines of the switch rail, stock rail and guard rail of the fitted railway track is obtained;
[0009] U3. Based on the data information of the set of contour lines of the switch rail, stock rail and guard rail of the fitted railway track, an improved zebra optimization algorithm based on a crazy adaptive dynamic learning factor is used to optimize the contour lines of the switch rail, stock rail and guard rail of the railway track, and the data information of the contour lines of the switch rail, stock rail and guard rail of the optimized railway track is obtained;
[0010] U4. Based on the data information of the contour lines of the switch rail, stock rail and guard rail of the optimized railway track, a turnout classification model of the railway track is constructed to identify the type of the turnout of the railway track, and the data information of the turnout type of the railway track is obtained.
[0011] Further, the method further includes:
[0012] U5. Based on the data information of the turnout type of the railway track, a deep learning network model for railway track recognition is constructed to represent the overall layout of the railway track, and the data information of the overall layout dot matrix of the railway track is output.
[0013] Further, in step U5, the constructing a deep learning network model for railway track recognition to represent the overall layout of the railway track includes:
[0014] U51. Based on the data information of the turnout type of the railway track, a turnout type data set of the railway track is constructed;
[0015] U52. The turnout type data set of the railway track is input into the deep learning network model for railway track recognition for training and learning to determine the overall layout function Q of the railway track,
[0016] where x is the turnout type data set of the railway track, f(x) is the railway track function matching the turnout type, and α1, α2 and α3 are the penalty factors of the deep learning network model, and the trained deep learning network model for railway track recognition is obtained;
[0017] U53. Based on the trained deep learning network model for railway track recognition, the turnout type data set of the railway track is input to represent the overall layout of the railway track, and the data information of the overall layout dot matrix of the railway track is output.
[0018] Further, the penalty factors α1, α2, and α3 of the deep learning network model are
[0019]
[0020] where x is the turnout type dataset of the railway track.
[0021] Further, in step U2, the use of the adaptive weight non-linear curve fitting algorithm for global search to fit the contour lines of the switch rail, stock rail, and guard rail of the railway track includes:
[0022] U21. Based on the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track, establish a position outlier rejection function W for the railway track for global search,
[0023] where y is the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track, and β1, β2, and β3 are the position outlier weight factors of the railway track, to reject the position outliers of the switch rail, stock rail, and guard rail of the railway track, and obtain the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track after rejection;
[0024] U22. Based on the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track after rejection, establish a non-linear curve fitting function R with adaptive weights,
[0025]
[0026] where z is the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track after rejection, and δ1, δ2, and δ3 are the adaptive weight coefficients;
[0027] U23. Based on the non-linear curve fitting function R with adaptive weights, fit the contour lines of the switch rail, stock rail, and guard rail of the railway track, and obtain the data information of the set of the contour lines of the switch rail, stock rail, and guard rail of the railway track after fitting.
[0028] Further, the adaptive weight coefficients δ1, δ2, and δ3 are
[0029]
[0030] where z is the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track after rejection.
[0031] Further, in step U3, the optimization of the contour lines of the switch rail, stock rail, and guard rail of the railway track by using the improved zebra optimization algorithm based on the crazy adaptive dynamic learning factor includes:
[0032] U31. Based on the data information of the set of contour lines of the switch rail, stock rail, and guard rail of the fitted railway track, initialize the zebra population, determine the population parameters and the maximum number of iterations T, and obtain the data information of the initialized zebra population;
[0033] U32. Based on the data information of the initialized zebra population, establish the fitness value function G of the population individuals,
[0034]
[0035] where r is the data information of the initialized zebra population, and γ1, γ2, and γ3 are the discount factors of the zebra population individuals, and deduce the fitness values of the population individuals to obtain the data information of the fitness values of the population individuals;
[0036] U33. Based on the data information of the fitness values of the population individuals, establish the objective optimization function H,
[0037]
[0038] where h is the data information of the fitness values of the population individuals, and λ1, λ2, and λ3 are the crazy adaptive dynamic learning factors, and optimize the contour lines of the switch rail, stock rail, and guard rail of the railway track to obtain the data information of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track.
[0039] Further, the crazy adaptive dynamic learning factors λ1, λ2, and λ3 are
[0040]
[0041] where h is the data information of the fitness values of the population individuals.
[0042] Further, in step U4, the construction of the turnout classification model of the railway track to identify the type of the turnout of the railway track includes:
[0043] U41. Based on the data information of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track, construct a dataset of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track;
[0044] U42. Input the dataset of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track into the turnout classification model of the railway track for training and learning, and determine the turnout classification function S of the railway track,
[0045]
[0046] Among them, q is the data set of the outline lines of the switch rail, stock rail, and guard rail of the optimized railway track, and ρ1, ρ2, and ρ3 are the comparison factors of the turnout of the railway, to obtain a trained turnout classification model for the railway track;
[0047] U43. Based on the trained turnout classification model of the railway track, input the data information of the outline lines of the switch rail, stock rail, and guard rail of the optimized railway track, distinguish the type of the turnout of the railway track, and obtain the data information of the type of the turnout of the railway track.
[0048] Further, in step U1, the trained yolov5 deep learning detection model includes:
[0049] U11. Collect the image data information of the switch rail, stock rail, and guard rail of the railway track, and construct an image data set of the switch rail, stock rail, and guard rail of the railway track;
[0050] U12. Input the image data set of the switch rail, stock rail, and guard rail of the railway track into the yolov5 deep learning detection model for training and learning, to obtain a trained yolov5 deep learning detection model.
[0051] To achieve the above object and other related objects, the present invention also provides a system for implementing the recognition method of the railway track based on yolov5 deep learning described in any one of the above, the system includes:
[0052] An image data acquisition module for the railway track, configured to input the image data information of the railway track collected in real time into the trained yolov5 deep learning detection model, identify and classify the switch rail, stock rail, and guard rail of the railway track, and obtain the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track;
[0053] A curve fitting module for the railway track, connected to the image data acquisition module for the railway track, configured to fit the outline lines of the switch rail, stock rail, and guard rail of the railway track by using an adaptive weight non-linear curve fitting algorithm for global search, to obtain the data information of the set of the outline lines of the switch rail, stock rail, and guard rail of the railway track after fitting;
[0054] A curve optimization module for the railway track, connected to the curve fitting module for the railway track, configured to optimize the outline lines of the switch rail, stock rail, and guard rail of the railway track by using an improved zebra optimization algorithm based on a crazy adaptive dynamic learning factor, to obtain the data information of the outline lines of the switch rail, stock rail, and guard rail of the optimized railway track;
[0055] The turnout type discrimination module of the railway track, which is connected to the curve optimization module of the railway, is used to construct a turnout classification model for the railway track to discriminate the type of the turnout of the railway track and obtain the data information of the type of the turnout of the railway track;
[0056] The recognition module of the railway track, which is connected to the turnout type discrimination module of the railway track, is used to construct a deep learning network model for the recognition of the railway track to represent the overall layout of the railway track and output the data information of the overall layout lattice of the railway track.
[0057] The present invention has the following positive effects:
[0058] 1. By adopting the adaptive weight non-linear curve fitting algorithm for global search to fit the contour lines of the switch rail, stock rail and guard rail of the railway track, and combining with the improved zebra optimization algorithm based on the crazy adaptive dynamic learning factor to optimize the contour lines of the switch rail, stock rail and guard rail of the railway track, the present invention can not only accurately identify the contour lines of the switch rail, stock rail and guard rail of the railway track, facilitate the subsequent identification and classification of the turnout types of the railway track, but also has strong robustness in the whole process and can adaptively and dynamically identify the switch rail, stock rail and guard rail of the railway track according to different data inputs, further improving the recognition accuracy.
[0059] 2. By inputting the image data information of the railway track collected in real time into the trained yolov5 deep learning detection model to identify and classify the switch rail, stock rail and guard rail of the railway track, constructing a turnout classification model for the railway track to discriminate the type of the turnout of the railway track, and then combining with constructing a deep learning network model for the recognition of the railway track to represent the overall layout of the railway track, the present invention can not only accurately discriminate and classify the turnout of the railway track in combination with the yolov5 deep learning detection model, but also does not require manual participation in the whole process, reducing manual errors and improving the driving stability and safety of the train. Description of the Drawings
[0060] Figure 1 is a schematic flow chart of the method of the present invention;
[0061] Figure 2 is a schematic flow chart of the adaptive weight non-linear curve fitting algorithm for global search of the present invention;
[0062] Figure 3 is a schematic flow chart of the improved zebra optimization algorithm based on the crazy adaptive dynamic learning factor of the present invention;
[0063] Figure 4 is a schematic flow chart of constructing the turnout classification model of the railway track of the present invention;
[0064] Figure 5 It is a schematic flow chart of constructing a deep learning network model for identifying railway tracks in the present invention;
[0065] Figure 6 It is a schematic diagram of the system framework of the present invention;
[0066] Figure 7 It is a schematic diagram (I) of identifying railway tracks in the present invention;
[0067] Figure 8 It is a schematic diagram (II) of identifying railway tracks in the present invention;
[0068] Figure 9 It is a schematic diagram (III) of identifying railway tracks in the present invention;
[0069] Figure 10 It is a schematic diagram (I) of identifying railway tracks at night in the present invention;
[0070] Figure 11 It is a schematic diagram (II) of identifying railway tracks at night in the present invention. Detailed implementation manners
[0071] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0072] Embodiment 1: As Figure 1 or Figure 7 or Figure 8 or Figure 9 shown, a method for identifying railway tracks based on yolov5 deep learning, the method includes:
[0073] U1. Input the image data information of the railway tracks collected in real time into the trained yolov5 deep learning detection model, identify and classify the switch rails, stock rails, and guard rails of the railway tracks, and obtain the data information of the matrix of the position points of the switch rails, stock rails, and guard rails of the railway tracks;
[0074] U2. Based on the data information of the matrix of the position points of the switch rails, stock rails, and guard rails of the railway tracks, use an adaptive weight non-linear curve fitting algorithm for global search to fit the contour lines of the switch rails, stock rails, and guard rails of the railway tracks, and obtain the data information of the set of the contour lines of the switch rails, stock rails, and guard rails of the railway tracks after fitting;
[0075] U3. Based on the data information of the contour line sets of the switch rail, stock rail, and guard rail of the railway track after fitting, use an improved zebra optimization algorithm based on a crazy adaptive dynamic learning factor to optimize the contour lines of the switch rail, stock rail, and guard rail of the railway track, and obtain the data information of the contour lines of the switch rail, stock rail, and guard rail of the optimized railway track;
[0076] U4. Based on the data information of the contour lines of the switch rail, stock rail, and guard rail of the optimized railway track, construct a turnout classification model for the railway track to identify the type of the turnout of the railway track, and obtain the data information of the turnout type of the railway track.
[0077] In this embodiment, as Figure 2 shown, in step U2, the use of the adaptive weight non-linear curve fitting algorithm for global search to fit the contour lines of the switch rail, stock rail, and guard rail of the railway track includes:
[0078] U21. Based on the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track, establish a position outlier elimination function W for the railway track for global search,
[0079] where y is the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track, and β1, β2, and β3 are the position outlier weight factors of the railway track, and eliminate the position outliers of the switch rail, stock rail, and guard rail of the railway track to obtain the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track after elimination;
[0080] U22. Based on the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track after elimination, establish a non-linear curve fitting function R with adaptive weights,
[0081]
[0082] where z is the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track after elimination, and δ1, δ2, and δ3 are the adaptive weight coefficients;
[0083] U23. Based on the non-linear curve fitting function R with adaptive weights, fit the contour lines of the switch rail, stock rail, and guard rail of the railway track to obtain the data information of the contour line sets of the switch rail, stock rail, and guard rail of the railway track after fitting.
[0084] In this embodiment, the adaptive weight coefficients δ1, δ2, and δ3 are
[0085]
[0086] Among them, z is the data information of the position point matrix of the switch rail, stock rail, and guard rail of the railway track after elimination.
[0087] In the embodiment, as Figure 3 shown, since step U3, the optimization of the contour lines of the switch rail, stock rail, and guard rail of the railway track by using the improved zebra optimization algorithm based on the crazy adaptive dynamic learning factor includes:
[0088] U31. Based on the data information of the contour line set of the switch rail, stock rail, and guard rail of the fitted railway track, initialize the zebra population, determine the population parameters and the maximum number of iterations T, and obtain the data information of the initialized zebra population;
[0089] U32. Based on the data information of the initialized zebra population, establish the fitness value function G of the population individuals,
[0090]
[0091] where r is the data information of the initialized zebra population, γ1, γ2, and γ3 are the discount factors of the zebra population individuals, and deduce the fitness values of the population individuals to obtain the data information of the fitness values of the population individuals;
[0092] U33. Based on the data information of the fitness values of the population individuals, establish the target optimization function H,
[0093]
[0094] where h is the data information of the fitness values of the population individuals, λ1, λ2, and λ3 are the crazy adaptive dynamic learning factors, and optimize the contour lines of the switch rail, stock rail, and guard rail of the railway track to obtain the data information of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track.
[0095] In this embodiment, the crazy adaptive dynamic learning factors λ1, λ2, and λ3 are
[0096] where h is the data information of the fitness values of the population individuals.
[0097] In this embodiment, by integrating the improved zebra optimization algorithm based on the crazy adaptive dynamic learning factor and the adaptive weight nonlinear curve fitting algorithm for global search, the turnout of the railway track is accurately analyzed. During the analysis process, the railway track can be identified and classified according to the characteristics of the railway track, providing data interaction and support for the safe driving of automated trains.
[0098] Embodiment 2: Based on the recognition method of railway tracks using YOLOv5 deep learning in Embodiment 1, the present invention will be further described and explained below.
[0099] As Figure 1 or Figure 7 or Figure 8 or Figure 9 shown, a recognition method of railway tracks using YOLOv5 deep learning, the method includes:
[0100] U1. Input the image data information of the railway tracks collected in real time into the trained YOLOv5 deep learning detection model to identify and classify the switch rails, stock rails, and guard rails of the railway tracks, and obtain the data information of the matrix of the position points of the switch rails, stock rails, and guard rails of the railway tracks;
[0101] U2. Based on the data information of the matrix of the position points of the switch rails, stock rails, and guard rails of the railway tracks, use an adaptive weight non-linear curve fitting algorithm for global search to fit the contour lines of the switch rails, stock rails, and guard rails of the railway tracks, and obtain the data information of the set of the contour lines of the switch rails, stock rails, and guard rails of the railway tracks after fitting;
[0102] U3. Based on the data information of the set of the contour lines of the switch rails, stock rails, and guard rails of the railway tracks after fitting, use an improved zebra optimization algorithm based on a crazy adaptive dynamic learning factor to optimize the contour lines of the switch rails, stock rails, and guard rails of the railway tracks, and obtain the data information of the contour lines of the switch rails, stock rails, and guard rails of the railway tracks after optimization;
[0103] U4. Based on the data information of the contour lines of the switch rails, stock rails, and guard rails of the railway tracks after optimization, construct a turnout classification model for the railway tracks to identify the types of turnouts of the railway tracks, and obtain the data information of the turnout types of the railway tracks.
[0104] In the embodiment, the method further includes:
[0105] U5. Based on the data information of the turnout types of the railway tracks, construct a deep learning network model for the recognition of the railway tracks to represent the overall layout of the railway tracks, and output the data information of the overall layout dot matrix of the railway tracks.
[0106] In this embodiment, as Figure 5 shown, in step U5, the construction of the deep learning network model for the recognition of the railway tracks to represent the overall layout of the railway tracks includes:
[0107] U51. Based on the data information of the turnout types of the railway tracks, construct a turnout type dataset for the railway tracks;
[0108] U52. Input the turnout type data set of the railway track into the identified deep learning network model of the railway track for training and learning to determine the overall layout function Q of the railway track,
[0109] where x is the turnout type data set of the railway track, f(x) is the railway track function matching the turnout type, and α1, α2, and α3 are the penalty factors of the deep learning network model, to obtain the trained identified deep learning network model of the railway track;
[0110] U53. Based on the trained identified deep learning network model of the railway track, input the turnout type data set of the railway track to characterize the overall layout of the railway track and output the data information of the overall layout lattice of the railway track.
[0111] In this embodiment, the penalty factors α1, α2, and α3 of the deep learning network model are
[0112]
[0113] where x is the turnout type data set of the railway track.
[0114] In this embodiment, as Figure 4 shown, in step U4, the construction of the turnout classification model of the railway track to identify the type of the turnout of the railway track includes:
[0115] U41. Based on the data information of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track, construct a data set of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track;
[0116] U42. Input the data set of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track into the turnout classification model of the railway track for training and learning to determine the turnout classification function S of the railway track,
[0117]
[0118] where q is the data set of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track, and ρ1, ρ2, and ρ3 are the comparison factors of the turnout of the railway track, to obtain the trained turnout classification model of the railway track;
[0119] U43. Based on the trained turnout classification model of the railway track, input the data information of the optimized contour lines of the switch rail, stock rail, and guard rail of the railway track to identify the type of the turnout of the railway track and obtain the data information of the turnout type of the railway track.
[0120] In this embodiment, in step U1, the trained yolov5 deep learning detection model includes:
[0121] U11. Collect the image data information of the switch rail, stock rail, and guard rail of the railway track, and construct an image data set of the switch rail, stock rail, and guard rail of the railway track;
[0122] U12. Input the image data set of the switch rail, stock rail, and guard rail of the railway track into the yolov5 deep learning detection model for training and learning to obtain the trained yolov5 deep learning detection model.
[0123] In this embodiment, as Figure 6 shown, the present invention also provides a system for implementing the recognition method of the railway track based on yolov5 deep learning described in any one of the above, and the system includes:
[0124] An image data acquisition module for the railway track, which is used to input the image data information of the railway track collected in real time into the trained yolov5 deep learning detection model, identify and classify the switch rail, stock rail, and guard rail of the railway track, and obtain the data information of the matrix of the position points of the switch rail, stock rail, and guard rail of the railway track;
[0125] A curve fitting module for the railway track, connected to the image data acquisition module for the railway track, which is used to fit the contour lines of the switch rail, stock rail, and guard rail of the railway track by using an adaptive weight non-linear curve fitting algorithm for global search to obtain the data information of the set of the contour lines of the switch rail, stock rail, and guard rail of the railway track after fitting;
[0126] A curve optimization module for the railway track, connected to the curve fitting module for the railway track, which is used to optimize the contour lines of the switch rail, stock rail, and guard rail of the railway track by using an improved zebra optimization algorithm based on a crazy adaptive dynamic learning factor to obtain the data information of the contour lines of the switch rail, stock rail, and guard rail of the railway track after optimization;
[0127] A turnout type discrimination module for the railway track, connected to the curve optimization module for the railway track, which is used to construct a turnout classification model for the railway track to discriminate the type of the turnout of the railway track and obtain the data information of the type of the turnout of the railway track;
[0128] An identification module for the railway track, connected to the turnout type discrimination module for the railway track, which is used to construct a deep learning network model for the identification of the railway track to represent the overall layout of the railway track and output the data information of the overall layout dot matrix of the railway track.
[0129] In this embodiment, as Figure 7 or Figure 8 orFigure 9 or Figure 10 or Figure 11 As shown, during the train operation, the railway track switch is identified to obtain the data information of the identified railway track switch. According to the data information of the identified railway track switch, the train running direction is determined and compared with the preset train running direction. If they are different, a warning message is issued; if they are the same, the train is kept running safely.
[0130] To verify the effectiveness of the present invention, we conducted tests in a variety of actual railway scenarios and compared them with other existing methods. The following are some experimental results:
[0131] 1) Using the precision, recall, and F1-score of this application as evaluation indicators, the precision reaches 97%, the recall is 95%, and the F1-score is 96%.
[0132] 2) Under the standard hardware configuration (Inteli7 CPU, 16GB RAM, NVIDIA RTX2080 GPU) of this application, the processing time for each frame of image is 30ms, meeting the requirements of real-time processing.
[0133] 3) The performance of this application under different lighting conditions, such as Figure 7 or Figure 8 or Figure 9 or Figure 10 or Figure 11 As shown, tests are carried out under different lighting conditions (daytime, night, cloudy day, etc.). The results show that the system can maintain a high detection accuracy under various lighting conditions. Under daytime lighting conditions, the precision reaches 98%; under night lighting conditions, the precision reaches 94%; under cloudy day lighting conditions, the precision reaches 96%.
[0134] 4) Comparison with other methods: This application is compared with traditional methods (such as Hough transform, Sobel edge detection). The results show that the present invention has a significant improvement in various indicators. For Hough transform: precision 85%, recall 80%, F1-score 82%; for Sobel edge detection: precision 88%, recall 85%, F1-score 86%.
[0135] In this embodiment, the present invention provides a computer-readable storage medium, on which a computer program is stored that is programmed or configured to execute the method for identifying railway tracks based on yolov5 deep learning described in any one of the above.
[0136] Any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), among others.
[0137] In summary, the present invention can not only accurately identify and classify the turnouts of railway tracks in combination with the YOLOv5 deep learning detection model, but also the whole process does not require manual participation, reducing human errors and improving the driving stability and safety of trains.
[0138] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. A railway track recognition method based on yolov5 deep learning, characterized in that: The method comprises: U1. Input the real-time collected railway track image data information into the trained yolov5 deep learning detection model, identify and classify the railway track's point rail, base rail and guard rail, and obtain the matrix data information of the railway track's point rail, base rail and guard rail position points; U2. Based on the data information of the matrix of the position points of the point rail, base rail and guard rail of the railway track, the contour lines of the point rail, base rail and guard rail of the railway track are fitted by using an adaptive weighted nonlinear curve fitting algorithm for global search to obtain the data information of the contour line set of the point rail, base rail and guard rail of the railway track after fitting; U3. Based on the data information of the contour line set of the pointed rail, the base rail and the guard rail of the railway track after fitting, the contour lines of the pointed rail, the base rail and the guard rail of the railway track are optimized by using an improved zebra optimization algorithm based on a crazy adaptive dynamic learning factor to obtain the data information of the contour lines of the pointed rail, the base rail and the guard rail of the railway track after optimization; U4. Based on the data information of the contour lines of the optimized railway track point rail, base rail and guard rail, a railway track turnout classification model is constructed to identify the type of turnout of the railway track and obtain data information of the turnout type of the railway track.
2. The railway track recognition method based on yolov5 deep learning according to claim 1 is characterized in that: The method further comprises: U5. Based on the data information of the turnout type of the railway track, a deep learning network model for identifying the railway track is constructed, the overall layout of the railway track is characterized, and the data information of the overall layout lattice of the railway track is output.
3. The railway track recognition method based on yolov5 deep learning according to claim 2 is characterized in that, In step U5, the deep learning network model for railway track recognition is constructed to characterize the overall layout of the railway track, including: U51. Based on the data information of the turnout type of the railway track, construct a railway track turnout type data set; U52. Input the railway track turnout type data set into the railway track identification deep learning network model for training and learning, and determine the overall layout function Q of the railway track, Among them, x is the railway track turnout type dataset, f(x) is the railway track function matching the turnout type, α1, α2 and α3 are the penalty factors of the deep learning network model, and the trained deep learning network model for railway track recognition is obtained; U53. Based on the trained deep learning network model for identifying railway tracks, a data set of turnout types of railway tracks is input, the overall layout of the railway tracks is characterized, and data information of the overall layout lattice of the railway tracks is output.
4. The railway track recognition method based on yolov5 deep learning according to claim 3 is characterized in that: The penalty factors α1, α2 and α3 of the deep learning network model are, Among them, x is the turnout type dataset of railway tracks.
5. The railway track recognition method based on yolov5 deep learning according to claim 1 is characterized in that: In step U2, the global search-oriented adaptive weighted nonlinear curve fitting algorithm is used to fit the contours of the point rail, the base rail and the guard rail of the railway track, including: U21. Based on the data information of the matrix of the position points of the railway track point rail, the base rail and the guard rail, a function W for eliminating abnormal points of the railway track position for global search is established. Among them, y is the data information of the matrix of the position points of the point rail, the base rail and the guard rail of the railway track, β1, β2 and β3 are the weight factors of the abnormal position points of the railway track, and the abnormal position points of the point rail, the base rail and the guard rail of the railway track are eliminated to obtain the data information of the position point matrix of the point rail, the base rail and the guard rail of the railway track after elimination; U22. Based on the data information of the position point matrix of the pointed rail, the base rail and the guard rail of the railway track after the removal, a nonlinear curve fitting function R with adaptive weights is established. Among them, z is the data information of the position point matrix of the point rail, base rail and guard rail of the railway track after removal, and δ1, δ2 and δ3 are adaptive weight coefficients; U23. Based on the nonlinear curve fitting function R with the adaptive weight, the contour lines of the point rail, base rail and guard rail of the railway track are fitted to obtain data information of the contour line set of the point rail, base rail and guard rail of the railway track after fitting.
6. The railway track recognition method based on yolov5 deep learning according to claim 5 is characterized in that: The adaptive weight coefficients δ1, δ2 and δ3 are, Among them, z is the data information of the position point matrix of the pointed rail, the basic rail and the guard rail of the railway track after being eliminated.
7. The railway track recognition method based on yolov5 deep learning according to claim 1 is characterized in that: From step U3, the optimization of the contours of the point rail, stock rail and guard rail of the railway track by using the improved zebra optimization algorithm based on crazy adaptive dynamic learning factor includes: U31. Based on the data information of the contour line set of the pointed rail, base rail and guard rail of the railway track after fitting, the zebra population is initialized, the population parameters and the maximum number of iterations T are determined, and the data information of the initialized zebra population is obtained; U32. Based on the data information of the initialized zebra population, establish the fitness value function G of the population individuals, Among them, r is the data information of the initialized zebra population, γ1, γ2 and γ3 are the discount factors of the zebra population individuals, and the fitness values of the population individuals are calculated to obtain the data information of the fitness values of the population individuals; U33. Based on the data information of the fitness values of the individuals in the population, establish the target optimization function H, Among them, h is the data information of the fitness value of the population individual, λ1, λ2 and λ3 are crazy adaptive dynamic learning factors, and the contour lines of the point rail, basic rail and guardrail of the railway track are optimized to obtain the data information of the contour lines of the point rail, basic rail and guardrail of the optimized railway track.
8. The railway track recognition method based on yolov5 deep learning according to claim 1 is characterized in that: In step U4, the construction of the railway track turnout classification model and identification of the type of the railway track turnout include: U41. Based on the data information of the optimized railway track point rail, base rail and guard rail contours, construct a data set of optimized railway track point rail, base rail and guard rail contours; U42. Input the optimized railway track point rail, base rail and guard rail contour data set into the railway track turnout classification model for training and learning, and determine the railway turnout classification function S, Among them, q is the dataset of the contour lines of the point rail, base rail and guard rail of the optimized railway track, ρ1, ρ2 and ρ3 are the contrast factors of the turnout of the railway, and the trained turnout classification model of the railway track is obtained; U43. Based on the trained railway track turnout classification model, the data information of the contour lines of the optimized railway track point rail, base rail and guard rail are input to identify the type of turnout on the railway track, and obtain the data information of the turnout type of the railway track.
9. The railway track recognition method based on yolov5 deep learning according to claim 1 is characterized in that: In step U1, the trained yolov5 deep learning detection model includes: U11. Collect image data information of the railway track's point rail, base rail and guard rail, and construct an image data set of the railway track's point rail, base rail and guard rail; U12. Input the image data set of the pointed rail, the base rail and the guard rail of the railway track into the yolov5 deep learning detection model for training and learning to obtain a trained yolov5 deep learning detection model.
10. A system for implementing the railway track recognition method based on yolov5 deep learning as described in any one of claims 1 to 9, characterized in that: The system comprises: The railway track image data acquisition module is used to input the real-time collected railway track image data information into the trained yolov5 deep learning detection model, identify and classify the railway track's point rail, base rail and guard rail, and obtain the matrix data information of the railway track's point rail, base rail and guard rail position points; A railway track curve fitting module is connected to the railway track image data acquisition module and is used to fit the contour lines of the point rail, base rail and guard rail of the railway track using an adaptive weighted nonlinear curve fitting algorithm for global search to obtain data information of the contour line set of the point rail, base rail and guard rail of the railway track after fitting; A railway track curve optimization module, connected to the railway track curve fitting module, is used to optimize the contour lines of the point rail, base rail and guard rail of the railway track by using an improved zebra optimization algorithm based on a crazy adaptive dynamic learning factor, and obtain data information of the contour lines of the point rail, base rail and guard rail of the railway track after optimization; A railway track turnout type identification module is connected to the railway curve optimization module and is used to construct a railway track turnout classification model, identify the type of the railway track turnout, and obtain data information of the railway track turnout type; The railway track recognition module is connected to the railway track turnout type identification module, and is used to construct a deep learning network model for railway track recognition, characterize the overall layout of the railway track, and output data information of the overall layout dot matrix of the railway track.
