Anti-collision warning device for railway mobile equipment

By combining SegNet and YoLoV8 models in the railway mobile equipment anti-collision warning device, it can identify and warn of complex foreign object intrusions on railway lines, solving the problem of difficulty in detecting complex foreign objects in the existing technology and improving railway safety.

CN118182572BActive Publication Date: 2024-10-15CHONGQING LOCOMOTIVE DEPOT OF CHINA RAILWAY CHENGDU BUREAU GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410611061.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-10-15
Estimated Expiration
2044-05-16

AI Technical Summary

Technical Problem

When detecting multiple foreign objects, the existing online monitoring system for railway train operating lines and driving conditions cannot correctly identify complex foreign object intrusion situations due to the single feature extracted by the model and algorithm, leading to the risk of driving safety accidents.

Method used

Design a collision avoidance warning device for railway mobile equipment, using the SegNet semantic segmentation network model and YoLoV8 target detection model, collecting line images through the long auxiliary lookout collector and road condition image collector, and using the neural network model to confirm the intrusion of foreign objects in front of the road, and The detection results are integrated through the track extraction module, foreign matter extraction module and determination module to determine whether the actual position of the foreign matter is on the track and provide early warning information.

Benefits of technology

It achieves accurate identification and early warning of complex foreign object intrusion situations, reduces accidents, helps locomotive drivers avoid collisions through real-time monitoring and early warning, and improves driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118182572B_ABST
    Figure CN118182572B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing and computer vision technology, and in particular to a railway mobile equipment anti-collision warning device, including a long auxiliary lookout collector, a line lookout warning auxiliary device host, a long road condition image collector and an auxiliary lookout display screen. The present invention uses a deep learning algorithm to automatically analyze and process line images, which can quickly and accurately detect foreign objects on the line, such as branches, stones, garbage, etc. Compared with traditional manual feature extraction and classification methods, deep learning has higher accuracy and robustness in identifying and locating foreign objects. It has high-precision feature extraction and classification capabilities, and can more accurately detect and locate foreign objects on the line, helping drivers to timely assess risks and take appropriate measures. Overall, the device is a technology with innovative and practical value, which is of great significance to the driving safety of diesel locomotives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent transportation technology, and in particular to an anti-collision warning device for railway mobile equipment. Background Art

[0002] With the continuous development of railway transportation, problems such as line obstacle intrusion have become increasingly prominent. Line blind spot auxiliary observation display and line foreign object intrusion detection reminder have become the key tasks of railway locomotive operation safety production management. During train operation, if rocks and branches fall from the natural environment, waste is placed by humans, and people and livestock break into the line, if the crew is in the blind spot and cannot observe in time, there is a risk of driving safety accidents.

[0003] The patent with publication number CN116279673A discloses an online monitoring system and device for train operation line and driving status, which relates to the field of train monitoring. In the system, the image acquisition module acquires railway line images and contact network images; the monitoring module acquires driving behavior images; the ground monitoring module is arranged next to a small-radius curved railway line with line of sight obstruction to monitor intrusive foreign objects on the curved line; the processing module is arranged in the on-board main box of the train, and the processing module determines in real time whether there are foreign objects on the railway line, foreign objects on the contact network, and abnormal operation of the driver and crew based on the railway line image, the contact network image and the driving behavior image, and directly acquires the foreign object monitoring results of the ground monitoring module; when foreign objects on the railway line, foreign objects on the contact network, or abnormal operation of the driver and crew are found, the corresponding information is transmitted to the train control host and an alarm is issued.

[0004] It can be seen that the train operation line and driving status online monitoring system and device have the following problems:

[0005] When the system detects multiple foreign objects, it cannot correctly identify complex foreign object intrusion situations because the model and algorithm used to extract single features. Summary of the invention

[0006] To this end, the present invention provides a railway mobile equipment anti-collision warning device to overcome the problem in the prior art that the device cannot correctly identify complex foreign object intrusion situations due to the single model and algorithm used to extract features when detecting multiple foreign objects.

[0007] To achieve the above object, the present invention provides a railway mobile equipment anti-collision warning device, comprising:

[0008] Long auxiliary lookout collector, set on the locomotive's real-time running line, to collect images of the line ahead of the locomotive;

[0009] A road condition image collector is arranged on the real-time running route of the locomotive, and is used to collect the road condition in front of the locomotive in real time to form an image array;

[0010] A main unit of the route observation and warning auxiliary device is connected to the road condition image collector and the long auxiliary observation collector respectively, and is used to confirm the intrusion of foreign objects in front of the road according to the image through several built-in neural network models and to determine the abnormal road condition according to the image array;

[0011] The auxiliary lookout display screen is connected to the main unit of the line lookout warning auxiliary device and is used to select and adjust the warning strategy according to the foreign object intrusion situation and the abnormal road condition.

[0012] Furthermore, the main unit of the line observation and warning auxiliary device includes a track extraction module, a foreign matter extraction module and a determination module;

[0013] The track extraction module is used to determine track information from the front line image according to the SegNet semantic segmentation network model;

[0014] The foreign object extraction module is used to determine foreign object information from the front line image according to the YoLoV8 target detection model;

[0015] The determination module is used to integrate the detection results of the YoLoV8 target detection model and the detection results of the SegNet semantic segmentation network model to obtain an integrated result, and determine whether the actual position of the foreign object is on the track based on the integrated result and the preset first pixel threshold and second pixel threshold.

[0016] Furthermore, the track extraction module includes:

[0017] A data preparation unit, used to annotate the image data set containing tracks collected by the long auxiliary observation collector, annotate the tracks as white and the background as black for each image, and to resize, crop, enhance, normalize, expand data and convert labels for the annotated images to form preprocessed images;

[0018] A data set division unit, connected to the data preparation unit, for dividing the pre-processed images into a training set and a validation set;

