Method and apparatus for performing refering image segmentation

EP4771603A1Pending Publication Date: 2026-07-08ROBERT BOSCH GMBH +1

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
ROBERT BOSCH GMBH
Filing Date
2023-08-29
Publication Date
2026-07-08

AI Technical Summary

Technical Problem

Existing Referring Image Segmentation (RIS) models face challenges in reducing the modality gap between language and image features, which hinders effective alignment of language expressions with corresponding image pixels, leading to suboptimal performance in segmenting objects referred by free-form language.

Method used

A novel RIS model and training framework that incorporates a Pyramid-pooled Language-Image Alignment (PLIA) module, Segmentation-grounded Masked Language Modeling (SMLM) auxiliary task, and Pixel-wise Language-Image Contrastive Learning (PLIC) to enhance language-image alignment, improve visual grounding, and provide explicit alignment supervision.

Benefits of technology

The proposed solution significantly enhances language-image alignment, leading to improved performance in RIS tasks by better understanding complex object relationships and providing holistic alignment supervision at both pixel-to-pixel and pixel-to-text levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023115415_06032025_PF_FP_ABST
    Figure CN2023115415_06032025_PF_FP_ABST
Patent Text Reader

Abstract

A computer implemented method for performing Referring Image Segmentation is disclosed. The method comprises: generating a first image feature map by at least part of an image encoder based on an image; generating a first language feature map by at least part of a language encoder based on a language expression associated with the image; performing, by at least part of a PLIA module, a plurality of pooling operations with a plurality of different pooling window sizes on the first image feature map to obtain a plurality of pooled image feature maps, and obtaining a multi-modal language feature map and a multi-modal image feature map based at least on the first language feature map and the plurality of pooled image feature maps; generating a second language feature map based on the first language feature map and the multi-modal language feature map; generating a pixel feature map by a pixel decoder based on the multi-modal image feature map; and predicting a segmentation of the image by a transformer decoder based on the second language feature map and the pixel feature map.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS FOR PERFORMING REFERING IMAGE SEGMENTATIONFIELD

[0001] Aspects of the present disclosure relate generally to artificial intelligence (AI) , and more particularly, to method and apparatus for performing Referring Image Segmentation (RIS) and training an RSI model.BACKGROUND

[0002] Deep learning has greatly improved the performance of vision algorithms on many popular image segmentation tasks, such as semantic segmentation, instance segmentation and panoptic segmentation. These tasks require grouping of image pixels under a fixed set of pre-defined categories and mainly differ in the granularity of grouping semantics required. In contrast to these unimodal segmentation tasks, RIS is a more challenging multi-modal task that requires to segment objects referred by free-form language expressions from an image, this requires the RIS model to simultaneously understand human language expression and make correct pixel-wise correspondence to the referred object in the image. RIS has gained widespread attention in the research community because of its potential to improve user experience in human-robot interaction, interactive image editing and so on.

[0003] A challenge in RIS lies in how to reduce the modality gap between language and image features. To do so, it is needed to have effective alignment between a given language expression and the corresponding image pixels for highlighting the referred target. Ideally, with robust pixel-wise language-image alignment, language and image features should have very high feature similarity when referring to the same object and very low feature similarity when referring to different objects. However, achieving such alignment is difficult because the language expression can be highly complex and diverse. For example, one can refer to an object by its color, position, property, action, or even its relationship to other objects. It is desirable if the alignment of the language and image features can be improved and accordingly the performance of RSI task can be improved.SUMMARY

[0004] In order to address the above-mentioned problem, the disclosure proposes a novel RIS model for performing RSI and a novel framework for training a RIS model in the effort of improving the alignment of the language and image features and accordingly improving the performance of RSI model.

[0005] According to an embodiment, there provides a computer implemented method for performing RSI. The method comprises: generating a first image feature map by at least part of an image encoder based on an image; generating a first language feature map by at least part of a language encoder based on a language expression associated with the image; performing, by at least part of a pyramid-pooled language-image alignment (PLIA) module, a plurality of pooling operations with a plurality of different pooling window sizes on the first image feature map to obtain a plurality of pooled image feature maps, and obtaining a multi-modal language feature map and a multi-modal image feature map based at least on the first language feature map and the plurality of pooled image feature maps; generating a second  language feature map based on the first language feature map and the multi-modal language feature map; generating a pixel feature map by a pixel decoder based on the multi-modal image feature map; and predicting a segmentation of the image by a transformer decoder based on the second language feature map and the pixel feature map.

[0006] According to an embodiment, there provides a computer implemented method for training a RIS model. The method comprises: generating a first image feature map by at least part of an image encoder of the RIS model based on an image; generating a first language feature map by at least part of a language encoder of the RIS model based on a language expression associated with the image; performing, by at least part of a PLIA module of the RIS model, a plurality of pooling operations with a plurality of different pooling window sizes on the first image feature map to obtain a plurality of pooled image feature maps, and obtaining a multi-modal language feature map and a multi-modal image feature map based at least on the first language feature map and the plurality of pooled image feature maps; generating a second language feature map based on the first language feature map and the multi-modal language feature map; generating a pixel feature map by a pixel decoder based on the multi-modal image feature map; predicting a segmentation of the image by a transformer decoder based on the second language feature map and the pixel feature map; generating at least one of a first loss and a second loss based on the predicted segmentation and a segmentation label associated with the image; and updating the RIS model based at least on the at least one of the first loss and the second loss.

