Image segmentation method, device, equipment and storage medium

Through the combination of convolutional multi-modal adapter and cross-attention network, the features of RGB-T images are extracted and fused, which solves the problem of insufficient long-distance dependence in the existing technology and improves the accuracy and robustness of image segmentation.

CN118015283BActive Publication Date: 2024-08-27INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410414073.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-08-27
Estimated Expiration
2044-04-08

AI Technical Summary

Technical Problem

Existing RGB-T image segmentation methods have limited capabilities in modeling long-distance dependencies and are difficult to effectively fuse the features of RGB images and infrared images, especially when there are large-scale spatial correlation characteristics between targets.

Method used

Using a visual transformer network based on convolutional multi-modal adapters and a cross-attention decoder network, multi-scale target features are generated by extracting and fusing the features of RGB images and infrared images, and the mask map is fused in a cascade manner. to achieve image segmentation.

Benefits of technology

It improves feature extraction capabilities, enhances the model's expressive ability in modeling long-distance dependencies, and improves the accuracy and robustness of image segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118015283B
    Figure CN118015283B
Patent Text Reader

Abstract

The present invention relates to the field of image segmentation technology, and provides an image segmentation method, apparatus, device and storage medium, including: obtaining paired RGB images and infrared images; inputting the RGB images and infrared images into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; inputting the target feature pairs of each scale into a decoder network based on cross-attention to obtain a target image segmentation result. The present invention uses a visual transformer network based on a convolutional multimodal adapter to improve feature extraction capabilities, and uses a transformer decoder block based on cross-attention to construct a decoder network based on cross-attention, which improves long-distance dependencies in modeling and further improves the expression capabilities of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image segmentation, and in particular to an image segmentation method, device, equipment and storage medium. Background Art

[0002] Currently, image segmentation technology based on visible light imaging has been deeply studied and widely used in fields such as autonomous driving and video surveillance. However, under some extreme imaging conditions, it is difficult to achieve reliable perception of the target using only visible light imaging. Since thermal infrared imaging mainly captures the thermal radiation emitted by the object itself, it is insensitive to changes in ambient light and has strong penetration ability. It still has good imaging effects in dim environments and bad weather conditions. Therefore, based on paired visible light-infrared (RGB-T: RGB-Thermal) images, studying image semantic segmentation technology with multimodal data fusion is of great significance for improving the adaptability of visual perception algorithms under various conditions.

[0003] Currently, existing RGB-T image segmentation methods mainly use convolutional networks to extract features of RGB images and infrared images. However, due to the limited receptive field size, convolutional networks have limited ability to model long-range contextual dependencies. Considering that objects in RGB-T images may have a wide range of spatial correlation characteristics (such as cars at both ends of the same road), modeling long-range dependencies of objects is very necessary. Summary of the invention

[0004] The present invention provides an image segmentation method, apparatus, device and storage medium, which are used to solve the defects of the prior art in image segmentation in terms of insufficient modeling of long-distance dependencies.

[0005] The present invention provides an image segmentation method, the method comprising:

[0006] Get paired RGB and infrared images;

[0007] Inputting the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale;

[0008] Inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result;

[0009] Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features;

[0010] Among them, the decoder network based on cross attention adaptively fuses the first feature and the second feature during the decoding process of the first feature and the second feature to obtain a multimodal feature; obtains a mask map corresponding to the multimodal feature based on the cross attention; and obtains the target image segmentation result by fusing at least two of the mask maps in a cascade manner.

[0011] According to an image segmentation method provided by the present invention, the visual transformer network based on the convolutional multimodal adapter includes a first visual transformer, a second visual transformer and at least one convolutional multimodal adapter; the first visual transformer includes at least one first transformer encoder block of a depth level, the second visual transformer includes at least one second transformer encoder block of a depth level, and a convolutional multimodal adapter is configured between each pair of the first transformer encoder block and the first transformer encoder block of the same depth level; the method further includes:

[0012] Inputting the RGB image feature into the first visual transformer, obtaining a first intermediate feature output by a first transformer encoder block in the first visual transformer;

[0013] Inputting the infrared image feature into the second visual transformer, obtaining a second intermediate feature output by a second transformer encoder block in the second visual transformer;

[0014] Based on the convolutional multimodal adapter, the first intermediate feature and the second intermediate feature are fused to obtain a first intermediate feature update amount corresponding to the first intermediate feature and a second intermediate feature update amount corresponding to the second intermediate feature;

[0015] Inputting the first intermediate feature update to a first transformer encoder block in the first visual transformer so that the first transformer encoder block in the first visual transformer outputs the first feature according to the first intermediate feature update;

[0016] The second intermediate feature update amount is input to the second transformer encoder block in the second visual transformer, so that the second transformer encoder block in the second visual transformer outputs the second feature according to the second intermediate feature update amount.

[0017] According to an image segmentation method provided by the present invention, the first intermediate feature and the second intermediate feature are obtained in the following manner:

[0018] The first transformer encoder block in the first visual transformer sequentially transforms the RGB image feature using layer normalization and multi-head self-attention to obtain a first transformed feature;

