Train multi-scale obstacle intelligent detection method

By applying deep learning models of Sparse R-CNN, Transformer and FPN networks in rail transit, a multi-scale obstacle detection system is built, which solves the shortcomings in accuracy and reliability of the existing system and achieves efficient and accurate obstacles. Identification improves train safety.

CN118968461APending Publication Date: 2024-11-15CENT SOUTH UNIV

Patent Information

Application Number
CN202410974388.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing intelligent detection system for on-vehicle obstacles in rail transit has insufficient accuracy and reliability, making it difficult to effectively identify and respond to obstacles of multiple scales, affecting train safety.

Method used

Deep learning model based on Sparse R-CNN, Transformer feature extraction network and FPN feature fusion network are adopted. Track image data is obtained through vehicle-mounted cameras, enhanced processing and annotation are carried out, and an intelligent detection model for initial train obstacles is constructed to realize multi-scale obstacles. Intelligent detection.

Benefits of technology

It improves the accuracy and detection speed of multi-scale obstacle detection on train tracks, reduces the error detection rate, enhances the identification efficiency, reduces the workload of drivers, and has high real-time and application prospects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968461A_ABST
    Figure CN118968461A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-scale obstacle intelligent detection method for a train, which comprises the following steps of: acquiring image data of a track in front of the existing train to obtain a track image data set; performing enhancement processing on the track image data set, and then performing labeling to obtain a training data set; the method comprises the following steps: constructing an initial train obstacle intelligent detection model based on a Sparse R-CNN baseline model, a Transform feature extraction network and an FPN feature fusion network; training the initial train obstacle intelligent detection model by using the training data set to obtain a train obstacle intelligent detection model; and carrying out actual train obstacle detection and identification by using the train obstacle intelligent detection model. According to the method, intelligent detection of the train track obstacle is realized through the convolutional neural network structure design based on deep learning, the accuracy is high, the real-time performance is good, the identification efficiency is improved, and the method has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of rail transit image recognition, and in particular relates to a multi-scale obstacle intelligent detection method for trains. Background Art

[0002] With the rapid development of modern science and technology, the rail transit industry has entered a new stage of development in all countries. With the increase in the operating mileage of urban rail transit, the reliability and safety of train operation have begun to attract more attention. In the current stage of rapid development of rail transit, urban rail transit automatic driving technology is an important way to solve problems such as foreign objects intruding along the track and illegal entry of pedestrians. Therefore, people's demand for accurate and fast obstacle recognition systems has become more urgent.

[0003] Most of the existing track obstacle detection work is based on Jingtai obstacle detection at horizontal intersections, but due to the uncertainty of pedestrian behavior on the road, the rail transit system still has safety issues. The active obstacle detection system based on on-board sensors can realize continuous detection of train tracks, making up for the shortcomings of static infrastructure stage detection and improving the safety of trains. However, the current on-board intelligent obstacle detection system still has deficiencies in accuracy and reliability, which needs further exploration. Summary of the invention

[0004] The purpose of the present invention is to provide a method for intelligently detecting multi-scale obstacles on train tracks, thereby improving the accuracy of multi-scale obstacle detection on train tracks and effectively increasing the detection speed.

[0005] The present invention provides a method for intelligently detecting multi-scale obstacles in trains, comprising the following steps:

[0006] S1. Obtain the existing track image data in front of the train to obtain a track image dataset;

[0007] S2. The track image dataset obtained in step S1 is enhanced and annotated to obtain a training dataset;

[0008] S3. Build the initial train obstacle intelligent detection model based on the Sparse R-CNN baseline model, Transformer feature extraction network and FPN feature fusion network;

[0009] S4. Using the training data set obtained in step S2, the initial train obstacle intelligent detection model obtained in step S3 is trained to obtain a train obstacle intelligent detection model;

[0010] S5. Use the train obstacle intelligent detection model obtained in step S4 to perform actual train obstacle detection and identification.

[0011] Step S1 specifically includes: using the on-board camera to capture the track video information in front of the train, including the platform video, the test line video and the track video; selecting key frames from the video, selecting an image every several frames, and obtaining a track image dataset.

[0012] Step S2 is specifically as follows: firstly, the track image data obtained in step S1 is enhanced, including horizontal or vertical flipping, adding noise and random rotation of the image; then, pixel-level annotation is performed using annotation software to mark obstacles and track danger areas, and the labels include location information and category information; and the track image data with labels is converted into a data set to obtain a training data set.

[0013] The initial train obstacle intelligent detection model described in step S3 includes a feature extraction module, a feature fusion module, an instance interaction module and a detection and recognition module;

[0014] The input image is extracted with features through the feature extraction module, and the feature fusion module fuses the extracted features to obtain a feature map. Finally, the instance interaction module performs instance interaction to obtain a new feature map, feature map classification, and predicted regression box. The output of the instance interaction module is used as the input of the detection and recognition module. The detection and recognition module visualizes the new feature map, feature map classification, and predicted regression box with the original image to obtain the recognition result of the image as the output of the model. The detection and recognition module does not participate in the training process.

[0015] Build feature extraction module based on CSwin Transformer;

[0016] The feature extraction module includes a 7×7 convolutional coding module, a first transformer module, a first merging module, a second transformer module, a second merging module, a third transformer module, a third merging module, and a fourth transformer module which are sequentially connected in series;

[0017] The feature extraction module up-scales and down-samples the input image through a 7×7 convolutional coding module, where the image size is H×W×3, H is the width of the image, and W is the length of the image. Tokens, where C is the feature dimension; the first to fourth transformer modules realize different levels of feature representation through continuous feature learning, and the number of Tokens generated by the i-th transformer module is The output of the i-th transformer module is the i-th feature map;

[0018] The first to third merge modules have the same structure, including a 7×7 convolutional layer; the first to third merge modules reduce the input tokens and double the feature dimension;

[0019] The first to fourth transformer modules have the same structure, including the first batch normalization module, the lightweight local enhancement module, the cross-window self-attention mechanism module, the weighted fusion module, the second batch normalization module and the DO-MLP module;

[0020] The input of the first batch normalization module is the input of the corresponding transformer module; the lightweight local enhancement module uses the output of the first batch normalization module as input; the cross-window self-attention mechanism module uses the output of the first batch normalization module as input; the weighted fusion module uses the output of the lightweight local enhancement module and the cross-window self-attention mechanism module as input; the output of the weighted fusion module is added pixel by pixel to the input of the first batch normalization module, and the result is used as the input of the second batch normalization module; the DO-MLP module uses the output of the second batch normalization module as input; the input of the second batch normalization module is added pixel by pixel to the output of the DO-MLP module, and the result is used as the output of the corresponding transformer module, which is expressed by the following formula:

[0021]

[0022]

[0023] Among them, X l-1 Is the input of the corresponding transformer module; is the input of the second batch normalization module; BN is batch normalization; LL is lightweight local enhancement; CSWin-Attention is the cross-window self-attention mechanism; WF is weighted fusion; DO-MLP is the multi-layer perceptron module processing embedded in Do-Conv; X l is the output of the transformer module;

[0024] The DO-MLP module is a multi-layer perceptron module embedded in the Do-Conv convolutional layer;

[0025] The cross-shaped window self-attention mechanism module includes a dimension segmentation module, a first W-MSA module, a second W-MSA module and a dimension fusion module; the cross-shaped window self-attention mechanism module divides the input data into two halves in the third dimension other than the length and width through the dimension segmentation module, and the obtained results are respectively used as the input of the first W-MSA module and the second W-MSA module; the first W-MSA module and the second W-MSA module perform a window attention mechanism on the input data in a preset area, and the obtained results are used as the input of the dimension aggregation module; the output of the dimension aggregation module is used as the output of the cross-shaped window self-attention mechanism module;

[0026] The first W-MSA module has the same structure as the second W-MSA module, which is a window-based multi-head self-attention mechanism; the first W-MSA module and the second W-MSA module respectively implement the window self-attention mechanism of horizontal stripes and the window self-attention mechanism of vertical stripes;

[0027] The dimension segmentation module divides the input data into dimensions, using the following formula:

[0028] H×W×C→H×W×(C / 2)+H×W×(C / 2)

[0029] The dimension aggregation module aggregates the input data into dimensions using the following formula:

[0030] H×W×(C / 2)+H×W×(C / 2)→H×W×C

[0031] The lightweight local enhancement module includes a first 1×1 convolution module, a 3×3 separable convolution module, a dimensional splicing module and a second 1×1 convolution module; the input of the lightweight local enhancement module is processed by the first 1×1 convolution module and the 3×3 separable convolution module in sequence, and the obtained result and the output of the first 1×1 convolution module are used as the input of the dimensional splicing module; the second 1×1 convolution module uses the output of the dimensional splicing module as input; the output of the second 1×1 convolution module is used as the output of the lightweight local enhancement module;

[0032] The weighted fusion module includes a dimension expansion module, a multi-layer perceptron module, a dimension reshaping module, a dimension decompression module and a weight aggregation module; the weighted fusion module uses the output of the lightweight local enhancement module and the cross-shaped window self-attention mechanism module as input; the output of the lightweight local enhancement module and the cross-shaped window self-attention mechanism module is added pixel by pixel as the input of the dimension expansion module; the dimension expansion module, the multi-layer perceptron module, the dimension reshaping module and the dimension decompression module are connected in series in sequence; the weight aggregation module uses the output of the lightweight local enhancement module, the output of the cross-shaped window self-attention mechanism module and the output of the dimension decompression module as input; the output of the weight aggregation module is used as the output of the weighted fusion module;

[0033] The dimension expansion module processing is expressed using the following formula:

[0034] B×C×H×W→B×C×1

[0035] Among them, B is the number of images input to the model; the processing process of the multi-layer perceptron module is expressed using the following formula:

[0036] B×C×1→1×BC

[0037] The dimension reshaping module processing is expressed using the following formula:

[0038] 1×BC→B×C×1×1

[0039] The dimension decompression module processing is expressed using the following formula:

[0040] B×C×1×1→B×1×C×1×1

[0041] The weight aggregation module uses the B×1×C×1×1 obtained by the dimension decompression module as the weight, assigns the output of the input lightweight local enhancement module and the output of the cross window self-attention mechanism module, and obtains the output of the weighted fusion module;

[0042] A feature fusion module is constructed based on the FPN structure; the feature fusion module includes a scale generation layer, a first fusion layer, a second fusion layer, a third fusion layer and a fourth fusion layer;

[0043] The 1st to 4th feature maps are processed by the scale generation layer to obtain scale features Figure 1 ~4, where scale feature maps i, i = 1, 2, 3, 4 correspond to the output of the (5-i)th transformer module;

[0044] The first fusion layer uses the 4th feature map as input; the second fusion layer uses the 3rd feature map and the output of the first fusion layer as input; the third fusion layer uses the 2nd feature map and the output of the second fusion layer as input; the fourth fusion layer uses the 1st feature map and the output of the third fusion layer as input; the output of the fourth fusion layer is used as the output of the feature fusion module;

[0045] The scale generation layer includes an upsampling module, a first 3×3 convolution module, an ASPP module, a second 3×3 convolution module, and a downsampling module connected in series in sequence; the scale generation module first uses the upsampling module to upsample the input 1st to 4th feature maps, and then uses the first 3×3 convolution module to splice the data to interact the semantic features and detail features, and then uses the ASPP module to capture the image context, and after being processed by the second 3×3 convolution module, downsampling is used to generate the same scale feature as the feature map. Figure 1 ~4;

[0046] The first fusion layer includes a 1×1Conv module and a scale enhancement module in series; the fourth feature map is processed by the 1×1Conv module and the result is the same as the scale feature map. Figure 1 As the input of the scale enhancement module; the output of the scale enhancement module is used as the output of the first fusion layer;

[0047] The second to fourth fusion layers have the same structure, including a 1×1Conv module, a scale enhancement module, an upsampling module, and a scale fusion module; the i-th fusion layer uses the (5-i)th feature map and the output of the i-1th fusion layer as input, where i=2,3,4; in the i-th fusion layer, the (5-i)th feature map is processed by the 1×1Conv module, and the result obtained is together with the scale feature map i as the input of the scale enhancement module, and the output of the i-1th fusion layer is processed by the upsampling module, and the result obtained is together with the scale feature map i and the scale feature map i+1 as the input of the scale fusion module, and the output of the scale enhancement module is weightedly added with the output of the scale fusion module, where the weight coefficient is the weight parameter to be learned W 2i-1 With W 2i , W 2i-1 Weight the output of the scale fusion module, W 2i Weighting the output of the second scale enhancement module;

[0048] The scale enhancement module is used for horizontal connection to enhance the clues of objects of a specific scale. The scale feature maps of different feature layers are added to the input features of the self-learning ratio to enhance the scale perception of the detected target. The residual connection avoids weakening the context information of the target, which is more conducive to the detection of small targets.

