Pixel-level rail transit scene understanding method and system

Through the lightweight dual-branch fusion backbone network and the bidirectional feature pyramid pooling network, combined with the multi-task multi-scale loss function, the problem of large calculation amount and slow speed in rail transit scene understanding is solved, the accuracy of scene understanding is improved and it is suitable for embedded devices. , realizing real-time scene understanding of rail transit.

CN118097570BActive Publication Date: 2024-09-20BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311541737.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2024-09-20
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

Existing rail transit scene understanding methods are computationally intensive and slow, making it difficult to effectively locate abnormal conditions such as foreign objects hanging on the catenary in rail transit, and lack pixel-level full scene understanding research.

Method used

A lightweight dual-branch fusion backbone network composed of residual blocks and inverted residual blocks is used to continuously downsample the image, extract image features, and obtain multi-scale receptive fields and deep semantic features through a bidirectional feature pyramid pooling network, combined with pulling The Prasian operator extracts real edges and uses a multi-task multi-scale loss function to optimize the scene understanding effect.

Benefits of technology

It achieves improved scene understanding accuracy without reducing the scene understanding speed, can be deployed on embedded devices, and is suitable for real-time scene understanding of rail transit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118097570B
    Figure CN118097570B
Patent Text Reader

Abstract

The present invention provides a pixel-level rail transit scene understanding method and system, which belongs to the field of rail transit safe operation control technology. A lightweight dual-branch fusion backbone network is used to continuously downsample the input image to extract image features; the feature map extracted by the backbone network is input into a bidirectional feature pyramid pooling network to obtain a multi-scale receptive field and deep semantic features, and a multi-task multi-scale loss function is used to further optimize the scene understanding effect of the method from the perspective of pixels and edges. The lightweight dual-branch fusion backbone network of the present invention can extract image features faster and more effectively, the bidirectional feature pyramid pooling network extracts semantic features from a multi-scale perspective, and the multi-task multi-scale loss function supervises the learning process of the method from the perspectives of edges and pixels, optimizes the effect of the scene understanding method, and improves the understanding accuracy of the model without increasing the reasoning time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rail transit safe operation control, and in particular to a pixel-level rail transit scene understanding method and system. Background Art

[0002] With the rapid development of artificial intelligence and high-speed railways, the rail transit protection mode is transitioning from passive safety to active safety. In the passive safety mode, the staff finds abnormalities in the rail transit environment and reports it to the train driver. This mode is difficult to avoid information lag and can no longer meet the safety needs of intelligent railways. In the active safety mode, the train uses active perception technology to detect whether the operating environment is abnormal, which can effectively ensure the safety of the train. Rail transit scene understanding is the basic task of active perception of train automatic driving. This method is the primary perception task by classifying the rail transit environment pixel by pixel, thereby providing location and semantic information for other tasks. Therefore, it is necessary to study rail transit scene understanding and improve the active perception ability of trains.

[0003] According to the research object, rail transit scene understanding can be divided into track area understanding and rail transit full scene understanding. At present, most rail transit scene understanding methods are based on track extraction, and there are few studies on pixel-level understanding of rail transit full scenes. Track area understanding only extracts rails or tracks, and other parts of the rail transit scene are background areas of no interest. However, the background area also has a great impact on safety. For example, foreign objects hanging on the contact network will pose a threat to train operation, and only extracting the track cannot locate such anomalies. At the same time, the current rail transit scene understanding methods are severely limited in actual engineering applications due to large computational complexity and slow speed. Therefore, it is necessary to study lightweight pixel-level rail transit scene understanding methods. Summary of the invention

[0004] The purpose of the present invention is to provide a pixel-level rail transit scene understanding method and system to solve at least one technical problem existing in the above-mentioned background technology.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] On the one hand, the present invention provides a pixel-level rail transit scene understanding method, comprising:

[0007] A lightweight dual-branch fusion backbone network consisting of several residual blocks and inverted residual blocks is used to continuously downsample the input image to extract image features.

[0008] The feature map extracted by the semantic branch of the backbone network is input into the bidirectional feature pyramid pooling network, and multi-scale receptive fields and deep semantic features are obtained through multiple convolution operations of different sizes;

[0009] Upsample and aggregate deep semantic features of different scales;

[0010] The Laplacian operator is used to extract the true edge, which is used to assist the edge loss and jointly with the pixel loss to optimize the scene understanding effect from the pixel and edge perspectives.

[0011] Furthermore, the lightweight dual-branch fusion backbone network consists of several residual blocks and inverted residual blocks;

[0012] Input the image into the residual block with a step size of 2, and get the output result F of the first layer 1 , which includes 32 levels of features, and the feature map size is 1 / 4 of the original image;

[0013] The output result F of the first layer 1 Input the residual block with a step size of 1 twice in succession to obtain the second layer output result F 2 , which includes 64 levels of features, and the feature map size is 1 / 4 of the original image;

[0014] The output result F of the second layer 2 Input the residual block with a step size of 2 twice in succession, and get the output result F of the third layer 3 , which includes 64 levels of features, and the feature map size is 1 / 8 of the original image;

[0015] The output result F of the third layer 3 Input the inverted residual block with a step size of 1 twice in succession to obtain the output result of the first layer of the detail branch It includes 64 levels of features, and the size of the detail feature map is 1 / 8 of the original image. The detail feature map includes rich image texture, color, and shape information.