[0019] Connecting the first variation feature with the RGB image feature through residual to obtain the first intermediate feature;

[0020] The second transformer encoder block in the second visual transformer sequentially transforms the infrared image using layer normalization and multi-head self-attention to obtain a second transformed feature;

[0021] The second change feature is connected to the infrared image feature through residual connection to obtain the second intermediate feature.

[0022] According to an image segmentation method provided by the present invention, the step of adaptively fusing the first feature and the second feature to obtain a multimodal feature includes:

[0023] Obtaining gating values ​​corresponding to the first feature and the second feature based on channel attention;

[0024] Modulating the second feature based on the gate value, and connecting the modulated second feature in series with the first feature to obtain an initial fusion feature;

[0025] The initial fusion features are reshaped, convolved, upsampled and flattened in turn to obtain multimodal features.

[0026] According to an image segmentation method provided by the present invention, the obtaining of the gating values ​​corresponding to the first feature and the second feature based on channel attention includes:

[0027] Splicing the first feature and the second feature along the channel dimension to obtain a spliced ​​feature;

[0028] The concatenated features are sequentially input into a first fully connected layer, a first nonlinear activation layer, a second fully connected layer and a second nonlinear activation layer to obtain a gating value.

[0029] According to an image segmentation method provided by the present invention, the mask image corresponding to the multimodal feature is obtained based on the cross attention, including:

[0030] Obtaining a category embedding matrix corresponding to the multimodal features;

[0031] Using the multimodal features as key vectors and value vectors, and the category embedding matrix as a query vector;

[0032] Based on the key vector, the value vector and the query vector, cross attention is applied to obtain a mask map corresponding to the multimodal feature.

[0033] According to an image segmentation method provided by the present invention, the at least two mask images include a first-scale mask image, a second-scale mask image, and a third-scale mask image, the scales of which increase successively;

[0034] The step of fusing at least two of the mask images in a cascade manner to obtain the target image segmentation result includes:

[0035] Performing reshape and transpose convolution operations on the first scale mask image in sequence to obtain a first target result;

[0036] Reshape the second-scale mask image to obtain a second target result;

[0037] Reshape the third-scale mask image to obtain a third target result;

[0038] Summing the first target result, the second target result and the third target result to obtain an initial fusion result;

[0039] After linearly transforming the initial fusion result based on the category embedding matrix corresponding to the third-scale mask image, the linear change results are sequentially processed by transposed convolution and Softmax function to obtain the target image segmentation result.

[0040] The present invention also provides an image segmentation device, the device comprising:

[0041] A first image segmentation module, used for acquiring paired RGB images and infrared images;

[0042] A second image segmentation module is used to input the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale;

[0043] A third image segmentation module, used for inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result;

[0044] Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features;

[0045] Among them, the decoder network based on cross attention adaptively fuses the first feature and the second feature during the decoding process of the first feature and the second feature to obtain a multimodal feature; obtains a mask map corresponding to the multimodal feature based on the cross attention; and obtains the target image segmentation result by fusing at least two of the mask maps in a cascade manner.

[0046] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned image segmentation methods is implemented.

[0047] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the image segmentation method described in any one of the above is implemented.

[0048] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the image segmentation method described above is implemented.

[0049] The image segmentation method, device, equipment and storage medium provided by the present invention are as follows: obtaining a paired RGB image and an infrared image; inputting the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pairs of each scale include a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the scales of the first feature and the second feature are the same; inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result; wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate feature of the RGB image and the second intermediate feature of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain a first feature according to the updated first intermediate feature and a second feature according to the updated second intermediate feature; wherein, in the process of decoding the first feature and the second feature, the decoder network based on cross attention adaptively fuses the first feature and the second feature to obtain a multimodal feature; based on cross attention, a mask map corresponding to the multimodal feature is obtained; and at least two of the mask maps are fused in a cascade manner to obtain a target image segmentation result. The present invention uses a visual transformer network based on a convolutional multimodal adapter to extract features of RGB images and infrared images, and uses the features of RGB images and infrared images in the calculation process of updating feature quantities, and uses a shared convolutional layer to fuse the two features to improve feature extraction capabilities. Furthermore, a decoder network based on cross-attention is constructed using a transformer decoder block based on cross-attention. Compared with the decoder structure based on convolutional networks in current segmentation models, the decoder network of the present invention has more advantages in modeling long-distance dependencies and a stronger expression ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 It is one of the flow charts of the image segmentation method provided by the present invention;

[0052] Figure 2 This is the second flow chart of the image segmentation method provided by the present invention;

[0053] Figure 3 It is a schematic diagram of the feature fusion update process of the convolutional multimodal adapter provided by the present invention;

[0054] Figure 4 It is a schematic diagram of the channel attention feature fusion process provided by the present invention;

[0055] Figure 5 It is a schematic diagram of the multi-scale cascade fusion process provided by the present invention;

[0056] Figure 6 It is a structural schematic diagram of the image segmentation device provided by the present invention;