[0007] According to an embodiment, there provides a computer system, which comprises one or more processors and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.

[0008] According to an embodiment, there provides one or more computer readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.

[0009] According to an embodiment, there provides a computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.

[0010] By using the RIS framework, aspects of the disclosure can enhance language-image alignment of a RIS task. Firstly, a lightweight plug-and-play Pyramid-pooled Language-Image Alignment (PLIA) module is configured to inject global contextual prior information into image features, so as to facilitate the RIS model to better understand complex object relationship in the image. Second, a Segmentation-grounded Masked Language Modeling (SMLM) auxiliary task is configured to improve visual grounding information in language features. Thirdly, Pixel-wise Language-Image Contrastive Learning (PLIC) is employed to explicitly align language and image features. The alignment supervision is holistic, considering both pixel-to-pixel level alignment and pixel-to-text level alignment. Other advantages and enhancements are explained in the description hereafter.BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The disclosed aspects will hereinafter be described in connection with the appended drawings that are provided to illustrate and not to limit the disclosed aspects.

[0012] Fig. 1 is a schematic block diagram illustrating an RIS model according to aspects of the disclosure.

[0013] Fig. 2 is a schematic block diagram illustrating an exemplary structure of a multi-modal encoder according to aspects of the disclosure.

[0014] Figs. 3 to 6 are schematic block diagrams illustrating exemplary structures of a multi-modal encoder sub-module according to aspects of the disclosure.

[0015] Fig. 7 is a schematic block diagram illustrating an exemplary structure of a SMLM framework for training the RIS model according to aspects of the disclosure.

[0016] Fig. 8 illustrates an exemplary method for performing RIS according to aspects of the disclosure.

[0017] Fig. 9 illustrates an exemplary process for training a RIS model according to aspects of the disclosure.

[0018] Fig. 10 illustrates an exemplary computing system according to aspects of the disclosure.DETAILED DESCRIPTION

[0019] The present disclosure will now be discussed with reference to several example implementations. It is to be understood that these implementations are discussed only for enabling those skilled in the art to better understand and thus implement the embodiments of the present disclosure, rather than suggesting any limitations on the scope of the present disclosure.

[0020] Various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts. References made to particular examples and embodiments are for illustrative purposes, and are not intended to limit the scope of the disclosure.

[0021] Fig. 1 is a schematic block diagram illustrating an RIS model according to aspects of the disclosure.

[0022] The RIS model 1 may include a multi-modal encoder 10, a pixel decoder 140 and a transformer decoder 150. The multi-modal encoder 10 may include a language encoder 110, an image encoder 130, and a pyramid-pooled language-image alignment (PLIA) module 120. In an embodiment, the language encoder 110 may be a BERT model, the image encoder 130 may be a Swin transformer. The BERT model and the Swin transformer are both known neural network (NN) models. It is appreciated that the language encoder 110 and the image encoder 130 do not limited to the BERT model and the Swin transformer, and any suitable language encoder and image encoder may be employed in the RIS model according to aspects of the disclosure.

[0023] An image I1 and a sentence S1 associated with the image may be input into the RIS model 1. In an example, the image I1 may be one as illustrated in Fig. 1, and the sentence S1 may be “Piles of green apples behind the grapes” . The task of the RIS model 1 is to perform segmentation of the image I1 based on the sentence S1. The language encoder 110,  the image encoder 130, and the PLIA module 120 collaboratively encodes the sentence S1 and the image I1 and output language feature map LFM and image feature map IFM. The language feature map LFM is input into the transformer decoder 150, and the image feature map IFM is input into the pixel decoder 140. The pixel decoder 140 generates pixel feature map PFM based on the image feature map IFM. The transformer decoder 150 may predict a segmentation output O of the image I1 based on the language feature map LFM and the pixel feature map PFM. The predicted segmentation of the image I1 may be a mask which indicates the segmentation area of the image I1. In this example, ideally the predicted mask would coincide with the piles of green apples behind the grapes in the image I1. The pixel decoder 140 and the transformer decoder 150 may be implemented with known NN models. For example, the pixel decoder and the Transformer decoder implemented in the open-source Mask2Former (B. Cheng, I. Misra, A. G. Schwing, A. Kirillov, and R. Girdhar. Masked-attention mask transformer for universal image segmentation. In CVPR, 2022) codebase may be used to implement the pixel decoder 140 and the transformer decoder 150. It is appreciated that the pixel decoder 140 and the transformer decoder 150 do not limited to the exampled ones, and any suitable pixel decoder 140 and transformer decoder 150 may be employed in the RIS model according to aspects of the disclosure.

[0024] Fig. 2 is a schematic block diagram illustrating an exemplary structure of a multi-modal encoder according to aspects of the disclosure.

[0025] The multi-modal encoder 10 may include a plurality of stages 10-1 to 10-L, each stage 10-i may be referred to as a multi-modal encoder sub-module 10-i. The language encoder 110 may include a plurality of stages 110-1 to 110-L, each stage 110-i may be referred to as a language encoder sub-module 110-i. The image encoder 130 may include a plurality of stages 130-1 to 130-L, each stage 130-i may be referred to as an image encoder sub-module 130-i. The PLIA module 120 may include a plurality of stages 120-1 to 120-L, each stage 120-i may be referred to as a PLIA sub-module 120-i. Each multi-modal encoder sub-module 10-i may include a language encoder sub-module 110-i, a PLIA sub-module 120-i and an image encoder sub-module 130-i, where the PLIA sub-module 120-i is deployed at the respective outputs of the language encoder sub-module 110-i and the image encoder sub-module 130-i. In an embodiment, each of the plurality of multi-modal encoder sub-modules 10-1 to 10-L may have the same structure.