[0016] Furthermore, the output result F of the third layer 3 Input the inverted residual block with a step size of 2 twice in succession to obtain the output result of the first layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 16 of the original image;

[0017] Output the result of the first layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the first layer output of the detail branch Add, and the addition result is input into the inverted residual block with a step size of 1 twice to obtain the second layer output result of the detail branch It includes 64 levels of features, and the feature map size is 1 / 8 of the original image; the first layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add, and the addition result is input into the inverted residual block with a step size of 2 twice to obtain the output result of the second layer of the semantic branch It includes 256 levels of features, and the feature map size is 1 / 32 of the original image.

[0018] Furthermore, the second layer output result of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the second layer output of the detail branch Add, and input the addition result into the inverse residual block with a step size of 1 to obtain the output result of the third layer of the detail branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the second layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add the output results of the second layer of the semantic branch Input the inverted residual block with a step size of 2 to obtain the output result of the third layer of the semantic branch It includes 512 levels of features, and the feature map size is 1 / 32 of the original image.

[0019] Furthermore, the output result of the third layer of the semantic branch Input into the bidirectional feature pyramid pooling network, then use the bilinear interpolation method to upsample the feature map to obtain the output result of the fourth layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the output result of the fourth layer of the semantic branch The third level output result of the detail branch Add them together to get the fusion result F s , which includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the fusion result of the two branches F s An upsampling operation is performed to restore the feature map to the same size as the original input image.

[0020] Furthermore, the calculation formula of the residual block is as follows:

[0021]

[0022] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBRk,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, s is the convolution step size, and R represents the ReLU activation function;

[0023] The calculation formula of the inverted residual block is as follows:

[0024]

[0025] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, and s is the convolution step size.

[0026] Furthermore, the bidirectional feature pyramid pooling network contains three 1×1 convolution operations, six 3×3 convolution operations, three pooling operations with step sizes of 2, 4, and 8, and one connection operation:

[0027]

[0028] Y=CBR 1,1 (Cat(y 1 ,y 2 …, y i ))+CBR 1,1 (x) (4)

[0029] Among them, CBR k,s represents the Conv-BN-ReLU sequential operation, P k,s represents the average pooling operation, k is the convolution kernel size, s is the convolution step size, Upf represents the upsampling operation of size f, and Cat represents the connection operation.

[0030] Furthermore, the multi-task multi-scale loss function includes a multi-scale pixel loss function and a multi-scale edge loss function:

[0031] L total =L boun +L pixel ;

[0032] Among them, L boun is the multi-scale marginal loss function, L pixel It is a multi-scale pixel loss function;

[0033]

[0034]

[0035] Among them, N is the pixel point in the image, M is the number of semantic categories, and y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the cross entropy loss of the feature map at stage t;

[0036]

[0037]

[0038]

[0039] Where N is the pixel in the image, y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the double cross loss function of the t-th feature map, is the dice loss of t feature maps.

[0040] In a second aspect, the present invention provides a pixel-level rail transit scene understanding system, comprising:

[0041] The downsampling module is used to continuously downsample the input image using a lightweight dual-branch fusion backbone network composed of several residual blocks and inverted residual blocks to extract image features;

[0042] The convolution module is used to input the feature map extracted by the semantic branch of the backbone network into the bidirectional feature pyramid pooling network, and obtain multi-scale receptive fields and deep semantic features through multiple convolution operations of different sizes;

[0043] The module is used to upsample the deep semantic features of different scales with the features fused from the two branches;

[0044] The edge loss extraction module is used to extract the real edge using the Laplace operator, which is used to assist the edge loss and optimize the scene understanding effect from the pixel and edge perspectives together with the pixel loss.

[0045] In a third aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the pixel-level rail transit scene understanding method as described above is implemented.

[0046] In a fourth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the pixel-level rail transit scene understanding method as described above.

[0047] In a fifth aspect, the present invention provides an electronic device comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the pixel-level rail transit scene understanding method as described above.

[0048] The beneficial effects of the present invention are as follows: a lightweight backbone network with strong feature extraction capability is used to extract different features from the detail and semantic levels, and then a bidirectional feature pyramid pooling network is used to further deepen the semantic features from a multi-scale perspective and merge them with the detail features; the Laplacian operator is used to extract the real edge, which is used to correct the edge loss generated during the training process, and together with the pixel loss, constitutes a loss function, which further improves the scene understanding accuracy without reducing the scene understanding speed. At the same time, this method has the characteristics of being lightweight and can be deployed on embedded devices for engineering applications.

[0049] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0051] Figure 1 This is a framework diagram of the pixel-level rail transit scene understanding method described in an embodiment of the present invention.

[0052] Figure 2 This is a diagram of the inverted residual block structure for efficient feature extraction according to an embodiment of the present invention. Figure 2 (a) is 3×3DWConv, Figure 2 (b) is 5×5DWConv.

[0053] Figure 3 This is a diagram of the bidirectional feature pyramid pooling network structure that can realize multi-scale receptive field and deep semantic feature extraction as described in an embodiment of the present invention.

[0054] Figure 4 This is a scene understanding result diagram of the pixel-level rail transit scene understanding method described in an embodiment of the present invention on the Railsem19 dataset. Figure 4 (a) is the original input image, Figure 4 (b) is the output scene understanding image corresponding to the original input image. Figure 4 (c) is the corresponding real scene understanding image.