[0019] A semantic segmentation training unit, connected to the data set partitioning unit, for training the preset SegNet semantic segmentation network model according to the training set and the validation set;

[0020] The track segmentation unit is connected to the semantic segmentation training unit and is used to use the trained SegNet semantic segmentation network model to segment the tracks of the re-collected images from the background to obtain an image with the track marked, wherein the white pixels in the image with the track marked represent the track and the black pixels represent the background.

[0021] Furthermore, the data set division unit includes:

[0022] Determine a division ratio subunit, which is used to divide the first 80% of the preprocessed image into a training set and the last 20% of the preprocessed image into a verification set as a division ratio;

[0023] A random sorting subunit, used for randomly sorting the pre-processed images;

[0024] a division subunit, connected to the division ratio determination subunit and the random sorting subunit, respectively, for taking the first 80% of the images of the pre-processed images after random sorting as a training set and the last 20% of the images as a verification set;

[0025] The storage subunit is connected to the division subunit and is used to put the images of the training set and the verification set into two different folders for distinction.

[0026] Furthermore, the data preparation unit includes:

[0027] A resizing subunit is used to uniformly resize the collected railway track images to a fixed size, and select an image size that meets the input requirements of the model;

[0028] The cropping subunit is used to crop and remove the black edges in the image and the pure background area below the cropping;

[0029] The enhancement subunit is used to generate new training samples without changing the semantic information of the image through rotation, flipping, translation, and scaling operations;

[0030] The normalization subunit is used to normalize the image and scale the pixel value range to between -1 and 1 so as to standardize the pixel values ​​using the mean and standard deviation;

[0031] A data expansion subunit, used to generate training samples by rotation, translation and affine transformation for samples whose sample number of the image is less than a preset threshold;

[0032] The label conversion subunit is used to mark the track as white pixels and the background as black pixels through pixel-level labeling tools, and convert the marked area into the label of each pixel.

[0033] Furthermore, the semantic segmentation training unit includes:

[0034] The semantic segmentation network model selection subunit is used to select an existing pre-trained SegNet semantic segmentation network model, wherein the existing pre-trained SegNet semantic segmentation network model includes:

[0035] The front-end encoder consists of multiple convolutional layers and pooling layers. The convolutional layer uses a 3x3 convolution kernel for convolution operations and a ReLU activation function for nonlinear transformation. The pooling layer uses maximum pooling to reduce the spatial dimension of the feature map.

[0036] The backend decoder consists of upsampling and convolution operations to reconstruct high-resolution semantic segmentation results. The upsampling operation is implemented using deconvolution.

[0037] Skip connection, skipping the feature map in the front-end encoder to the corresponding back-end decoder layer, is used to fuse feature information of different resolution scales;

[0038] Output layer: The output of the last convolutional layer is normalized by the softmax activation function to generate a predicted semantic segmentation image. The prediction result of each pixel represents the semantic category to which it belongs.

[0039] Furthermore, the foreign matter extraction module comprises:

[0040] A labeling data processing unit, used to convert the image of the labeling track into a format corresponding to the YoLoV8 target detection model, each of the images of the labeling track corresponds to a text file, wherein each text file represents each target instance, and the target instance includes the category of the target, the coordinates of the upper left corner of the bounding box, and the width and height information of the bounding box;

[0041] A data segmentation unit, connected to the labeling data processing unit, is used to divide the data set containing the images of the labeling tracks after the conversion into a training set and a verification set, 80% of the data is used for training, and 20% of the data is used for verification;

[0042] A model initialization unit, used to initialize the YoLoV8 target detection model by random initialization;

[0043] The loss function definition unit is used to define the loss using the cross entropy loss function and the mean square error loss function;

[0044] The YoLoV8 target detection model training unit is respectively connected to the data segmentation unit, the model initialization unit and the loss function definition unit, and is used to iteratively train the model using the training data set, and in each iteration, input the image model, calculate the loss function, and update the weight of the model using the back propagation algorithm, and use the Adam optimizer to control the mode and speed of gradient update.

[0045] Furthermore, the YoLoV8 target detection model that has been trained detects foreign targets in the segmented area of ​​the track, identifies and locates foreign targets in the track, outputs the bounding box and category information of the foreign target, and draws the bounding box of the detected foreign target on the track of the image according to the output of the model, and annotates its category information on the image by using different labels to form a visual detection image.

[0046] Furthermore, the determination module performs pixel-level region matching on the result output by the YoLoV8 target detection model and the result output by the SegNet semantic segmentation network model to determine the track of each target, and is used to obtain the position information of the target bounding box of the YoLoV8 target detection model, including the coordinates of the upper left corner point and the width and height of the bounding box, and obtain the pixel coordinates of the center point of each target bounding box by calculating the upper left corner coordinates of the bounding box with half the width and height of the bounding box, and obtain the pixel value of the corresponding position in the track segmentation mask of the SegNet semantic segmentation network model by using the pixel coordinates of the center point, and divide each target into the track or the area outside the track according to the pixel value of the track in the image labeled with the track output by the SegNet semantic segmentation network model.

[0047] If the pixel value of the position corresponding to the track in the track-labeled image output by the SegNet semantic segmentation network model is a preset first pixel threshold, the target is divided into an area outside the track;

[0048] If the pixel value of the position corresponding to the track in the track-labeled image output by the SegNet semantic segmentation network model is a preset second pixel threshold, the target is divided into an area located on the track.

[0049] Furthermore, the line observation and warning auxiliary device host also includes:

[0050] A face and eye recognition camera is installed at one end of the host of the line observation and warning auxiliary device, which is used for real-time monitoring and voice alarm prompts, warning the driver to adjust the driving status in time and automatically upload the alarm data;

