Image referent object segmentation method and system based on cross-modal interactive reasoning
Through a cross-modal interactive reasoning network, combined with visual features and natural language processing, it solves the problem of positioning errors in image-referenced object segmentation tasks in complex visual scenes, and achieves more accurate and refined object segmentation effects.
Patent Information
- Application Number
- CN202311567341.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-11-22
AI Technical Summary
In existing technology, under complex visual scenes or complex language expressions, problems of finding the wrong target, incomplete segmentation, or unable to find objects often occur in the task of image reference object segmentation, mainly due to the semantic gap and insufficient understanding of visual features and text features. .
Adopting a method based on cross-modal interactive reasoning, through the cross-modal interactive reasoning network of the encoding and decoding architecture, using the visual feature extraction model DeepLab-101 and the natural semantic understanding model BERT, combined with the cross-modal joint coding, cross-graph interactive positioning module and Cross-modal attention enhances the decoder to achieve semantic alignment and fusion of visual features and text features, and gradually locate and segment objects matching text from the image.
It significantly improves the accuracy and precision of object segmentation in images, alleviates the problem of positioning errors, and achieves effective object segmentation in complex scenes.
Smart Images

Figure CN117809028B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image-referent object segmentation method and system based on cross-modal interactive reasoning, and belongs to the technical field of computer vision and multimedia computing. Background Art
[0002] The image-to-object segmentation task is a cutting-edge research task that combines computer vision and natural language processing technologies. The core technology of the task is to jointly model natural language expressions and images, aiming to solve an important problem: how to correctly understand and accurately locate the objects referred to by natural language in the image, and then accurately segment them. This task is of great significance for further promoting research on image understanding and semantic understanding.
[0003] At present, the research on this task is mainly reflected in the following aspects: (1) Early work proposed to extract visual features and text features separately and fuse them in a simple concatenation or dot product manner, and then generate the final segmentation mask through the fused multimodal features to segment the target object; (2) In order to keep the semantic information between visual features and text features consistent, many works introduced various cross-modal attention mechanisms; (3) Thanks to the development of transformer technology, some works explored the multimodal feature interaction under the transformer architecture. Although the previous work has made great progress, for complex visual scenes or complex language expressions, their models still perform poorly, often finding the wrong target, incomplete segmentation, or even failing to find the object. These problems can be attributed to the lack of understanding of visual features and text features by existing models, and the failure to fully mine more effective information; on the other hand, there is a semantic gap between visual features and text features, and the failure to fully understand each other. It can be seen that the image-to-object segmentation task is still a very challenging task, and solving these problems has become the key to better completing this task. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides an image-referent object segmentation method based on cross-modal interactive reasoning; the present invention also provides an image-referent object segmentation system based on cross-modal interactive reasoning.
[0005] For the image-to-object segmentation task, it is necessary to accurately locate the image background and the object to be detected, and to accurately understand the natural semantics of the given text information. Most importantly, the above visual features and text features need to be semantically aligned and fused through a cross-modal attention mechanism. Finally, under the guidance of natural language, objects that match the semantics of the text are accurately located and segmented from the image background and several objects to be detected.
[0006] The present invention constructs a cross-modal interactive reasoning network of a codec architecture, which gradually realizes the rough positioning and fine segmentation of the referred object from the image under the guidance of a given natural language text description. Specifically, the present invention first proposes a new encoding method, which embeds text features in each stage of visual feature extraction to achieve cross-modal joint encoding to enhance the model's comprehensive understanding of visual information and language information; secondly, the present invention proposes a cross-graph interactive positioning module, which uses the advantages of multimodal graph modeling to perform graph reasoning between text and vision, and the two fully interact and understand each other, so as to roughly locate the target object, which alleviates the common positioning error problem of previous models to a certain extent; finally, the present invention proposes a cross-modal attention enhancement decoder, which uses the idea of attention to sequentially refine the coarse cross-modal features from the encoding stage in the spatial and channel dimensions, thereby achieving a fine segmentation effect.
[0007] Terminology explanation:
[0008] 1. Visual feature extraction model DeepLab-101, which is based on the classic convolutional neural network ResNet, and has been improved and expanded on this basis. The deep neural network consists of multiple convolutional layers and pooling layers to extract image features. The model can be divided into 5 levels as a whole, which extract visual features at different scales. The network is finally post-processed using the Atrous Spatial Pyramid Pooling (ASPP) module, which sets five convolution branches and realizes the extraction of multi-scale features by changing the expansion rate, so that the model can better meet the needs of image segmentation tasks.
[0009] 2. BERT, a natural semantic understanding model, is a deep neural network model based on Transformer, which aims to provide high-quality feature representation for natural language processing tasks. Transformer is a neural network model used to process sequence data. It uses a technology called "self-attention mechanism" to consider the relationship between sequence elements, enabling it to better process sequence data, which determines its ability to better process text information.
[0010] The technical solution of the present invention is:
[0011] Image referent object segmentation method based on cross-modal interactive reasoning, including:
[0012] Understand the given image and generate corresponding visual features;
[0013] Effectively represent the given query statement and generate text features;
[0014] In the process of gradually generating visual features, text features are embedded in sequence and jointly encoded with visual features;
[0015] Use deep visual features and text features to build multimodal graphs, perform cross-modal graph reasoning, and roughly locate target objects;
[0016] The cross-modal attention enhancement module is used to enhance cross-modal features at different scales and refine the image object segmentation results.
[0017] Preferably, according to the present invention, a visual feature extraction model DeepLab-101 is used to understand a given image and generate corresponding visual features.
[0018] Preferably, according to the present invention, a natural semantic understanding model BERT is used to effectively characterize a given query sentence and generate text features.
[0019] Preferably, according to the present invention, a cross-modal joint encoding module (TGMM-JE) is used to embed text features in sequence during the process of gradually generating visual features, and jointly encode them with the visual features, including:
[0020] The generated visual features are denoted as f v ; The generated text features are denoted as f e , text feature f e Including the whole sentence feature f el With the word-by-word feature f ew , for a given visual feature f v and word embedding f ew , by calculating the pixel-word affinity matrix A v→e To analyze the relationship between each pixel and each word, as shown in formula (1):
[0021]
[0022] In formula (1), w v and w ew are all learnable parameters. flatten(·) represents the operation of flattening a two-dimensional matrix into a one-dimensional vector. represents matrix multiplication;
[0023] By aggregating the relationship between each pixel and each word to evaluate the importance of each word, a new language expression understanding is generated with the assistance of visual information, called visually aware word embedding, as shown in formula (2):
[0024]
[0025] In formula (2), GAP(·) represents the global average pooling operation; repeat(·) represents replication in a specific dimension; ⊙ represents element-by-element multiplication between matrices; is the text feature after embedding the visual information;
[0026] Combined with updated text features and the original text feature, i.e., the whole sentence feature f el , get the new semantic vector of the whole sentence level As shown in formula (3):
[0027]
[0028] Newly acquired indicates enhanced language expression, including understanding of visual information;
[0029] By fusing enhanced language expressions and visual features, the visual features and language features are jointly encoded to generate a visual-language joint embedding f v,e , as shown in formula (4):
[0030]
[0031] In formula (4), λ is a learnable parameter used to adjust the influence of multimodal embedding on the original visual features; ⊙ represents the element-by-element multiplication between matrices; repeat(·) represents replication in a specific dimension;
[0032] The outputs corresponding to the i-th layer are respectively recorded as and Among them, i∈{1,2,3,4,5}.
[0033] Preferably, according to the present invention, a cross-graph interactive positioning module (CGIP module) is used to construct a multimodal graph using deep visual features and text features, perform cross-modal graph reasoning, and perform rough positioning of the target object, including:
[0034] First, the visual features and Four times and two times downsampling are performed respectively and compared with the visual features Connect; again, perform a convolution operation on the connected visual features to generate visual features By visual features and word embedding f ew As input, graph reasoning is performed, including:
[0035] Each pixel and each word is used as a vertex of the two modal graphs to construct a cross-modal bipartite graph, whose adjacency matrix A e→v The calculation is shown in formula (5):
[0036]
[0037] In formula (5), w ew and w ve All are learnable parameters; Depend on and It is obtained by concatenation and convolution; Represents matrix multiplication;
[0038] By performing graph convolution operations on the cross-modal bipartite graph, the language expression and visual features influence each other, and important language information is transferred to the visual information along the weighted graph edges, as shown in formula (6):
[0039]
[0040] In formula (6), w c / i is a learnable parameter, Represents the important visual information obtained under the guidance of language expression. The reshape(·) operation reshapes the one-dimensional vector into a two-dimensional matrix;
[0041] use Each pixel of is used as a vertex to construct a complete graph, and a graph convolution operation is performed on the complete graph to aggregate important information on the complete graph, as shown in Equation (7) and Equation (8):
[0042]
[0043]
[0044] In formula (7) and formula (8), w v 2 e and w i / r are all learnable parameters, represents matrix multiplication, A v→v is the adjacency matrix of the complete graph; Gcn(·) is the graph convolution operation, and its specific calculation process is shown on the right side of formula (8). The output of the above operation is recorded as This is the coarse positioning feature obtained after the cross-graph interactive positioning module.
[0045] Will output Send it to the ASPP module to learn multi-scale information, further increase the receptive field, and get the final result
[0046] Preferably, according to the present invention, a newly designed cross-modal attention enhancement module (CMAE-DE) is used to enhance cross-modal features at different scales and refine the segmentation results, including:
[0047] First, a spatial attention map SA is generated using the cross-modal spatial attention submodule i ; As shown in formula (9):
[0048]
[0049] In formula (9), the reshape(·) operation reshapes the one-dimensional vector into a two-dimensional matrix;
[0050] By analyzing the spatial attention map SA i and visual feature maps The relationship between the channels of the channel vector As shown in formula (10):
[0051]
[0052] Use a multi-layer perceptron to learn a set of weights CA i To filter the features of different channels, as shown in formula (11):
[0053]
[0054] In formula (11), MLP(·) contains two linear operations;
[0055] Using channel attention CA i and spatial attention SA i Visual features in channel and spatial dimensions Continuous filtering is performed to remove irrelevant information and effectively emphasize the object being referred to, as shown in equations (12) and (13):
[0056]
[0057]
[0058] In formula (12) and formula (13), represents the multimodal features of cross-modal attention enhancement, sig(·) represents the sigmoid activation function; repeat(·) means to copy in a specific dimension to achieve dimension matching;
[0059] At this point, each layer has obtained the corresponding processing results, and the results of adjacent layers are fused together, as shown in formula (14):
[0060]
[0061] In formula (14), it will be used to guide the output of the next layer For each output Use 1×1 convolution to transform each output Mapped to two class score features P R , select the shallowest segmentation score P1 as the final result. P1 is a 0, 1 matrix of size H*W, where H and W are the height and width of the image, in pixels. P1 gives the prediction result of each pixel position of the original image, 1 represents the foreground, that is, the target described by the text, and 0 represents the background, that is, the irrelevant area.
[0062] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of an image-referent object segmentation method based on cross-modal interactive reasoning are implemented.
[0063] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of an image-referent object segmentation method based on cross-modal interactive reasoning.
[0064] Image-referenced object segmentation system based on cross-modal interactive reasoning, including:
[0065] The visual feature generation module is configured to: understand a given image and generate corresponding visual features;
[0066] The text feature generation module is configured to: effectively represent a given query sentence and generate text features;
[0067] The joint encoding module is configured to: embed text features in sequence during the process of gradually generating visual features, and jointly encode them with the visual features;
[0068] The coarse positioning module is configured to: construct a multimodal graph using deep visual features and text features, perform cross-modal graph reasoning, and perform coarse positioning of the target object;
[0069] The feature enhancement module is configured to: utilize the newly designed cross-modal attention enhancement module to enhance the cross-modal features at different scales and refine the segmentation results.
[0070] Compared with the prior art, the present invention has the following beneficial effects:
[0071] 1. This paper proposes a new text-guided multi-modality joint encoder (TGMM-JE), which can enhance language expression by combining the understanding of visual information, and then encode important visual features under the continuous guidance of language expression.
[0072] 2. The present invention proposes a cross-graph interactive positioning module (CGIP), which uses multimodal features and language features to construct a multimodal graph, and then locates the target object through cross-graph interaction and intra-graph reasoning.
[0073] 3. The present invention proposes a cross-modal attention enhanced decoder (CMAE-DE) to enhance multimodal features at multiple scales and gradually refine the features from the encoding stage from bottom to top to achieve fine segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a schematic diagram of the overall framework flow of the image-referent object segmentation method based on cross-modal interactive reasoning of the present invention;
[0075] Figure 2 Schematic diagram of the framework of the text-guided multi-modal joint encoder (TGMM-JE) of the present invention;
[0076] Figure 3 It is a schematic diagram of the framework of the cross-graph interactive positioning module (CGIP) of the present invention;
[0077] Figure 4 Schematic diagram of the cross-modal attention enhanced decoder (CMAE-DE) framework of the present invention;
[0078] FIG5( a ) is a schematic diagram of a first example of a visual display of an effect diagram of the present invention;
[0079] FIG5( b ) is a schematic diagram of a second example of a visual display of the effect diagram of the present invention;
[0080] FIG. 5( c ) is a third schematic diagram of a visual display example of the effect diagram of the present invention. DETAILED DESCRIPTION
[0081] The present invention will be further defined below in conjunction with the accompanying drawings and embodiments, but is not limited thereto.
[0082] Example 1
[0083] Image-based object segmentation methods based on cross-modal interactive reasoning, such as Figure 1 As shown in the figure, the image object referred to by a given natural language expression is segmented by constructing a Cross-Modal Interactive Reasoning Network (CMIRNet) model. It includes:
[0084] Understand the given image and generate corresponding visual features;
[0085] Effectively represent the given query statement and generate text features;
[0086] In the process of gradually generating visual features, text features are embedded in sequence and jointly encoded with visual features;
[0087] Use deep visual features and text features to build multimodal graphs, perform cross-modal graph reasoning, and roughly locate target objects;
[0088] The newly designed cross-modal attention enhancement module is used to enhance cross-modal features at different scales and refine the image object segmentation results.
[0089] Example 2
[0090] The difference between the image-referenced object segmentation method based on cross-modal interactive reasoning described in Example 1 is that:
[0091] like Figure 2 As shown, the visual feature extraction model DeepLab-101 is used to understand the given image and generate corresponding visual features.
[0092] The visual feature extraction model DeepLab-101 is used to encode the image and generate corresponding visual features. The visual features are mapped into high-dimensional, abstract data information through a deep learning network, and the color, texture, shape and other features in the image are expressed in the form of a matrix, which is conducive to subsequent operations.
[0093] like Figure 2 As shown in the figure, the natural semantic understanding model BERT is used to effectively represent the given query sentence and generate text features.
[0094] The natural semantic understanding model BERT is used to encode the text and generate text features. Similar to visual features, this text feature also uses deep learning methods to achieve the mapping from text to high-dimensional, abstract data, and expresses the information contained in the text in the form of a matrix to facilitate subsequent processing, which is more conducive to the integration and understanding of visual information and text information.
[0095] Example 3
[0096] The image-referenced object segmentation method based on cross-modal interactive reasoning according to any one of Embodiments 1 or 2 is different in that:
[0097] Using the cross-modal joint encoding module (TGMM-JE), text features are embedded in sequence during the gradual generation of visual features and jointly encoded with visual features, including:
[0098] The generated visual features are denoted as fv ; The generated text features are denoted as f e , text feature f e Including the whole sentence feature f el With the word-by-word feature f ew , where the whole sentence feature is a single vector, which encompasses the information expressed by the entire sentence as a whole, and has a global understanding of the text; while the word-by-word feature is composed of N vectors, each of which encompasses the information expressed by each word, and has a word-by-word understanding of the text, where N is the number of words in the sentence.
[0099] For a given visual feature f v and word embedding f ew , by calculating the pixel-word affinity matrix A v→e To analyze the relationship between each pixel and each word, as shown in formula (1):
[0100]
[0101] In formula (1), w v and w ew are all learnable parameters. flatten(·) represents the operation of flattening a two-dimensional matrix into a one-dimensional vector. represents matrix multiplication;
[0102] By aggregating the relationship between each pixel and each word to evaluate the importance of each word, a new language expression understanding is generated with the assistance of visual information, called visually aware word embedding, as shown in formula (2):
[0103]
[0104] In formula (2), GAP(·) represents the global average pooling operation; repeat(·) represents replication in a specific dimension to meet the dimension matching requirement; ⊙ represents the element-by-element multiplication between matrices; The text features are embedded with visual information, which have a better cross-modal understanding of the task;
[0105] Combined with updated text features and the original text feature, i.e., the whole sentence feature f el , get the new semantic vector of the whole sentence level As shown in formula (3):
[0106]
[0107] Newly acquired indicates enhanced language expression, including understanding of visual information;
[0108] By fusing enhanced language expressions and visual features, the visual features and language features are jointly encoded to generate a visual-language joint embedding f v,e , as shown in formula (4):
[0109]
[0110] In formula (4), λ is a learnable parameter used to adjust the impact of multimodal embedding on the original visual features; ⊙ represents the element-by-element multiplication between matrices; repeat(·) represents replication in a specific dimension to meet the dimension matching requirements;
[0111] The outputs corresponding to the i-th layer are respectively recorded as and Among them, i∈{1,2,3,4,5}.
[0112] The visual feature extraction model DeepLab-101 contains a total of 5 encoding blocks. The encoding process is carried out sequentially. The output of each layer is processed using a cross-modal joint encoding module (TGMM-JE module). The visual embedding word vector generated by formula (3) is The visual-language joint embedding f generated by equation (4) v,e As the output of this module, it will be used in subsequent modules. To distinguish different layers, the output corresponding to the i-th layer is recorded as and Among them, i∈{1,2,3,4,5}.
[0113] Through the Cross-Graph Interactive Localization Module (CGIP module), deep visual features and text features are used to build a multimodal graph, perform cross-modal graph reasoning, and perform rough localization of the target object, including:
[0114] Extract the output of the 3rd, 4th and 5th layers of the TGMM-JE module As the input of the CGIP module, where i∈{3,4,5}. In addition, the text word-by-word features f generated by the natural semantic understanding model BERT ew It is also sent to the CGIP module as input. Figure 3 As shown, in order to capture multi-scale visual information, first, the visual features and Four times and two times downsampling are performed respectively and compared with the visual features Connect; again, perform a convolution operation on the connected visual features to generate visual features By visual features and word embedding f ew As input, graph reasoning is performed, including:
[0115] Each pixel and each word is used as a vertex of the two modal graphs to construct a cross-modal bipartite graph, whose adjacency matrix A e→v The calculation is shown in formula (5):
[0116]
[0117] In formula (5), w ew and w ve All are learnable parameters; Depend on and It is obtained by concatenation and convolution; Represents matrix multiplication;
[0118] By performing graph convolution operations on the cross-modal bipartite graph, the language expression and visual features influence each other, and important language information is transferred to the visual information along the weighted graph edges, as shown in formula (6):
[0119]
[0120] In formula (6), w cgi is a learnable parameter, Represents the important visual information obtained under the guidance of language expression. The reshape(·) operation reshapes the one-dimensional vector into a two-dimensional matrix;
[0121] use Each pixel of is used as a vertex to construct a complete graph, and a graph convolution operation is performed on the complete graph to aggregate important information on the complete graph, as shown in Equation (7) and Equation (8):
[0122]
[0123]
[0124] In formula (7) and formula (8), w′ ve and w igr are all learnable parameters, represents matrix multiplication; A v→v is the adjacency matrix of the complete graph; Gcn(·) is the graph convolution operation, and its specific calculation process is shown on the right side of formula (8). The output of the above operation is recorded as This is the coarse positioning feature obtained after the cross-graph interactive positioning module.
[0125] Will output Send it to the ASPP module to learn multi-scale information, further increase the receptive field, and get the final result The ASPP module mentioned here is a module used for post-processing visual features in the visual feature extraction model DeepLab-101.
[0126] The newly designed cross-modal attention enhancement module (CMAE-DE) is used to enhance cross-modal features at different scales and refine the segmentation results, including:
[0127] As mentioned above, the output of each layer of the encoding block of the visual feature extraction model DeepLab-101 is processed using the TGMM-JE module. The output of each layer of this module (visual embedding word vector and cross-modal features ) and then sent to the CMAE-DE module to perform the following operations.
[0128] like Figure 4 As shown, we first use the cross-modal spatial attention submodule to generate a spatial attention map SA i ; If a pixel is expressed in language If the SA is highly correlated, the corresponding position is highlighted, and vice versa. i The weights in reflect the possibility of pixels belonging to the referenced object and can be used to enhance the target in subsequent operations: as shown in formula (9):
[0129]
[0130] In formula (9), the reshape(·) operation reshapes the one-dimensional vector into a two-dimensional matrix;
[0131] Cross-modal channel attention is used to measure the importance of reference features in channel localization. By analyzing the spatial attention map SA i and visual feature maps The relationship between the channels of the channel vector As shown in formula (10):
[0132]
[0133] In order to further improve those channels with special segmentation effects and reduce the importance of invalid channels, a multi-layer perception is used to learn a set of weights CA i To filter the features of different channels, as shown in formula (11):
[0134]
[0135] In formula (11), MLP(·) contains two linear operations;
[0136] So far, channel attention CA i and spatial attention SA i All have been generated. Using channel attention CA i and spatial attention SA i Visual features in channel and spatial dimensions Continuous filtering is performed to remove irrelevant information and effectively emphasize the object being referred to, as shown in equations (12) and (13):
[0137]
[0138]
[0139] In formula (12) and formula (13), represents the multimodal features enhanced by cross-modal attention, sig(·) represents the sigmoid activation function, and repeat(·) means duplication in a specific dimension to meet the dimension matching requirement.
[0140] At this point, each layer has obtained the corresponding processing results, and the results of adjacent layers are fused together to realize the decoding process, as shown in formula (14):
[0141]
[0142] In formula (14), it will be used to guide the output of the next layer For further refinement and enhancement. Use 1×1 convolution to transform each output Mapped to two class score features P R , select the shallowest segmentation score P1 as the final result. P1 is a 0, 1 matrix of size H*W, where H and W are the height and width of the image, respectively, in pixels. P1 gives the prediction result of each pixel position of the original image, 1 represents the foreground, that is, the target described by the text, and 0 represents the background, that is, the irrelevant area. The output visualization of some cases of the present invention is shown in Figure 5(a), Figure 5(b), and Figure 5(c).
[0143] The performance evaluation process is as follows:
[0144] The present invention was trained and tested on three datasets: refcoco, refcoco+, and G-Ref, and the final performance is shown in Table 3. The data in Table 3 show that the present invention has a clear advantage in comparison with the model using the traditional convolutional neural network as the backbone network, and ranks first on most datasets and second on some datasets. For the sake of fairness, when comparing with the transformer-based model, the present invention also replaces the backbone network with the transformer-based swin-transformer. As shown in the table data, the model of the present invention ranks first on all datasets.
[0145] Table 1 introduces the comparison models;
[0146] Table 1
[0147]
[0148] Table 2 introduces the international standard datasets for evaluating performance;
[0149] Table 2
[0150] International Annotated Datasets Dataset Links RefCOCO https: / / bvisionweb1.cs.unc.edu / licheng / referit / data / refcoco.zip RefCOCO+ https: / / bvisionweb1.cs.unc.edu / licheng / refefit / data / refcoco+.zip G-Ref https: / / bvisionweb1.cs.unc.edu / licheng / referit / data / refcocog.zip
[0151] Table 3 is a performance comparison of the present invention and other models;
[0152] Table 3
[0153]
[0154] Note: The evaluation index is the overall intersection over union (oIoU), which is used to comprehensively evaluate the overlap between the predicted image and the true image. The larger the value, the better. The best result is in bold font, and the second best result is underlined. "-" indicates that no data is available.
[0155] Example 4
[0156] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the image reference object segmentation method based on cross-modal interactive reasoning described in any one of Examples 1-3 are implemented.
[0157] Example 5
[0158] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the image-referenced object segmentation method based on cross-modal interactive reasoning described in any one of Examples 1-3.
[0159] Example 6
[0160] Image-referenced object segmentation system based on cross-modal interactive reasoning, including:
[0161] The visual feature generation module is configured to: understand a given image and generate corresponding visual features;
[0162] The text feature generation module is configured to: effectively represent a given query sentence and generate text features;
[0163] The joint encoding module is configured to: embed text features in sequence during the process of gradually generating visual features, and jointly encode them with the visual features;
[0164] The coarse positioning module is configured to: construct a multimodal graph using deep visual features and text features, perform cross-modal graph reasoning, and perform coarse positioning of the target object;
[0165] The feature enhancement module is configured to: utilize the newly designed cross-modal attention enhancement module to enhance the cross-modal features at different scales and refine the segmentation results.
Claims
1. An image-referent object segmentation method based on cross-modal interactive reasoning, characterized in that: include: Understand the given image and generate corresponding visual features; Effectively represent the given query statement and generate text features; In the process of gradually generating visual features, text features are embedded in sequence and jointly encoded with visual features; Use deep visual features and text features to build multimodal graphs, perform cross-modal graph reasoning, and roughly locate target objects; The cross-modal attention enhancement module is used to enhance cross-modal features at different scales and refine the image object segmentation results. In the process of gradually generating visual features, text features are embedded in sequence and jointly encoded with visual features, including: The generated visual features are denoted as f v ; The generated text features are denoted as f e , text feature f e Including the whole sentence feature f el With the word-by-word feature f ew , for a given visual feature f v and word-by-word features f ew , by calculating the pixel-word affinity matrix A v→e To analyze the relationship between each pixel and each word, as shown in formula (1): In formula (1), w v and w ew are all learnable parameters. flatten(·) represents the operation of flattening a two-dimensional matrix into a one-dimensional vector. represents matrix multiplication; By aggregating the relationship between each pixel and each word to evaluate the importance of each word, a new language expression understanding is generated with the assistance of visual information, called visually aware word embedding, as shown in formula (2): In formula (2), GAP(·) represents the global average pooling operation; repeat(·) represents replication in a certain dimension, and ⊙ represents the element-by-element multiplication between matrices; is the text feature after embedding the visual information; Combined with updated text features and the original text feature, i.e., the whole sentence feature f el , get the new semantic vector of the whole sentence level As shown in formula (3): Newly Acquired indicates enhanced language expression, including understanding of visual information; By fusing enhanced language expressions and visual features, the visual features and language features are jointly encoded to generate a visual-language joint embedding f v,e , as shown in formula (4): In formula (4), λ is a learnable parameter used to adjust the impact of multimodal embedding on the original visual features; ⊙ represents the element-by-element multiplication between matrices; repeat(·) represents replication in a certain dimension; The outputs corresponding to the i-th layer are respectively recorded as and Among them, i∈{1,2,3,4,5}.
2. The image-referent object segmentation method based on cross-modal interactive reasoning according to claim 1 is characterized in that: The visual feature extraction model DeepLab-101 is used to understand the given image and generate corresponding visual features.
3. The image-referent object segmentation method based on cross-modal interactive reasoning according to claim 1 is characterized in that: The natural semantic understanding model BERT is used to effectively represent the given query statement and generate text features.
4. The image-referent object segmentation method based on cross-modal interactive reasoning according to claim 1 is characterized in that: Use deep visual features and text features to build multimodal graphs, perform cross-modal graph reasoning, and roughly locate target objects, including: First, the visual features and Four times and two times downsampling are performed respectively and compared with the visual features Connect; again, perform a convolution operation on the connected visual features to generate visual features By visual features and word-by-word features f ew As input, graph reasoning is performed.
5. The image-referent object segmentation method based on cross-modal interactive reasoning according to claim 4 is characterized in that: Use deep visual features and text features to build multimodal graphs, perform cross-modal graph reasoning, and roughly locate target objects, including: Each pixel and each word is used as a vertex of the two modal graphs to construct a cross-modal bipartite graph, whose adjacency matrix A e→v The calculation is shown in formula (5): In formula (5), w ew and w ve All are learnable parameters; Depend on and It is obtained by concatenation and convolution; Represents matrix multiplication; By performing graph convolution operations on the cross-modal bipartite graph, the language expression and visual features influence each other, and important language information is transferred to the visual information along the weighted graph edges, as shown in formula (6): In formula (6), w cgi is a learnable parameter, Represents the important visual information obtained under the guidance of language expression. The reshape(·) operation reshapes the one-dimensional vector into a two-dimensional matrix; use Each pixel of is used as a vertex to construct a complete graph, and a graph convolution operation is performed on the complete graph to aggregate important information on the complete graph, as shown in Equation (7) and Equation (8): In formula (7) and formula (8), w v ' e and w igr are all learnable parameters, represents matrix multiplication, A v→v is the adjacency matrix of the complete graph; Gcn(·) is the graph convolution operation; Will output Send it to the ASPP module to learn multi-scale information, further increase the receptive field, and get the final result 6. The image-referenced object segmentation method based on cross-modal interactive reasoning according to any one of claims 1 to 5, characterized in that: The cross-modal attention enhancement module is used to enhance the cross-modal features at different scales and refine the segmentation results, including: First, a spatial attention map SA is generated using the cross-modal spatial attention submodule i ; As shown in formula (9): In formula (9), the reshape(·) operation reshapes the one-dimensional vector into a two-dimensional matrix; By analyzing the spatial attention map SA i and visual feature maps The relationship between the channels of the channel vector As shown in formula (10): Use a multi-layer perceptron to learn a set of weights CA i To filter the features of different channels, as shown in formula (11): In formula (11), MLP(·) contains two linear operations; Using channel attention CA i and spatial attention SA i Visual features in channel and spatial dimensions Perform continuous filtering to remove irrelevant information and emphasize the object, as shown in equations (12) and (13): In formula (12) and formula (13), represents the multimodal features of cross-modal attention enhancement, sig(·) represents the sigmoid activation function; repeat(·) represents replication in a certain dimension; At this point, each layer has obtained the corresponding processing results, and the results of adjacent layers are fused together, as shown in formula (14): In formula (14), it will be used to guide the output of the next layer For each output Use 1×1 convolution to transform each output Mapped to two class score features P R , select the shallowest segmentation score P Q As the final result; P1 is a 0, 1 matrix of size H*W, where H and W are the height and width of the image, respectively, in pixels; P1 gives the prediction result of each pixel position of the original image, 1 represents the foreground, that is, the target described by the text, and 0 represents the background, that is, the irrelevant area.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the image reference object segmentation method based on cross-modal interactive reasoning described in any one of claims 1-6 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image reference object segmentation method based on cross-modal interactive reasoning described in any one of claims 1-6 are implemented.
9. Image-referenced object segmentation system based on cross-modal interactive reasoning, characterized in that: include: The visual feature generation module is configured to: understand a given image and generate corresponding visual features; The text feature generation module is configured to: effectively represent a given query sentence and generate text features; The joint encoding module is configured to: embed text features in sequence during the process of gradually generating visual features, and jointly encode them with the visual features; The coarse positioning module is configured to: construct a multimodal graph using deep visual features and text features, perform cross-modal graph reasoning, and perform coarse positioning of the target object; The feature enhancement module is configured to: utilize the newly designed cross-modal attention enhancement module to enhance the cross-modal features at different scales and refine the segmentation results; In the process of gradually generating visual features, text features are embedded in sequence and jointly encoded with visual features, including: The generated visual features are denoted as f v ; The generated text features are denoted as f e , text feature f e Including the whole sentence feature f el With the word-by-word feature f ew , for a given visual feature f v and word-by-word features f ew , by calculating the pixel-word affinity matrix A v→e To analyze the relationship between each pixel and each word, as shown in formula (1): In formula (1), w v and w ew are all learnable parameters. flatten(·) represents the operation of flattening a two-dimensional matrix into a one-dimensional vector. represents matrix multiplication; By aggregating the relationship between each pixel and each word to evaluate the importance of each word, a new language expression understanding is generated with the assistance of visual information, called visually aware word embedding, as shown in formula (2): In formula (2), GAP(·) represents the global average pooling operation; repeat(·) represents replication in a specific dimension, and ⊙ represents element-by-element multiplication between matrices; is the text feature after embedding the visual information; Combined with updated text features and the original text feature, i.e., the whole sentence feature f el , get the new semantic vector of the whole sentence level As shown in formula (3): Newly Acquired indicates enhanced language expression, including understanding of visual information; By fusing enhanced language expressions and visual features, the visual features and language features are jointly encoded to generate a visual-language joint embedding f v,e , as shown in formula (4): In formula (4), λ is a learnable parameter used to adjust the influence of multimodal embedding on the original visual features; ⊙ represents the element-by-element multiplication between matrices; repeat(·) represents replication in a specific dimension; The outputs corresponding to the i-th layer are respectively recorded as and Among them, i∈{1,2,3,4,5}.