[0055] Figure 5 This is a scene understanding result diagram of the pixel-level rail transit scene understanding method described in an embodiment of the present invention on the Railscapes dataset. Figure 5 (a) is the original input image, Figure 5 (b) is the output scene understanding image corresponding to the original input image. Figure 5 (c) is the corresponding real scene understanding image.

[0056] Figure 6 This is a flow chart of the pixel-level rail transit scene understanding method described in an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0058] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.

[0059] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.

[0060] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or groups thereof.

[0061] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0062] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.

[0063] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.

[0064] Example 1

[0065] In this embodiment 1, a pixel-level rail transit scene understanding system is first provided, which includes: a downsampling module, which is used to use a lightweight two-branch fusion backbone network composed of a plurality of residual blocks and inverted residual blocks to perform continuous downsampling operations on the input image to extract image features; a convolution module, which is used to input the feature map extracted by the semantic branch of the backbone network into a bidirectional feature pyramid pooling network, and obtain multi-scale receptive fields and deep semantic features through multiple convolution operations of different sizes; an upsampling module, which is used to upsample the deep semantic features of different scales with the features fused from the two branches; an edge loss extraction module, which is used to extract the real edge using the Laplacian operator, which is used to assist the edge loss, and together with the pixel loss, optimize the scene understanding effect from the pixel and edge perspectives.

[0066] In this embodiment 1, the above-mentioned system is used to implement a pixel-level rail transit scene understanding method, including: using a lightweight dual-branch fusion backbone network composed of a number of residual blocks and inverted residual blocks to continuously downsample the input image to extract image features; inputting the feature map extracted by the semantic branch of the backbone network into a bidirectional feature pyramid pooling network, and obtaining multi-scale receptive fields and deep semantic features through multiple convolution operations of different sizes; upsampling the deep semantic features of different scales and then aggregating them; using the Laplacian operator to extract the real edge, which is used to assist the edge loss, and together with the pixel loss, optimizes the scene understanding effect from the pixel and edge perspectives.

[0067] Among them, the lightweight dual-branch fusion backbone network consists of several residual blocks and inverted residual blocks;

[0068] Input the image into the residual block with a step size of 2, and get the output result F of the first layer 1 , which includes 32 levels of features, and the feature map size is 1 / 4 of the original image;

[0069] The output result F of the first layer 1 Input the residual block with a step size of 1 twice in succession to obtain the second layer output result F 2 , which includes 64 levels of features, and the feature map size is 1 / 4 of the original image;

[0070] The output result F of the second layer 2 Input the residual block with a step size of 2 twice in succession, and get the output result F of the third layer 3 , which includes 64 levels of features, and the feature map size is 1 / 8 of the original image;

[0071] The output result F of the third layer 3 Input the inverted residual block with a step size of 1 twice in succession to obtain the output result of the first layer of the detail branch It includes 64 levels of features, and the size of the detail feature map is 1 / 8 of the original image. The detail feature map includes rich image texture, color, and shape information.

[0072] The output result F of the third layer 3 Input the inverted residual block with a step size of 2 twice in succession to obtain the output result of the first layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 16 of the original image;

[0073] Output the result of the first layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the first layer output of the detail branch Add, and the addition result is input into the inverted residual block with a step size of 1 twice to obtain the second layer output result of the detail branch It includes 64 levels of features, and the feature map size is 1 / 8 of the original image; the first layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add, and the addition result is input into the inverted residual block with a step size of 2 twice to obtain the output result of the second layer of the semantic branch It includes 256 levels of features, and the feature map size is 1 / 32 of the original image.

[0074] Output the result of the second layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the second layer output of the detail branch Add, and input the addition result into the inverse residual block with a step size of 1 to obtain the output result of the third layer of the detail branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the second layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add the output results of the second layer of the semantic branch Input the inverted residual block with a step size of 2 to obtain the output result of the third layer of the semantic branch It includes 512 levels of features, and the feature map size is 1 / 32 of the original image.

[0075] Output the result of the third layer of the semantic branch Input into the bidirectional feature pyramid pooling network, then use the bilinear interpolation method to upsample the feature map to obtain the output result of the fourth layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the output result of the fourth layer of the semantic branch The third level output result of the detail branch Add them together to get the fusion result F s , which includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the fusion result of the two branches F s An upsampling operation is performed to restore the feature map to the same size as the original input image.

[0076] The calculation formula of the residual block is as follows:

[0077]

[0078] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, s is the convolution step size, and R represents the ReLU activation function;

[0079] The calculation formula of the inverted residual block is as follows:

[0080]

[0081] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, and s is the convolution step size.

[0082] The bidirectional feature pyramid pooling network contains three 1×1 convolution operations, six 3×3 convolution operations, three pooling operations with strides of 2, 4, and 8, and one connection operation:

[0083]

[0084] Y=CBR 1,1 (Cat(y 1 ,y 2 …, y i ))+CBR 1,1 (x) (4)

[0085] Among them, CBR k,s represents the Conv-BN-ReLU sequential operation, P k,s represents the average pooling operation, k is the convolution kernel size, s is the convolution step size, Up f represents an upsampling operation of size f, and Cat represents a concatenation operation.