[0051] The panoramic camera is arranged below the face and eye recognition camera, and is used for real-time monitoring of the driver's hand brake status during locomotive operation, and for providing voice alarm prompts and warning the driver to make timely corrections, while automatically generating alarm data and uploading it to the ground software.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] By collecting images of the line ahead of the vehicle and using the built-in neural network model for analysis and warning, it can accurately warn of foreign object intrusion and abnormal road conditions ahead, and provide timely warning information. Through monitoring and warning, the device helps locomotive drivers avoid collisions with foreign objects or driving on dangerous roads, thereby reducing the occurrence of accidents. Through timely line information and warning information, it can help locomotive drivers make appropriate adjustments and controls, and through real-time monitoring of the locomotive driver's driving status, remind the driver to stay alert.

[0054] Furthermore, by training and optimizing the track extraction module and the foreign object extraction module, accurate segmentation and detection of tracks and foreign object targets can be achieved. By processing image data in real time and completing segmentation and detection in a short time, timely warning and target detection results can be provided. It can accurately segment the tracks in the image and detect foreign object targets in the track area, providing accurate warning and target detection information.

[0055] Furthermore, the data preparation unit annotates and preprocesses the images to ensure the quality and rationality of the image data, and provides accurate annotated and preprocessed images for training. The semantic segmentation training unit uses the training set and the validation set to train the SegNet semantic segmentation network model, which improves the accuracy and robustness of the model. By using the trained model, the tracks in the image can be accurately segmented from the background in practical applications, and a visual annotated track image can be achieved, providing a reliable foundation for subsequent track analysis and processing.

[0056] Furthermore, by determining the division ratio subunit, the pre-processed images are divided into a training set and a validation set at a ratio of 80% and 20%. Such a division ratio can provide sufficient validation data while ensuring a sufficient number of training samples, ensuring the accuracy and generalization ability of the model, and randomly sorting the pre-processed images through the random sorting subunit, avoiding the orderliness of the images from causing deviations in the results of model training and validation, and improving the diversity and coverage of data samples. The images of the training set and the validation set are stored in different folders through the storage subunit, so that the training set and the validation set can be effectively distinguished and managed.

[0057] Furthermore, through the resizing and cropping subunits, the images are uniformly adjusted and cropped, unnecessary black edges and pure background areas are removed, and useful track areas are retained, thereby improving the accuracy and effectiveness of the data. Through the enhancement and normalization subunits, the data diversity is increased by using operations such as rotation, flipping, translation, and scaling, and the pixel values ​​are standardized to improve the diversity and consistency of the data and enhance the adaptability of the model to different scenes. Through the data expansion subunit, new training samples are generated for images with a small number of samples by using rotation, translation, and affine transformation, thereby improving the diversity and quantity of the data. At the same time, the track and background are annotated as specific pixel points through the label conversion subunit, providing accurate label information for easy model learning and recognition.

[0058] Furthermore, by selecting the existing pre-trained SegNet semantic segmentation network model, the advantages of the pre-trained model can be utilized to reduce the model's training time and computing resource consumption, while improving the model's accuracy and robustness. Through the configuration of the front-end encoder and the back-end decoder, the input image is feature extracted and reconstructed, retaining the image's semantic features and detail information, improving the model's accuracy and precision in track segmentation, and passing the front-end encoder's feature map to the corresponding back-end decoder layer through the Skip connection, integrating feature information of different resolution scales, and improving the model's semantic understanding and segmentation capabilities. The output layer normalizes and classifies the output of the last convolutional layer to generate a predicted semantic segmentation image, assigning a semantic category to each pixel in the image, and achieving accurate track segmentation.

[0059] Furthermore, through the annotation data processing unit, the annotated track image is converted into the format required by the YoLoV8 target detection model, ensuring the accuracy and applicability of the annotated data and providing the label information required for model training. The data set is divided into a training set and a validation set through the data segmentation unit, with 80% of the data used for training and 20% of the data used for validation, ensuring the adequacy and reliability of the model training and validation data and improving the generalization ability and accuracy of the model. The YoLoV8 target detection model is initialized through the model initialization unit, and the model is iteratively trained using the training data set through the training unit, the cross entropy loss and mean square error loss functions are used for loss calculation, the model weights are updated using the back propagation algorithm, and the Adam optimizer is used to control the way and speed of gradient updating, thereby improving the accuracy and generalization ability of the model.

[0060] Furthermore, the trained YoLoV8 target detection model can accurately detect and identify foreign objects in actual images, locate and classify them by outputting their bounding boxes and category information, and has high detection accuracy and generalization ability. It provides an intuitive visual representation by drawing the bounding boxes of detected foreign objects on the track of the image and annotating their category information on the image with different labels.

[0061] Furthermore, the track area where each target is located is determined by matching the pixel-level regions of the output results of the two models. According to the pixel values ​​of the corresponding positions in the track segmentation mask output by the SegNet semantic segmentation network model, it is judged whether the target is on the track or outside the track, and the precise positioning and division of the target area is achieved. By setting the preset first and second pixel thresholds, according to the pixel values ​​of the corresponding positions of the track in the annotated track image output by the SegNet semantic segmentation network model, the target is divided into an area outside the track or an area on the track. Through such judgment and division, the certainty and accuracy of the track where the target is located is achieved.

[0062] Furthermore, by monitoring the driver's facial image in real time and using a fully convolutional neural network model to analyze the head posture and the status of the eyes and mouth, an evaluation value is obtained by combining the classification results with different weights to judge the driver's mental state and issue a warning. By detecting the position of the driver's hand holding the gate in real time, and using a convolutional neural network model to extract features and calculate the degree of overlap with the hand shape, the gate status is evaluated and warned according to the indicators. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 This is a schematic diagram of the structure of the anti-collision warning device for railway mobile equipment in this embodiment;

[0064] Figure 2 This is a schematic diagram of the structure of the main unit of the line observation and warning auxiliary device of this embodiment;

