Train control on-board equipment identification method and system, storage medium and electronic equipment
By constructing and training a train-controlled vehicle-mounted equipment recognition model composed of backbone network, neck network and head network, the problem of the difficulty of accurate, timely and efficient maintenance in the identification of train-controlled vehicle-mounted equipment of rail transit vehicles is solved, and the accurate identification of various types of vehicle-mounted equipment of rail transit vehicles is achieved.
Patent Information
- Application Number
- CN202510585962.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-06-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional manual inspection methods are difficult to achieve accurate, timely and efficient maintenance under the diversity and complex distribution of train-controlled equipment in rail transit vehicles, resulting in frequent problems of identification and misidentification or miss identification.
By constructing the original image sequence data set, preprocessing, category annotation and division, a train control vehicle-mounted equipment recognition model connected by the backbone network, neck network and head network, the training set is used for model training, iteratively update parameters, determine the optimal model, and complete the identification of train control vehicle-mounted equipment.
It realizes accurate identification of various vehicle-mounted equipment for rail transit vehicles in complex scenarios, improves the accuracy and efficiency of identification, and reduces the risk of misidentification and misidentification.
Smart Images

Figure CN120088586A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of rail transit data identification, and in particular relates to a train control on-board equipment identification method, system, storage medium and electronic equipment. Background Art
[0002] With the rapid development of the rail transit industry, the accuracy of traditional manual inspection methods has been severely restricted in the face of the diversity and complex distribution of on-board equipment for rail transit vehicles. Especially in large-scale rail transit transportation networks, manual inspection is not only time-consuming and laborious, but also difficult to ensure the timeliness and accuracy of maintenance work, and cannot meet the needs of efficient operation and maintenance. Accurate identification of on-board equipment for train control is the key to improving the safety and reliability of rail transit vehicles.
[0003] The precise identification process of train control on-board equipment places strict requirements on image data: the viewing angle must cover all key components of the equipment to be identified, the amount of data must be large enough to cover all possible situations, and it must be able to accurately capture targets of different scales. In practical applications, due to the complex and changeable environment in which train control on-board equipment is located, the recognition effect is easily affected by environmental factors such as lighting changes, object occlusion, and background clutter, which can easily lead to misidentification or missed recognition problems, greatly increasing the difficulty and challenge of recognition. Traditional rule-based recognition technology can no longer adapt to rapidly changing and complex recognition scenarios to achieve high-precision recognition results.
[0004] Therefore, it is now necessary to provide a train control on-board equipment identification method that can accurately identify the train control on-board equipment of a rail transit vehicle. Summary of the invention
[0005] The present invention provides a train control on-board equipment identification method, system, storage medium and electronic equipment.
[0006] A train control vehicle-mounted equipment identification method of the present invention comprises: Construct a raw image sequence dataset based on the sensor data of various train control onboard equipment; Preprocessing, classifying and dividing the original image sequence data set to obtain a class label set, a training set and a test set; Constructing a train control on-board equipment recognition model, and using the training set to train the train control on-board equipment recognition model to obtain a three-branch prediction result; A total loss is calculated based on the category label set and the three-branch prediction results; Calculating the gradient of the total loss with respect to the parameters of the train control on-board equipment identification model, iteratively updating the parameters of the train control on-board equipment identification model, and determining the optimal train control on-board equipment identification model; Input the test set into the optimal train control on-vehicle equipment recognition model to obtain the optimal three-branch prediction result, and complete the recognition of the train control on-vehicle equipment.
[0007] Furthermore, Preprocess the original image sequence dataset, including: Gradually perform initial unified size adjustment, edge padding, noise reduction processing, and gray distribution adjustment on the original image sequence dataset to obtain the preprocessed image sequence dataset.
[0008] Furthermore, Divide the original image sequence dataset, including: Divide the preprocessed image sequence dataset into the training set and the test set according to a predetermined ratio. The division formula is: , wherein, is the total number of images in the training set; is the ceiling operation; is the division ratio of the training set; is the division ratio of the test set; is the total number of images in the preprocessed image sequence dataset; , , wherein, is the training set; is the test set; is an image in the preprocessed image sequence dataset; .
[0009] Furthermore, After class labeling the original image sequence dataset, a class label set is obtained. The labels in the class label set correspond one-to-one with the images in the preprocessed image sequence dataset, the labels in the class label set correspond one-to-one with the images in the training set, and the labels in the class label set correspond one-to-one with the images in the test set.
[0010] Furthermore, The train control on-vehicle equipment recognition model is composed of a backbone network, a neck network, and a head network connected in series.
[0011] Furthermore, Use the training set to train the train control on-vehicle equipment recognition model to obtain three-branch prediction results, including: Use the training set as the total input of the backbone network to train the backbone network to obtain the output results of the last three convolutional modules; Use the output result of the last three convolutional modules as the input of the neck network to train the neck network, and obtain the output result of the neck network; Use the output result of the neck network as the input of the head network to train the head network, and obtain the three-branch prediction result.
[0012] Furthermore, The three-branch prediction result includes a set of predicted class probabilities, a set of bounding box coordinate regression values, and a set of predicted confidence levels. The set of predicted class probabilities includes multiple predicted class probabilities, the set of bounding box coordinate regression values includes multiple bounding box coordinate regression values, and the set of predicted confidence levels includes multiple predicted confidence levels.
[0013] Furthermore, Calculate the total loss according to the class label set and the three-branch prediction result, including: Calculate the classification loss according to the set of predicted class probabilities; Calculate the bounding box prediction error localization loss according to the class label set and the set of bounding box coordinate regression values; Calculate the confidence level loss according to the class label set and the set of predicted confidence levels; Perform weighted summation on the classification loss, the bounding box prediction error localization loss, and the confidence level loss to obtain the total loss.
[0014] Furthermore, After iteratively updating the parameters of the train control on-vehicle equipment recognition model, determine the optimal parameter set, so as to obtain the optimal on-vehicle equipment recognition model, and the total loss corresponding to the optimal parameter set is the smallest.
[0015] A train control on-vehicle equipment recognition system of the present invention is used to implement the foregoing train control on-vehicle equipment recognition method, and the system includes: A construction module for constructing an original image sequence data set based on the sensor data of various train control on-vehicle equipment; A processing module for preprocessing, class labeling, and dividing the original image sequence data set to obtain a class label set, a training set, and a test set; A training module for constructing a train control on-vehicle equipment recognition model, and using the training set to train the train control on-vehicle equipment recognition model to obtain a three-branch prediction result; A loss calculation module for calculating the total loss according to the class label set and the three-branch output result; An optimal model determination module, configured to calculate the gradient of the total loss with respect to the parameters of the on-vehicle equipment recognition model for train control, iteratively update the parameters of the on-vehicle equipment recognition model for train control, and determine an optimal on-vehicle equipment recognition model for train control; An identification module, configured to input the test set into the optimal on-vehicle equipment recognition model for train control to obtain an optimal three-branch prediction result, thereby completing the identification of the on-vehicle equipment for train control.
[0016] A computer-readable storage medium of the present invention stores a program or instructions. When the program or instructions run on a computer, the computer is caused to execute the foregoing method for identifying on-vehicle equipment for train control.
[0017] An electronic device of the present invention includes a processor, and the processor is coupled to a memory; the processor is configured to read and execute a computer program stored in the memory to implement the foregoing method for identifying on-vehicle equipment for train control.
[0018] Compared with the prior art, the present invention has the following beneficial effects: The method for identifying on-vehicle equipment for train control provided by the present invention can accurately and quickly extract multi-category target features, and achieve accurate identification of various on-vehicle equipment of rail transit vehicles in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following briefly introduces the accompanying drawings required for describing the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is a flowchart of the method for identifying on-vehicle equipment for train control of the present invention; Figure 2 It is a schematic diagram of the on-vehicle equipment recognition model for train control of the present invention; Figure 3 It is a schematic diagram of the verification effect of the optimal on-vehicle equipment recognition model for train control of the present invention; Figure 4 It is a schematic diagram of the structure of the on-vehicle equipment recognition system for train control of the present invention; Figure 5 It is a schematic diagram of the structure of the electronic device of the present invention.
[0021] DESCRIPTION OF REFERENCE NUMERALS: 201 - construction module, 202 - processing module, 203 - training module, 204 - loss calculation module, 205 - optimal model determination module, 206 - identification module, 301 - processor, 302 - memory. DETAILED DESCRIPTION OF THE INVENTION
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0023] It is worth noting that the train control on-vehicle equipment identification method provided by the present invention is mainly oriented to the rail transit field and is applicable to the train control on-vehicle equipment identification task of rail transit vehicles. The rail transit vehicles include, but are not limited to, high-speed trains / motor trains, regular speed trains, subway trains, light rail trains, monorail trains, maglev trains, heavy-haul locomotives, etc.
[0024] Figure 1 is a flowchart of a train control on-vehicle equipment identification method provided by an embodiment of the present invention. In one embodiment, it specifically includes the following steps: S101: Construct an original image sequence dataset based on the sensor data of various train control on-vehicle equipment.
[0025] Collect the sensor data of various train control on-vehicle equipment, and construct an original image sequence dataset based on the sensor data of various train control on-vehicle equipment , and an original image sequence dataset includes the sensor data of multiple types of train control on-vehicle equipment. The number of sensor data is determined according to actual needs. Generally speaking, the more the number, the better the training effect of the subsequent recognition model.
[0026] , where is a certain image in the original image sequence dataset; is the real number field; is the total number of channels of the original image sequence; is the height of a certain image in the original image sequence dataset; is the width of a certain image in the original image sequence dataset; is the total number of images in the original image sequence dataset.
[0027] S102: Preprocess, classify and label, and divide the original image sequence dataset to obtain a class label set, a training set, and a test set.
[0028] S102-1: Perform an initial unified size adjustment on the original image sequence dataset to obtain an image sequence dataset after the initial unified size adjustment.
[0029] Before the initial uniform size adjustment of the images in the original image sequence dataset, set the target adjustment height and target adjustment width. Based on the target adjustment height, target adjustment width, the height of a certain image in the original image sequence dataset, and the width of a certain image in the original image sequence dataset, calculate the scaling ratio. The calculation formula is as follows. (1), In the formula, is the scaling ratio; is the target adjustment height of a certain image; is the height of a certain image in the original image sequence dataset; is the target adjustment width of a certain image; is the width of a certain image in the original image sequence dataset.
[0030] According to the scaling ratio, perform the initial uniform size adjustment on a certain image in the original image sequence dataset. The adjustment formula is as follows. (2), (3), In the formula, is the height of a certain image in the image sequence dataset after the initial uniform size adjustment; is the scaling ratio; is the height of a certain image in the original image sequence dataset; is the width of a certain image in the image sequence dataset after the initial uniform size adjustment; is the width of a certain image in the original image sequence dataset.
[0031] By performing the initial uniform size adjustment on each image in the original image sequence dataset, obtain the image sequence dataset after the initial uniform size adjustment. Define a certain image in the image sequence dataset after the initial uniform size adjustment as , .
[0032] S102-2: Perform edge padding on the image sequence dataset after the initial uniform size adjustment to obtain the image sequence dataset after the uniform size adjustment.
[0033] Perform edge padding on a certain image in the image sequence dataset after the initial uniform size adjustment. The edge padding includes height edge padding and width edge padding. The padding formula is as follows. (4), (5), In the formula, The size for height edge padding of an image in the image sequence dataset after the initial unified size adjustment; The target adjusted height of an image; The height of an image in the image sequence dataset after the initial unified size adjustment; The size for width edge padding of an image in the image sequence dataset after the initial unified size adjustment; The target adjusted width of an image; The width of an image in the image sequence dataset after the initial unified size adjustment.
[0034] By performing edge padding on each image in the image sequence dataset after the initial unified size adjustment, an image sequence dataset after unified size adjustment is obtained , , where is an image in the image sequence dataset after unified size adjustment.
[0035] S102-3: Denoise the image sequence dataset after unified size adjustment to obtain a denoised image sequence dataset.
[0036] By using a sliding window of size (6), where is the average value of the neighborhood pixel values at position in the sliding window, and the neighborhood pixel value refers to the sum of the pixel values of each pixel point in the sliding window; is the row of an image, , is the target adjusted height of an image; is the column of an image, , is the target adjusted width of an image; is the side length of the sliding window; is an image in the denoised image sequence dataset at position in; is the indication index of a certain row in an image; is the indication index of a certain column in an image.
[0037] Through formula (6), the average value of the neighborhood pixel values at position in the sliding window can be usedInstead of a certain image in the denoised image sequence dataset at the position of the pixel value .
[0038] By performing denoising processing on each image in the image sequence dataset after unified size adjustment, a denoised image sequence dataset is obtained , , where is a certain image in the denoised image sequence dataset
[0039] S102-4: Perform gray-level distribution adjustment on the denoised image sequence dataset to obtain an image sequence dataset after gray-level distribution adjustment, that is, obtain a preprocessed image sequence dataset
[0040] Before performing gray-level distribution adjustment on the denoised image sequence dataset, the clustering region of each image is obtained through a clustering method. The clustering region corresponding to a certain image is the target region, and the clustering region not corresponding to (i.e., irrelevant to) a certain image is the background region
[0041] In a certain image in the denoised image sequence dataset, find and determine the maximum gray value and the minimum gray value of the clustering center pixel points in the target region, as well as the maximum gray value and the minimum gray value of the clustering center pixel points in the background region, where is the pixel point label of the maximum gray value of the clustering center in the target region; is the pixel point label of the minimum gray value of the clustering center in the target region , where , is the total number of pixel points
[0042] Define the gray value at the position in a certain image in the denoised image sequence dataset as .
[0043] Calculate the distance between the gray value at the position in a certain image in the denoised image sequence dataset and the gray value of the clustering center in the target region, and calculate the distance between the gray value at the position in a certain image in the denoised image sequence dataset and the gray value of the clustering center in the background region. The calculation formula is as follows (7), In the formula, An image in the image sequence dataset after denoising Centrally located The distance between the gray value at and the gray value of the cluster center of the target area; An image in the image sequence dataset after denoising Centrally located The gray value at ; is the maximum gray value of the cluster center pixel in the target area; The minimum gray value of the cluster center pixel in the target area; An image in the image sequence dataset after denoising Centrally located The distance between the gray value at and the gray value of the background area cluster center; is the maximum gray value of the center pixel of the background area cluster; It is the minimum gray value of the center pixel of the background area cluster.
[0044] Calculate the noise reduction of an image in the image sequence data set The segmentation threshold for segmentation is calculated as follows: (8), In the formula, For an image in the image sequence data set after denoising The segmentation threshold for segmentation; Adjust the width of a target for an image; Adjust the height for a certain image target; is a row of an image, ; is the column of an image, ; An image in the image sequence dataset after denoising Centrally located The distance between the gray value at and the gray value of the cluster center of the target area; An image in the image sequence dataset after denoising Centrally located The distance between the gray value at and the gray value of the background area cluster center.
[0045] Calculate the noise reduction of an image in the image sequence data set After grayscale distribution adjustment, it is located at position The gray value at is calculated as follows: (9), Wherein, is the gray value at the position after the gray distribution adjustment of a certain image in the image sequence dataset after denoising processing after the gray distribution adjustment of a certain image in the image sequence dataset after denoising processing at the position; is the gray value at the position of a certain image in the image sequence dataset after denoising processing in the position ; is the maximum gray value of the clustering center pixel points in the target area; is the minimum gray value of the clustering center pixel points in the background area; is the segmentation threshold for segmenting a certain image in the image sequence dataset after denoising processing .
[0046] By performing gray distribution adjustment on each image in the image sequence dataset after denoising processing, an image sequence dataset after gray distribution adjustment is obtained , , where is a certain image in the image sequence dataset after gray distribution adjustment.
[0047] The image sequence dataset after gray distribution adjustment is the preprocessed image sequence dataset.
[0048] It should be noted that the total number of images in the original image sequence dataset, the image sequence dataset after the first unified size adjustment, the image sequence dataset after the unified size adjustment, the image sequence dataset after denoising processing, and the image sequence dataset after gray distribution adjustment (preprocessed image sequence dataset) are all equal, that is, they are all .
[0049] S102-5: Perform class labeling on the preprocessed image sequence dataset to obtain a class label set.
[0050] Set as the calibration bounding box coordinates of a certain image in the preprocessed image sequence dataset, is the calibration confidence label of a certain image in the preprocessed image sequence dataset, and construct the class label set corresponding to the preprocessed image sequence dataset , , where is the class of a certain image; is the calibration bounding box coordinates of a certain image; is the calibration confidence label of a certain image; is the total number of labels, that is, the total number of classes of the on-vehicle train control equipment.
[0051] Establish the mapping relationship between the preprocessed image sequence dataset and the class label set as follows: (10), In the formula, is the mapping from all images in the preprocessed image sequence dataset to the corresponding labels in the class label set; is the preprocessed image sequence dataset; is the class label set.
[0052] The labels in the class label set correspond one-to-one with the images in the preprocessed image sequence dataset.
[0053] S102-6: Divide the preprocessed image sequence dataset into a training set and a test set according to a predetermined ratio.
[0054] According to the predetermined ratio, divide the preprocessed image sequence dataset and its corresponding class label set into a training set and a test set according to the ratio. The division formula is as follows: (11), (12), In the formula, is the training set; is the test set; is a certain image in the preprocessed image sequence dataset; is the total number of images in the training set; is the ceiling operation; is the division ratio of the training set; is the division ratio of the test set; is the total number of images in the preprocessed image sequence dataset; .
[0055] By dividing the preprocessed image sequence dataset, a training set and a test set are obtained. The training set , and the test set .
[0056] Since the labels in the class label set correspond one-to-one with the images in the preprocessed image sequence dataset, after dividing the preprocessed image sequence dataset into a training set and a test set, the corresponding relationship between the labels and the images is not affected.
[0057] S103: Construct a train control on-vehicle equipment recognition model, and use the training set to train the train control on-vehicle equipment recognition model to obtain a three-branch prediction result.
[0058] The train control on-vehicle equipment recognition model based on the convolutional neural network is composed of a backbone network, a neck network, and a head network connected in series.
[0059] The training process is as follows: S103-1: Use the training set as the total input of the backbone network to train the backbone network, and obtain the output results of the last three convolutional modules.
[0060] The backbone network contains layers of convolutional modules. The backbone network is represented by the following formula: (13) In the formula, is the output result of a certain layer of the backbone network, ; is the backbone network representation; is the training set; is the parameter set of the backbone network; is the output result of the previous layer of a certain layer of the backbone network.
[0061] Specifically, using the training set as the total input and as the backbone network parameters, when training a certain layer, use the output result of the previous layer of the certain layer as the input of the certain layer to obtain the output result of the certain layer. It should be noted that when , , and no input is introduced at this time. For example, the input of the first convolutional module is the training set , and the output result is ; the input of the second convolutional module is the output result of the first layer , and the output result is ; the input of the th convolutional module is the output result of the th layer , and the output result is .
[0062] In summary, the output result of the backbone network is the output results of the last three convolutional modules , and .
[0063] Preferably, = 5.
[0064] S103-2: Use the output results of the last three convolutional modules as the input of the neck network to train the neck network, and obtain the output result of the neck network.
[0065] The neck network includes two upsampling fusion networks, two downsampling fusion networks, and one aggregation network.
[0066] The two upsampling fusion networks include a first upsampling fusion network and a second upsampling fusion network. The input of the first upsampling fusion network is and , and the output result is ; The input of the second upsampling fusion network is and , and the output is .
[0067] The two downsampling fusion networks include a first downsampling fusion network and a second downsampling fusion network. The input of the first downsampling fusion network is and , and the output result is ; The input of the second downsampling fusion network is and , and the output result is .
[0068] The input of the fusion network is , , , and , and the output result is , and .
[0069] The neck network is represented by the following formula (14), wherein , , are all output results of the neck network; is the neck network representation; is the parameter set of the neck network, ; is the first upsampling fusion network representation; is the second upsampling fusion network representation; is the parameter set of the first upsampling fusion network; is the parameter set of the second upsampling fusion network; is the output result of the first upsampling fusion network; is the output result of the second upsampling fusion network; is the first downsampling fusion network representation; is the second downsampling fusion network representation; is the parameter set of the first downsampling fusion network; is the parameter set of the second downsampling fusion network; is the output result of the first downsampling fusion network; is the output result of the second downsampling fusion network; is the output result of the third - last layer of the backbone network; is the output result of the second - last layer of the backbone network; is the output result of the last layer of the backbone network; is the operation of the aggregation network.
[0070] Specifically, is the parameter set of the neck network. Taking , and as the inputs of the neck network, the output results , and are obtained.
[0071] S103 - 3: Using the output result of the neck network as the input of the head network to train the head network, a three - branch prediction result is obtained. The three - branch prediction result includes a set of predicted class probabilities, a set of bounding box coordinate regression values, and a set of predicted confidence levels.
[0072] Using the output result of the neck network as the input of the head network, a three - branch prediction is performed on the input of the head network using a shared convolution module. The head network is represented by the following formula, (15), wherein, is the three - branch prediction result of the head network; is the parameter set of the head network; is the head network representation; , and are the output results of the neck network.
[0073] Specifically, is the parameter set of the head network. Using the output results of the neck network , and as the inputs, a three - branch prediction result , is obtained.
[0074] Specifically, (16), wherein, is the normalization exponential function; is based on the output results of the head network , and As the input, after the 1×1 convolution operation, perform the operation, and the output result is the set of predicted class probabilities; is the set of predicted class probabilities, , is the predicted class probability of a certain image in the training set.
[0075] (17), In the formula, is the 1×1 convolution operation; uses the output result of the head network , and as the input, perform the 1×1 convolution operation, and the output result is the set of bounding box coordinate regression values; is the set of bounding box coordinate regression values, , is the bounding box coordinate regression value of a certain image in the training set.
[0076] (18), In the formula, is the threshold function of the neural network; uses the output result of the head network , and as the input, after the 1×1 convolution operation, perform the operation, and the output result is the set of predicted confidences; is the set of predicted confidences, , is the predicted confidence of a certain image in the training set.
[0077] In summary, the train control on-vehicle equipment recognition model based on the convolutional neural network composed of the backbone network, the neck network, and the head network is as Figure 2 shown, Figure 2 The dots in it represent the input parameters, and the specific expression is as follows, (19), In the formula, is the three-branch prediction result of the train control on-vehicle equipment recognition model; is the representation of the train control on-vehicle equipment recognition model; is the training set; is the parameter set of the train control on-vehicle equipment recognition model, ; " " is the function concatenation operation.
[0078] Specifically expressed as: taking is the parameter set of the train control on-vehicle equipment recognition model, using the training set as the input to obtain the three-branch prediction result , .
[0079] S104: Calculate the total loss according to the category label set and the three-branch prediction result.
[0080] S104-1: Calculate the classification loss according to the prediction category probability set in the three-branch prediction result. The calculation formula is as follows,[[]] (20), wherein,[[]] is the classification loss; is the balance factor; is the modulation factor; is the total number of images in the training set; is the predicted category probability of a certain image in the training set.
[0081] The balance factor is used to control the importance of positive and negative samples, and the modulation factor is used to suppress the influence of easily classified samples on the classification loss.
[0082] S104-2: Calculate the bounding box prediction error localization loss according to the category label set and the bounding box coordinate regression value set in the three-branch prediction result. The calculation formula is as follows,[[]] (21), wherein,[[]] is the bounding box prediction error localization loss; is the calibrated bounding box coordinate of a certain image in the training set; is the smooth norm loss function; is the total number of images in the training set; is the bounding box coordinate regression value of a certain image in the training set.
[0083] S104-3: Calculate the confidence loss according to the category label set and the prediction confidence set in the three-branch prediction result. The calculation formula is as follows,[[]] (22), wherein,[[]] is the confidence loss; is the calibrated confidence label of a certain image in the training set; is the total number of images in the training set; is the predicted confidence of a certain image in the training set.
[0084] S104-4: Perform weighted summation on the classification loss, the bounding box prediction error localization loss, and the confidence loss to obtain the total loss. The calculation formula is as follows,[[]] (23), wherein, is the total loss; is the weight coefficient of the classification loss ; is the localization loss of the bounding box prediction error 's weight coefficient; is the confidence loss 's weight coefficient.
[0085] Set the weight coefficients according to experience. Preferably, the weight coefficients are all 1 / 3.
[0086] S105: Calculate the gradient of the total loss with respect to the parameters of the train control on-vehicle equipment recognition model, iteratively update the parameters of the train control on-vehicle equipment recognition model, and determine the optimal train control on-vehicle equipment recognition model.
[0087] Calculate the gradient of the total loss with respect to the parameters of the train control on-vehicle equipment recognition model, and update the parameters of the train control on-vehicle equipment recognition model to obtain the updated parameters of the train control on-vehicle equipment recognition model. The calculation formula is as follows, (24), wherein, is the gradient of the total loss with respect to the parameters of the train control on-vehicle equipment recognition model; the arrow " " is an assignment operation, that is, assign the value on the right side of the arrow to the variable on the left side of the arrow, that is, assign to .
[0088] Set a predetermined number of iterations or an optimization target, substitute the updated parameters of the train control on-vehicle equipment recognition model into formula (19) to continue training the train control on-vehicle equipment recognition model, recalculate the total loss according to the steps in S104, and iterate like this until the predetermined number of iterations or the optimization target is reached. The optimization target is that the total loss is less than a predetermined value.
[0089] Finally, obtain the optimal parameter set of the train control on-vehicle equipment recognition model. The optimal parameter set corresponds to the minimum total loss, , so as to obtain the optimal train control on-vehicle equipment recognition model .
[0090] S106: Input the test set into the optimal train control on-vehicle equipment recognition model to obtain the optimal three-branch prediction result, and complete the recognition of the train control on-vehicle equipment.
[0091] Using the test set as the input of the optimal train control on-vehicle equipment recognition model, forward propagation is performed through the backbone network, neck network, and head network to obtain the final recognition result. The calculation formula is as follows: (25), wherein, is the optimal three-branch prediction result of the optimal train control on-vehicle equipment recognition model; is the representation of the train control on-vehicle equipment recognition model; is the test set; is the optimal parameter set of the optimal train control on-vehicle equipment recognition model.
[0092] Specifically, it is expressed as: taking as the optimal parameter set of the optimal train control on-vehicle equipment recognition model, using the test set as the input to obtain the optimal three-branch prediction result , , is the optimal prediction class probability set, is the optimal bounding box coordinate regression value set, is the optimal prediction confidence set.
[0093] Each image has a corresponding optimal prediction class probability set, optimal bounding box coordinate regression value set, and optimal prediction confidence set. Through the optimal prediction class probability set, optimal bounding box coordinate regression value set, and optimal prediction confidence set, different train control on-vehicle equipment can be recognized.
[0094] Verification example Select one image of each of the train control on-vehicle equipment GSMR, radar (LD), TCR, and transponder (YDQ) and input them into the optimal recognition model to obtain the recognition result of each image , , and the output result is as Figure 3 shown. In Figure 3 , the optimal prediction class probability of GSMR is , the optimal bounding box coordinate regression value is , and the optimal prediction confidence is . The optimal prediction class probability of radar (LD) is , the optimal bounding box coordinate regression value is , and the optimal prediction confidence is . The optimal prediction class probability of TCR is , the optimal bounding box coordinate regression value is , and the optimal prediction confidence is . The optimal prediction class probability of the transponder (YDQ) is , the optimal bounding box coordinate regression value is , the optimal prediction confidence is .
[0095] An embodiment of the present invention also provides a train control on-vehicle equipment identification system, as Figure 4 shown, including: A construction module 201, configured to construct an original image sequence data set based on the sensor data of various train control on-vehicle equipment.
[0096] A processing module 202, configured to preprocess, classify and label, and divide the original image sequence data set to obtain a class label set, a training set, and a test set.
[0097] A training module 203, configured to construct a train control on-vehicle equipment identification model, and use the training set to train the train control on-vehicle equipment identification model to obtain a three-branch prediction result.
[0098] A loss calculation module 204, configured to calculate a total loss according to the class label set and the three-branch prediction result.
[0099] An optimal model determination module 205, configured to calculate the gradient of the total loss with respect to the parameters of the train control on-vehicle equipment identification model, iteratively update the parameters of the train control on-vehicle equipment identification model, and determine the optimal train control on-vehicle equipment identification model.
[0100] An identification module 206, configured to input the test set into the optimal train control on-vehicle equipment identification model to obtain an optimal three-branch prediction result, and complete the identification of the train control on-vehicle equipment.
[0101] It should be noted here that the above construction module 201, processing module 202, training module 203, loss calculation module 206, optimal model determination module 205, and identification module 206 correspond to steps S101 to S106 in the embodiment of the train control on-vehicle equipment identification method. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.
[0102] An embodiment of the present invention also provides a computer-readable storage medium, storing a program or instruction, when the above program or instruction runs on a computer, causing the computer to execute the train control on-vehicle equipment identification method as described in the above method embodiment.
[0103] As Figure 5 shown, an embodiment of the present invention also provides an electronic device, including: a processor 301, the processor 301 is coupled to a memory 302, and the processor 301 is configured to read and execute a computer program stored in the memory 302 to implement the train control on-vehicle equipment identification method as described in the above method embodiment.
[0104] Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A train control vehicle-mounted equipment identification method, characterized in that: include: Construct a raw image sequence dataset based on the sensor data of various train control onboard equipment; Preprocessing, classifying and dividing the original image sequence data set to obtain a class label set, a training set and a test set; Constructing a train control on-board equipment recognition model, and using the training set to train the train control on-board equipment recognition model to obtain a three-branch prediction result; A total loss is calculated based on the category label set and the three-branch prediction results; Calculating the gradient of the total loss with respect to the parameters of the train control on-board equipment identification model, iteratively updating the parameters of the train control on-board equipment identification model, and determining the optimal train control on-board equipment identification model; The test set is input into the optimal train control on-board equipment identification model to obtain the optimal three-branch prediction result, thereby completing the identification of the train control on-board equipment.
2. The method according to claim 1, characterized in that Preprocessing the original image sequence data set includes: The original image sequence data set is gradually subjected to initial uniform size adjustment, edge filling, noise removal processing and grayscale distribution adjustment to obtain the preprocessed image sequence data set.
3. The method according to claim 2, characterized in that The original image sequence data set is divided, including: The preprocessed image sequence data set is divided into the training set and the test set according to a predetermined ratio, and the division formula is: , In the formula, is the total number of images in the training set; This is a round-up operation; is the partition ratio of the training set; is the partition ratio of the test set; is the total number of images in the preprocessed image sequence dataset; , , In the formula, is the training set; is the test set; is an image in the preprocessed image sequence dataset; .
4. The method according to claim 2 or 3, characterized in that: After the original image sequence data set is categorized, a category label set is obtained, wherein the labels in the category label set correspond one-to-one to the images in the preprocessed image sequence data set, the labels in the category label set correspond one-to-one to the images in the training set, and the labels in the category label set correspond one-to-one to the images in the test set.
5. The method according to claim 1, characterized in that The train control on-board equipment identification model is composed of a backbone network, a neck network and a head network connected in series.
6. The method according to claim 5, characterized in that The train control onboard equipment recognition model is trained using the training set to obtain a three-branch prediction result, including: The backbone network is trained using the training set as the total input of the backbone network to obtain the output results of the last three layers of convolutional modules; Using the output results of the last three layers of convolutional modules as inputs of the neck network to train the neck network, and obtaining output results of the neck network; The output result of the neck network is used as the input of the head network to train the head network and obtain the three-branch prediction result.
7. The method according to claim 1 or 6, characterized in that: The three-branch prediction result includes a prediction category probability set, a bounding box coordinate regression value set and a prediction confidence set, the prediction category probability set includes multiple prediction category probabilities, the bounding box coordinate regression value set includes multiple bounding box coordinate regression values, and the prediction confidence set includes multiple prediction confidences.
8. The method according to claim 7, characterized in that The total loss is calculated based on the category label set and the three-branch prediction results, including: Calculating classification loss based on the predicted class probability set; Calculating a bounding box prediction error positioning loss based on the category label set and the bounding box coordinate regression value set; Calculating a confidence loss based on the class label set and the prediction confidence set; The classification loss, the bounding box prediction error positioning loss and the confidence loss are weightedly summed to obtain the total loss.
9. The method according to claim 1, characterized in that: After iteratively updating the parameters of the train control on-board equipment identification model, an optimal parameter set is determined to obtain the optimal on-board equipment identification model, and the total loss corresponding to the optimal parameter set is minimized.
10. A train control vehicle-mounted equipment identification system, characterized in that: include: A construction module is used to construct a raw image sequence dataset based on sensor data from various train control onboard devices; A processing module, used for preprocessing, classifying and dividing the original image sequence data set to obtain a class label set, a training set and a test set; A training module, used for building a train control on-board equipment recognition model, and using the training set to train the train control on-board equipment recognition model to obtain a three-branch prediction result; A loss calculation module, used to calculate the total loss according to the category label set and the three-branch output results; An optimal model determination module, used to calculate the gradient of the total loss to the parameters of the train control on-board equipment identification model, iteratively update the parameters of the train control on-board equipment identification model, and determine the optimal train control on-board equipment identification model; The identification module is used to input the test set into the optimal train control on-board equipment identification model to obtain the optimal three-branch prediction result and complete the identification of the train control on-board equipment.
11. A computer-readable storage medium, characterized in that: A program or instruction is stored, and when the program or instruction is run on a computer, the computer executes the train control vehicle-mounted equipment identification method as described in any one of claims 1-9.
12. An electronic device, characterized in that: comprising a processor coupled to a memory; The processor is used to read and execute the computer program stored in the memory to implement the train control vehicle-mounted equipment identification method as described in any one of claims 1-9.
Citation Information
Patent Citations
Unmanned aerial vehicle aerial photography target credible identification method based on data and model dual uncertainty perception
CN116740587A
Freight train foreign matter detection method and system based on YOLOv8
CN117557860A
Target detection method and device, equipment and storage medium
CN118864822A
Road disease detection method based on scale difference
CN119206176A
Remote sensing small target detection method based on YOLOv5
CN119206181A