[0086] The multi-task multi-scale loss function includes a multi-scale pixel loss function and a multi-scale edge loss function:

[0087] L total =L boun +L pixel ;

[0088] Among them, L boun is the multi-scale marginal loss function, L pixel It is a multi-scale pixel loss function;

[0089]

[0090]

[0091] Among them, N is the pixel point in the image, M is the number of semantic categories, and y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the cross entropy loss of the feature map at stage t;

[0092]

[0093]

[0094]

[0095] Where N is the pixel in the image, y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the double cross loss function of the t-th feature map, is the dice loss of t feature maps.

[0096] Example 2

[0097] In this embodiment 2, a pixel-level rail transit scene understanding method is provided to effectively understand the various components of the rail transit scene. The method mainly includes the following steps:

[0098] Step S1: First, use a lightweight dual-branch fusion backbone network composed of several residual blocks and inverted residual blocks to continuously downsample the input image to extract image features. The lightweight dual-branch fusion backbone network has fewer parameters and increases the fusion of information at different levels, which can quickly and accurately extract image features;

[0099] Step S2: The feature map extracted by the semantic branch of the backbone network is input into the bidirectional feature pyramid pooling network, and a multi-scale receptive field and deep semantic features are obtained through multiple convolution operations with different step lengths. The deep semantic features of different scales are then upsampled and aggregated. The bidirectional feature pyramid network is at the end of the backbone network to further deepen the semantic features while ensuring a small amount of calculation parameters, thereby improving the accuracy of network scene understanding.

[0100] Step S3: Finally, the multi-task multi-scale loss function is used to supervise the learning process of the method from the perspective of multi-scale pixels and multi-task edges, and further optimize the scene understanding effect of the method. During the learning process of the method, the loss function corrects each pixel of the entire image from the perspective of multi-scale pixels, and further enhances the edge information of each object in the image from the perspective of multi-task edges, which enhances the learning effect of the method as a whole.

[0101] Step S1 specifically includes the following steps:

[0102] Step 1.1: Input the image into the residual block with a step size of 2 to obtain the output result F of the first layer. 1 , which includes 32 levels of features, the feature map size is 1 / 4 of the original image, and the calculation formula of the residual block is as follows:

[0103]

[0104] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, s is the convolution step size, and R represents the ReLU activation function.

[0105] Step 1.2: The output result F of the first layer 1 Input the residual block with a step size of 1 twice in succession to obtain the second layer output result F 2 , which includes 64 levels of features, and the feature map size is 1 / 4 of the original image;

[0106] Step 1.3: The output result F of the second layer 2 Input the residual block with a step size of 2 twice in succession, and get the output result F of the third layer 3 , which includes 64 levels of features, and the feature map size is 1 / 8 of the original image;

[0107] Step 1.4: The output result F of the third layer 3 Input the inverted residual block with a step size of 1 twice in succession to obtain the output result of the first layer of the detail branch It includes 64 levels of features, and the feature map size is 1 / 8 of the original image. 3 Input the inverted residual block with a step size of 2 twice in succession to obtain the output result of the first layer of the semantic branch It includes 128 levels of features, the feature map size is 1 / 16 of the original image, and the calculation formula of the inverted residual block is as follows:

[0108]

[0109] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, and s is the convolution step size. ;

[0110] Step 1.5: Output the first layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the first layer output of the detail branch Add, and the addition result is input into the inverted residual block with a step size of 1 twice to obtain the second layer output result of the detail branch It includes 64 levels of features, and the feature map size is 1 / 8 of the original image; the first layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add, and the addition result is input into the inverted residual block with a step size of 2 twice to obtain the output result of the second layer of the semantic branch It includes 256 levels of features, and the feature map size is 1 / 32 of the original image;

[0111] Step 1.6: Output the result of the second layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the second layer output of the detail branch Add, and input the addition result into the inverse residual block with a step size of 1 to obtain the output result of the third layer of the detail branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the second layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add the output results of the second layer of the semantic branch Input the inverted residual block with a step size of 2 to obtain the output result of the third layer of the semantic branch It includes 512 levels of features, and the feature map size is 1 / 32 of the original image;

[0112] Step 1.7: Output the result of the third layer of the semantic branch Input into the bidirectional feature pyramid pooling network, then use the bilinear interpolation method to upsample the feature map to obtain the output result of the fourth layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image;

[0113] Step 1.8: Output the result of the fourth layer of the semantic branch The third level output result of the detail branch Add them together to get the fusion result F s , which includes 128 levels of features, and the feature map size is 1 / 8 of the original image;

[0114] Step 1.9, the fusion result F of the two branchess An upsampling operation is performed to restore the feature map to the same size as the original input image.

[0115] Step S2 specifically includes the following steps:

[0116] Step 2.1: Input the features extracted by the semantic branch into the multi-scale pyramid pooling network for multi-scale downsampling, and then input them into the pyramid upsampling module to restore the image feature size. The calculation formula for each scale is as follows:

[0117]

[0118] Among them, CBR k,s represents the Conv-BN-ReLU sequential operation, P k,s represents the average pooling operation, k is the convolution kernel size, s is the convolution step size, Up f Represents an upsampling operation of size f.

[0119] Step 2.2: Perform cat connection operation on the output results of each scale. The calculation formula is as follows:

[0120] Y=CBR 1,1 (Cat(y 1 ,y 2 …, y i ))+CBR 1,1 (x) (4)

[0121] Among them, CBR k,s represents the Conv-BN-ReLU sequential operation, y i Represents the output results of each scale, and Cat represents the connection operation.

[0122] The loss function described in step S3 supervises the learning process of the entire method from the perspectives of pixels and edges to further optimize the results. The loss function includes a multi-scale pixel loss function and a multi-scale edge loss function, and the calculation formula is:

[0123] L total =L boun +L pixel (5)

[0124] Among them, L boun is the multi-scale marginal loss function, L pixel It is a multi-scale pixel loss function.

[0125]

[0126]

[0127] Among them, N is the pixel point in the image, M is the number of semantic categories, and y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the cross entropy loss of the feature map at stage t.

[0128]

[0129]

[0130]

[0131] Where N is the pixel in the image, y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the double cross loss function of the t-th feature map, is the dice loss of t feature maps.

[0132] In summary, the method of this embodiment aims to address the problems that there are few studies on pixel-level understanding of rail transit scenes, and the existing scene understanding models have large parameters and slow calculation speed. A lightweight scene understanding method for pixel-level understanding of rail transit scenes is proposed - a pixel-level rail transit scene understanding method. The network uses a lightweight backbone network with strong feature extraction capabilities to extract different features from the details and semantics levels, and then uses a bidirectional feature pyramid pooling network to further deepen the semantic features from a multi-scale perspective and merge them with the detail features. At the same time, the Laplace operator is used to extract the real edge, which is used to correct the edge loss generated during the training process, and together with the pixel loss, it constitutes a multi-task multi-scale loss function, which improves the scene understanding accuracy of the method without reducing the speed of scene understanding. At the same time, the method has the characteristics of lightweight and can be deployed on embedded devices for engineering applications.

[0133] Example 3

[0134] like Figures 1 to 6 As shown, in this embodiment 3, a pixel-level rail transit scene understanding method is provided. The network is a lightweight network that can be deployed on embedded devices. At the same time, the scene understanding accuracy is high and the scene understanding speed is fast. It can be used for real-time scene understanding of the entire rail transit scene.

[0135] The specific implementation process of the pixel-level rail transit scene understanding method includes the following steps:

[0136] Step S1, use a lightweight dual-branch fusion backbone network to continuously downsample the input image to extract image features; input the feature map extracted by the semantic branch of the backbone network into a bidirectional feature pyramid pooling network to obtain multi-scale receptive fields and deep semantic features. The lightweight dual-branch fusion backbone network has fewer parameters and increases the fusion of information at different levels, which can quickly and accurately extract image features;

[0137] The step S1 specifically includes the following steps:

[0138] Step 1.1: First, input the image into the residual block with a step size of 2 to obtain the output result F of the first layer. 1 , which includes 32 levels of features, and the feature map size is 1 / 4 of the original image; the calculation formula of the residual block is as follows:

[0139]

[0140] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, s is the convolution step size, and R represents the ReLU activation function.

[0141] Step 1.2: The output result F of the first layer 1 Input the residual block with a step size of 1 twice in succession to obtain the second layer output result F 2 , which includes 64 levels of features, and the feature map size is 1 / 4 of the original image;

[0142] Step 1.3: The output result F of the second layer 2 Input the residual block with a step size of 2 twice in succession, and get the output result F of the third layer 3 , which includes 64 levels of features, and the feature map size is 1 / 8 of the original image;

[0143] Step 1.4: The output result F of the third layer 3 Input the inverted residual block with a step size of 1 twice in succession to obtain the output result of the first layer of the detail branch It includes 64 levels of features, and the feature map size is 1 / 8 of the original image. 3 Input the inverted residual block with a step size of 2 twice in succession to obtain the output result of the first layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 16 of the original image; the calculation formula of the inverted residual block is as follows:

[0144]

[0145] Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, s is the convolution step size, and R represents the ReLU activation function.

[0146] Step 1.5: Output the first layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the first layer output of the detail branch Add, and the addition result is input into the inverted residual block with a step size of 1 twice to obtain the second layer output result of the detail branch It includes 64 levels of features, and the feature map size is 1 / 8 of the original image; the first layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add, and the addition result is input into the inverted residual block with a step size of 2 twice to obtain the output result of the second layer of the semantic branch It includes 256 levels of features, and the feature map size is 1 / 32 of the original image;

[0147] Step 1.6: Output the result of the second layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the second layer output of the detail branch Add, and input the addition result into the inverse residual block with a step size of 1 to obtain the output result of the third layer of the detail branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the second layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add the output results of the second layer of the semantic branch Input the inverted residual block with a step size of 2 to obtain the output result of the third layer of the semantic branch It includes 512 levels of features, and the feature map size is 1 / 32 of the original image;

[0148] Step 1.7: Output the result of the third layer of the semantic branch Input into the bidirectional feature pyramid pooling network, then use the bilinear interpolation method to upsample the feature map to obtain the output result of the fourth layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image;

[0149] Step 1.8: Output the result of the fourth layer of the semantic branch The third level output result of the detail branch Add them together to get the fusion result F s , which includes 128 levels of features, and the feature map size is 1 / 8 of the original image;