[0065] Figure 3 is a structural block diagram of the track extraction module of this embodiment;

[0066] Figure 4 This is a structural block diagram of the data partitioning unit in this embodiment. DETAILED DESCRIPTION

[0067] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0068] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0069] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0070] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0071] See also Figure 1-4 As shown, Figure 1 This is a schematic diagram of the structure of the anti-collision warning device for railway mobile equipment in this embodiment; Figure 2 This is a schematic diagram of the structure of the main unit of the line observation and warning auxiliary device of this embodiment; Figure 3 is a structural block diagram of the track extraction module of this embodiment; Figure 4 This is a structural block diagram of the data partitioning unit in this embodiment.

[0072] See also Figure 1 As shown, this embodiment provides a railway mobile equipment anti-collision warning device, including:

[0073] A long auxiliary lookout collector 1 is arranged on the real-time running line of the locomotive to collect images of the line ahead of the locomotive;

[0074] A road condition image collector 3, arranged on the real-time running route of the locomotive, for collecting the road condition in front of the locomotive in real time to form an image array;

[0075] The main unit 2 of the route observation and warning auxiliary device is connected to the road condition image collector and the long auxiliary observation collector respectively, and is used to confirm the intrusion of foreign objects in front of the road according to the image through several neural network models set inside, and to determine the abnormal road condition according to the image array;

[0076] The auxiliary lookout display screen 4 is connected to the main unit of the line lookout warning auxiliary device and is used to select and adjust the warning strategy according to the foreign object intrusion situation and the abnormal road condition.

[0077] The long auxiliary lookout collector collects images of the line ahead of the locomotive; the road condition image collector collects the road condition ahead of the locomotive in real time. The line lookout warning auxiliary device host confirms the intrusion of foreign objects in front of the road according to the image through several built-in neural network models and determines the abnormal road condition according to the image array; the auxiliary lookout display screen selects and adjusts the warning strategy according to the foreign object intrusion and the abnormal road condition.

[0078] By collecting images of the line ahead of the vehicle and using the built-in neural network model for analysis and warning, it can accurately warn of foreign object intrusion and abnormal road conditions ahead, and provide timely warning information. Through monitoring and warning, the device helps locomotive drivers avoid collisions with foreign objects or driving on dangerous roads, thereby reducing the occurrence of accidents. Through timely line information and warning information, it can help locomotive drivers make appropriate adjustments and controls, and through real-time monitoring of the locomotive driver's driving status, remind the driver to stay alert.

[0079] See also Figure 2 As shown, specifically, the main unit of the line observation and warning auxiliary device includes a track extraction module 21, a foreign matter extraction module 22 and a determination module 23;

[0080] The track extraction module is used to determine track information from the front line image according to the SegNet semantic segmentation network model;

[0081] The foreign object extraction module is used to determine foreign object information from the front line image according to the YoLoV8 target detection model;

[0082] The determination module is used to integrate the detection results of the YoLoV8 target detection model and the detection results of the SegNet semantic segmentation network model to obtain an integrated result, and determine whether the actual position of the foreign object is on the track based on the integrated result and the preset first pixel threshold and second pixel threshold.

[0083] The main unit of the line observation and warning auxiliary device includes a track extraction module, a foreign object extraction module and a determination module. The track extraction module determines the track information in the image of the line ahead according to the SegNet semantic segmentation network model. The foreign object extraction module determines the foreign object information in the image of the line ahead according to the YoLoV8 target detection model. The determination module integrates the detection results of the YoLoV8 target detection and the SegNet semantic segmentation network model to determine whether the actual position of the foreign object is on the track. The main unit of the device is connected to the auxiliary observation display, the long-end road condition image collector and the TAX box to collect the image of the line ahead of the vehicle, monitor the equipment status in real time and provide real-time line information and warning information.

[0084] The data preparation unit annotates and preprocesses the images to ensure the quality and rationality of the image data, and provides accurate annotated and preprocessed images for training. The semantic segmentation training unit uses the training set and validation set to train the SegNet semantic segmentation network model, which improves the accuracy and robustness of the model. By using the trained model, the tracks in the image can be accurately segmented from the background in practical applications, and a visual annotated track image can be achieved, providing a reliable foundation for subsequent track analysis and processing.

[0085] By training and optimizing the track extraction module and the foreign object extraction module, accurate segmentation and detection of tracks and foreign objects can be achieved. By processing image data in real time and completing segmentation and detection in a short time, timely warning and target detection results can be provided. It can accurately segment tracks in images and detect foreign objects in the track area, providing accurate warning and target detection information.

[0086] See also Figure 3 As shown, specifically, the track extraction module includes:

[0087] The data preparation unit 211 is used to annotate the image data set containing tracks collected by the long auxiliary observation collector, annotate the tracks as white and the background as black for each image, and resize, crop, enhance, normalize, expand data and convert labels for the annotated images to form preprocessed images;

[0088] A data set division unit 212, connected to the data preparation unit, for dividing the pre-processed images into a training set and a validation set;

[0089] A semantic segmentation training unit 213, connected to the data set partitioning unit, for training the preset SegNet semantic segmentation network model according to the training set and the validation set;

[0090] The track segmentation unit is connected to the semantic segmentation training unit and is used to use the trained SegNet semantic segmentation network model to segment the tracks of the re-collected images from the background to obtain an image with the track marked, wherein the white pixels in the image with the track marked represent the track and the black pixels represent the background.

[0091] The image data set collected by the long auxiliary lookout collector is annotated and preprocessed through the data preparation unit. The data preparation unit annotates the images containing the tracks, annotates the tracks as white and the background as black, and resizes, crops, enhances, normalizes, expands the data, and converts the labels of the annotated images to generate preprocessed images.