[0026] Taking the multi-modal encoder sub-module 10-1 as an example, the PLIA sub-module 120-1 may include a plurality of cross-attention modules CA-1 to CA-K and a plurality of pooling modules PL-1 to PL-K. The pooling modules PL-1 to PL-K may respectively perform pooling operations with different pooling window sizes to a first image feature map output by the image encoder sub-module 130-1, and output a plurality of pooled image feature maps having different sizes, which are illustrated as the parallelograms in Fig. 2. The cross-attention modules CA-1 to CA-K respectively perform cross-attention process based on the first language feature map and the plurality of pooled image feature maps to obtain a plurality of cross-attended language feature maps and a plurality of cross-attended image feature maps. In an embodiment, the plurality of cross-attended language feature maps and the plurality of cross-attended image feature maps may be further processed to obtain multi-modal language feature map and multi-modal image feature map. The multi-modal language feature map may be processed by an image gate to obtain a post-gate language  feature map, and the multi-modal image feature map may be processed by a language gate to obtain a post-gate image feature map. The image gate is illustrated by the triangle at the left side of the PLIA sub-module 120-1, and the language gate is illustrated by the triangle at the right side of the PLIA sub-module 120-1. Then the first language feature map and the post-gate language feature map may be added to obtain a second language feature map, and the first image feature map and the post-gate image feature map be added to obtain a second image feature map.

[0027] The second language feature map and the second image feature map output by the multi-modal encoder sub-module 10-1 may be input into the multi-modal encoder sub-module 10-2, and particularly may be respectively input into the language encoder sub-module 110-2 and the image encoder sub-module 130-2, which accordingly generate a first language feature map and a first image feature map at its stage or iteration. The same process described with reference to the multi-modal encoder sub-module 10-1 may be performed in the multi-modal encoder sub-module 10-2. The multi-modal encoder sub-modules 10-1 to 10-K iteratively perform the process described with reference to the multi-modal encoder sub-module 10-1. In an embodiment, the second language feature map output by the last multi-modal encoder sub-module 10-L may be the LFM output by the multi-modal encoder 10 as illustrated in Fig. 1. In an embodiment, the multi-modal image feature maps before passing through the language gates in the respective multi-modal encoder sub-modules 10-1 to 10-K may be the IFM output by the multi-modal encoder 10 and input into the pixel decoder 140 as illustrated in Fig. 1.

[0028] Although the multi-modal encoder 10 includes a plurality of stages 10-1 to 10-L in the embodiment illustrated in Fig. 2, it is appreciated that the multi-modal encoder 10 may include only one stage, that is to say, the number L may be one.

[0029] Fig. 3 is a schematic block diagram illustrating an exemplary structure of a multi-modal encoder sub-module according to aspects of the disclosure.

[0030] The illustrated multi-modal encoder sub-module 10-i may be an exemplary implementation of the one of the multi-modal encoder sub-modules 10-1 to 10-L as illustrated in Fig. 2. The multi-modal encoder sub-module 10-i may include a language encoder sub-module 110-i, an image encoder sub-module 130-i and a PLIA sub-module 120-i, where the label 120-i is not shown in Fig. 3. The PLIA sub-module 120-i may include the units of the multi-modal encoder sub-module 10-i other than the language encoder sub-module 110-i and the image encoder sub-module 130-i, where the addition units at the end of the multi-modal encoder sub-module 10-i may be considered as being or not being a part of the PLIA sub-module 120-i.

[0031] When the multi-modal encoder sub-module 10-i is the first multi-modal encoder sub-module 10-1 of the multi-modal encoder 10, its input may be the sentence S1 and the referred image I1 as illustrated in Figs. 1 and 2, the output language feature map and image feature map of the multi-modal encoder sub-module 10-i may be the input of the next multi-modal encoder sub-module 10-i+1. As illustrated in Fig. 3, the language encoder sub-module 110-i receives the sentence S1 or the language feature map of the sentence S1 and generates a first language feature map based on its input. No matter the input of the language encoder sub-module 110-i is the sentence S1 or the language feature map of the sentence S1 output from previous multi-modal encoder sub-module 10-i-1, the language encoder sub-module 110-i generates the first language feature map based eventually on the sentence S1. The image  encoder sub-module 130-i receives the image I1 or the image feature map of the image I1 and generates a first image feature map based on its input. No matter the input of the image encoder sub-module 130-i is the image I1 or the image feature map of the image I1 output from previous multi-modal encoder sub-module 10-i-1, the image encoder sub-module 130-i generates the first image feature map based eventually on the image I1.

[0032] The first image feature map output by the image encoder sub-module 130-i is input into a plurality of pooling modules PL-1 to PL-K. The pooling modules PL-1 to PL-K may respectively perform pooling operations with different pooling window sizes to the first image feature map output by the image encoder sub-module 130-i, and output K pooled image feature maps having different sizes. The plurality of pooled image feature maps are respectively input into a plurality of Multi-Layer Perceptron (MLP) modules, and the plurality of MLP modules may better extract global information of the pooled image feature maps and generates a plurality of global enhanced image feature maps. The MLP modules may be referred to as global information enhancement modules. It is appreciated that the global information enhancement modules may also be implemented by NN modules other than MLP modules.