[0150] Step 1.9, the fusion result F of the two branches s An upsampling operation is performed to restore the feature map to the same size as the original input image.

[0151] Step S2: The feature map extracted by the semantic branch of the backbone network is input into the bidirectional feature pyramid pooling network, and multi-scale receptive fields and deep semantic features are obtained through multiple convolution operations with different step lengths. The deep semantic features of different scales are then upsampled and aggregated. The bidirectional feature pyramid network is at the end of the backbone network to further deepen the semantic features while ensuring a small amount of calculation parameters, thereby improving the accuracy of network scene understanding.

[0152] The step S2 specifically includes the following steps:

[0153] Step 2.1: Input the features extracted by the semantic branch into the multi-scale pyramid pooling network for multi-scale downsampling, and then input them into the pyramid upsampling module to restore the image feature size. The calculation formula for each scale is as follows:

[0154]

[0155] Among them, CBR k,s represents the Conv-BN-ReLU sequential operation, P k,s represents the average pooling operation, k is the convolution kernel size, s is the convolution step size, Up f Represents an upsampling operation of size f.

[0156] Step 2.2: Perform cat connection operation on the output results of each scale. The calculation formula is as follows:

[0157] Y=CBR 1,1 (Cat(y 1 ,y 2…, y i ))+CBR 1,1 (x) (4)

[0158] Among them, CBR k,s represents the Conv-BN-ReLU sequential operation, y i Represents the output results of each scale, and Cat represents the connection operation.

[0159] Step S3: Finally, the multi-task multi-scale loss function is used to supervise the learning process of the method from the perspective of multi-scale pixels and multi-task edges, and further optimize the scene understanding effect of the method. During the learning process of the method, the loss function corrects each pixel of the entire image from the perspective of multi-scale pixels, and further enhances the edge information of each object in the image from the perspective of multi-task edges, which enhances the learning effect of the method as a whole.

[0160] The step S3 is specifically learned by a loss function supervision auxiliary method. Specifically, the loss function includes a multi-scale pixel loss function and a multi-scale edge loss function, and the calculation formula is:

[0161] L total =L boun +L pixel (5)

[0162] Among them, L boun is the multi-scale marginal loss function, L pixel It is a multi-scale pixel loss function.

[0163]

[0164]

[0165] Among them, N is the pixel point in the image, M is the number of semantic categories, and y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the cross entropy loss of the feature map at stage t.

[0166]

[0167]

[0168]

[0169] Where N is the pixel in the image, y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the double cross loss function of the t-th feature map, is the dice loss of t feature maps.

[0170] In this embodiment, in order to verify the effectiveness of this method in multiple rail transit scenarios, tests were performed on Railsem19 and Railscapes respectively. Figure 4 This is the scene understanding diagram of this method on the Railsem19 dataset. Figure 5 This is a scene understanding diagram of the method on the Railscapes dataset. The method was trained and tested on two NVIDIA GeForce RTX 3090s without compression and acceleration.

[0171] In this embodiment, the understanding accuracy of the method is measured by mIoU and mAcc, the understanding speed of the method is measured by FPS, the parameter amount of the method is measured by Parameters, and the computing power of the method is measured by Glops.

[0172] Table 1 shows the test results of the pixel-level rail transit scene understanding method on the Railsem19 and Railscapes datasets.

[0173] Table 1

[0174]

[0175] As can be seen from Table 1, the pixel-level rail transit scene understanding method proposed in this embodiment performs well in terms of understanding accuracy, understanding speed, and parameter quantity on the Railsem19 and Railscapes datasets.

[0176] In summary, the method of this embodiment can extract image features quickly and efficiently. At the same time, the method has a lightweight structure, few calculation parameters, and can be deployed on embedded devices to understand real-time scenes as trains run.

[0177] Example 4

[0178] This embodiment 4 provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the pixel-level rail transit scene understanding method described above is implemented.

[0179] Example 5

[0180] This embodiment 5 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a pixel-level rail transit scene understanding method.

[0181] Example 6

[0182] This embodiment 6 provides an electronic device, including: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the pixel-level rail transit scene understanding method as described above.

[0183] In summary, the pixel-level rail transit scene understanding method and system described in the embodiment of the present invention first uses a lightweight dual-branch fusion backbone network to continuously downsample the input image to extract image features; then the feature map extracted by the backbone network is input into the bidirectional feature pyramid pooling network to obtain multi-scale receptive fields and deep semantic features, and the semantic features specifically refer to global visual scene information; finally, the multi-task multi-scale loss function is used to further optimize the scene understanding effect of the method from the perspective of pixels and edges. The lightweight dual-branch fusion backbone network designed by the method of the present invention can extract image features more quickly and effectively, the bidirectional feature pyramid pooling network further extracts semantic features from a multi-scale perspective, and the multi-task multi-scale loss function can supervise the learning process of the method from both edge and pixel perspectives, further optimize the effect of the scene understanding method, and further improve the understanding accuracy of the model without increasing the reasoning time. The method can be deployed on embedded devices, the operating environment is more universal, and it is suitable for understanding in different rail transit scenarios.

[0184] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0188] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in the scope of protection of the present invention.

Claims

