Feature self-enhancement-based rgb-d segmentation method, system and training method
By employing a feature self-enhancement method, which utilizes advanced RGB features to guide deep feature self-enhancement, and combines semantic edge loss and a normalized stream encoder, the problem of noise interference in RGB-D images is solved, thereby improving the accuracy and robustness of semantic segmentation.
Patent Information
- Application Number
- CN202411164238.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-08-22
AI Technical Summary
Existing technologies struggle to effectively integrate RGB and depth information, leading to noise and missing data in depth images interfering with semantic segmentation performance and affecting model performance under various environments and conditions.
We adopt a feature-based self-enhancement approach, which combines attention mechanism and residual block layer with gated convolutional layer to guide deep feature self-enhancement using high-level RGB features. We also combine semantic edge loss and normalized stream encoder to optimize the quality and stability of fused features.
It improves the accuracy and robustness of semantic segmentation, maintains high performance in complex environments, effectively suppresses noise in deep information, and enhances the clarity of segmentation edges and the overall segmentation effect.
Smart Images

Figure CN119131386B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and machine learning, specifically to the field of image semantic segmentation, and particularly to an RGB-D segmentation method, system, and training method based on feature self-enhancement. Background Technology
[0002] Semantic segmentation is a key task in computer vision, aiming to assign a semantic label to each pixel in an image. With the development of deep learning technology, semantic segmentation has made significant progress in both accuracy and efficiency.
[0003] However, compared to simple RGB images, RGB-D images (i.e. RGB images containing depth information) show greater potential in semantic segmentation because depth information can provide additional geometric and spatial cues, helping the model better understand the shape and boundaries of scenes and objects.
[0004] Furthermore, RGB-D semantic segmentation has broad application prospects in the field of computer vision, and its challenges and potential in multimodal data processing drive continuous exploration of more effective techniques and methods. Future research will continue to advance progress in data fusion, model design, and practical applications, propelling the continued development of this field.
[0005] Effectively fusing RGB and depth information is one of the core challenges of RGB-D semantic segmentation. These two types of information have different characteristics and noise patterns, and traditional fusion methods may struggle to fully leverage their complementary advantages. Specifically, depth data is often affected by sensor accuracy, viewpoint limitations, and environmental conditions, which can lead to noise and missing data in depth images. How to handle these issues during the fusion process is crucial for improving segmentation performance. Developing more robust methods to handle noise and missing data in depth information, enabling models to maintain high performance under various environments and conditions, is a goal in this field, but current technologies have not yet achieved this objective. Summary of the Invention
[0006] In view of the shortcomings of the existing technology, the purpose of this invention is to provide an RGB-D segmentation method, system and training method based on feature self-enhancement.
[0007] To achieve the aforementioned objectives, the technical solution adopted by this invention includes:
[0008] In a first aspect, the present invention provides a training method for an RGB-D image segmentation model based on feature self-enhancement, comprising:
[0009] Acquire RGB images and corresponding depth images, input them into an encoder to obtain depth features and RGB features at multiple levels;
[0010] By fusing the depth features and the primary RGB features, a preliminary fused feature is obtained;
[0011] The preliminary fusion feature is used as the first input depth feature to obtain the preliminary self-enhancing feature under the guidance of the second-level RGB feature. The higher-level RGB feature is used to guide the self-enhancing of the current level fusion feature to obtain the final fusion feature.
[0012] The final fused features and the RGB features at multiple levels are input into the decoder to obtain the segmentation results, and the parameters are updated based on the truth labels.
[0013] Secondly, the present invention also provides an RGB-D image segmentation method based on feature self-enhancement, which performs semantic segmentation using the RGB-D image segmentation model obtained by the above training method, including:
[0014] Obtain the RGB image to be segmented and the corresponding depth image, and input them into the encoder to obtain depth features and RGB features at multiple levels;
[0015] By fusing the depth features and the primary RGB features, a preliminary fused feature is obtained;
[0016] The initial fusion feature is used as the first input feature and self-enhanced under the guidance of the second-level RGB feature to obtain the output feature. The output feature is then used as a new input feature and self-enhanced under the guidance of a higher-level RGB feature until the final fusion feature is obtained.
[0017] The final fused features and the RGB features at multiple levels are input into the decoder to obtain the segmentation result.
[0018] Thirdly, the present invention also provides an RGB-D image segmentation system based on feature self-enhancement, comprising an RGB-D image segmentation model obtained by the above training method, wherein the RGB-D image segmentation model includes:
[0019] The encoder module is used to obtain depth features and multiple levels of RGB features using the RGB image to be segmented and the corresponding depth image;
[0020] The preliminary fusion module is used to fuse the depth features and the primary RGB features to obtain preliminary fused features;
[0021] The feature self-enhancement module is used to take the preliminary fused feature as the first input feature and perform self-enhancement under the guidance of the second-level RGB feature to obtain the output feature, and then use the output feature as a new input feature to perform self-enhancement under the guidance of a higher-level RGB feature until the final fused feature is obtained.
[0022] The decoder module is used to input the final fused features and the RGB features at multiple levels into the decoder to obtain the segmentation result.
[0023] Fourthly, the present invention also provides a readable storage medium storing a computer program, which, when run, executes the steps of the above-described training method or the above-described RGB-D image segmentation method, or stores an RGB-D image segmentation model obtained by the above-described training method.
[0024] Based on the above technical solution, compared with the prior art, the beneficial effects of the present invention include at least the following:
[0025] The model construction method provided by this invention utilizes high-level RGB features to guide the self-enhancement of low-level fusion features. It can suppress noise in depth information through cyclic self-enhancement, thereby making full use of their complementary advantages and avoiding the interference of noise and missing data in depth images on training and image segmentation. This improves training efficiency, the accuracy and robustness of segmentation edges, and enables the model to maintain high performance under various environments and conditions.
[0026] The above description is merely an overview of the technical solution of the present invention. In order to enable those skilled in the art to better understand the technical means of this application and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described below in conjunction with detailed drawings. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating an RGB-D image segmentation method provided in a typical embodiment of the present invention.
[0028] Figure 2 This is a schematic diagram of the overall framework of the RGB-D image segmentation model and model training method provided in a typical embodiment of the present invention. Detailed Implementation
[0029] In view of the shortcomings of the prior art, the inventors of this invention, through long-term research and extensive practice, have proposed the technical solution of this invention. The following will further explain and illustrate this technical solution, its implementation process, and its principles.
[0030] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0031] Moreover, relational terms such as “first” and “second” are used merely to distinguish one component or method step from another that has the same name, and do not necessarily require or imply any such actual relationship or order between these components or method steps.
[0032] See Figure 1 and Figure 2 As shown, this embodiment of the invention provides a training method for an RGB-D image segmentation model based on feature self-enhancement, which includes the following steps:
[0033] Acquire RGB images and corresponding depth images, input them into an encoder to obtain depth features and RGB features at multiple levels;
[0034] By fusing the depth features and the primary RGB features, a preliminary fused feature is obtained;
[0035] The initial fusion feature is used as the first input depth feature to obtain an initial self-enhancing feature under the guidance of the second-level RGB feature. The higher-level RGB feature is used to guide the self-enhancing of the current level fusion feature to obtain the final fusion feature. For example, the initial fusion feature is used as the first input feature to perform self-enhancing under the guidance of the second-level RGB feature to obtain the output feature. The output feature is then used as a new input feature to perform self-enhancing under the guidance of the higher-level RGB feature until the final fusion feature is obtained.
[0036] The final fused features and the RGB features at multiple levels are input into the decoder to obtain the segmentation results, and the parameters are updated based on the truth labels.
[0037] Regarding the specific fusion method, in some implementations, the fusion of the depth features and the primary RGB features adopts an attention mechanism, dynamically adjusting the importance of each depth feature and primary RGB feature for fusion.
[0038] An attention-based fusion module is used to fuse initial depth and RGB features. This module employs an attention mechanism, enabling the network to automatically learn appropriate feature fusion methods to obtain high-quality fused features. Specifically, the attention mechanism allows the network to dynamically adjust the importance of each feature map, effectively enhancing meaningful feature information while suppressing irrelevant or redundant features based on the needs of the current task and scene. This approach not only improves the adaptability of the semantic segmentation model in complex scenes but also enables it to handle noise and low-quality information that may exist in depth images, thereby further optimizing the quality and stability of the fused features.
[0039] Furthermore, in some implementations, the fusion process under the attention mechanism is represented as follows:
[0040]
[0041] in, The depth feature refers to the depth feature embedded in the initial layer; F1 represents the primary RGB feature, and in this invention, Fi and These represent RGB feature embeddings and fused feature embeddings at different levels, respectively; || represents the join operation, f 1×1 This represents feature aggregation; by default, f 1×1 It is a convolutional layer with a 1×1 kernel; f ACF This indicates complementary and integrated attention; f ACM This indicates a complementary and fusion operation of attention.
[0042] Furthermore, in the self-enhancement process, a preferred embodiment of the present invention also introduces a residual block layer for feature optimization; that is, in some embodiments, the self-enhancement specifically includes:
[0043] Residual block enhancement is performed on the input features to select and enhance high-quality features from the initial fused features;
[0044] Self-enhancement guided by the high-quality features;
[0045] The residual block enhancement is represented as follows:
[0046]
[0047] Among them, f RBL Represents the residual block layer; This indicates the high-quality feature; This represents the input feature.
[0048] The preferred embodiment described above introduces residual block layers to select and enhance high-quality features from the initial fused features. Residual blocks typically include skip connections, which help avoid the vanishing gradient problem and accelerate training; through these skip connections, the network can effectively transfer and combine low-level and high-level feature information, thereby enhancing its ability to extract valuable information from the initial fused features.
[0049] The overall self-enhancement process can be performed using gate convolutional layers; that is, in some implementations, the self-enhancement process is represented as:
[0050]
[0051] Where α n This represents the attention map matrix, used to highlight relevant features; σ represents the sigmoid activation function F. nThis represents the non-primary RGB feature; when n takes the value (2, 3, ..., N-1) This represents the output feature, when n takes the value N. ω represents the final fused feature; ω represents the channel weight; ⊙ represents point-by-point multiplication.
[0052] By default, N=5, but it is not limited to this.
[0053] In the preferred embodiment described above, the features output from the residual block layer and high-level RGB features are input into the gated convolutional layer. The gated convolutional layer utilizes the high-level RGB features to guide the features to perform self-enhancement, thereby suppressing noise in the fused features. Specifically, the gated convolutional layer can dynamically adjust the weights of the convolutional kernels, emphasizing useful features and suppressing noise and irrelevant information. In this way, the network can effectively filter out noise in deep features, improve the purity and discriminative power of the final fused features, and ensure accurate semantic segmentation even in complex environments.
[0054] Regarding the loss function used, in some implementations, the loss function includes semantic edge loss, which is calculated as follows:
[0055]
[0056] Among them, F E Indicates semantic edge prediction; f P This represents the feature transformation function, which transforms concatenated features into semantic edge predictions F. E It uses two 1×1 convolution operations; f IG The function representing the image gradient can be used, for example, with the Marr-Hildreth edge detector, but is not limited to this; X represents a pixel; L CE denoted as Standard Cross Entropy (CE) loss; E represents the true semantic edge, specifically the true semantic edge obtained by applying edge detection based on the Euclidean distance transform algorithm to the true segmentation Y of the pixel label for each category. This represents the semantic edge loss.
[0057] In some implementations, the loss function is expressed as:
[0058]
[0059] in, Indicates the total loss; λ represents semantic loss; λ1 represents the first weight, λ2 represents the second weight; F Y Y represents the segmentation result, and Y represents the truth label.
[0060] The loss function used in this embodiment of the invention mainly consists of two parts: one part is semantic loss. The emphasis is on the semantic loss of objects, and another part is the semantic margin loss. Focus on the edges of the object. λ1 represents the edge-related loss assigned to it. The weights, λ2, represent the weights assigned to the semantic segmentation loss. The weight.
[0061] Regarding the decoder, in some implementations, the decoder employs a normalized stream decoder, the calculation formula of which is:
[0062] x = f U (F E , ......, F N-3 F N-2 F N-1 F N )
[0063]
[0064] F Y =MLP(F L )
[0065] Among them, f U This represents an ALL-MLP combination function, which consists of a multilayer perceptron (MLP) and connection operations; Let z represent a set of probabilities, where each element represents the probability of x in different distributions; l =φ l (z 1-1 ), where z0 = x is the output of the l-th layer of the normalized stream decoder, and z0 = x belongs to the space And z = φ(x) belongs to space L represents the total number of layers; det represents the determinant. It is in z l-1 Transformation φ l Jacobian matrix, It is a predefined prior distribution, F L This indicates that the standardized flow approximation is accurate.
[0066] In some implementations, the prior log-likelihood distribution is expressed as:
[0067]
[0068] In the above scheme, a normalizing flow is used to approximate the probability vector of pixel x. Where C equals the feature dimension. Each element in the matrix represents the probability of x in a specific distribution. A series of operations that make up the normalized flow coupling layer are defined, denoted as... Where L represents the total number of layers. Also defined is... This is the output of the l-th layer, where z0 = x belongs to the space... and Belonging to space Therefore, the distribution of x that can be approximated using the normalized flow can be calculated using the following formula:
[0069]
[0070] Where det represents the determinant. It is in z l-1 Transformation The Jacobian matrix. It is a predefined prior distribution. To maintain... The feature dimension of z is the same as that of x. Assuming that z follows multiple univariate Gaussian distributions, the log-likelihood can be expressed as follows:
[0071]
[0072] Finally, a multilayer perceptron is used to transform the probability vector F into the final prediction result, as follows:
[0073] F Y =MLP(F L )
[0074] Finally, in some implementations, the iterations in the training method can be performed in batches, that is, the training set is divided into multiple batches, with each batch corresponding to one iteration. The number of data points in a batch can be more than one, such as 2-256, etc., or it can be just one, in which case it is equivalent to not performing the iteration in batches.
[0075] As typical examples of the above technical solutions, the training method described above can specifically include the following steps:
[0076] 1) Obtain preliminary RGB and depth features: Obtain RGB and depth images as input, and input the RGB and depth images into their respective encoders to obtain preliminary RGB and depth features;
[0077] 2) Fusing the initial deep features and RGB features to obtain high-quality fused features: The initial deep features and RGB features are fused using the designed attention-complementary fusion module. This module adopts an attention mechanism so that the network can automatically learn the appropriate feature fusion method to obtain high-quality fused features.
[0078] 3) Use residual block layers to perform initial self-enhancement on fused features: Introduce residual block layers to select and enhance high-quality features in the initial fused features. Residual blocks usually include skip connections, which helps to avoid the gradient vanishing problem and accelerate training.
[0079] 4) Use gated convolutional layers to further enhance the fused features with high-level RGB features: Use gated convolutional layers to process the extracted fused features. Gated convolutional layers can use high-level RGB features to suppress noise in the fused features, thereby improving the accuracy and robustness of segmentation.
[0080] 5) Introduce semantic edge loss to guide and optimize the final fused features: This loss function is usually used to ensure that the edge parts of the segmentation results are clearer and more accurate;
[0081] 6) Inject the final fused features and RGB features at different levels into the normalized flow encoder. Then, use gradient descent to update the model parameters until convergence. Finally, inject the final fused features and RGB features at different levels into the normalized flow encoder. The normalized flow encoder may employ normalized flow techniques to generate the final segmentation result, ensuring classification accuracy and spatial coherence for each pixel.
[0082] The basic technical concept of the above solution can be summarized as follows: First, preliminary fusion features are obtained, and then these features are self-enhanced through a series of methods. The model parameters are updated by jointly training with the semantic edge loss function and the semantic loss function, calculating the loss function.
[0083] A second aspect of this invention provides an RGB-D image segmentation method based on feature self-enhancement, which performs semantic segmentation using an RGB-D image segmentation model obtained through the training method provided in any of the above embodiments, comprising the following steps:
[0084] Obtain the RGB image to be segmented and the corresponding depth image, and input them into the encoder to obtain depth features and RGB features at multiple levels;
[0085] By fusing the depth features and the primary RGB features, a preliminary fused feature is obtained;
[0086] The initial fusion feature is used as the first input feature and self-enhanced under the guidance of the second-level RGB feature to obtain the output feature. The output feature is then used as a new input feature and self-enhanced under the guidance of a higher-level RGB feature until the final fusion feature is obtained.
[0087] The final fused features and the RGB features at multiple levels are input into the decoder to obtain the segmentation result.
[0088] A third aspect of this invention also provides an RGB-D image segmentation system based on feature self-enhancement, comprising an RGB-D image segmentation model obtained by the training method provided in any of the above embodiments, wherein the RGB-D image segmentation model comprises the following modules:
[0089] The encoder module is used to obtain depth features and multiple levels of RGB features using the RGB image to be segmented and the corresponding depth image;
[0090] The preliminary fusion module is used to fuse the depth features and the primary RGB features to obtain preliminary fused features;
[0091] The feature self-enhancement module is used to take the preliminary fused feature as the first input feature and perform self-enhancement under the guidance of the second-level RGB feature to obtain the output feature, and then use the output feature as a new input feature to perform self-enhancement under the guidance of a higher-level RGB feature until the final fused feature is obtained.
[0092] The decoder module is used to input the final fused features and the RGB features at multiple levels into the decoder to obtain the segmentation result.
[0093] As a typical example of the above technical solution, a model training system based on a self-enhancing feature fusion network can be used during the training process. The resulting model belongs to the segmentation system described above, and includes:
[0094] The preliminary feature extraction module is used to obtain preliminary RGB features and depth features with the same shape. The training set used includes labeled data semantic labels and RGB-D data.
[0095] The attention-complementary fusion module is used to fuse preliminary deep features and RGB features. Through the attention mechanism, it automatically learns a suitable feature fusion method to obtain high-quality fused features.
[0096] The residual block enhancement module is used to introduce residual block layers to select and enhance the features of the initial fusion. It utilizes the skip connections in the residual blocks to avoid the gradient vanishing problem and accelerate training, ensuring the effective extraction of high-quality features.
[0097] The gated convolutional layer noise reduction module is used to input the features output by the residual block layer and the high-level RGB features into the gated convolutional layer. The gated convolutional layer uses the high-level RGB features to guide the features to perform self-enhancement, effectively suppressing noise in the fused features.
[0098] The semantic edge guidance module is used to introduce semantic edge loss to guide and optimize the final fusion features. Using this loss function, the edge parts of the segmentation result are made clearer and more accurate.
[0099] The normalized stream decoding module is used to inject the final fused features and RGB features at different levels into the normalized stream encoder, apply normalized stream technology to generate the final segmentation result, and ensure the classification accuracy and spatial coherence of each pixel.
[0100] The iterative update module is used to iteratively update the parameters of the constructed model based on the semantic loss and semantic edge loss, and jointly train the model.
[0101] This invention also provides a readable storage medium storing a computer program, which, when run, executes the steps of the above-described training method or the above-described RGB-D image segmentation method, or stores an RGB-D image segmentation model obtained by the above-described training method.
[0102] The technical solution of the present invention will be further described in detail below through several embodiments and in conjunction with the accompanying drawings. However, the selected embodiments are only for illustrating the present invention and do not limit the scope of the present invention.
[0103] Example 1
[0104] This embodiment illustrates a training method for an RGB-D image segmentation model (named SEFnet), the steps of which include:
[0105] (1) Initial depth and RGB features are obtained through a ResNet101 encoder; secondly, the training set consists of labeled RGB data and depth data. The labeled data is divided into batches of a specific size and then fed into the model for training.
[0106] (2) The initial depth features and RGB features are fused by utilizing the attention complementarity fusion module of the design. The corresponding formula is as follows:
[0107]
[0108] in, These are deep features embedded in the initial layer. F i and These represent RGB feature embeddings and fused feature embeddings at different levels, respectively. The || operator is used to denote the join operation, and f is used to denote the join operation. 1×1 This indicates feature aggregation. By default, f 1×1 It is a convolutional layer with a 1×1 kernel. Using f respectively... ACF and f ACM This is used to represent attention complementarity fusion and attention complementarity fusion operations.
[0109] (3) After the above operations, a residual block layer is introduced to select and enhance high-quality features in the initial fusion features, as shown in the following formula:
[0110]
[0111] Among them, f RBL This represents the residual block layer.
[0112] (4) After the above operations, the gate convolutional layer processes the extracted fused features, and the corresponding formula is as follows:
[0113]
[0114] Where α n This represents the attention map matrix, used to highlight relevant features. ω represents the channel weights, ⊙ represents pointwise multiplication, and σ represents the sigmoid activation function. By default, N = 5.
[0115] (5) After the above processing, semantic edge loss is introduced to guide and optimize the final fused features. The corresponding formula is as follows:
[0116]
[0117] L E =L CE (F E E)
[0118] Among them, f IG This represents the function used to generate the image gradient, employing the Marr-Hildreth edge detector. P Let F represent a feature transformation function that transforms concatenated features into semantic edge predictions. E It uses two 1×1 convolution operations. CE This represents the standard cross-entropy (CE) loss. E represents the true semantic edge obtained by applying an edge detection algorithm based on Euclidean distance transform to the true segmentation Y of the pixel label for each category.
[0119] (6) After the above processing, the final fused features and RGB features at different levels are injected into the normalized stream encoder. The corresponding formula is as follows:
[0120] x = f U (F E F N-3 F N-2 F N-1 F N )
[0121] Among them, f UThis represents an ALL-MLP combination function, which consists of a multilayer perceptron (MLP) and connection operations.
[0122] Next, a normalizing flow is used to approximate the probability vector of pixel x. Where C equals the feature dimension. Each element in the matrix represents the probability of x in a specific distribution. A series of operations that make up the normalized flow coupling layer are defined, denoted as... Where L represents the total number of layers. Also defined is... This is the output of the l-th layer, where z0 = x belongs to the space... and Belonging to space Therefore, the distribution of x that can be approximated using the normalized flow can be calculated using the following formula:
[0123]
[0124] Where det represents the determinant. It is in z l-1 Transformation The Jacobian matrix. It is a predefined prior distribution. To maintain... The feature dimension of z is the same as that of x. Assuming that z follows multiple univariate Gaussian distributions, the log-likelihood can be expressed as follows:
[0125]
[0126] Finally, a multilayer perceptron is used to transform the probability vector F into the final prediction result, as follows:
[0127] F Y =MLP(F L )
[0128] The joint loss is used to update the parameters of the base model. The formula steps for joint training are as follows:
[0129]
[0130] The loss function mainly consists of two parts: one part is semantic loss. The emphasis is on the semantic loss of objects, and another part is the semantic margin loss. Focus on the edges of the object. λ1 represents the edge-related loss assigned to it. The weights, λ2, represent the weights assigned to the semantic segmentation loss. The weight.
[0131] (7) Update the two model parameters using gradient descent, and repeat steps (1)-(6) until the model converges, thus obtaining a self-enhancing network model that can be used for RGB-D semantic segmentation.
[0132] Specifically, step (1) is a typical preliminary step, obtaining initial features. During each iteration, the network parameters are updated using gradient descent. In step (2), the initial depth features and RGB features are fused. In step (3), the fused features are initially self-enhanced. In step (4), the fused features are further self-enhanced using high-level RGB features. In step (5), semantic edge loss is introduced to guide and optimize the final fused features. In step (6), the final fused features and RGB features at different levels are injected into the normalized stream encoder.
[0133] The above model training process was applied to training experiments, and the advantages of the solution provided in this embodiment were demonstrated by comparing it with the baseline scheme:
[0134] Data augmentation techniques, including translation, flipping, and scaling, were used in all experiments. All networks were trained using a stochastic gradient descent (SGD) optimizer. The initial learning rate was 0.00025, the momentum was 0.9, and a multinomial decay strategy (1 - (iter / max_iter)) was employed. 0.9 , used to adjust the learning rate.
[0135] Tables 1, 2, and 3 below show the comparison results between the RGB-D semantic segmentation method described in this example and existing RGB-D semantic segmentation methods on three different datasets, using different network structures as the base model, and with different labeled data partitions.
[0136] Table 1. Model prediction results for different training methods on the NYUDv2 dataset.
[0137]
[0138] Table 2. Model prediction results for different training methods on the SUN-RGBD dataset.
[0139]
[0140] Table 3. Model prediction results for different training methods on the Cityscapes dataset.
[0141]
[0142] The NYUDv2 dataset consists of 1449 indoor RGB-D image samples, each with dense pixel-level annotations for 40 categories. Following common segmentation practices, NYUDv2 is divided into 795 training images and 654 test images. The SUN-RGBD dataset contains 10,335 RGB-D images with a resolution of 530×730, where objects are categorized into 37 classes. The Cityscapes dataset contains images from 27 cities in Germany and neighboring countries, with dense pixel-level annotations for 30 categories, of which 19 categories are used for training and evaluation. Using a standard segmentation procedure, Cityscapes is divided into 2975 training images, 500 validation images, and 1525 test images, each with a resolution of 1024×2048 pixels. As shown in Tables 1, 2, and 3, the method described in this embodiment effectively improves the performance of the RGB-D semantic segmentation model.
[0143] Example 2
[0144] This embodiment compares the training method provided by the present invention with existing semi-supervised RGB-D semantic segmentation methods based on multi-model mutual learning:
[0145] Table 4 below shows the ablation experiments on the NYUDv2 dataset. As can be seen from Table 4, the method described in this embodiment improves the performance of the RGB-D semantic segmentation model in each module.
[0146] Table 4 Ablation experiments on the NYUDv2 dataset
[0147]
[0148] Furthermore, in the above embodiments, performance degradation was observed after removing the corresponding technical means in many preferred embodiments. Therefore, the attention mechanism, residual block, gate convolutional layer, semantic edge loss, and normalized stream encoder mentioned above are also of significant help in improving training effect and model performance.
[0149] Based on the above embodiments and comparative examples, it is clear that the model construction method provided by the embodiments of the present invention utilizes high-level RGB features to guide the self-enhancement of low-level fusion features. It can suppress the noise in the depth information through cyclic self-enhancement, thereby making full use of their complementary advantages, avoiding the interference of noise and missing data in the depth image on the training and image segmentation process, thereby improving training efficiency, the accuracy and robustness of segmentation edges, and enabling the model to maintain high performance under various environments and conditions.
[0150] This embodiment also provides an electronic device, including: one or more processors; and a memory, wherein the memory is used to store one or more executable instructions; the one or more processors are configured to execute the one or more executable instructions to perform the training steps described in this embodiment or to run the RGB-D semantic segmentation model provided in this embodiment of the invention.
[0151] Specific embodiments of the present invention may be systems, methods, and / or computer program products. Computer program products may include computer-readable storage media having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present invention. Computer-readable storage media may be tangible devices that hold and store instructions used by instruction execution devices. Computer-readable storage media may include, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.
[0152] It should be understood that the above embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A training method for an RGB-D image segmentation model based on feature self-enhancement, characterized in that, include: Acquire RGB images and corresponding depth images, input them into an encoder to obtain depth features and RGB features at multiple levels; The deep features and primary RGB features are fused to obtain preliminary fused features. The fusion of the deep features and primary RGB features adopts an attention mechanism, dynamically adjusting the importance of each deep feature and primary RGB feature for fusion. The fusion process under the attention mechanism is represented as follows: ; ; in, Represents the depth feature; This represents the primary RGB feature; Indicates a connection operation. Indicates feature aggregation; This indicates complementary and integrated attention; This indicates a complementary and fusion operation of attention; The initial fusion feature is used as the first input feature, and self-enhancement is performed under the guidance of the second-level RGB feature to obtain an initial self-enhanced feature as the output feature. The output feature is then used as a new input feature, and the self-enhancement of the current level fusion feature is guided by higher-level RGB features to obtain the final fusion feature. The self-enhancement specifically includes: Residual block enhancement is performed on the input features to select and enhance high-quality features from the initial fused features; Self-enhancement guided by the high-quality features; The residual block enhancement is represented as follows: ; in, Represents the residual block layer; This indicates the high-quality feature; This represents the input feature; The self-enhancing process is represented as follows: ; ; in Represents the attention map matrix; This represents the non-primary RGB feature; when n takes... hour This represents the output feature, when n takes the value N. This represents the final fusion feature; Represents channel weight; This represents point-by-point multiplication; The final fused features and the RGB features at multiple levels are input into a standardized stream decoder to obtain the segmentation results, and parameters are updated based on the truth labels.
2. The training method according to claim 1, characterized in that, The loss function used includes semantic edge loss, which is calculated as follows: ; ; in, This represents semantic edge prediction; Represents the feature transformation function; A function that generates image gradients; Represents pixels; This represents the standard cross-entropy loss; Represents the true semantic edge; This represents the semantic edge loss.
3. The training method according to claim 2, characterized in that, The loss function is expressed as: ; ; in, Indicates the total loss; Indicates semantic loss; Indicates the first weight. Indicates the second weight; Y represents the segmentation result, and Y represents the truth label.
4. The training method according to claim 3, characterized in that, The calculation formula for the standardized stream decoder is: ; ; ; in, Represents an ALL-MLP combination function; Represents a set of probabilities, where each element represents Probability in different distributions; , for the standardized stream decoder The output of the layer, where Belonging to space ,and Belonging to space , , Indicates the total number of floors; Represents a determinant. Is Transformation Jacobian matrix, It is a predefined prior distribution. This indicates a standardized flow approximation; The prior distribution log-likelihood is expressed as: ;。 5. A feature-based self-enhancing RGB-D image segmentation method, characterized in that, Semantic segmentation using an RGB-D image segmentation model obtained through the training method described in any one of claims 1-4 includes: Obtain the RGB image to be segmented and the corresponding depth image, and input them into the encoder to obtain depth features and RGB features at multiple levels; By fusing the depth features and the primary RGB features, a preliminary fused feature is obtained; The initial fusion feature is used as the first input feature and self-enhanced under the guidance of the second-level RGB feature to obtain the output feature. The output feature is then used as a new input feature and self-enhanced under the guidance of a higher-level RGB feature until the final fusion feature is obtained. The final fused features and the RGB features at multiple levels are input into the decoder to obtain the segmentation result.
6. A feature-based self-enhancing RGB-D image segmentation system, characterized in that, The RGB-D image segmentation model includes the training method described in any one of claims 1-4, wherein the RGB-D image segmentation model comprises: The encoder module is used to obtain depth features and multiple levels of RGB features using the RGB image to be segmented and the corresponding depth image; The preliminary fusion module is used to fuse the depth features and the primary RGB features to obtain preliminary fused features; The feature self-enhancement module is used to take the preliminary fused feature as the first input feature and perform self-enhancement under the guidance of the second-level RGB feature to obtain the output feature, and then use the output feature as a new input feature to perform self-enhancement under the guidance of a higher-level RGB feature until the final fused feature is obtained. The decoder module is used to input the final fused features and the RGB features at multiple levels into the decoder to obtain the segmentation result.