[0092] The data preparation unit annotates and preprocesses the images to ensure the quality and rationality of the image data, and provides accurate annotated and preprocessed images for training. The semantic segmentation training unit uses the training set and validation set to train the SegNet semantic segmentation network model, which improves the accuracy and robustness of the model. By using the trained model, the tracks in the image can be accurately segmented from the background in practical applications, and a visual annotated track image can be achieved, providing a reliable foundation for subsequent track analysis and processing.

[0093] See also Figure 4 As shown, specifically, the data set division unit includes:

[0094] Determine a division ratio subunit 2121, which is used to divide the first 80% of the pre-processed image into a training set and the last 20% of the pre-processed image into a verification set as a division ratio;

[0095] A random sorting subunit 2122, used for randomly sorting the pre-processed images;

[0096] A division subunit 2123, connected to the determination division ratio subunit and the random sorting subunit, respectively, is used to use the first 80% of the images of the pre-processed images after random sorting as a training set and the last 20% of the images as a verification set;

[0097] The storage subunit 2124 is connected to the division subunit, and is used to put the images of the training set and the verification set into two different folders for distinction.

[0098] The pre-processed images are divided into training set and validation set by determining the division ratio subunit, and the images are randomly sorted by the random sorting subunit. Then, the division subunit uses the first 80% of the images as the training set and the last 20% of the images as the validation set, and the images are stored in corresponding folders by the storage subunit.

[0099] By determining the division ratio subunit, the pre-processed images are divided into a training set and a validation set at a ratio of 80% and 20%. Such a division ratio can provide sufficient validation data while ensuring a sufficient number of training samples, ensuring the accuracy and generalization ability of the model. The pre-processed images are randomly sorted by the random sorting subunit, avoiding the orderliness of the images from causing deviations in the results of model training and validation, and improving the diversity and coverage of data samples. The images of the training set and the validation set are stored in different folders by the storage subunit, so that the training set and the validation set can be effectively distinguished and managed.

[0100] Specifically, the data preparation unit includes:

[0101] A resizing subunit is used to uniformly resize the collected railway track images to a fixed size, and select an image size that meets the input requirements of the model;

[0102] The cropping subunit is used to crop and remove the black edges in the image and the pure background area below the cropping;

[0103] The enhancement subunit is used to generate new training samples without changing the semantic information of the image through rotation, flipping, translation, and scaling operations;

[0104] The normalization subunit is used to normalize the image and scale the pixel value range to between -1 and 1 so as to standardize the pixel values ​​using the mean and standard deviation;

[0105] A data expansion subunit, used to generate training samples by rotation, translation and affine transformation for samples whose sample number of the image is less than a preset threshold;

[0106] The label conversion subunit is used to mark the track as white pixels and the background as black pixels through pixel-level labeling tools, and convert the marked area into the label of each pixel.

[0107] The collected railway track images are preprocessed and data augmented through operations such as resizing, cropping, enhancement, normalization, data augmentation, and label conversion subunits to meet the input requirements of the model and improve the diversity and quality of the data.

[0108] Through the resizing and cropping subunits, the images are uniformly adjusted and cropped, unnecessary black edges and pure background areas are removed, and useful track areas are retained, which improves the accuracy and effectiveness of the data. Through the enhancement and normalization subunits, the data diversity is increased by using operations such as rotation, flipping, translation, and scaling, and the pixel values ​​are standardized to improve the diversity and consistency of the data and enhance the adaptability of the model to different scenes. Through the data expansion subunit, images with a small number of samples are rotated, translated, and affine transformed to generate new training samples, which improves the diversity and quantity of the data. At the same time, the track and background are annotated as specific pixel points through the label conversion subunit, providing accurate label information for model learning and recognition.

[0109] Specifically, the semantic segmentation training unit includes:

[0110] The semantic segmentation network model selection subunit is used to select an existing pre-trained SegNet semantic segmentation network model, wherein the existing pre-trained SegNet semantic segmentation network model includes:

[0111] The front-end encoder consists of multiple convolutional layers and pooling layers. The convolutional layer uses a 3x3 convolution kernel for convolution operations and a ReLU activation function for nonlinear transformation. The pooling layer uses maximum pooling to reduce the spatial dimension of the feature map.

[0112] The backend decoder consists of upsampling and convolution operations to reconstruct high-resolution semantic segmentation results. The upsampling operation is implemented using deconvolution.

[0113] Skip connection, skipping the feature map in the front-end encoder to the corresponding back-end decoder layer, is used to fuse feature information of different resolution scales;

[0114] Output layer: The output of the last convolutional layer is normalized by the softmax activation function to generate a predicted semantic segmentation image. The prediction result of each pixel represents the semantic category to which it belongs.

[0115] By selecting an existing pre-trained SegNet semantic segmentation network model and configuring its front-end encoder, back-end decoder, Skip connection and output layer, the semantic segmentation network is built and the model is selected.

[0116] By selecting the existing pre-trained SegNet semantic segmentation network model, the advantages of the pre-trained model can be used to reduce the model's training time and computing resource consumption, while improving the model's accuracy and robustness. Through the configuration of the front-end encoder and the back-end decoder, the input image is feature extracted and reconstructed, retaining the image's semantic features and detail information, improving the model's accuracy and precision in track segmentation. The feature map of the front-end encoder is passed to the corresponding back-end decoder layer through the Skip connection, integrating feature information of different resolution scales, and improving the model's semantic understanding and segmentation capabilities. The output layer normalizes and classifies the output of the last convolutional layer to generate a predicted semantic segmentation image, assigning a semantic category to each pixel in the image, and achieving accurate track segmentation.

[0117] Specifically, the foreign body extraction module includes:

[0118] A labeling data processing unit, used to convert the image of the labeling track into a format corresponding to the YoLoV8 target detection model, each of the images of the labeling track corresponds to a text file, wherein each text file represents each target instance, and the target instance includes the category of the target, the coordinates of the upper left corner of the bounding box, and the width and height information of the bounding box;