1. A pixel-level rail transit scene understanding method, It is characterized in that include: A lightweight dual-branch fusion backbone network consisting of several residual blocks and inverted residual blocks is used to continuously downsample the input image to extract image features; the input image is the image data in the Railsem19 dataset; The feature map extracted by the semantic branch of the backbone network is input into the bidirectional feature pyramid pooling network, and multi-scale receptive fields and deep semantic features are obtained through multiple convolution operations of different sizes; The deep semantic features of different scales are upsampled with the features fused from the two branches; wherein the features fused from the two branches are obtained by the following steps: firstly, the image is input into a residual block with a step size of 2 to obtain the output result of the first layer, the output result of the first layer is input into a residual block with a step size of 1 twice in succession to obtain the output result of the second layer, the output result of the second layer is input into a residual block with a step size of 2 twice in succession to obtain the output result of the third layer, the output result of the third layer is input into an inverted residual block with a step size of 1 twice in succession to obtain the output result of the first layer of the detail branch, and ... The result is input into the inverted residual block with a step size of 2 twice to obtain the output result of the first layer of the semantic branch; the output result of the first layer of the semantic branch is upsampled to a feature map of the same size as the output result of the first layer of the detail branch by bilinear interpolation operation, the feature map after upsampling the output result of the first layer of the semantic branch is added to the output result of the first layer of the detail branch, and the addition result is input into the inverted residual block with a step size of 1 twice to obtain the output result of the second layer of the detail branch; the output result of the first layer of the detail branch is downsampled to a feature map of the same size as the output result of the first layer of the semantic branch by convolution operation, and the detail branch is added to the feature map after upsampling. The downsampled feature map of the first layer output of the branch is added to the first layer output of the semantic branch, and the addition result is input twice in succession into the inverse residual block with a step size of 2 to obtain the second layer output of the semantic branch; the second layer output of the semantic branch is upsampled to a feature map of the same size as the second layer output of the detail branch by bilinear interpolation, and the upsampled feature map of the second layer output of the semantic branch is added to the second layer output of the detail branch, and the addition result is input into the inverse residual block with a step size of 1 to obtain the third layer output of the detail branch; the second layer output of the detail branch is convolved Downsample to a feature map with the same size as the second-layer output result of the semantic branch, add the downsampled feature map of the second-layer output result of the detail branch to the second-layer output result of the semantic branch, input the second-layer output result of the semantic branch into an inverted residual block with a step size of 2, and obtain the third-layer output result of the semantic branch; input the third-layer output result of the semantic branch into a bidirectional feature pyramid pooling network, and then upsample the feature map using a bilinear interpolation method to obtain the fourth-layer output result of the semantic branch; add the fourth-layer output result of the semantic branch to the third-layer output result of the detail branch to obtain a fusion result; The Laplacian operator is used to extract the true edge, which is used to assist the edge loss and jointly with the pixel loss to optimize the scene understanding effect from the pixel and edge perspectives.

2. The pixel-level rail transit scene understanding method according to claim 1, It is characterized in that The lightweight dual-branch fusion backbone network consists of several residual blocks and inverted residual blocks; Input the image into the residual block with a step size of 2, and get the output result F of the first layer 1 , which includes 32 levels of features, and the feature map size is 1 / 4 of the original image; The output result F of the first layer 1 Input the residual block with a step size of 1 twice in succession to obtain the second layer output result F 2 , which includes 64 levels of features, and the feature map size is 1 / 4 of the original image; The output result F of the second layer 2 Input the residual block with a step size of 2 twice in succession, and get the output result F of the third layer 3 , which includes 64 levels of features, and the feature map size is 1 / 8 of the original image; The output result F of the third layer 3 Input the inverted residual block with a step size of 1 twice in succession to obtain the output result of the first layer of the detail branch It includes 64 levels of features, and the size of the detail feature map is 1 / 8 of the original image. The detail feature map includes rich image texture, color, and shape information.

3. The pixel-level rail transit scene understanding method according to claim 2, It is characterized in that The output result F of the third layer 3 Input the inverted residual block with a step size of 2 twice in succession to obtain the output result of the first layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 16 of the original image; Output the result of the first layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the first layer output of the detail branch Add, and the addition result is input into the inverted residual block with a step size of 1 twice to obtain the second layer output result of the detail branch It includes 64 levels of features, and the feature map size is 1 / 8 of the original image; the first layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add, and the addition result is input into the inverted residual block with a step size of 2 twice to obtain the output result of the second layer of the semantic branch It includes 256 levels of features, and the feature map size is 1 / 32 of the original image.

4. The pixel-level rail transit scene understanding method according to claim 3, It is characterized in that Output the result of the second layer of the semantic branch Perform bilinear interpolation upsampling to The feature maps of the same size are The upsampled feature map and the second layer output of the detail branch Add, and input the addition result into the inverse residual block with a step size of 1 to obtain the output result of the third layer of the detail branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the second layer of the detail branch outputs the result Perform convolution operation to downsample to The feature maps of the same size are The downsampled feature map and the output result of the first layer of the semantic branch Add together the output results of the second layer of the semantic branch Input the inverted residual block with a step size of 2 to obtain the output result of the third layer of the semantic branch It includes 512 levels of features, and the feature map size is 1 / 32 of the original image.