[0033] The first language feature map and the K global enhanced image feature maps are respectively input into a plurality of cross-attention modules CA-1 to CA-K, the first language feature map and the first image feature map are input into a cross-attention module CA-0. The cross-attention modules CA-1 to CA-K respectively perform cross-attention process based on the first language feature map and the plurality of global enhanced image feature maps to obtain a plurality of cross-attended language feature maps and a plurality of cross-attended image feature maps. The cross-attention module CA-0 perform cross-attention process based on the first language feature map and the first image feature map to obtain a cross-attended language feature map. As illustrated in Fig. 3, the hollow arrows indicate the proceeding of the language feature map and the solid arrows indicate the proceeding of the image feature map. The plurality of cross-attended language feature maps and the plurality of cross-attended image feature maps are respectively input into a plurality of up-sampling modules US-1 to US-K. The up-sampling modules US-1 to US-K respectively up-samples the cross-attended language feature maps and the cross-attended image feature map to the up-sampled feature maps having original feature map size, i.e., the same size as the first language feature map and the first image feature map. In an embodiment, the up-sampling may be performed via bilinear interpolation.

[0034] The concatenation module CC concatenates the plurality of up-sampled language feature maps and the cross-attended language feature map output by cross-attention module CA-0 to obtain a concatenated language feature map, and concatenates the plurality of up-sampled image feature maps and the cross-attended image feature map output by cross-attention module CA-0 to obtain a concatenated image feature map. In an embodiment, the concatenation of the feature maps may be performed along the channel dimension.

[0035] A MLP2 module may receive the concatenated language feature map and generate the multi-modal language feature map. The MLP2 module may reduce the channel dimension of the concatenated language feature map back to the original size, so that the multi-modal language feature map may have the original size. A MLP3 module may receive the concatenated image feature map and generate the multi-modal image feature map. The  MLP3 module may reduce the channel dimension of the concatenated image feature map back to the original size, so that the multi-modal image feature map may have the original size. Taking advantage of the process of the PLIA sub-module, the language-image alignment may be enhanced by injecting global contextual prior into image features before performing language-image fusion.

[0036] An image gate IG may process the multi-modal language feature map to generate a post-gate language feature map, then the post-gate language feature map is added back to the first language feature map by the addition module to obtain a second language feature map. The second language feature map may be used as input language feature map of the next multi-modal encoder sub-module 10-i+1. A language gate LG may process the multi-modal image feature map to generate a post-gate image feature map, then the post-gate image feature map is added back to the first image feature map by the addition module to obtain a second image feature map. The second image feature map may be used as input image feature map of the next multi-modal encoder sub-module 10-i+1. In an embodiment, the language gate LG and the image gate IG may be implemented with Tanh nonlinearity. By using the language gate LG and the image gate IG, it may alleviate the multi-modal signal from overwhelming the original signal.

[0037] The multi-modal image feature map before passing through the language gate LG is sent to the pixel decoder 140 for further processing. The L multi-modal image feature maps output by the L multi-modal encoder sub-modules 10-1 to 10-L are sent to the pixel decoder 140 for further processing. As described above with reference to Fig. 1, the pixel decoder 140 may generate the pixel feature maps based on the multi-modal image feature maps output by the multi-modal encoder sub-modules 10-1 to 10-L.

[0038] Although a plurality of pyramid branches 1 to K are illustrated in the embodiment of Fig. 3, where each pyramid branch j includes the pooling module j, the MLP module j, the cross-attention module j, the up-sampling module j, it is appreciated that there may be only one pyramid branch in other embodiments, i.e., K may be one.

[0039] It is appreciated that various modifications may be made to the embodiment of Fig. 3 within the scope of the disclosure. Figs. 4 to 6 illustrate exemplary variants of the embodiment of Fig. 3. In the example of Fig. 4, an additional MLP module MLP-0 may be set before the cross-attention module CA-0 in the branch corresponding to the CA-0. The MLP-0 together with the MLP-1 to MLP-K may enhance the global information extraction of the image feature map. Although no pooling module is set in the branch 0 corresponding to the MLP-0 and CA-0, it may be regarded as a pooling operation with a pooling window size of 1x1 is performed in the branch 0. In the example of Fig. 5, the multi-modal encoder sub-module 10-i may include K branches, each branch j of the K branches includes a pooling module j, a MLP-j, a CA-j and a US-j, where the branch 0 corresponding to CA-0 as illustrated in Fig. 3 is omitted in the example of Fig. 5. Similar as the embodiments of Fig. 3 and Fig. 4, the pooling modules PL-1 to PL-K respectively have increasing pooling window sizes. In the example of Fig. 6, the multi-modal encoder sub-module 10-i may not include the image gate IG and the language gate LG compared to the embodiments of Figs. 3 to 5. It is appreciated that the variants illustrated in Figs. 4 to 6 may be combined within the scope of the disclosure, such combination would be apparent for those skilled in the art.