[0119] A data segmentation unit, connected to the labeling data processing unit, is used to divide the data set containing the images of the labeling tracks after the conversion into a training set and a verification set, 80% of the data is used for training, and 20% of the data is used for verification;

[0120] A model initialization unit, used to initialize the YoLoV8 target detection model by random initialization;

[0121] The loss function definition unit is used to define the loss using the cross entropy loss function and the mean square error loss function;

[0122] The YoLoV8 target detection model training unit is respectively connected to the data segmentation unit, the model initialization unit and the loss function definition unit, and is used to iteratively train the model using the training data set, and in each iteration, input the image model, calculate the loss function, and update the weight of the model using the back propagation algorithm, and use the Adam optimizer to control the mode and speed of gradient update.

[0123] The visual detection module includes units such as annotated data processing, data segmentation, model initialization, loss function definition, and YoLoV8 target detection model training. The annotated data processing unit converts the annotated track image into the format required by the YoLoV8 target detection model; the data segmentation unit divides the data set into a training set and a validation set; the model initialization unit randomly initializes the YoLoV8 target detection model; the loss function definition unit defines the cross entropy loss and mean square error loss functions; the YoLoV8 target detection model training unit uses the training data set to iteratively train the model, and updates the model weights through the back-propagation algorithm, using the Adam optimizer to control the way and speed of gradient updates.

[0124] Through the annotation data processing unit, the annotated track image is converted into the format required by the YoLoV8 target detection model, which ensures the accuracy and applicability of the annotation data and provides the label information required for model training. The data segmentation unit divides the data set into a training set and a validation set, with 80% of the data used for training and 20% of the data used for validation, ensuring the adequacy and reliability of the model training and validation data and improving the generalization ability and accuracy of the model. The YoLoV8 target detection model is initialized through the model initialization unit, and the model is iteratively trained using the training data set through the training unit. The cross entropy loss and mean square error loss functions are used for loss calculation, the back propagation algorithm is used to update the model weights, and the Adam optimizer is used to control the way and speed of gradient update, thereby improving the accuracy and generalization ability of the model.

[0125] Specifically, the trained YoLoV8 target detection model detects foreign targets in the segmented track area, identifies and locates foreign targets in the track, outputs the bounding box and category information of the foreign targets, and draws the bounding box of the detected foreign targets on the track of the image according to the output of the model, and annotates its category information on the image by using different labels to form a visual detection image.

[0126] According to the trained YoLoV8 target detection model, foreign objects in the segmented track area are detected, identified and located, and their bounding boxes and category information are output. According to the output results of the model, the bounding boxes of the detected foreign objects are drawn on the track of the image, and their category information is annotated on the image using different labels to form a visual detection image.

[0127] The trained YoLoV8 target detection model can accurately detect and identify foreign objects in actual images, locate and classify them by outputting their bounding boxes and category information, and has high detection accuracy and generalization ability. It provides an intuitive visual representation by drawing the bounding boxes of detected foreign objects on the track of the image and annotating their category information on the image with different labels.

[0128] Specifically, the determination module performs pixel-level region matching on the result output by the YoLoV8 target detection model and the result output by the SegNet semantic segmentation network model to determine the track of each target, and is used to obtain the position information of the bounding box of the target of the YoLoV8 target detection model, including the coordinates of the upper left corner point and the width and height of the bounding box, and calculate the pixel coordinates of the center point of each target bounding box by calculating the upper left corner coordinates of the bounding box with half the width and height of the bounding box, and obtain the pixel value of the corresponding position in the track segmentation mask of the SegNet semantic segmentation network model by using the pixel coordinates of the center point, and divide each target into the track or the area outside the track according to the pixel value of the track in the image labeled with the track output by the SegNet semantic segmentation network model.

[0129] If the pixel value of the position corresponding to the track in the track-labeled image output by the SegNet semantic segmentation network model is a preset first pixel threshold, the target is divided into an area outside the track;

[0130] If the pixel value of the position corresponding to the track in the track-labeled image output by the SegNet semantic segmentation network model is a preset second pixel threshold, the target is divided into an area located on the track.

[0131] The output result integration module performs pixel-level region matching on the output results of the YoLoV8 target detection model and the SegNet semantic segmentation network model. The track of each target is determined by the matching results, and the bounding box position information of the target is obtained. By calculating the pixel coordinates of the center point of the bounding box, the pixel value of the corresponding position in the track segmentation mask of the SegNet semantic segmentation network model is obtained, and the target is divided into the track or the area outside the track according to the pixel value.

[0132] By matching the pixel-level regions of the output results of the two models, the track area where each target is located is determined. According to the pixel values ​​of the corresponding positions in the track segmentation mask output by the SegNet semantic segmentation network model, it is judged whether the target is on the track or outside the track, and the target area is accurately located and divided. By setting the preset first and second pixel thresholds, according to the pixel values ​​of the corresponding positions of the track in the annotated track image output by the SegNet semantic segmentation network model, the target is divided into an area outside the track or an area on the track. Through such judgment and division, the certainty and accuracy of the track where the target is located is achieved.

[0133] In this embodiment, the first pixel threshold is set to 0, and the second pixel threshold is set to 255.

[0134] Specifically, the line observation and warning auxiliary device host also includes:

[0135] A face and eye recognition camera is installed at one end of the host of the line observation and warning auxiliary device, which is used for real-time monitoring and voice alarm prompts, warning the driver to adjust the driving status in time and automatically upload the alarm data;

[0136] The panoramic camera is arranged below the face and eye recognition camera, and is used for real-time monitoring of the driver's hand-holding gate status during locomotive operation, and provides voice alarm prompts and warns the driver to make timely corrections, while automatically generating alarm data and uploading it to the ground software.

