Track extraction method based on lightweight network
By constructing a lightweight convolution network model, using depth separation convolution to reduce the amount of parameters and computational complexity, the problem of traditional methods decreasing detection accuracy under environmental changes is solved, and efficient and accurate track recognition is achieved on resource-constrained devices.
Patent Information
- Application Number
- CN202510353613.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional machine vision methods are susceptible to environmental changes in obstacle perception systems in rail transit, resulting in a decrease in detection accuracy. The deep learning model has many parameters and complex calculations, making it difficult to deploy efficiently and operate in real-time on resource-constrained devices.
The lightweight network is used to train the track data set, and a lightweight convolutional network model including 14 convolutional layers, 1 pooling layer and 1 fully connected layer is built. The parameter quantity and calculation complexity can be significantly reduced through depth separation convolution, achieving efficient track recognition.
It realizes efficient and accurate track recognition in various environments, improves the accuracy and robustness of track recognition, and has faster inference speed when processing track images in real time.
Smart Images

Figure CN119863781A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of rail transit information technology, and in particular relates to a track extraction method based on a lightweight network. Background Art
[0002] The train active obstacle perception system is an important subsystem for rail transit operation safety. The decision-making result of obstacle intrusion depends on the scope of the track area. At present, traditional machine vision methods rely on manually designed features and complex parameter adjustments, which are easily affected by environmental changes, resulting in reduced detection accuracy. Most segmentation models based on deep learning often have many parameters and complex calculations. They cannot be efficiently deployed on resource-constrained devices and are difficult to run effectively in real-time applications. Summary of the invention
[0003] In order to solve the above technical problems, the present invention provides a track extraction method based on a lightweight network to solve the problems in the prior art. The technical solution adopted by the present invention is: A track extraction method based on a lightweight network comprises the following steps: Step 1: Use a lightweight network to train the track data set to obtain a track recognition model; Step 2: Collect real-time track images, input them into the track recognition model, and obtain track coordinates.
[0004] Furthermore, step 1 includes: Step 11: Build a lightweight convolutional network model; Step 12: Import the track data set into the lightweight convolutional network model for training to obtain a track recognition model.
[0005] Furthermore, the structure of the lightweight convolutional network model in step 11 is as follows: The lightweight convolutional network model includes 14 convolutional layers, 1 pooling layer and 1 fully connected layer; The first layer is a convolutional layer with 32 convolution kernels of size 3×3 and a stride of 2; The 2nd to 14th layers are depth-wise separable convolutional layers. Each layer contains two sublayers: a depth-wise convolutional layer with a 3*3 convolution kernel that performs independent convolution on each channel and a point-wise convolutional layer with a 1*1 convolution kernel that performs cross-channel convolution. The 15th layer is a pooling layer with an output vector length of 1024; The 16th layer is a fully connected layer with an output vector length of 130.
[0006] Furthermore, the model training method in step 12 includes: Step 12a: Input the image into the lightweight convolutional network model. After passing through the convolution layer or pooling layer, the feature map is calculated by the ReLU6 activation function until the full connection layer obtains the final detection result. The formula of the ReLU6 activation function is as follows: ; In the formula, For the The output vector of the layer, For the The layer introduces nonlinear changes in the output vector; Step 12b, in the test results, are the horizontal and vertical coordinate vectors of the left track, are the abscissa vector and ordinate vector of the right track; is the confidence of the left track and the right track; Step 12c. Loss function Including track coordinate regression loss , track confidence classification loss and weight parameters , the formula is as follows: ; Track Coordinate Regression Loss and track confidence classification loss The formula is as follows: ; In the formula, the superscript ^ indicates the true value; Step 12d: Use the Adam optimization method to iterate the network parameters and adjust the learning rate according to the gradient information until the loss function value converges or reaches the predetermined number of iterations.
[0007] Furthermore, step 2 includes: Step 21: Input the image into the trained network model, and after passing through the convolution layer or pooling layer, calculate the feature map through the activation function until the final detection result is obtained by the fully connected layer; Step 22, the detection result is a vector with a length of 130, and the 1st to 64th values are the horizontal and vertical coordinate values of the left track prediction, that is, ; The horizontal and vertical coordinates of the predicted orbits on the left side of the 65th to 128th values, that is, ; The 129th value is the confidence of the left track, that is ; The 130th value is the confidence of the right track, that is .
[0008] The present invention has the following beneficial effects: This paper proposes a track extraction method based on a lightweight network, which aims to achieve efficient and accurate track recognition. The model's parameters and computational complexity are significantly reduced through deep separable convolution, which enables faster inference speed when processing track images in real time. In addition, the model performs well in a variety of environments and can improve the accuracy and robustness of track recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 It is a detection flow chart of the present invention; Figure 2 It is a data flow diagram of the lightweight network of the present invention. DETAILED DESCRIPTION
[0010] The following will be combined with the embodiments of the present invention Figure 1-Figure 2 , the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Unless otherwise specified, the technical means used in the embodiments are conventional means well known to those skilled in the art.
[0011] like Figure 1 , a track extraction method based on a lightweight network, comprising: Step 1: Use a lightweight network to train the track data set to obtain a track recognition model; the track data set in step 1 includes pictures and labels, and the labels include left track coordinates and right track coordinates, for example, 20,000 pictures and corresponding labels, and the ratio of the training set to the test set is 8:2.
[0012] Step 2: Collect real-time track images, input them into the track recognition model, and obtain track coordinates.
[0013] Furthermore, the establishment of the track identification model in step 1 includes: Step 11: Build a lightweight convolutional network model; Step 12: Import the track data set into the model for training to obtain a track recognition model.
[0014] Furthermore, the lightweight convolutional network model in step 11 is based on the MobileNet structure as follows: The lightweight convolutional network model includes 14 convolutional layers, 1 pooling layer and 1 fully connected layer; The first layer is a convolutional layer with 32 convolution kernels of size 3×3 and a stride of 2; The 2nd to 14th layers are depth-wise separable convolutional layers. Each layer contains two sublayers: a depth-wise convolutional layer with a 3*3 convolution kernel that performs independent convolution on each channel and a point-wise convolutional layer with a 1*1 convolution kernel that performs cross-channel convolution. The 15th layer is a pooling layer with an output vector length of 1024; The 16th layer is a fully connected layer with an output vector length of 130.
[0015] Furthermore, the model training method in step 12 includes: Step 12a: Input the image into the model, and after passing through the convolution layer or pooling layer, calculate the feature map through the ReLU6 activation function until the full connection layer obtains the final detection result. The formula of the ReLU6 activation function is as follows: ; In the formula, For the The output vector of the layer, For the The layer introduces nonlinear changes in the output vector; Step 12b, in the test result, are the horizontal and vertical coordinate vectors of the left track, are the abscissa vector and ordinate vector of the right track; is the confidence of the left track and the right track; Step 12c. Loss function Regression loss from track coordinates and track confidence classification loss and weight parameters The weight parameters α and β of the loss function are 0.5 and 0.5 respectively, and the formula is as follows: ; Track Coordinate Regression Loss and track confidence classification loss The formula is as follows: ; In the formula, the superscript ^ indicates the true value; Step 12d: Use the Adam optimization method to iterate the network parameters and adjust the learning rate according to the gradient information until the loss function value converges or reaches a predetermined number of iterations. Specifically, the number of iterations is 300 and the learning rate is 0.001.
[0016] Further, step 2, the prediction of orbital coordinates includes: Step 21: Input the image into the trained network model, and after passing through the convolution layer or pooling layer, calculate the feature map through the activation function until the final detection result is obtained by the fully connected layer; Step 22, the detection result is a vector with a length of 130, and the 1st to 64th values are the horizontal and vertical coordinate values of the left track prediction, that is, ; The horizontal and vertical coordinates of the predicted orbits on the left side of the 65th to 128th values, that is, ; The 129th value is the confidence of the left track, that is ; The 130th value is the confidence of the right track, that is .
[0017] like Figure 2 As shown: the image size is 224*224, and the model output results are 32 coordinate points of the left and right tracks and the confidence of the left and right tracks.
[0018] The track coordinates obtained by the present invention can be used to detect obstacle intrusion in the track area.
[0019] To facilitate the understanding of those skilled in the art, an embodiment is now used to illustrate a track extraction method based on a lightweight network, which includes the following steps: Step 1, using a lightweight network to train a track data set to obtain a track recognition model; Step 2, collecting a real-time track image, inputting it into the track recognition model, and obtaining the track coordinates.
[0020] The embodiments described above are only descriptions of the preferred modes of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations, modifications, and substitutions made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A track extraction method based on a lightweight network, characterized in that: The following steps are involved: Step 1: Use a lightweight network to train the track data set to obtain a track recognition model; Step 2: Collect real-time track images, input them into the track recognition model, and obtain track coordinates.
2. A track extraction method based on a lightweight network as claimed in claim 1, characterized in that: Step 1 includes: Step 11: Build a lightweight convolutional network model; Step 12: Import the track data set into the lightweight convolutional network model for training to obtain a track recognition model.
3. A track extraction method based on a lightweight network as claimed in claim 2, characterized in that: The structure of the lightweight convolutional network model in step 11 is as follows: The lightweight convolutional network model includes 14 convolutional layers, 1 pooling layer and 1 fully connected layer; The first layer is a convolutional layer with 32 convolution kernels of size 3×3 and a stride of 2; The 2nd to 14th layers are depth-wise separable convolutional layers. Each layer contains two sublayers: a depth-wise convolutional layer with a 3*3 convolution kernel that performs independent convolution on each channel and a point-wise convolutional layer with a 1*1 convolution kernel that performs cross-channel convolution. The 15th layer is a pooling layer with an output vector length of 1024; The 16th layer is a fully connected layer with an output vector length of 130.
4. A track extraction method based on a lightweight network as claimed in claim 2, characterized in that: Step 12: The model training method includes: Step 12a: Input the image into the lightweight convolutional network model. After passing through the convolution layer or pooling layer, the feature map is calculated by the ReLU6 activation function until the full connection layer obtains the final detection result. The formula of the ReLU6 activation function is as follows: ; In the formula, For the The output vector of the layer, For the The layer introduces nonlinear changes in the output vector; Step 12b, in the test results, are the horizontal and vertical coordinate vectors of the left track, are the abscissa vector and ordinate vector of the right track; is the confidence of the left track and the right track; Step 12c. Loss function Including track coordinate regression loss , track confidence classification loss and weight parameters , the formula is as follows: ; Track Coordinate Regression Loss and track confidence classification loss The formula is as follows: ; In the formula, the superscript ^ indicates the true value; Step 12d: Use the Adam optimization method to iterate the network parameters and adjust the learning rate according to the gradient information until the loss function value converges or reaches the predetermined number of iterations.
5. A track extraction method based on a lightweight network as claimed in claim 1, characterized in that: Step 2 includes: Step 21: Input the image into the trained network model, and after passing through the convolution layer or pooling layer, calculate the feature map through the activation function until the final detection result is obtained by the fully connected layer; Step 22, the detection result is a vector with a length of 130, and the 1st to 64th values are the horizontal and vertical coordinate values of the left track prediction, that is, ; The horizontal and vertical coordinates of the predicted orbits on the left side of the 65th to 128th values, that is, ; The 129th value is the confidence of the left track, that is ; The 130th value is the confidence of the right track, that is .
Citation Information
Patent Citations
Track area identification method based on deep learning convolutional neural network
CN114581861A
Track identification method based on residual network
CN119229420A
Lightweight network-based traffic sign recognition method
WO2022205685A1
Cited By
Lightweight fuzzy semantic accurate description and safe adaptation method
CN122432986A