[0040] Referring to Fig. 1, the multi-modal image feature maps as illustrated in Figs. 3 to  6 are output from the L multi-modal encoder sub-modules 10-1 to 10-L to the pixel decoder 140. The pixel decoder 140 is responsible for enhancing the multi-modal image features extracted by image encoder 110 of the multi-modal encoder 10. In an embodiment, the Swin Transformer employed as the image encoder 110 generates hierarchical representations that contain semantics from low to high levels. Given multi-scale feature maps and sampled offsets where and where Cl, Hl, Wl are the channel, height and width dimensions for the l-th feature map, each pixel decoder block produces output pixel feature map yl by the equations (1) and (2) :

[0041] MSDeformAttn is the Multi-scale Deformable Attention (X. Zhu, W. Su, L. Lu, B. Li, X.

[0042] Wang, and J. Dai. Deformable detr: Deformable transformers for end-to-end object detection. In ICLR, 2021) that updates each element q with normalized reference coordinate pq∈ [0, 1] 2 in xl by attending to K sampling points via equation (3)

[0043] M is the number of attention heads, Wm, W′m are learnable projection matrices at the m-th head, Amqk is the attention weight of the k-th sampling point at attention head m and is the offset from q to the k-th sampling point at attention head m.

[0044] The transformer decoder 150 may predict a segmentation of the image I1 based on the language feature map output by the multi-modal encoder 10 and the pixel feature map yl output by the pixel decoder 140. The language feature map LFM output by the multi-modal encoder 10 may be the second language feature map output by the last multi-modal encoder sub-module 10-L as described with reference to the embodiments of Figs. 3 to 6.

[0045] In order to train the RIS model 1, in an embodiment, a binary cross-entropy loss and / or a Dice loss may be used to update the RIS model 1. It is appreciated the binary cross-entropy loss and the Dice loss are commonly used loss for training NN models based on training data set. For example, the training data set may include images, and annotated expressions that refers to object regions in the images. The binary cross-entropy loss and the Dice loss may be obtained based on predicted segmentation masks and the true segmentation masks in the training data set. The known AdamW optimizer may be used to update the RIS model 1 based on the loss.

[0046] In another embodiment, a pixel-wise language-image contrastive learning (PLIC) mechanism is additionally or alternatively employed to provide explicit alignment supervision. To explicitly supervise the learning of the RIS model with pixel-wise language-image alignment training signal, two multi-modal contrastive losses, i.e., Pixel-to-Pixel Contrastive Loss and Pixel-to-Text Contrastive Loss are additionally or alternatively employed to optimize the RIS model. The Pixel-to-Pixel Contrastive Loss encourages image features from the same set to be well-aligned, whereas the Pixel-to-Text Contrastive Loss encourages language and image features to be well-aligned. With better language-image aligned features, subsequent Transformer decoder 150 is able to generate mask prediction with higher quality.

[0047] Given language feature produced by the language encoder of the multi-modal encoder 10 and final pixel decoder mask feature with |P| positive pixel features, |N | negative pixel features, let be the i-th pixel feature in the positive set be the j-th pixel feature in the background set and Tk be the k-th language token, the  and may be obtained by equations (4) and (5)

[0048] Where and are the average pooled positive and negative pixel features,  is the average pooled and linearly projected word feature and τ1, τ2 are hyper-parameters that affect the sharpness of the probability distribution.

[0049] In this embodiment, by using the Pixel-to-Pixel Contrastive Loss and the Pixel-to-Text Contrastive Loss in addition to or in alternative to the binary cross-entropy loss and / or the Dice loss, the language and image features may be explicitly aligned so as to improve the segmentation prediction of the RIS model.

[0050] In another embodiment, Segmentation-grounded Masked Language Modeling (SMLM) auxiliary task is additionally or alternatively employed to improve visual grounding information in language features. The SMLM auxiliary task is performed in the training process to learn good feature representation by means of masked input modeling.

[0051] Fig. 7 is a schematic block diagram illustrating an exemplary structure of SMLM framework for training the RIS model according to aspects of the disclosure.

[0052] The SMLM framework 70 includes a segmentation label encoder 160 and a masked language predictor 170 in addition to the multi-modal encoder 10. For example, a training data includes image I1, its corresponding referring expression S1 and segmentation mask M1 which is the grand truth label. A masked referring expression M-S1 may be generated by randomly replace some tokens in the tokenized referring expression S1. The framework 70 aims to predict the actual tokens being masked in the sentence S1 based on the masked referring expression M-S1, the image I1 and the mask M1.

[0053] As illustrated in Fig. 7, taking the sentence S1 “Piles of green apples behind the grapes” as an example, the masked sentence M-S1 may be “Piles of green <mask> behind the grapes” . The language encoder 110 generates masked language feature map M-LFM based on the masked sentence M-S1. During the process described with reference to Figs. 1 to 6, the image feature map IFM has been generated by the multi-modal encoder 10, therefore image  encoder 130 does not need to actually encode the image I1 once again in an embodiment. In another embodiment, the image encoder 130 may encode the image I1 once again to obtain the image feature map IFM. The segmentation label encoder 160 may encode the segmentation mask MI into a mask feature map MFM. In an implementation, an MLP module may be employed as the segmentation label encoder 160 to encode the center coordinates of the given segmentation mask into the mask feature map. The masked language predictor 170 then process the concatenated masked language feature map M-LFM, image feature map IFM and segmentation label feature map MFM to predict the masked part of the language expression S1. In an implementation, the masked language predictor 170 may has the same structure as the BERT encoder. A cross-entropy loss  may be obtained based on the prediction of the masked part and the true masked part. The cross-entropy loss  is used to compare the final predicted distribution with the target distribution. The SMLM auxiliary task forces the language model to learn visual grounding by exposing the language model to extra visual information.