[0049] The scale enhancement module includes a 1×1Conv module and a 3×3 convolution module. The scale enhancement module first adds the output of the corresponding 1×1Conv module and the scale feature map i to each pixel after processing by the 3×3 convolution module, and then adds the result to the output of the corresponding 1×1Conv module to obtain the result as the output of the scale enhancement module.

[0050] The scale fusion module selects adjacent scale feature maps for aggregation to refine small target features; integrates deep features into shallow feature maps, establishes an adjacent feature fusion mechanism, and ensures instance perception of the target and sufficient information interaction; the scale fusion module reasonably organizes and utilizes scale features learned at different levels to aggregate multiple layers of effective features and improve feature fusion efficiency;

[0051] The scale fusion module first performs 3×3 convolution on the input scale feature map i and scale feature map i+1 and adds them pixel by pixel. The result is then processed with the output of the corresponding upsampling module by 3×3 convolution and added pixel by pixel to finally obtain the output of the scale fusion module.

[0052] The example interaction module includes a first RoIAlign module, a second RoIAlign module, a third RoIAlign module, a fourth RoIAlign module, a fifth RoIAlign module, a first interaction detection head module, a second interaction detection head module, a third interaction detection head module, a fourth interaction detection head module, and a fifth interaction detection head module;

[0053] The first RoI Align module uses the feature map output by the feature fusion module and the initial proposal box as input to obtain RoI feature 1; the first interaction detection head module uses RoI feature 1 and the initial proposal feature as input to obtain interaction feature 1, regression box 1 and classification 1, where the initial proposal box is represented by a four-dimensional parameter from 0 to 1, including the center coordinates and the length and width of the proposal box;

[0054] The second RoIAlign module uses the feature map output by the feature fusion module and regression frame 1 as input to obtain RoI feature 2; the second interaction detection head module uses RoI feature 2 and interaction feature 1 as input to obtain interaction feature 2, regression frame 2 and classification 2;

[0055] The third RoIAlign module uses the feature map output by the feature fusion module and the regression frame 2 as input to obtain RoI feature 3; the third interaction detection head module uses RoI feature 3 and interaction feature 2 as input to obtain interaction feature 3, regression frame 3 and classification 3;

[0056] The fourth RoIAlign module uses the feature map output by the feature fusion module and the regression frame 3 as input to obtain RoI feature 4; the fourth interaction detection head module uses RoI feature 4 and interaction feature 3 as input to obtain interaction feature 4, regression frame 4 and classification 4;

[0057] The fifth RoIAlign module uses the feature map output by the feature fusion module and the regression frame 4 as input to obtain RoI feature 5; the fifth interaction detection head module uses RoI feature 5 and interaction feature 4 as input to obtain interaction feature 5, regression frame 5 and classification 5; the output of the fifth RoIAlign module is used as the output of the instance interaction module;

[0058] The first to fifth interactive detection head modules have the same structure, including a multi-head self-attention mechanism module, a dynamic convolution module, a fully connected layer, and a classification and regression layer. The first interactive detection head module processes the initial suggestion features through the multi-head self-attention mechanism module to generate parameters, and then uses the parameters as the convolution kernel setting of the dynamic convolution module, inputs the RoI feature 1 into the set dynamic convolution module for calculation, adds the calculation result to the parameter to obtain the target feature 1, and uses the feature map obtained by the target feature 1 through the fully connected layer as the interactive feature 1, and then sends the interactive feature 1 to the classification and regression layer. The classification and regression box prediction are performed in the classification and regression layer to obtain classification 1 and regression box 1; the jth interaction detection head module processes the interaction feature j-1 through the multi-head self-attention mechanism module to generate parameters, and then uses the parameters as the convolution kernel setting of the dynamic convolution module to calculate with the RoI feature j, and then adds the calculation result to the parameter to obtain the target feature j, and passes the target feature j through the fully connected layer to obtain the feature map as the interaction feature j, and then sends the interaction feature j to the classification and regression layer for classification and regression box prediction to obtain classification j and regression box j, where j = 2, 3, 4, 5;

[0059] The detection and recognition module adjusts the size of the feature map in the input data to a preset size and then divides it into several grids. If the target center of the obstacle feature image is located in a grid unit, the detection and recognition process is performed in the grid unit; each grid unit predicts B prior boxes, the confidence score of the prior box and the information probability C of the target category. The confidence score is expressed by the following formula:

[0060]

[0061] P r (Object) indicates whether the grid cell contains an obstacle, if yes, it is 1, otherwise, it is 0; is the intersection-over-union ratio between the real position box and the prior box;

[0062] Because the prior box is not necessarily located at the center of the target, the delta output is evaluated using the region proposal network to adjust the prior box position and obtain the prior box position coordinates (x, y, w, h), where (x, y) are the coordinates of the middle point of the prior box; w is the length of the prior box, and h is the width of the prior box;

[0063] The obtained prior frame coordinates are then normalized, and the non-maximum suppression algorithm is used to process the areas that meet the confidence threshold in the obstacle feature image, retaining the prior frame with the highest foreground score, and obtaining the coordinate range and category information corresponding to the final region proposal frame;

[0064] Finally, the track area and obstacle frame are generated by the obtained data, and whether there are obstacles in the track area is detected by judging whether they overlap, and then the recognition result is output.

[0065] The present invention discloses a method for intelligent detection of multi-scale obstacles on trains. Through the design of a convolutional neural network structure based on deep learning, intelligent detection of obstacles on train tracks is realized. The method has high accuracy, low false detection rate, fast detection speed, good real-time performance, improved recognition efficiency, greatly reduced the workload of train drivers, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a schematic diagram of the process of the present invention;

[0067] Figure 2 (a~c) are schematic diagrams of the detection results of track obstacles in an embodiment of the present invention, wherein Figure a is a test line scene; Figure b is a night scene; and Figure c is a tunnel scene. DETAILED DESCRIPTION

[0068] The present invention provides a method for intelligently detecting multi-scale obstacles in trains, the flow chart of which is as follows: Figure 1 As shown, the following steps are included:

[0069] S1. Obtain the existing train front track image data to obtain a track image dataset, specifically:

[0070] The on-board camera is used to capture video information of the track in front of the train, including platform video, test line video and track video. Key frames are selected from the video, and one image is selected every 50 frames. After processing, 3,000 images of different scenes are obtained as the track image dataset.

[0071] S2. Enhance the track image dataset obtained in step S1 and then annotate it to obtain a training dataset, specifically:

[0072] First, the track image data obtained in step S1 is enhanced, including horizontal or vertical flipping, adding noise and random rotation of the image; then the labeling software Labelme is used to perform pixel-level labeling using the polygon labeling method to mark obstacles and track danger areas, and the labels include location information and category information; each annotation is changed through Python code, and then the json file produced after the annotation is converted into the COCO dataset using Python code to obtain the training dataset.

[0073] S3. Build the initial train obstacle intelligent detection model based on the Sparse R-CNN baseline model, Transformer feature extraction network and FPN feature fusion network;

[0074] The initial train obstacle intelligent detection model includes a feature extraction module, a feature fusion module, an instance interaction module and a detection and recognition module;

[0075] The input image is extracted with features through the feature extraction module, and the feature fusion module fuses the extracted features to obtain a feature map. Finally, the instance interaction module performs instance interaction to obtain a new feature map, feature map classification, and predicted regression box. The output of the instance interaction module is used as the input of the detection and recognition module. The detection and recognition module visualizes the new feature map, feature map classification, and predicted regression box with the original image to obtain the recognition result of the image as the output of the model. The detection and recognition module does not participate in the training process.

[0076] Build feature extraction module based on CSwinTransformer;

[0077] The feature extraction module includes a 7×7 convolutional coding module, a first transformer module, a first merging module, a second transformer module, a second merging module, a third transformer module, a third merging module, and a fourth transformer module which are sequentially connected in series;

[0078] The feature extraction module is based on CSwin Transformer. It upscales and downsamples the input image through a 7×7 convolutional coding module. The image size is H×W×3, where H is the width of the image and W is the length of the image. Where C is the feature dimension; the first to fourth transformer modules realize different levels of feature representation through continuous feature learning, and the number of tokens generated by the i-th transformer module is The output of the i-th transformer module is the i-th feature map;

[0079] The first to third merge modules have the same structure, including a 7×7 convolutional layer; the first to third merge modules reduce the input tokens and double the feature dimension;

[0080] The first to fourth transformer modules have the same structure, including the first batch normalization module, the lightweight local enhancement module, the cross-window self-attention mechanism module, the weighted fusion module, the second batch normalization module and the DO-MLP module;

[0081] The input of the first batch normalization module is the input of the corresponding transformer module; the lightweight local enhancement module uses the output of the first batch normalization module as input; the cross-window self-attention mechanism module uses the output of the first batch normalization module as input; the weighted fusion module uses the output of the lightweight local enhancement module and the cross-window self-attention mechanism module as input; the output of the weighted fusion module is added pixel by pixel to the input of the first batch normalization module, and the result is used as the input of the second batch normalization module; the DO-MLP module uses the output of the second batch normalization module as input; the input of the second batch normalization module is added pixel by pixel to the output of the DO-MLP module, and the result is used as the output of the corresponding transformer module, which is expressed by the following formula:

[0082]

[0083]

[0084] Among them, X l-1 Is the input of the transformer module; is the input of the second batch normalization module; BN is batch normalization; LL is lightweight local enhancement; CSWin-Attention is the cross-window self-attention mechanism; WF is weighted fusion; DO-MLP is the multi-layer perceptron module processing embedded in Do-Conv; X l is the output of the transformer module;

[0085] The DO-MLP module is a multi-layer perceptron module embedded in the Do-Conv convolutional layer;

[0086] The cross-shaped window self-attention mechanism module includes a dimension segmentation module, a first W-MSA module, a second W-MSA module and a dimension fusion module; the cross-shaped window self-attention mechanism module averages the input data in the third dimension other than the length and width through the dimension segmentation module, and the obtained results are respectively used as the input of the first W-MSA module and the second W-MSA module; the first W-MSA module and the second W-MSA module perform a window attention mechanism on the input data in a preset area, and the obtained results are used as the input of the dimension fusion module; the output of the dimension fusion module is used as the output of the cross-shaped window self-attention mechanism module;

[0087] The first W-MSA module has the same structure as the second W-MSA module, which is a window-based multi-head self-attention mechanism; the first W-MSA module and the second W-MSA module respectively implement the window self-attention mechanism of horizontal stripes and the window self-attention mechanism of vertical stripes;

[0088] The dimension segmentation module divides the input data into dimensions, using the following formula:

[0089] H×W×C→H×W×(C / 2)+H×W×(C / 2)

[0090] The dimension aggregation module aggregates the input data into dimensions using the following formula:

[0091] H×W×(C / 2)+H×W×(C / 2)→H×W×C

[0092] The lightweight local enhancement module includes a first 1×1 convolution module, a 3×3 separable convolution module, a dimensional splicing module and a second 1×1 convolution module; the input of the lightweight local enhancement module is processed by the first 1×1 convolution module and the 3×3 separable convolution module in sequence, and the output of the first 1×1 convolution module is used as the input of the dimensional splicing module; the second 1×1 convolution module uses the output of the dimensional splicing module as input; the output of the second 1×1 convolution module is used as the output of the lightweight local enhancement module;

[0093] The weighted fusion module includes a dimension expansion module, a multi-layer perceptron module, a dimension reshaping module, a dimension decompression module and a weight aggregation module; the weighted fusion module uses the output of the lightweight local enhancement module and the cross-shaped window self-attention mechanism module as input; the output of the lightweight local enhancement module and the cross-shaped window self-attention mechanism module is added pixel by pixel as the input of the dimension expansion module; the dimension expansion module, the multi-layer perceptron module, the dimension reshaping module and the dimension decompression module are connected in series in sequence; the weight aggregation module uses the output of the lightweight local enhancement module, the output of the cross-shaped window self-attention mechanism module and the output of the dimension decompression module as input; the output of the weight aggregation module is used as the output of the weighted fusion module;

[0094] The dimension expansion module processing is expressed using the following formula:

[0095] B×C×H×W→B×C×1

[0096] Among them, B is the number of images input to the model; the processing process of the multi-layer perceptron module is expressed using the following formula:

[0097] B×C×1→1×BC

[0098] The dimension reshaping module processing is expressed using the following formula:

[0099] 1×BC→B×C×1×1

[0100] The dimension decompression module processing is expressed using the following formula:

[0101] B×C×1×1→B×1×C×1×1

[0102] The weight aggregation module uses the B×1×C×1×1 obtained by the dimension decompression module as the weight, assigns the output of the input lightweight local enhancement module and the output of the cross window self-attention mechanism module, and obtains the output of the weighted fusion module;