[0057] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] The problem that needs to be solved in RGB-T image segmentation is to predict the object category corresponding to each pixel for the well-paired input RGB image and infrared image. At present, the RGB-T image segmentation method based on deep learning is mainly based on the encoder-decoder structure. The encoder is used to extract the features of RGB images and infrared images, and the decoder is used to fuse features of multiple scales and realize pixel-level prediction. The core problem that the RGB-T image segmentation model needs to solve is how to effectively fuse the features of RGB images and infrared images. The current method mainly considers the fusion of these two modal features in the input and decoder. At present, the transformer network (Transformer) that can model long-range dependencies has not been fully utilized in this problem.

[0060] Existing RGB-T image segmentation methods mainly use convolutional networks to extract features of RGB images and infrared images. However, due to the limited receptive field size, convolutional networks have limited ability to model long-range contextual dependencies. Considering that objects in RGB-T images may have a wide range of spatial correlation characteristics (such as cars at both ends of the same road), modeling long-range dependencies of objects is very necessary.

[0061] Therefore, in order to solve the above problems, the present invention provides an image segmentation method. Figure 1 It is a flow chart of the image segmentation method provided by the present invention, such as Figure 1 As shown, the method includes:

[0062] Step 110, obtaining a paired RGB image and an infrared image;

[0063] The pairing in this embodiment means that the RGB image and the infrared image are registered, and the same pixel in the two images corresponds to the same position in the physical world.

[0064] Step 120, inputting the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale;

[0065] Among them, the convolutional multimodal adapter is a special processing module, which is mainly used for multimodal data processing. It uses convolution operations to extract and fuse features of different modalities in order to better understand and analyze multimodal data.

[0066] In multimodal learning, data of different modalities often have different characteristics. Therefore, in this embodiment, a convolutional multimodal adapter is used to capture the correlation and complementarity between data of different modalities, thereby generating a more expressive feature representation.

[0067] In this embodiment, the visual transformer network based on the convolutional multimodal adapter includes two parts: a convolutional multimodal adapter and a visual transformer.

[0068] Among them, the Vision Transformer (ViT) network is a deep learning model based on the self-attention mechanism, which can focus on and encode different areas of the input image. Compared with the Convolutional Neural Network (NN), ViT's advantage is that it can effectively model the long-distance dependencies between targets, which is important for tasks that require the use of large-scale spatial information.

[0069] Among them, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate feature and obtain the second feature according to the updated second intermediate feature.

[0070] Specifically, the visual transformer network extracts initial features of the RGB image and the infrared image respectively. This is usually achieved through a series of convolutional layers, pooling layers or other types of feature extraction layers that can capture basic information such as color, texture, shape, etc. from the original image.

[0071] After extracting the initial features, the Convolutional Multimodal Adapter-based Visual Transformer Network extracts at least two intermediate feature pairs, which are usually the result of further transformation and processing of the initial features.

[0072] Each intermediate feature pair includes a first intermediate feature of an RGB image and a second intermediate feature of an infrared image of the same scale, and each pair of intermediate features comes from data representations of different scales.

[0073] Among them, scale refers to the spatial granularity or resolution of data representation. In multi-feature extraction, features of different scales may contain different information, which helps the model capture various details and global structures of the input data.

[0074] Next, the visual transformer network based on the convolutional multimodal adapter will perform a fusion update of the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the features of the RGB image and the infrared image. The purpose of the fusion is to combine the feature information of the two modalities.

[0075] Finally, the visual transformer network based on the convolutional multimodal adapter will generate the first feature corresponding to the RGB image of each scale and the second feature corresponding to the infrared image according to the first intermediate feature and the second intermediate feature in the updated intermediate feature pairs of each scale.

[0076] Step 130, inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result;

[0077] In this embodiment, a cross-attention based transformer decoder block (Transformer DecoderBlock, TDB) is used to construct a cross-attention based decoder network. Compared with the decoder structure based on the convolutional network in the existing segmentation model, it has more advantages in modeling long-distance dependencies and the model has stronger expressive ability.

[0078] Among them, the decoder network based on cross attention adaptively fuses the first feature and the second feature during the decoding process of the first feature and the second feature to obtain a multimodal feature; obtains a mask map corresponding to the multimodal feature based on the cross attention; and obtains the target image segmentation result by fusing at least two of the mask maps in a cascade manner.

[0079] In this embodiment, the target feature pairs of each scale include features of the same scale extracted from the RGB image and the infrared image, and these feature pairs are sent to the decoder network based on cross attention. The main task of the decoder network based on cross attention is to decode these features into the results of image segmentation. In this process, the decoder network based on cross attention will adaptively fuse the first feature of the RGB image with the second feature of the infrared image.

[0080] Adaptive fusion means that the network automatically adjusts the weights between different features according to the importance and relevance of the features, thereby generating a multimodal feature that combines two modal information.

[0081] Then, based on the cross-attention mechanism, the decoder network generates the corresponding mask map (i.e., the prediction result map) for the multimodal features. Cross-attention is a special attention mechanism that allows the network to focus on the information of all positions in the input features when generating the output of each position. By calculating the correlation between different positions, cross-attention can help the network better capture the contextual information and spatial dependencies in the image.