[0054] In this embodiment, by using the SMLM loss  in addition to or in alternative to the Pixel-to-Pixel Contrastive Loss  the Pixel-to-Text Contrastive Loss  the binary cross-entropy loss and / or the Dice loss, visual grounding information in language features may be improved so as to improve the segmentation prediction of the RIS model.

[0055] In an embodiment, to supervise the learning of the RIS model, a weighted combination of the different losses described above may be employed as shown in equation (6) .

[0056] is the binary cross-entropy loss,  is the Dice loss,  is the pixel to pixel loss,  is the pixel to text loss,  is the SMLM loss.  λSMLM are weight coefficients. In an implementation, the known AdamW optimizer may be used to update the RIS model 1 based on the loss

[0057] Fig. 8 illustrates an exemplary process for performing RIS according to aspects of the disclosure.

[0058] At step 810, a first image feature map may be generated by at least part of an image encoder based on an image.

[0059] At step 820, a first language feature map may be generated by at least part of a language encoder based on a language expression associated with the image.

[0060] At step 830, a plurality of pooling operations with a plurality of different pooling window sizes may be performed, by at least part of a PLIA module, on the first image feature map to obtain a plurality of pooled image feature maps, and a multi-modal language feature map and a multi-modal image feature map may be obtained based at least on the first language feature map and the plurality of pooled image feature maps.

[0061] At step 840, a second language feature map may be generated based on the first language feature map and the multi-modal language feature map.

[0062] At step 850, a pixel feature map may be generated by a pixel decoder based on the multi-modal image feature map.

[0063] At step 860, a segmentation of the image, such as a mask of the image, may be  predicted by a transformer decoder based on the second language feature map and the pixel feature map.

[0064] According to an embodiment, at step 840, a second image feature map may be generated based on the first image feature map and the multi-modal image feature map.

[0065] According to an embodiment, at step 830, cross-attention process is performed based at least on the first language feature map and each of the plurality of pooled image feature maps to obtain a plurality of cross-attended language feature maps and a plurality of cross-attended image feature maps, and the multi-modal language feature map and the multi-modal image feature map are obtained based on the plurality of cross-attended language feature maps and the plurality of cross-attended image feature maps.

[0066] According to an embodiment, at step 830, global information extraction process is performed to each of the plurality of pooled image feature maps to obtain a plurality of global enhanced image feature maps, and cross-attention process is performed based at least on the first language feature map and each of the plurality of global enhanced image feature maps to obtain the plurality of cross-attended language feature maps and the plurality of cross-attended image feature maps.

[0067] According to an embodiment, at step 830, up-sampling process is performed to each of the plurality of cross-attended language feature maps and each of the plurality of cross-attended image feature maps to obtain a plurality of up-sampled language feature maps and a plurality of up-sampled image feature maps, at least the plurality of up-sampled language feature maps are concatenated to obtain a concatenated language feature map and at least the plurality of up-sampled image feature maps are concatenated to obtain a concatenated image feature map, and the multi-modal language feature map and the multi-modal image feature map are obtained based on the concatenated language feature map and the concatenated image feature map.

[0068] According to an embodiment, at step 840, the multi-modal language feature map is processed by an image gate to generate a post-gate language feature map, and the second language feature map is generated based on the first language feature map and the post-gate language feature map. According to an embodiment, at step 840, the multi-modal image feature map is processed by a language gate to generate a post-gate image feature map, and the second image feature map is generated based on the first image feature map and the post-gate image feature map.

[0069] According to an embodiment, the image encoder comprises L sequential image encoder sub-modules, the language encoder comprises L sequential language encoder sub-modules, the PLIA module comprises L sequential PLIA sub-modules, wherein L is larger than one or L is one, and the L PLIA sub-modules are respectively deployed at the respective outputs of the L language encoder sub-modules and the L image encoder sub-modules.

[0070] According to an embodiment, the generating a first image feature map at step 810, the generating a first language feature map at step 820, the performing a plurality of pooling operations and the obtaining a multi-modal language feature map and a multi-modal image feature map at step 830 are performed iteratively by each set i of image encoder sub-module i, language encoder sub-module i and PLIA sub-module i, where 1≤i≤L. The second language feature map and the second image feature map output by the set i is taken as input of image encoder sub-module i+1 and language encoder sub-module i+1, where 1≤i≤ L-1. At step 860, the segmentation mask of the image is predicted based on the second language feature map output by a set L of image encoder sub-module L, language encoder sub-module L and PLIA sub-module L.

[0071] Fig. 9 illustrates an exemplary process for training a RIS model according to aspects of the disclosure.

[0072] At step 910, a first image feature map may be generated by at least part of an image encoder of the RIS model based on an image.

[0073] At step 920, a first language feature map may be generated by at least part of a language encoder of the RIS model based on a language expression associated with the image.

[0074] At step 930, a plurality of pooling operations with a plurality of different pooling window sizes may be performed, by at least part of a PLIA module of the RIS model, on the first image feature map to obtain a plurality of pooled image feature maps, and a multi-modal language feature map and a multi-modal image feature map may be obtained based at least on the first language feature map and the plurality of pooled image feature maps.