[0103] A feature fusion module is constructed based on the FPN structure; the feature fusion module includes a scale generation layer, a first fusion layer, a second fusion layer, a third fusion layer and a fourth fusion layer;

[0104] The 1st to 4th feature maps are processed by the scale generation layer to obtain scale features Figure 1 ~4, where scale feature maps i, i = 1, 2, 3, 4 correspond to the output of the (5-i)th transformer module;

[0105] The first fusion layer uses the 4th feature map as input; the second fusion layer uses the 3rd feature map and the output of the first fusion layer as input; the third fusion layer uses the 2nd feature map and the output of the second fusion layer as input; the fourth fusion layer uses the 1st feature map and the output of the third fusion layer as input; the output of the fourth fusion layer is used as the output of the feature fusion module;

[0106] The scale generation layer includes an upsampling module, a first 3×3 convolution module, an ASPP module, a second 3×3 convolution module, and a downsampling module connected in series in sequence; the scale generation module first uses the upsampling module to upsample the input 1st to 4th feature maps, and then uses the first 3×3 convolution module to splice the data to interact the semantic features and detail features, and then uses the ASPP module to capture the image context, and after being processed by the second 3×3 convolution module, downsampling is used to generate the same scale feature as the feature map. Figure 1 ~4;

[0107] The first fusion layer includes a 1×1Conv module and a scale enhancement module in series; the fourth feature map is processed by the 1×1Conv module and the result is the same as the scale feature map. Figure 1 As the input of the scale enhancement module; the output of the scale enhancement module is used as the output of the first fusion layer;

[0108] The second to fourth fusion layers have the same structure, including a 1×1Conv module, a scale enhancement module, an upsampling module, and a scale fusion module; the i-th fusion layer uses the (5-i)th feature map and the output of the i-1th fusion layer as input, where i=2,3,4; in the i-th fusion layer, the (5-i)th feature map is processed by the 1×1Conv module, and the result obtained is together with the scale feature map i as the input of the scale enhancement module, and the output of the i-1th fusion layer is processed by the upsampling module, and the result obtained is together with the scale feature map i and the scale feature map i+1 as the input of the scale fusion module, and the output of the scale enhancement module is weightedly added with the output of the scale fusion module, where the weight coefficient is the weight parameter to be learned W 2i-1 With W 2i , W 2i-1 Weight the output of the scale fusion module, W 2i Weighting the output of the second scale enhancement module;

[0109] The scale enhancement module is used for horizontal connection to enhance the clues of objects of a specific scale. The scale feature maps of different feature layers are added to the input features of the self-learning ratio to enhance the scale perception of the detected target. The residual connection avoids weakening the context information of the target, which is more conducive to the detection of small targets.

[0110] The scale enhancement module includes a 1×1Conv module and a 3×3 convolution module. The scale enhancement module first adds the output of the corresponding 1×1Conv module and the scale feature map i to each pixel after processing by the 3×3 convolution module, and then adds the result to the output of the corresponding 1×1Conv module to obtain the result as the output of the scale enhancement module.

[0111] The scale fusion module selects adjacent scale feature maps for aggregation to refine small target features; integrates deep features into shallow feature maps, establishes an adjacent feature fusion mechanism, and ensures instance perception of the target and sufficient information interaction; the scale fusion module reasonably organizes and utilizes scale features learned at different levels to aggregate multiple layers of effective features and improve feature fusion efficiency;

[0112] The scale fusion module first performs 3×3 convolution on the input scale feature map i and scale feature map i+1 and adds them pixel by pixel. The result is then processed with the output of the corresponding upsampling module by 3×3 convolution and added pixel by pixel to finally obtain the output of the scale fusion module.

[0113] The example interaction module includes a first RoIAlign module, a second RoIAlign module, a third RoIAlign module, a fourth RoIAlign module, a fifth RoIAlign module, a first interaction detection head module, a second interaction detection head module, a third interaction detection head module, a fourth interaction detection head module, and a fifth interaction detection head module;

[0114] The first RoI Align module uses the feature map output by the feature fusion module and the initial proposal box as input to obtain RoI feature 1; the first interaction detection head module uses RoI feature 1 and the initial proposal feature as input to obtain interaction feature 1, regression box 1 and classification 1, where the initial proposal box is represented by a four-dimensional parameter from 0 to 1, including the center coordinates and the length and width of the proposal box;

[0115] The second RoIAlign module uses the feature map output by the feature fusion module and regression frame 1 as input to obtain RoI feature 2; the second interaction detection head module uses RoI feature 2 and interaction feature 1 as input to obtain interaction feature 2, regression frame 2 and classification 2;

[0116] The third RoIAlign module uses the feature map output by the feature fusion module and the regression frame 2 as input to obtain RoI feature 3; the third interaction detection head module uses RoI feature 3 and interaction feature 2 as input to obtain interaction feature 3, regression frame 3 and classification 3;

[0117] The fourth RoIAlign module uses the feature map output by the feature fusion module and the regression frame 3 as input to obtain RoI feature 4; the fourth interaction detection head module uses RoI feature 4 and interaction feature 3 as input to obtain interaction feature 4, regression frame 4 and classification 4;

[0118] The fifth RoIAlign module uses the feature map output by the feature fusion module and the regression frame 4 as input to obtain RoI feature 5; the fifth interaction detection head module uses RoI feature 5 and interaction feature 4 as input to obtain interaction feature 5, regression frame 5 and classification 5; the output of the fifth RoIAlign module is used as the output of the instance interaction module;

[0119] The first to fifth interactive detection head modules have the same structure, including a multi-head self-attention mechanism module, a dynamic convolution module, a fully connected layer, and a classification and regression layer. The first interactive detection head module processes the initial suggestion features through the multi-head self-attention mechanism module to generate parameters, and then uses the parameters as the convolution kernel setting of the dynamic convolution module, inputs the RoI feature 1 into the set dynamic convolution module for calculation, adds the calculation result to the parameter to obtain the target feature 1, and uses the feature map obtained by the target feature 1 through the fully connected layer as the interactive feature 1, and then sends the interactive feature 1 to the classification and regression layer. The classification and regression box prediction are performed in the classification and regression layer to obtain classification 1 and regression box 1; the jth interaction detection head module processes the interaction feature j-1 through the multi-head self-attention mechanism module to generate parameters, and then uses the parameters as the convolution kernel setting of the dynamic convolution module to calculate with the RoI feature j, and then adds the calculation result to the parameter to obtain the target feature j, and passes the target feature j through the fully connected layer to obtain the feature map as the interaction feature j, and then sends the interaction feature j to the classification and regression layer for classification and regression box prediction to obtain classification j and regression box j, where j = 2, 3, 4, 5;