[0082] Finally, at least two mask images are fused in a cascade manner to obtain the target image segmentation result. Cascade fusion refers to stacking mask images of different scales or different modalities in a certain order and fusing them into a final segmentation result through convolution or other operations. This method can make full use of the information in different mask images and improve the accuracy and robustness of segmentation.

[0083] In this embodiment, a paired RGB image and an infrared image are obtained; the RGB image and the infrared image are input into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pairs of each scale include a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the scales of the first feature and the second feature are the same; the target feature pairs of each scale are input into a decoder network based on cross attention to obtain a target image segmentation result; wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate feature of the RGB image and the second intermediate feature of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain a first feature according to the updated first intermediate feature and a second feature according to the updated second intermediate feature; wherein, in the process of decoding the first feature and the second feature, the decoder network based on cross attention adaptively fuses the first feature and the second feature to obtain a multimodal feature; a mask map corresponding to the multimodal feature is obtained based on cross attention; and at least two of the mask maps are fused in a cascade manner to obtain a target image segmentation result. The present invention uses a visual transformer network based on a convolutional multimodal adapter to extract features of RGB images and infrared images, and uses the features of RGB images and infrared images in the calculation process of updating feature quantities, and uses a shared convolutional layer to fuse the two features to improve feature extraction capabilities. Furthermore, a decoder network based on cross-attention is constructed using a transformer decoder block based on cross-attention. Compared with the decoder structure based on convolutional networks in current segmentation models, the decoder network of the present invention has more advantages in modeling long-distance dependencies and a stronger expression ability of the model.

[0084] In some embodiments, the convolutional multimodal adapter-based visual transformer network includes a first visual transformer, a second visual transformer, and at least one convolutional multimodal adapter; the first visual transformer includes at least one first transformer encoder block of a depth level, the second visual transformer includes at least one second transformer encoder block of a depth level, and a convolutional multimodal adapter is configured between each pair of the first transformer encoder block and the first transformer encoder block of the same depth level; the method further includes:

[0085] Inputting the RGB image feature into the first visual transformer, obtaining a first intermediate feature output by a first transformer encoder block in the first visual transformer;

[0086] Inputting the infrared image feature into the second visual transformer, obtaining a second intermediate feature output by a second transformer encoder block in the second visual transformer;

[0087] Based on the convolutional multimodal adapter, the first intermediate feature and the second intermediate feature are fused to obtain a first intermediate feature update amount corresponding to the first intermediate feature and a second intermediate feature update amount corresponding to the second intermediate feature;

[0088] Inputting the first intermediate feature update to a first transformer encoder block in the first visual transformer so that the first transformer encoder block in the first visual transformer outputs the first feature according to the first intermediate feature update;

[0089] The second intermediate feature update amount is input to the second transformer encoder block in the second visual transformer, so that the second transformer encoder block in the second visual transformer outputs the second feature according to the second intermediate feature update amount.

[0090] In this embodiment, reference Figure 2 As shown, the visual transformer in this embodiment has 12 transformer encoder blocks (TEBs) with a total parameter size of 86M. The width of the middle layer is 768. Therefore, when the input image size is When , the length of the input and output feature sequence of each TEB is , the feature dimension is 768. In addition, due to the 12th TEB in the visual transformer (i.e., TEB 12 ) does not participate in the calculation and is therefore not shown in the attached figure.

[0091] Continue to refer Figure 2 As shown, in this embodiment, three depth levels of TEBs can be selected, namely TEB5, TEB7, TEB 11 , these three depth levels of TEB5, TEB7, TEB 11 The output of (i.e., the first feature and the second feature) is used as the input of the decoder network based on cross attention.

[0092] In addition, in this embodiment, the visual transformer parameters pre-trained on ImageNet data can be used as the initialization of the backbone network of the visual transformer. This can effectively utilize the knowledge learned in the general field and alleviate the problem of insufficient training data in the RGB-T field.

[0093] In addition, in this embodiment, a convolutional multimodal adapter CMMAdapter is introduced into each TEB of the visual transformer to perform appropriate corrections on the intermediate features obtained in each TEB.

[0094] In this embodiment, the first intermediate feature and the second intermediate feature are obtained in the following manner:

[0095] The first transformer encoder block in the first visual transformer sequentially transforms the RGB image feature using layer normalization and multi-head self-attention to obtain a first transformed feature;

[0096] Connecting the first variation feature with the RGB image feature through residual to obtain the first intermediate feature;

[0097] The second transformer encoder block in the second visual transformer sequentially transforms the infrared image using layer normalization and multi-head self-attention to obtain a second transformed feature;

[0098] The second change feature is connected to the infrared image feature through residual connection to obtain the second intermediate feature.

[0099] Continue to refer Figure 3 As shown, the dotted box corresponds to the original TEB, and the TEB on the left is used to analyze the RGB image features. Transformation, the TEB on the right is used to transform the infrared image features In this embodiment, the RGB image features are processed on the left side. Take as an example to describe the feature output process of TEB.