[0137] During the operation of the face and eye recognition camera and the panoramic camera, the host of the line observation and warning auxiliary device collects standard color card images of different color temperatures for establishing a corresponding relationship, analyzes sample data, uses regression analysis or least squares method to find the best parameter combination, and establishes a linear function for mapping the original color value output by the camera to the real color value. The mapping function maps the original color value to the real color value by correcting the original color value;

[0138] The face and eye recognition camera collects the driver's face image in real time. The main unit of the route lookout and warning auxiliary device is provided with a full convolutional neural network model for judging the current mental state of the driver. The main unit of the route lookout and warning auxiliary device estimates the three-dimensional posture information of the head by using the position information of the key points of the face and the three-dimensional coordinate position of the average face learned offline and the positioning method based on point features in the field of camera calibration. The opening and closing states of the two eyes and the mouth are identified by the three-dimensional posture information, and the results of face recognition classification and the results of eye and mouth state classification are weighted normalized. The weights of the results of face recognition classification and the results of eye and mouth state classification are set. According to the set weights and calculation formulas, each result is multiplied by the corresponding weight, and they are added to obtain the final evaluation value.

[0139] If the evaluation value is greater than 0.5, the driver is judged to be in a good mental state;

[0140] If the evaluation value is less than or equal to 0.5, the driver is judged to be in a poor mental state and a warning is issued;

[0141] The panoramic camera collects the image of the driver's cab in real time. The main unit of the line observation and warning auxiliary device is provided with a convolutional neural network model for detecting the position of the gate. The convolutional neural network model adopts a single pipeline strategy. The main unit of the line observation and warning auxiliary device collects several different types of locomotive gate image materials and extracts semantic features from the image materials. The semantic features include contour, edge, color, texture and shape features. The extracted semantic features are used to train the convolutional neural network model.

[0142] The input image and the corresponding gate position are used as training samples. The convolutional neural network optimizes the parameters in the network according to the loss function through the back propagation algorithm, and adjusts the weight and bias of the network through the gradient descent optimization algorithm to infer the gate position in the image.

[0143] The trained network model accepts new images as input and predicts the location of the gate in the image through the forward propagation process;

[0144] The line observation and warning auxiliary device host uses the full convolutional neural network model to detect the state of holding the gate. The line observation and warning auxiliary device host extracts features of the input image through the full convolutional neural network model to obtain multiple feature maps, and restores the resolution of the feature map to the same size as the original image through an upsampling operation, and merges the channels of the upsampled feature map to obtain the final output feature map. The output feature map contains information on the contour boundary extraction of the gate pole and the feature extraction of the gate pole obstruction. The output feature map contains information on the contour boundary extraction of the gate pole and the feature extraction of the gate pole obstruction. According to the output feature map, the degree of overlap between the gate pole and the hand shape is calculated, and the shape matching algorithm is used to perform similarity calculation to obtain an indicator representing the state of the gate. The indicator is a discrete value, representing the specific state of the gate.

[0145] The main unit of the line observation and warning auxiliary device includes a face and eye recognition camera and a panoramic camera. The face and eye recognition camera monitors the driver's mental state in real time and issues a voice alarm prompt, while the panoramic camera monitors the driver's hand-holding gate status and issues a voice alarm prompt. During the working process of the face and eye recognition camera and the panoramic camera, by collecting standard color card images with different color temperatures, a color value mapping function is established to correct the original color value output by the camera. The face and eye recognition camera collects the driver's face image in real time, uses a fully convolutional neural network model to judge the driver's mental state, and issues a warning based on the evaluation value. The panoramic camera collects the driver's cab image in real time, uses a convolutional neural network model to detect the hand-holding gate status, and evaluates the gate lever status based on the indicators.

[0146] By monitoring the driver's facial image in real time and using a fully convolutional neural network model to analyze the head posture and the status of the eyes and mouth, the evaluation value is obtained by combining the classification results with different weights, the driver's mental state is judged and an early warning is issued. By detecting the position of the driver's hand holding the gate in real time, and using a convolutional neural network model to extract features and calculate the degree of overlap with the hand shape, the gate status is evaluated and an early warning is issued based on the indicators.

[0147] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0148] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A railway mobile equipment anti-collision warning device, characterized in that: include: Long auxiliary lookout collector, set on the real-time running line of the locomotive, to collect images of the line ahead of the locomotive; A road condition image collector is arranged on the real-time running route of the locomotive, and is used to collect the road condition in front of the locomotive in real time to form an image array; A main unit of the route observation and warning auxiliary device is connected to the road condition image collector and the long auxiliary observation collector respectively, and is used to confirm the intrusion of foreign objects in front of the road according to the image through several built-in neural network models and to determine the abnormal road condition according to the image array; An auxiliary lookout display screen is connected to the main unit of the line lookout warning auxiliary device and is used to select and adjust the warning strategy according to the foreign object intrusion situation and the abnormal road condition; The main unit of the line observation and warning auxiliary device includes a track extraction module, a foreign body extraction module and a determination module; The track extraction module is used to determine track information from the front line image according to the SegNet semantic segmentation network model; The foreign object extraction module is used to determine foreign object information from the front line image according to the YoLoV8 target detection model; The determination module is used to integrate the detection result of the YoLoV8 target detection model and the detection result of the SegNet semantic segmentation network model to obtain an integration result, and determine whether the actual position of the foreign object is on the track according to the integration result and the preset first pixel threshold and second pixel threshold; The determination module performs pixel-level region matching on the result output by the YoLoV8 target detection model and the result output by the SegNet semantic segmentation network model to determine the track where each target is located, and is used to obtain the position information of the bounding box of the target of the YoLoV8 target detection model, including the coordinates of the upper left corner point and the width and height of the bounding box, and obtain the pixel coordinates of the center point of each target bounding box by calculating the upper left corner coordinates of the bounding box and half of the width and height of the bounding box, and obtain the pixel value of the corresponding position in the track segmentation mask of the SegNet semantic segmentation network model by using the pixel coordinates of the center point, and divide each target into the track or the area outside the track according to the value of the pixel value of the track in the image of the labeled track output by the SegNet semantic segmentation network model, If the pixel value of the position corresponding to the track in the track-labeled image output by the SegNet semantic segmentation network model is a preset first pixel threshold, the target is divided into an area outside the track; If the pixel value at the position corresponding to the track in the track-labeled image output by the SegNet semantic segmentation network model is a preset second pixel threshold, the target is divided into an area located on the track; The line observation and warning auxiliary device host also includes: A face and eye recognition camera is installed at one end of the host of the line observation and warning auxiliary device, which is used for real-time monitoring and voice alarm prompts, warning the driver to adjust the driving status in time and automatically upload the alarm data; The panoramic camera is arranged below the face and eye recognition camera, and is used for real-time monitoring of the driver's hand brake status during locomotive operation, and for providing voice alarm prompts and warning the driver to make timely corrections, while automatically generating alarm data and uploading it to the ground software.