[0120] The detection and recognition module adjusts the feature map size in the input data to 1300×800 and then divides it into several grids. If the target center of the obstacle feature image is located in a grid unit, the detection and recognition process is performed in the grid unit; each grid unit predicts B prior boxes, the confidence score of the prior box and the information probability C of the target category. The confidence score is expressed by the following formula:

[0121]

[0122] P r (Object) indicates whether the grid cell contains an obstacle, if yes, it is 1, otherwise, it is 0; is the intersection-over-union ratio between the real position box and the prior box;

[0123] Each pixel in the feature map can generate three prior boxes of different sizes. The size of each box is determined by the two parameters scale and ratio. The three boxes keep the area of ​​the box unchanged and change its aspect ratio through the value of ratio to generate boxes of different sizes. The scale of each layer is (64, 128, 256) and the ratio is (0.5, 1, 2). Each pixel in each layer will generate three anchor boxes, and there will be a total of 9 anchor boxes of different sizes.

[0124] Because the prior box is not necessarily located at the center of the target, the delta output is evaluated using the region proposal network to adjust the prior box position and obtain the prior box position coordinates (x, y, w, h), where (x, y) are the coordinates of the middle point of the prior box; w is the length of the prior box, and h is the width of the prior box;

[0125] The obtained prior frame coordinates are then normalized, and the non-maximum suppression algorithm is used to process the areas that meet the confidence threshold in the obstacle feature image, retaining the prior frame with the highest foreground score, and obtaining the coordinate range and category information corresponding to the final region proposal frame;

[0126] Finally, the track area and obstacle frame are generated by the obtained data, and whether there are obstacles in the track area is detected by judging whether they overlap, and then the recognition result is output.

[0127] S4. Using the training data set obtained in step S2, the initial train obstacle intelligent detection model obtained in step S3 is trained to obtain a train obstacle intelligent detection model;

[0128] S5. Use the train obstacle intelligent detection model obtained in step S4 to perform actual train obstacle detection and identification.

[0129] The method of the present invention is further described below in conjunction with an embodiment:

[0130] Using the idea of ​​transfer learning, the model in the method of the present invention is initialized using the weight parameters pre-trained on the MS COCO dataset. Then, after a series of parameter debugging and experiments, the important parameters of the training are shown in Table 1:

[0131] Table 1 Main training parameters of the model

[0132]

[0133] After the training is completed, the model is evaluated. The model in the method of the present invention performs best in mAP, reaching 94.4%, which is 19.7%, 16.8%, 14.4%, and 10% higher than the one-stage network YOLOV3, ATSS, FCOS, and RetinaNet, respectively, and 10.8%, 10.1%, and 12.6% higher than the two-stage network Mask R-CNN, Cascade R-CNN, and Faster R-CNN, respectively. The comparative experiment compares the feature extraction network and the feature fusion neck network under the model framework of the method of the present invention to prove the effectiveness of the designed components. The feature extraction modules of the CNN backbone Resnet50, Resnet101, MobileNetV2, RegNet, ConvNeXt, Transformer backbone MobileViT, PVT, PVTV2, Swin T, CSwinT, Focal T, Quadtree T and the model of the present invention were selected for feature extraction network comparison, and the accuracy rates increased by 3.8%, 3.6%, 8.2%, 5.5%, 4.3%, 7%, 3.5%, 2.7%, 3.7%, 3.1%, 5.5% and 4.3% respectively. The feature fusion modules of FPN, FPN-CARAFE, AugFPN, PAFPN, BiFPN, BFP, FPT, FPG, MLFPN and the model of the present invention were selected for feature fusion network comparison. The feature fusion module of the model of the present invention uses a variety of multi-scale means to increase the performance of the model, and significantly improves the accuracy of each category, mainly by generating multi-scale information, strengthening the information exchange of the image pyramid and aggregating shallow features and deep features. In summary, after optimizing and improving the detection technology framework, the model of the method of the present invention is better than the commonly used target detection network in terms of detection accuracy and detection time, and can meet the needs of train obstacle detection scenarios.

Claims

1. A multi-scale obstacle intelligent detection method for trains, characterized in that: The following steps are involved: S1. Obtain the existing track image data in front of the train to obtain a track image dataset; S2. The track image dataset obtained in step S1 is enhanced and annotated to obtain a training dataset; S3. Build the initial train obstacle intelligent detection model based on the Sparse R-CNN baseline model, Transformer feature extraction network and FPN feature fusion network; S4. Using the training data set obtained in step S2, the initial train obstacle intelligent detection model obtained in step S3 is trained to obtain a train obstacle intelligent detection model; S5. Use the train obstacle intelligent detection model obtained in step S4 to perform actual train obstacle detection and identification.

2. The multi-scale obstacle intelligent detection method for trains according to claim 1 is characterized in that: Step S1 specifically includes: using the on-board camera to capture the track video information in front of the train, including the platform video, the test line video and the track video; selecting key frames from the video, selecting an image every several frames, and obtaining a track image dataset.

3. The multi-scale obstacle intelligent detection method for trains according to claim 2 is characterized in that: Step S2 is specifically as follows: firstly, the track image data obtained in step S1 is enhanced, including horizontal or vertical flipping, adding noise and random rotation of the image; then, pixel-level annotation is performed using annotation software to mark obstacles and track danger areas, and the labels include location information and category information; and the track image data with labels is converted into a data set to obtain a training data set.

4. The multi-scale obstacle intelligent detection method for trains according to claim 3 is characterized in that: The initial train obstacle intelligent detection model includes a feature extraction module, a feature fusion module, an instance interaction module and a detection and recognition module; The input image is extracted with features through the feature extraction module, and the feature fusion module fuses the extracted features to obtain a feature map. Finally, instance interaction is performed through the instance interaction module to obtain a new feature map, feature map classification and predicted regression box. The output of the instance interaction module is used as the input of the detection and recognition module. The detection and recognition module visualizes the new feature map, feature map classification and predicted regression box with the original image to obtain the recognition result of the image as the output of the model. The detection and recognition module does not participate in the training process.