[0100] Assume that the input RGB image features The size is , represents the sequence length (i.e. the number of divided image blocks), Represents the dimension of the feature. Layer Normalization (LN) and Multi-Head Self-Attention (MHSA) are used in turn. The first change feature obtained is and Add them in a residual connection way to get the first intermediate feature . It is expressed as:

[0101] ;

[0102] Size and The same. By using multi-head self-attention, the relationship between each image block of the RGB image is further enhanced. Subsequently, TEB uses a multi-layer perceptron (MLP) to mix between channels, as shown in the following formula:

[0103] ;

[0104] This is the final output of TEB, which is Same size.

[0105] In this embodiment, in order to enhance the adaptability of the visual converter to new tasks, a CMMAdapter is introduced for each TEB, such as Figure 3 The middle part is shown in Figure 1. CMMAdapter comprehensively processes RGB image features and infrared image features , and calculate the feature update amount for RGB and infrared TEB respectively. CMMAdapter has a convolutional structure that can effectively capture local information, which is well complementary to the global information in TEB.

[0106] Specifically, the first intermediate feature update amount calculated by CMMAdapter for RGB TEB is The second intermediate feature update calculated for infrared TEB They are:

[0107] ;

[0108] ;

[0109] and is a scale factor used to control the speed of introducing new knowledge during model training. The operation representation will have a size of The matrix is ​​transformed into a size of The three-dimensional tensor of is used to recover the spatial information of the feature. Symbol Represents the feature matrix and Stitching along the channel dimension. for The convolution operation requires that the feature dimension of its output be much smaller than the feature dimension of its input. Represents Sigmoid Linear Unit, which is a differentiable nonlinear activation function. is a 3×3 convolution operation for RGB features, For infrared characteristics Convolution operation. Finally, The operation represents the size of The three-dimensional tensor of size is transformed into The matrix of .

[0110] Based on the first intermediate feature update amount and the second intermediate feature update , the first transformer encoder block in the first visual transformer updates the quantity according to the first intermediate feature The first feature of the output The second transformer encoder block in the second visual transformer updates the quantity according to the second intermediate feature The second feature of the output They are:

[0111] ;

[0112] ;

[0113] In this embodiment, a visual transformer network based on a convolutional multimodal adapter is used to extract the features of RGB images and infrared images. The features of RGB images and infrared images are simultaneously used in the calculation process of updating the feature quantity, and the two features are fused using a shared convolutional layer to improve the feature extraction capability.

[0114] In some embodiments, the adaptively fusing the first feature and the second feature to obtain a multimodal feature includes:

[0115] Obtaining gating values ​​corresponding to the first feature and the second feature based on channel attention;

[0116] Modulating the second feature based on the gate value, and connecting the modulated second feature in series with the first feature to obtain an initial fusion feature;

[0117] The initial fusion features are reshaped, convolved, upsampled and flattened in turn to obtain multimodal features.

[0118] First, the channel attention module CAFusion receives the first feature and the second feature as input. Then, the channel attention module CAFusion learns the importance of each feature channel. This can be achieved through steps such as global average pooling, fully connected layers, and nonlinear activation functions (such as ReLU or Sigmoid). Finally, the channel attention module CAFusion outputs a weight vector with the same number of input feature channels, that is, the gate value.

[0119] The gate value is used to weight the second feature channel by channel. Specifically, the value of each feature channel is multiplied by the corresponding gate value. In this way, important feature channels will be enhanced, while unimportant channels may be suppressed.

[0120] Specifically, in this embodiment, obtaining the gating values ​​corresponding to the first feature and the second feature based on channel attention includes:

[0121] Splicing the first feature and the second feature along the channel dimension to obtain a spliced ​​feature;

[0122] The concatenated features are sequentially input into a first fully connected layer, a first nonlinear activation layer, a second fully connected layer and a second nonlinear activation layer to obtain a gating value.

[0123] refer to Figure 4 As shown, RGB image features and infrared image features As input to the channel attention module CAFusion, the channel attention is first used in the channel attention module CAFusion to achieve further adaptive fusion of the two features, and upsampling is used to obtain the multi-scale and multi-modal features required by the decoder.

[0124] Specifically, the input is RGB image features and infrared image features , their sizes are The two features are first concatenated along the channel dimension, and then pass through the first fully connected layer (Fully Connected Layer, FC) (i.e. the first fully connected layer), Non-linear activation layer (i.e. the first non-linear activation layer), the second fully connected layer (Fully Connected Layer, FC) (i.e. the second fully connected layer), The nonlinear activation layer (i.e. the first fully connected layer (FC)) (i.e. the second nonlinear activation layer) is processed to obtain the channel-by-channel gating value:

[0125] ;

[0126] in, The size is .

[0127] Then continue to refer to Figure 4 , using this gate value Infrared image features Modulation and RGB image features The initial fusion features are obtained by concatenation:

[0128] ;

[0129] in, Represents the operation of multiplying corresponding elements of two matrices.