2. The anti-collision warning device for railway mobile equipment according to claim 1 is characterized in that: The track extraction module comprises: A data preparation unit, used to annotate the image data set containing tracks collected by the long auxiliary observation collector, annotate the tracks as white and the background as black for each image, and to resize, crop, enhance, normalize, expand data and convert labels for the annotated images to form preprocessed images; A data set division unit, connected to the data preparation unit, for dividing the pre-processed images into a training set and a validation set; A semantic segmentation training unit, connected to the data set partitioning unit, for training a preset SegNet semantic segmentation network model according to the training set and the validation set; The track segmentation unit is connected to the semantic segmentation training unit and is used to use the trained SegNet semantic segmentation network model to segment the tracks of the re-collected images from the background to obtain an image with the track marked, wherein the white pixels in the image with the track marked represent the track and the black pixels represent the background.

3. The anti-collision warning device for railway mobile equipment according to claim 2, characterized in that: The data set division unit comprises: Determine a division ratio subunit, which is used to divide the first 80% of the preprocessed image into a training set and the last 20% of the preprocessed image into a verification set as a division ratio; A random sorting subunit, used for randomly sorting the pre-processed images; a division subunit, connected to the division ratio determination subunit and the random sorting subunit, respectively, for taking the first 80% of the images of the pre-processed images after random sorting as a training set and the last 20% of the images as a verification set; The storage subunit is connected to the division subunit and is used to put the images of the training set and the verification set into two different folders for distinction.

4. The anti-collision warning device for railway mobile equipment according to claim 3 is characterized in that: The data preparation unit comprises: A resizing subunit is used to uniformly resize the collected railway track images to a fixed size, and select an image size that meets the input requirements of the model; The cropping subunit is used to crop and remove the black edges in the image and the pure background area below the cropping; The enhancement subunit is used to generate new training samples without changing the semantic information of the image through rotation, flipping, translation, and scaling operations; The normalization subunit is used to normalize the image and scale the pixel value range to between -1 and 1 so as to standardize the pixel values ​​using the mean and standard deviation; A data expansion subunit, used to generate training samples by rotation, translation and affine transformation for samples whose sample number of the image is less than a preset threshold; The label conversion subunit is used to mark the track as white pixels and the background as black pixels through pixel-level labeling tools, and convert the marked area into the label of each pixel.

5. The anti-collision warning device for railway mobile equipment according to claim 4, characterized in that: The semantic segmentation training unit comprises: The semantic segmentation network model selection subunit is used to select an existing pre-trained SegNet semantic segmentation network model, wherein the existing pre-trained SegNet semantic segmentation network model includes: The front-end encoder consists of multiple convolutional layers and pooling layers. The convolutional layer uses a 3x3 convolution kernel for convolution operations and a ReLU activation function for nonlinear transformation. The pooling layer uses maximum pooling to reduce the spatial dimension of the feature map. The backend decoder consists of upsampling and convolution operations to reconstruct high-resolution semantic segmentation results. The upsampling operation is implemented using deconvolution. Skip connection, skipping the feature map in the front-end encoder to the corresponding back-end decoder layer, is used to fuse feature information of different resolution scales; Output layer: The output of the last convolutional layer is normalized by the softmax activation function to generate a predicted semantic segmentation image. The prediction result of each pixel represents the semantic category to which it belongs.

6. The anti-collision warning device for railway mobile equipment according to claim 5, characterized in that: The foreign body extraction module comprises: A labeling data processing unit, used to convert the image of the labeling track into a format corresponding to the YoLoV8 target detection model, each of the images of the labeling track corresponds to a text file, wherein each text file represents each target instance, and the target instance includes the category of the target, the coordinates of the upper left corner of the bounding box, and the width and height information of the bounding box; A data segmentation unit, connected to the labeling data processing unit, is used to divide the data set containing the images of the labeling tracks after the conversion into a training set and a verification set, 80% of the data is used for training, and 20% of the data is used for verification; A model initialization unit, used to initialize the YoLoV8 target detection model by random initialization; The loss function definition unit is used to define the loss using the cross entropy loss function and the mean square error loss function; The YoLoV8 target detection model training unit is respectively connected to the data segmentation unit, the model initialization unit and the loss function definition unit, and is used to iteratively train the model using the training data set, and in each iteration, input the image model, calculate the loss function, and update the weight of the model using the back propagation algorithm, and use the Adam optimizer to control the mode and speed of gradient update.

7. The anti-collision warning device for railway mobile equipment according to claim 6, characterized in that: According to the trained YoLoV8 target detection model, foreign objects in the segmented track area are detected, foreign objects in the track are identified and located, and the bounding box and category information of the foreign objects are output. According to the output of the model, the bounding box of the detected foreign objects is drawn on the track of the image, and its category information is annotated on the image by using different labels to form a visual detection image.