5. The multi-scale obstacle intelligent detection method for trains according to claim 4 is characterized in that: Build feature extraction module based on CSwinTransformer; The feature extraction module includes a 7×7 convolutional coding module, a first transformer module, a first merging module, a second transformer module, a second merging module, a third transformer module, a third merging module, and a fourth transformer module which are sequentially connected in series; The feature extraction module up-scales and down-samples the input image through a 7×7 convolutional coding module, where the image size is H×W×3, H is the width of the image, and W is the length of the image. Tokens, where C is the feature dimension; the first to fourth transformer modules realize different levels of feature representation through continuous feature learning, and the number of Tokens generated by the i-th transformer module is The output of the i-th transformer module is the i-th feature map; The first to third merge modules have the same structure, including a 7×7 convolutional layer; the first to third merge modules reduce the input tokens and double the feature dimension; The first to fourth transformer modules have the same structure, including the first batch normalization module, the lightweight local enhancement module, the cross-window self-attention mechanism module, the weighted fusion module, the second batch normalization module and the DO-MLP module; The input of the first batch normalization module is the input of the corresponding transformer module; the lightweight local enhancement module uses the output of the first batch normalization module as input; the cross-window self-attention mechanism module uses the output of the first batch normalization module as input; The weighted fusion module uses the output of the lightweight local enhancement module and the cross-window self-attention mechanism module as input; the output of the weighted fusion module is added pixel by pixel to the input of the first batch normalization module, and the result is used as the input of the second batch normalization module; the DO-MLP module uses the output of the second batch normalization module as input; the input of the second batch normalization module is added pixel by pixel to the output of the DO-MLP module, and the result is used as the output of the corresponding transformer module, which is expressed by the following formula: Among them, X l-1 Is the input of the corresponding transformer module; is the input of the second batch normalization module; BN is batch normalization; LL is lightweight local enhancement; CSWin-Attention is the cross-window self-attention mechanism; WF is weighted fusion; DO-MLP is the multi-layer perceptron module processing embedded in Do-Conv; X l is the output of the transformer module; The DO-MLP module is a multi-layer perceptron module embedded in the Do-Conv convolutional layer; The cross-shaped window self-attention mechanism module includes a dimension segmentation module, a first W-MSA module, a second W-MSA module and a dimension fusion module; the cross-shaped window self-attention mechanism module divides the input data into two halves in the third dimension other than the length and width through the dimension segmentation module, and the obtained results are respectively used as the input of the first W-MSA module and the second W-MSA module; the first W-MSA module and the second W-MSA module perform a window attention mechanism on the input data in a preset area, and the obtained results are used as the input of the dimension fusion module; the output of the dimension fusion module is used as the output of the cross-shaped window self-attention mechanism module; The first W-MSA module has the same structure as the second W-MSA module, which is a window-based multi-head self-attention mechanism; the first W-MSA module and the second W-MSA module respectively implement the window self-attention mechanism of horizontal stripes and the window self-attention mechanism of vertical stripes; The dimension segmentation module divides the input data into dimensions, using the following formula: H×W×C→H×W×(C / 2)+H×W×(C / 2) The dimension aggregation module aggregates the input data into dimensions using the following formula: H×W×(C / 2)+H×W×(C / 2)→H×W×C The lightweight local enhancement module includes a first 1×1 convolution module, a 3×3 separable convolution module, a dimensional splicing module and a second 1×1 convolution module; the input of the lightweight local enhancement module is processed by the first 1×1 convolution module and the 3×3 separable convolution module in sequence, and the obtained result and the output of the first 1×1 convolution module are used as the input of the dimensional splicing module; the second 1×1 convolution module uses the output of the dimensional splicing module as input; the output of the second 1×1 convolution module is used as the output of the lightweight local enhancement module; The weighted fusion module includes a dimension expansion module, a multi-layer perceptron module, a dimension reshaping module, a dimension decompression module and a weight aggregation module; the weighted fusion module uses the output of the lightweight local enhancement module and the cross-shaped window self-attention mechanism module as input; the output of the lightweight local enhancement module and the cross-shaped window self-attention mechanism module is added pixel by pixel as the input of the dimension expansion module; the dimension expansion module, the multi-layer perceptron module, the dimension reshaping module and the dimension decompression module are connected in series in sequence; the weight aggregation module uses the output of the lightweight local enhancement module, the output of the cross-shaped window self-attention mechanism module and the output of the dimension decompression module as input; the output of the weight aggregation module is used as the output of the weighted fusion module; The dimension expansion module processing is expressed using the following formula: B×C×H×W→B×C×1 Among them, B is the number of images input to the model; the processing process of the multi-layer perceptron module is expressed using the following formula: B×C×1→1×BC The dimension reshaping module processing is expressed using the following formula: 1×BC→B×C×1×1 The dimension decompression module processing is expressed using the following formula: B×C×1×1→B×1×C×1×1 The weight aggregation module takes the B×1×C×1×1 obtained by the dimensional decompression module as the weight, assigns the output of the input lightweight local enhancement module and the output of the cross window self-attention mechanism module, and obtains the output of the weighted fusion module.