[0130] Next, in order to achieve Mixing of channels and obtaining specific dimensions The output of using Convolution pair After the convolution, in order to obtain a larger scale feature map, an upsampling operation is used to enlarge the feature map. times. In addition, due to is a sequence, so before the convolution operation, a reshape operation needs to be used to restore its spatial structure; after the upsampling operation, a flattening operation needs to be used to convert the feature map into a sequence. The final fused multimodal features It is expressed as:

[0131] ;

[0132] in, Represents upsampling times the operation, express convolution; Represents a reshape operation; Represents a flatten operation.

[0133] In some embodiments, obtaining a mask map corresponding to the multimodal feature based on the cross attention includes:

[0134] Obtaining a category embedding matrix corresponding to the multimodal features;

[0135] Using the multimodal features as key vectors and value vectors, and the category embedding matrix as a query vector;

[0136] Based on the key vector, the value vector and the query vector, cross attention is applied to obtain a mask map corresponding to the multimodal feature.

[0137] In this embodiment, a category embedding matrix is ​​predefined, and each row in the category embedding matrix represents an embedding vector of a category. These embedding vectors can capture the semantic relationship between categories and help the model understand the differences and connections between different categories.

[0138] Further, in the cross-attention mechanism, there are usually three key components: query vector, key vector and value vector. In this embodiment, multimodal features are used as key vector and value vector. The category embedding matrix is ​​used as the query vector.

[0139] In this embodiment, based on the above key vector, value vector and query vector, cross attention is applied to obtain mask maps corresponding to multimodal features of each scale.

[0140] refer to Figure 2As shown in FIG. 1 , image segmentation is performed according to the features of three scales during the image segmentation process. Specifically, the transformer encoder blocks TEB5, TEB7, and TEB 11 The output RGB image features and infrared image features are fused through the channel attention module CAFusion to obtain TDB5, TDB7, TDB 11 Key vector and value vector. 11 The query vector (Query) of is a randomly initialized category embedding matrix, and the query vector of TDB7 is TDB 11 The output category embedding matrix, the query vector of TDB5 comes from the output category embedding matrix of TDB7. Finally, according to the key vector, value vector and query vector corresponding to each scale, cross attention is applied to obtain the mask map corresponding to the multimodal features of each scale.

[0141] In some embodiments, the at least two mask images include a first-scale mask image, a second-scale mask image, and a third-scale mask image, the scales of which increase successively;

[0142] The step of fusing at least two of the mask images in a cascade manner to obtain the target image segmentation result includes:

[0143] Performing reshape and transpose convolution operations on the first scale mask image in sequence to obtain a first target result;

[0144] Reshape the second-scale mask image to obtain a second target result;

[0145] Reshape the third-scale mask image to obtain a third target result;

[0146] Summing the first target result, the second target result and the third target result to obtain an initial fusion result;

[0147] After linearly transforming the initial fusion result based on the category embedding matrix corresponding to the third-scale mask image, the linear change results are sequentially processed by transposed convolution and Softmax function to obtain the target image segmentation result.

[0148] refer to Figure 5 As shown, in this embodiment, the preliminary prediction results of three scales are fused in a cascade manner to obtain the target image segmentation result. In the fusion process, fine-grained predictions are gradually added. Compared with directly fusing all scale predictions at once by summing, a more accurate segmentation result can be obtained.

[0149] Specifically, the transformer decoder block TDB11 , TDB7, and TDB5 output three mask images of different sizes, respectively, represented as , , Their sizes are , , ,in Indicates the number of categories.

[0150] The coarsest mask The spatial structure is restored after the reshaping operation, and the transposed convolution is separated by channels. Achieve double upsampling, and obtain the first target result and mask map The second target result is obtained by reshaping operation, and then the summation operation is performed to achieve fusion, and so on, to obtain the preliminary fusion result S0. Specifically expressed as:

[0151] ;

[0152] Among them, the size of the initial fusion result S is .

[0153] Next, we use the output category embedding matrix of TDB5 The initial fusion results Perform linear transformation to achieve the fusion of information between categories. Here, No. Elements can be understood as categories and categories The correlation between .

[0154] Furthermore, in order to obtain the target image segmentation result, transposed convolution is used in sequence Four times upsampling and Function. The above process can be formally expressed as:

[0155] ;

[0156] in, Represents the multiplication of two matrices and tensors.

[0157] In this embodiment, the low-resolution mask image is continuously upsampled and fused with the high-resolution mask image step by step. Compared with directly fusing the mask images of all scales at once by summing, this embodiment can obtain a more accurate target image segmentation result.

[0158] Based on any of the above embodiments, the present invention further provides an image segmentation device, Figure 6 Schematic diagram of the structure of the image segmentation device provided by the present invention. Figure 6As shown, the device comprises:

[0159] A first image segmentation module 610, for acquiring a paired RGB image and an infrared image;

[0160] A second image segmentation module 620 is used to input the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale;

[0161] A third image segmentation module 630, configured to input the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result;

[0162] Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features;