5. The pixel-level rail transit scene understanding method according to claim 4, It is characterized in that Output the result of the third layer of the semantic branch Input into the bidirectional feature pyramid pooling network, then use the bilinear interpolation method to upsample the feature map to obtain the output result of the fourth layer of the semantic branch It includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the output result of the fourth layer of the semantic branch The third level output result of the detail branch Add them together to get the fusion result F S , which includes 128 levels of features, and the feature map size is 1 / 8 of the original image; the fusion result of the two branches F S An upsampling operation is performed to restore the feature map to the same size as the original input image.

6. The pixel-level rail transit scene understanding method according to claim 5, It is characterized in that The calculation formula of the residual block is as follows: Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, s is the convolution step size, and R represents the ReLU activation function; The calculation formula of the inverted residual block is as follows: Among them, CBR k,s Represents Conv-BN-ReLU sequential operation, DCBR k,s represents the DWConv-BN-ReLU sequential operation, CB k,s represents the DWConv-BN sequential structure, P k,s is the average pooling operation, k is the convolution kernel size, and s is the convolution step size.

7. The pixel-level rail transit scene understanding method according to claim 6, It is characterized in that The bidirectional feature pyramid pooling network contains three 1×1 convolution operations, six 3×3 convolution operations, three pooling operations with strides of 2, 4, and 8, and one connection operation: Y=CBR 1,1 (Cat(y 1 ,y 2 …,y i ))+CBR 1,1 (x) (4) Among them, CBR k,s represents the Conv-BN-ReLU sequential operation, P k,s represents the average pooling operation, k is the convolution kernel size, s is the convolution step size, Up f represents an upsampling operation of size f, and Cat represents a concatenation operation.

8. The pixel-level rail transit scene understanding method according to claim 7, It is characterized in that The multi-task multi-scale loss function includes a multi-scale pixel loss function and a multi-scale edge loss function: L total =L boun +L pixel ; Among them, L boun is the multi-scale marginal loss function, L pixel It is a multi-scale pixel loss function; Among them, N is the pixel point in the image, M is the number of semantic categories, and y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the cross entropy loss of the feature map at stage t; Where N is the pixel in the image, y ij The true label corresponding to the i-th pixel is j, p ij represents the probability that the i-th pixel is predicted to be label j, is the double cross loss function of the t-th feature map, is the dice loss of t feature maps.

9. A pixel-level rail transit scene understanding system, It is characterized in that include: The downsampling module is used to perform continuous downsampling operations on the input image using a lightweight dual-branch fusion backbone network composed of several residual blocks and inverted residual blocks to extract image features; wherein the input image is the image data in the Railsem19 dataset; The convolution module is used to input the feature map extracted by the semantic branch of the backbone network into the bidirectional feature pyramid pooling network, and obtain multi-scale receptive fields and deep semantic features through multiple convolution operations of different sizes; The upsampling module is used to upsample the deep semantic features of different scales with the features fused from the two branches; wherein the features fused from the two branches are obtained by the following steps: firstly, the image is input into a residual block with a step size of 2 to obtain the output result of the first layer, the output result of the first layer is input into a residual block with a step size of 1 twice in succession to obtain the output result of the second layer, the output result of the second layer is input into a residual block with a step size of 2 twice in succession to obtain the output result of the third layer, the output result of the third layer is input into an inverted residual block with a step size of 1 twice in succession to obtain the output result of the first layer of the detail branch, and at the same time The output of the third layer is input twice in succession into the inverse residual block with a step size of 2 to obtain the output of the first layer of the semantic branch; the output of the first layer of the semantic branch is upsampled to a feature map of the same size as the output of the first layer of the detail branch by bilinear interpolation operation, the upsampled feature map of the first layer of the semantic branch output is added to the output of the first layer of the detail branch, and the addition result is input twice in succession into the inverse residual block with a step size of 1 to obtain the output of the second layer of the detail branch; the output of the first layer of the detail branch is downsampled to a feature map of the same size as the output of the first layer of the semantic branch by convolution operation , add the downsampled feature map of the first layer output result of the detail branch to the first layer output result of the semantic branch, and input the addition result twice in a row into the inverse residual block with a step size of 2 to obtain the second layer output result of the semantic branch; perform bilinear interpolation operation on the second layer output result of the semantic branch to upsample it to a feature map of the same size as the second layer output result of the detail branch, add the upsampled feature map of the second layer output result of the semantic branch to the second layer output result of the detail branch, and input the addition result into the inverse residual block with a step size of 1 to obtain the third layer output result of the detail branch; perform convolution operation on the second layer output result of the detail branch The product operation is performed to downsample the feature map to the same size as the second-layer output result of the semantic branch, the feature map after the downsampling of the second-layer output result of the detail branch is added to the second-layer output result of the semantic branch, and the second-layer output result of the semantic branch is input into the inverted residual block with a step size of 2 to obtain the third-layer output result of the semantic branch; the third-layer output result of the semantic branch is input into the bidirectional feature pyramid pooling network, and then the feature map is upsampled using the bilinear interpolation method to obtain the fourth-layer output result of the semantic branch; the fourth-layer output result of the semantic branch is added to the third-layer output result of the detail branch to obtain the fusion result; The edge loss extraction module is used to extract the real edge using the Laplace operator, which is used to assist the edge loss and optimize the scene understanding effect from the pixel and edge perspectives together with the pixel loss.

10. An electronic device, It is characterized in that include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the pixel-level rail transit scene understanding method as described in any one of claims 1-8.