[0075] At step 940, a second language feature map may be generated based on the first language feature map and the multi-modal language feature map.

[0076] At step 950, a pixel feature map may be generated by a pixel decoder based on the multi-modal image feature map.

[0077] At step 960, a segmentation of the image, such as a mask of the image, may be predicted by a transformer decoder based on the second language feature map, and the pixel feature map.

[0078] At step 970, at least one of a first loss and a second loss may be generated based on the predicted segmentation and a segmentation label associated with the image. For example, the first loss may the binary cross-entropy loss and the second loss may be the Dice loss

[0079] At step 980, the RIS model may be updated based at least on the at least one of the first loss and the second loss.

[0080] According to an embodiment, at step 940, a second image feature map may be generated based on the first image feature map and the multi-modal image feature map.

[0081] According to an embodiment, at step 970, a third loss may be generated based on the pixel feature map and a fourth loss may be generated based on the second language feature map and the pixel feature map. At step 980 the RIS model may be updated based at least on the third loss, the fourth loss, and the at least one of the first loss and the second loss. For example, the third loss may the pixel to pixel loss and fourth loss may be the pixel to text loss

[0082] According to an embodiment, at step 970, a part of the language expression may be masked to obtain a marked language expression, a masked language feature map may be generated by the language encoder based on the masked language expression, a segmentation label feature map may be generated by a segmentation label encoder based on the segmentation label associated with the image, the masked part of the language expression may be predicted by a masked language predictor based on the masked language feature map, the second image feature map and the segmentation label feature map, a fifth loss may be generated based on the predicted masked part of the language expression and the real masked  part of the language expression. At step 980, the RIS model may be updated based at least on the third loss, the fourth loss, the fifth loss and the at least one of the first loss and the second loss. For example, the fifth loss may the SMLM loss

[0083] According to an embodiment, the image encoder comprises L image encoder sub-modules, the language encoder comprises L language encoder sub-modules, the PLIA module comprises L PLIA sub-modules, wherein L is larger than one or L is one, and the L PLIA sub-modules are respectively deployed at the respective outputs of the L language encoder sub-modules and the L image encoder sub-modules.

[0084] According to an embodiment, the generating a first image feature map at step 910, the generating a first language feature map at step 920, the performing a plurality of pooling operations and the obtaining a multi-modal language feature map and a multi-modal image feature map at step 930 may be performed iteratively by each set i of image encoder sub-module i, language encoder sub-module i and PLIA sub-module i, where 1≤i≤L. The second language feature map and the second image feature map output by the set i are taken as input of image encoder sub-module i+1 and language encoder sub-module i+1, where 1≤i ≤L-1. The segmentation mask of the image may be predicted based on the second language feature map output by a set L of image encoder sub-module L, language encoder sub-module L and PLIA sub-module L.

[0085] Fig. 10 illustrates an exemplary computing system according to aspects of the disclosure. The computing system 1000 may comprise at least one processor 1010. The computing system 1000 may further comprise at least one storage device 1020. The storage device 1020 may store computer-executable instructions that, when executed, cause the processor 1010 to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-9.

[0086] The embodiments of the present disclosure may be embodied in a computer-readable medium such as non-transitory computer-readable medium. The non-transitory computer-readable medium may comprise instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-9.

[0087] The embodiments of the present disclosure may be embodied in a computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-9.

[0088] It should be appreciated that all the operations in the methods described above are merely exemplary, and the present disclosure is not limited to any operations in the methods or sequence orders of these operations, and should cover all other equivalents under the same or similar concepts.

[0089] It should also be appreciated that all the modules in the apparatuses described above may be implemented in various approaches. These modules may be implemented as hardware, software, or a combination thereof. Moreover, any of these modules may be further functionally divided into sub-modules or combined together.

[0090] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be  applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the various aspects described throughout the present disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims.

Claims