[0163] Among them, the decoder network based on cross attention adaptively fuses the first feature and the second feature during the decoding process of the first feature and the second feature to obtain a multimodal feature; obtains a mask map corresponding to the multimodal feature based on the cross attention; and obtains the target image segmentation result by fusing at least two of the mask maps in a cascade manner.

[0164] The device provided by the embodiment of the present invention obtains a paired RGB image and an infrared image; inputs the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the scales of the first feature and the second feature are the same; the target feature pairs of each scale are input into a decoder network based on cross attention to obtain a target image segmentation result; wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate feature of the RGB image and the second intermediate feature of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain a first feature according to the updated first intermediate feature and a second feature according to the updated second intermediate feature; wherein, in the process of decoding the first feature and the second feature, the decoder network based on cross attention adaptively fuses the first feature and the second feature to obtain a multimodal feature; based on cross attention, a mask map corresponding to the multimodal feature is obtained; and at least two of the mask maps are fused in a cascade manner to obtain a target image segmentation result. The present invention uses a visual transformer network based on a convolutional multimodal adapter to extract features of RGB images and infrared images, and uses the features of RGB images and infrared images in the calculation process of updating feature quantities, and uses a shared convolutional layer to fuse the two features to improve feature extraction capabilities. Furthermore, a decoder network based on cross-attention is constructed using a transformer decoder block based on cross-attention. Compared with the decoder structure based on convolutional networks in current segmentation models, the decoder network of the present invention has more advantages in modeling long-distance dependencies and a stronger expression ability of the model.

[0165] The image segmentation device described in this embodiment and the image segmentation method provided by the present invention described above can be referred to each other, and will not be described in detail here.

[0166] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the image segmentation method, which includes:

[0167] Get paired RGB and infrared images;

[0168] Inputting the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale;

[0169] Inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result;

[0170] Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features;

[0171] Among them, the decoder network based on cross attention adaptively fuses the first feature and the second feature during the decoding process of the first feature and the second feature to obtain a multimodal feature; obtains a mask map corresponding to the multimodal feature based on the cross attention; and obtains the target image segmentation result by fusing at least two of the mask maps in a cascade manner.

[0172] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0173] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can perform the image segmentation method provided by the above methods, the method comprising:

[0174] Get paired RGB and infrared images;

[0175] Inputting the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale;

[0176] Inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result;

[0177] Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features;

[0178] Among them, the decoder network based on cross attention adaptively fuses the first feature and the second feature during the decoding process of the first feature and the second feature to obtain a multimodal feature; obtains a mask map corresponding to the multimodal feature based on the cross attention; and obtains the target image segmentation result by fusing at least two of the mask maps in a cascade manner.

[0179] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the image segmentation method provided by the above methods is implemented, and the method includes:

[0180] Get paired RGB and infrared images;

[0181] Inputting the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale;

[0182] Inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result;

[0183] Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features;

[0184] Among them, the decoder network based on cross attention adaptively fuses the first feature and the second feature during the decoding process of the first feature and the second feature to obtain a multimodal feature; obtains a mask map corresponding to the multimodal feature based on the cross attention; and obtains the target image segmentation result by fusing at least two of the mask maps in a cascade manner.

[0185] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0186] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image segmentation method, characterized in that: The method comprises: Get paired RGB and infrared images; The RGB image and the infrared image are input into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and updating; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale; the visual transformer network based on a convolutional multimodal adapter includes a first visual transformer, a second visual transformer and at least one convolutional multimodal adapter; the first visual transformer includes at least one first transformer encoder block of a depth level, the second visual transformer includes at least one second transformer encoder block of a depth level, and a convolutional multimodal adapter is configured between each pair of the first transformer encoder block and the first transformer encoder block of the same depth level; Inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result; Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features; The decoder network based on cross attention adaptively fuses the first feature and the second feature in the process of decoding the first feature and the second feature to obtain a multimodal feature; a mask map corresponding to the multimodal feature is obtained based on the cross attention; and at least two mask maps are fused in a cascade manner to obtain the target image segmentation result; The at least two mask images include a first-scale mask image, a second-scale mask image, and a third-scale mask image, the scales of which increase successively; The step of fusing at least two of the mask images in a cascade manner to obtain the target image segmentation result includes: Performing reshape and transpose convolution operations on the first scale mask image in sequence to obtain a first target result; Reshape the second-scale mask image to obtain a second target result; Reshape the third-scale mask image to obtain a third target result; Summing the first target result, the second target result and the third target result to obtain an initial fusion result; After linearly transforming the initial fusion result based on the category embedding matrix corresponding to the third-scale mask image, the linear change results are sequentially processed by transposed convolution and Softmax function to obtain the target image segmentation result.