6. The multi-scale obstacle intelligent detection method for trains according to claim 5, characterized in that: Construct feature fusion module based on FPN structure; The feature fusion module includes a scale generation layer, a first fusion layer, a second fusion layer, a third fusion layer and a fourth fusion layer; The 1st to 4th feature maps are processed by the scale generation layer to obtain scale feature maps 1 to 4, where scale feature maps i, i = 1, 2, 3, 4 correspond to the output of the (5-i)th transformer module; The first fusion layer uses the 4th feature map as input; the second fusion layer uses the 3rd feature map and the output of the first fusion layer as input; The third fusion layer uses the second feature map and the output of the second fusion layer as input; The fourth fusion layer uses the first feature map and the output of the third fusion layer as input; the output of the fourth fusion layer is used as the output of the feature fusion module; The scale generation layer includes an upsampling module, a first 3×3 convolution module, an ASPP module, a second 3×3 convolution module, and a downsampling module connected in series in sequence; the scale generation module first uses the upsampling module to upsample the input 1st to 4th feature maps, and then uses the first 3×3 convolution module to splice the data to interact the semantic features and detail features, and then uses the ASPP module to capture the image context, and after being processed by the second 3×3 convolution module, downsampling is used to generate scale feature maps 1 to 4 with the same scale as the feature map; The first fusion layer includes a series of 1×1Conv modules and scale enhancement modules; After the fourth feature map is processed by the 1×1Conv module, the result and the scale feature map 1 are used as the input of the scale enhancement module; The output of the scale enhancement module is used as the output of the first fusion layer; The second to fourth fusion layers have the same structure, including a 1×1Conv module, a scale enhancement module, an upsampling module, and a scale fusion module; the i-th fusion layer uses the (5-i)th feature map and the output of the i-1th fusion layer as input, where i=2,3,4; in the i-th fusion layer, the (5-i)th feature map is processed by the 1×1Conv module, and the result obtained is together with the scale feature map i as the input of the scale enhancement module, and the output of the i-1th fusion layer is processed by the upsampling module, and the result obtained is together with the scale feature map i and the scale feature map i+1 as the input of the scale fusion module, and the output of the scale enhancement module is weightedly added with the output of the scale fusion module, where the weight coefficient is the weight parameter to be learned W 2i-1 With W 2i , W 2i-1 Weight the output of the scale fusion module, W 2i Weighting the output of the second scale enhancement module; The scale enhancement module is used for horizontal connection to enhance the clues of objects of a specific scale. The scale feature maps of different feature layers are added to the input features of the self-learning ratio to enhance the scale perception of the detected target. The residual connection avoids weakening the context information of the target, which is more helpful for small target detection; The scale enhancement module includes a 1×1 Conv module and a 3×3 convolution module; The scale enhancement module first adds the output of the corresponding 1×1Conv module and the scale feature map i to each other pixel by pixel after being processed by the 3×3 convolution module, and then adds the result to the output of the corresponding 1×1Conv module to obtain the result as the output of the scale enhancement module; The scale fusion module selects adjacent scale feature maps for aggregation to refine small target features; integrates deep features into shallow feature maps, establishes an adjacent feature fusion mechanism, and ensures instance perception of the target and sufficient information interaction; the scale fusion module reasonably organizes and utilizes scale features learned at different levels to aggregate multiple layers of effective features and improve feature fusion efficiency; The scale fusion module first performs 3×3 convolution on the input scale feature map i and scale feature map i+1 and adds them pixel by pixel. The result is then added pixel by pixel with the output of the corresponding upsampling module of the input through 3×3 convolution to finally obtain the output of the scale fusion module.

7. The multi-scale obstacle intelligent detection method for trains according to claim 6, characterized in that: The example interaction module includes a first RoIAlign module, a second RoIAlign module, a third RoIAlign module, a fourth RoIAlign module, a fifth RoIAlign module, a first interaction detection head module, a second interaction detection head module, a third interaction detection head module, a fourth interaction detection head module, and a fifth interaction detection head module; The first RoIAlign module uses the feature map output by the feature fusion module and the initial proposal box as input to obtain RoI feature 1; The first interaction detection head module uses RoI feature 1 and initial proposal feature as input to obtain interaction feature 1, regression box 1 and classification 1, where the initial proposal box is represented by a four-dimensional parameter from 0 to 1, including the center coordinates and the length and width of the proposal box; The second RoIAlign module uses the feature map output by the feature fusion module and regression frame 1 as input to obtain RoI feature 2; The second interaction detection head module uses RoI feature 2 and interaction feature 1 as input to obtain interaction feature 2, regression box 2 and classification 2; The third RoIAlign module uses the feature map output by the feature fusion module and regression frame 2 as input to obtain RoI feature 3; The third interaction detection head module uses RoI feature 3 and interaction feature 2 as input to obtain interaction feature 3, regression box 3 and classification 3; The fourth RoIAlign module uses the feature map output by the feature fusion module and the regression frame 3 as input to obtain the RoI feature 4; The fourth interaction detection head module uses RoI feature 4 and interaction feature 3 as input to obtain interaction feature 4, regression box 4 and classification 4; The fifth RoIAlign module uses the feature map output by the feature fusion module and the regression frame 4 as input to obtain RoI feature 5; the fifth interaction detection head module uses RoI feature 5 and interaction feature 4 as input to obtain interaction feature 5, regression frame 5 and classification 5; the output of the fifth RoIAlign module is used as the output of the instance interaction module; The first to fifth interactive detection head modules have the same structure, including a multi-head self-attention mechanism module, a dynamic convolution module, a fully connected layer, and a classification and regression layer. The first interactive detection head module processes the initial suggestion features through the multi-head self-attention mechanism module to generate parameters, and then uses the parameters as the convolution kernel setting of the dynamic convolution module, inputs the RoI feature 1 into the set dynamic convolution module for calculation, adds the calculation result to the parameter to obtain the target feature 1, and uses the feature map obtained by the target feature 1 through the fully connected layer as the interactive feature 1, and then sends the interactive feature 1 to the classification and regression layer. The classification and regression box prediction is performed in the classification layer to obtain classification 1 and regression box 1; the jth interaction detection head module processes the interaction feature j-1 through the multi-head self-attention mechanism module to generate parameters, and then uses the parameter as the convolution kernel setting of the dynamic convolution module to calculate with the RoI feature j, and then adds the calculation result to the parameter to obtain the target feature j, and passes the target feature j through the fully connected layer to obtain the feature map as the interaction feature j, and then sends the interaction feature j to the classification and regression layer for classification and regression box prediction to obtain classification j and regression box j, where j = 2, 3, 4, 5.

8. The multi-scale obstacle intelligent detection method for trains according to claim 7, characterized in that: The detection and recognition module adjusts the size of the feature map in the input data to a preset size and then divides it into several grids. If the target center of the obstacle feature image is located in a grid unit, the detection and recognition process is performed in the grid unit; each grid unit predicts B prior boxes, the confidence score of the prior box and the information probability C of the target category. The confidence score is expressed by the following formula: P r (Object) indicates whether the grid cell contains an obstacle, if yes, it is 1, otherwise, it is 0; is the intersection-over-union ratio between the real position box and the prior box; Because the prior box is not necessarily located at the center of the target, the delta output is evaluated using the region proposal network to adjust the prior box position and obtain the prior box position coordinates (x, y, w, h), where (x, y) are the coordinates of the middle point of the prior box; w is the length of the prior box, and h is the width of the prior box; The obtained prior frame coordinates are then normalized, and the non-maximum suppression algorithm is used to process the areas that meet the confidence threshold in the obstacle feature image, retaining the prior frame with the highest foreground score, and obtaining the coordinate range and category information corresponding to the final region proposal frame; Finally, the track area and obstacle frame are generated by the obtained data, and whether there are obstacles in the track area is detected by judging whether they overlap, and then the recognition result is output.

Citation Information

Patent Citations

  • Rail transit obstacle detection method based on deep learning

    CN112633176A

  • Rail transit train obstacle detection method based on convolutional neural network

    CN114973199A

Cited By

  • Method and system for identifying abnormal behaviors of sailors

    CN120954086A