1.A computer implemented method for performing Referring Image Segmentation, comprising:generating a first image feature map by at least part of an image encoder based on an image;generating a first language feature map by at least part of a language encoder based on a language expression associated with the image;performing, by at least part of a pyramid-pooled language-image alignment (PLIA) module, a plurality of pooling operations with a plurality of different pooling window sizes on the first image feature map to obtain a plurality of pooled image feature maps, and obtaining a multi-modal language feature map and a multi-modal image feature map based at least on the first language feature map and the plurality of pooled image feature maps;generating a second language feature map based on the first language feature map and the multi-modal language feature map;generating a pixel feature map by a pixel decoder based on the multi-modal image feature map; andpredicting a segmentation of the image by a transformer decoder based on the second language feature map and the pixel feature map.2.The method of claim 1, further comprising generating a second image feature map based on the first image feature map and the multi-modal image feature map.3.The method of claim 1 or 2, wherein the obtaining a multi-modal language feature map and a multi-modal image feature map comprises:performing cross-attention process based at least on the first language feature map and each of the plurality of pooled image feature maps to obtain a plurality of cross-attended language feature maps and a plurality of cross-attended image feature maps, andobtaining the multi-modal language feature map and the multi-modal image feature map based on the plurality of cross-attended language feature maps and the plurality of cross-attended image feature maps.4.The method of claim 3, wherein the obtain a plurality of cross-attended image feature maps and a plurality of cross-attended language feature maps comprises:performing global information extraction process to each of the plurality of pooled image feature maps to obtain a plurality of global enhanced image feature maps; andperforming cross-attention process based at least on the first language feature map and each of the plurality of global enhanced image feature maps to obtain the plurality of cross-attended language feature maps and the plurality of cross-attended image feature maps.5.The method of claim 4, wherein the obtaining a multi-modal language feature map and a multi-modal image feature map comprises:performing up-sampling process to each of the plurality of cross-attended language feature maps and each of the plurality of cross-attended image feature maps to obtain a plurality of up-sampled language feature maps and a plurality of up-sampled image feature maps;concatenating at least the plurality of up-sampled language feature maps to obtain a concatenated language feature map and concatenating at least the plurality of up-sampled image feature maps to obtain a concatenated image feature map; andobtaining the multi-modal language feature map and the multi-modal image feature map based on the concatenated language feature map and the concatenated image feature map.6.The method of claim 5, wherein the generating a second language feature map comprises: processing the multi-modal language feature map by an image gate to generate a post-gate language feature map, and generating the second language feature map based on the first language feature map and the post-gate language feature map;wherein the generating a second image feature map comprises: processing the multi-modal image feature map by a language gate to generate a post-gate image feature map, and generating the second image feature map based on the first image feature map and the post-gate image feature map.7.The method of claim 1 or 2, wherein the image encoder comprises L image encoder sub-modules, the language encoder comprises L language encoder sub-modules, the PLIA module comprises L PLIA sub-modules, wherein L is larger than one or L is one, and the L PLIA sub-modules are respectively deployed at the respective outputs of the L language encoder sub-modules and the L image encoder sub-modules.8.The method of claim 7, wherein the generating a first image feature map, the generating a first language feature map, the performing a plurality of pooling operations and the obtaining a multi-modal language feature map and a multi-modal image feature map are performed iteratively by each set i of image encoder sub-module i, language encoder sub-module i and PLIA sub-module i, where 1≤i≤L;wherein the second language feature map and the second image feature map output by the set i is taken as input of image encoder sub-module i+1 and language encoder sub-module i+1, where 1≤i≤L-1;wherein the predicting a segmentation of the image comprises predicting the segmentation of the image based on the second language feature map output by a set L of image encoder sub-module L, language encoder sub-module L and PLIA sub-module L.9.A computer implemented method for training a Referring Image Segmentation (RIS) model, comprising:generating a first image feature map by at least part of an image encoder of the RIS model based on an image;generating a first language feature map by at least part of a language encoder of the RIS model based on a language expression associated with the image;performing, by at least part of a pyramid-pooled language-image alignment (PLIA) module of the RIS model, a plurality of pooling operations with a plurality of different pooling window sizes on the first image feature map to obtain a plurality of pooled image feature maps, and obtaining a multi-modal language feature map and a multi-modal image feature map based at least on the first language feature map and the plurality of pooled image feature maps;generating a second language feature map based on the first language feature map and the multi-modal language feature map;generating a pixel feature map by a pixel decoder based on the multi-modal image feature map;predicting a segmentation of the image by a transformer decoder based on the second language feature map and the pixel feature map;generating at least one of a first loss and a second loss based on the predicted segmentation and a segmentation label associated with the image; andupdating the RIS model based at least on the at least one of the first loss and the second loss.10.The method of claim 9, further comprising:generating a second image feature map based on the first image feature map and the multi-modal image feature map.11.The method of claim 9 or 10, further comprising:generating a third loss based on the pixel feature map and generating a fourth loss based on the second language feature map and the pixel feature map;wherein the updating the RIS model comprises updating the RIS model based at least on the third loss, the fourth loss, and the at least one of the first loss and the second loss.12.The method of claim 11, further comprising:masking a part of the language expression to obtain a marked language expression;generating a masked language feature map by the language encoder based on the masked language expression;generating a segmentation label feature map by a segmentation label encoder based on the segmentation label associated with the image;predicting the masked part of the language expression by a masked language predictor based on the masked language feature map, the second image feature map and the segmentation label feature map;generating a fifth loss based on the predicted masked part of the language expression and the real masked part of the language expression;wherein the updating the RIS model comprises updating the RIS model based at least on the third loss, the fourth loss, the fifth loss and the at least one of the first loss and the second loss.13.The method of one of claims 9-12, wherein the image encoder comprises L image encoder sub-modules, the language encoder comprises L language encoder sub-modules, the PLIA module comprises L PLIA sub-modules, wherein L is larger than one or L is one, and the L PLIA sub-modules are respectively deployed at the respective outputs of the L language encoder sub-modules and the L image encoder sub-modules.14.The method of claim 13, wherein the generating a first image feature map, the generating a first language feature map, the performing a plurality of pooling operations and the obtaining a multi-modal language feature map and a multi-modal image feature map are performed iteratively by each set i of image encoder sub-module i, language encoder sub-module i and PLIA sub-module i, where 1≤i≤L;wherein the second language feature map and the second image feature map output by the set i is taken as input of image encoder sub-module i+1 and language encoder sub-module i+1, where 1≤i≤L-1;wherein the predicting a segmentation of the image comprises predicting the segmentation of the image based on the second language feature map output by a set L of image encoder sub-module L, language encoder sub-module L and PLIA sub-module L.15.A computer system, comprising:one or more processors; andone or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method of one of claims 1-14.16.One or more computer readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of one of claims 1-14.