2. The image segmentation method according to claim 1, characterized in that: The method further comprises: Inputting the RGB image feature into the first visual transformer, obtaining a first intermediate feature output by a first transformer encoder block in the first visual transformer; Inputting the infrared image feature into the second visual transformer, obtaining a second intermediate feature output by a second transformer encoder block in the second visual transformer; Based on the convolutional multimodal adapter, the first intermediate feature and the second intermediate feature are fused to obtain a first intermediate feature update amount corresponding to the first intermediate feature and a second intermediate feature update amount corresponding to the second intermediate feature; Inputting the first intermediate feature update to a first transformer encoder block in the first visual transformer so that the first transformer encoder block in the first visual transformer outputs the first feature according to the first intermediate feature update; The second intermediate feature update amount is input to the second transformer encoder block in the second visual transformer, so that the second transformer encoder block in the second visual transformer outputs the second feature according to the second intermediate feature update amount.

3. The image segmentation method according to claim 2, characterized in that: The first intermediate feature and the second intermediate feature are obtained in the following manner: The first transformer encoder block in the first visual transformer sequentially transforms the RGB image feature using layer normalization and multi-head self-attention to obtain a first transformed feature; Connecting the first variation feature with the RGB image feature through residual to obtain the first intermediate feature; The second transformer encoder block in the second visual transformer sequentially transforms the infrared image using layer normalization and multi-head self-attention to obtain a second transformed feature; The second change feature is connected to the infrared image feature through residual connection to obtain the second intermediate feature.

4. The image segmentation method according to claim 1, characterized in that: The adaptively fusing the first feature and the second feature to obtain a multimodal feature includes: Obtaining gating values ​​corresponding to the first feature and the second feature based on channel attention; Modulating the second feature based on the gate value, and connecting the modulated second feature in series with the first feature to obtain an initial fusion feature; The initial fusion features are reshaped, convolved, upsampled and flattened in turn to obtain multimodal features.

5. The image segmentation method according to claim 4, characterized in that: The obtaining the gating values ​​corresponding to the first feature and the second feature based on the channel attention includes: Splicing the first feature and the second feature along the channel dimension to obtain a spliced ​​feature; The concatenated features are sequentially input into a first fully connected layer, a first nonlinear activation layer, a second fully connected layer and a second nonlinear activation layer to obtain a gating value.

6. The image segmentation method according to claim 1, characterized in that: The step of obtaining a mask map corresponding to the multimodal feature based on the cross attention comprises: Obtaining a category embedding matrix corresponding to the multimodal features; Using the multimodal features as key vectors and value vectors, and the category embedding matrix as a query vector; Based on the key vector, the value vector and the query vector, cross attention is applied to obtain a mask map corresponding to the multimodal feature.

7. An image segmentation device, characterized in that: The device comprises: A first image segmentation module, used for acquiring paired RGB images and infrared images; The second image segmentation module is used to input the RGB image and the infrared image into a visual transformer network based on a convolutional multimodal adapter to obtain at least two target feature pairs of different scales after fusion and update; wherein the target feature pair of each scale includes a first feature corresponding to the RGB image and a second feature corresponding to the infrared image, and the first feature and the second feature have the same scale; the visual transformer network based on a convolutional multimodal adapter includes a first visual transformer, a second visual transformer and at least one convolutional multimodal adapter; the first visual transformer includes at least one first transformer encoder block of a depth level, the second visual transformer includes at least one second transformer encoder block of a depth level, and a convolutional multimodal adapter is configured between each pair of the first transformer encoder block and the first transformer encoder block of the same depth level; A third image segmentation module, used for inputting the target feature pairs of each scale into a decoder network based on cross attention to obtain a target image segmentation result; Wherein, in the process of extracting the features of the RGB image and the features of the infrared image, the visual transformer network based on the convolutional multimodal adapter updates the first intermediate features of the RGB image and the second intermediate features of the infrared image according to the fusion of the features of the RGB image and the features of the infrared image, so as to obtain the first feature according to the updated first intermediate features and obtain the second feature according to the updated second intermediate features; The decoder network based on cross attention adaptively fuses the first feature and the second feature in the process of decoding the first feature and the second feature to obtain a multimodal feature; a mask map corresponding to the multimodal feature is obtained based on the cross attention; and at least two mask maps are fused in a cascade manner to obtain the target image segmentation result; The at least two mask images include a first-scale mask image, a second-scale mask image, and a third-scale mask image, the scales of which increase successively; The step of fusing at least two of the mask images in a cascade manner to obtain the target image segmentation result includes: Performing reshape and transpose convolution operations on the first scale mask image in sequence to obtain a first target result; Reshape the second-scale mask image to obtain a second target result; Reshape the third-scale mask image to obtain a third target result; Summing the first target result, the second target result and the third target result to obtain an initial fusion result; After linearly transforming the initial fusion result based on the category embedding matrix corresponding to the third-scale mask image, the linear change results are sequentially processed by transposed convolution and Softmax function to obtain the target image segmentation result.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the image segmentation method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image segmentation method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Transform-based reference image segmentation method

    CN114821050A

  • Method and device for identifying object from video

    CN116030387A

  • Image recognition and classification method and device for indoor scene

    CN117197642A

  • Anaphora image segmentation model training and segmentation method, system, equipment and medium

    CN117315249A

  • Multi-attention codec network and system applied to skin lesion segmentation

    CN117496144A