A visual question answering method and system based on multi-granularity text representation and image-text fusion

Through hierarchical dilated convolution and image-text adaptive fusion technology, the problem of coarse-grained text feature representation and modal fusion weight adjustment in visual question and answer is solved, multi-level feature fusion and dynamic calculation of attention weights are realized, and the performance of visual question and answer is improved. Accuracy.

CN114925703BActive Publication Date: 2024-09-10QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210667045.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2024-09-10
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

In the existing visual question and answer technology, text feature representation is coarse-grained, resulting in the singleness of information extraction and the inability to fully utilize deep semantics. The multi-modal fusion method of image and text fails to consider modal differences and cannot independently adjust feature weights.

Method used

Hierarchical dilated convolution is used to extract multi-level text features, and through adaptive image and text fusion, Transformer is used instead of the traditional splicing method to dynamically calculate the attention weight of modal features and fuse high-order feature vectors.

Benefits of technology

Effectively retain the multi-level features of text, dynamically focus on image and text elements, and improve the accuracy of visual question and answer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925703B
    Figure CN114925703B
Patent Text Reader

Abstract

The present invention relates to a visual question-answering method and system with multi-granularity text representation and image-text fusion, comprising the following steps: obtaining an image and a question text corresponding to the image to obtain image features; extracting sentence information of different levels in the question text through hierarchical dilated convolution to form text features; after vector splicing the obtained image features and text features, fusing high-order features of different modalities through the Transformer layer to obtain an adaptive fused feature vector, converting it into a candidate answer dimension through linear transformation, and obtaining the prediction result of the answer through a prediction function. In the text feature representation, a multi-level text information description is performed to retain the multi-level features of the text, and the high-order feature vectors of different modalities are fused in a way of adaptive image-text fusion to accurately express the question theme and meaning from multiple levels. After fusion, the attention weight of the image text can be dynamically calculated to better predict the answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of visual question answering, and specifically to a visual question answering method and system with multi-granularity text representation and image-text fusion. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Visual Question Answering (VQA) takes image information and text question information related to the image as computer input, and enables the computer to obtain the answer to the question by understanding and reasoning about the two modalities of information, image and text.

[0004] In the existing relevant technologies and methods, the computer obtains the answer to the question by extracting text features and image features and fusing them. On the one hand, the representation of text features is mostly coarse-grained extraction, which makes the information extraction single, resulting in the loss of text information and the inability to fully utilize the deep semantics of the text; on the other hand, the multimodal fusion method of image and text is mostly based on the feature level fusion of vector splicing. This type of method fails to consider the differences between different modalities and cannot autonomously adjust the weights of each modal feature during fusion. Summary of the invention

[0005] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a visual question answering method and system with multi-granularity text representation and image-text fusion. In the text feature representation, a hierarchical dilated convolution method is introduced. Multi-level text information description is performed in this way, which can better retain the multi-level features of the text. In addition, an image-text adaptive fusion method is used, and Transformer is adopted instead of the traditional splicing method to fuse high-order feature vectors of different modalities. At the same time, the automatic fusion mechanism is used to dynamically calculate the attention weights of image and text feature vectors to represent the importance of information in different modalities, thereby correctly focusing on image and text elements to better predict the answer, thereby improving the accuracy of visual question answering.

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

[0007] A first aspect of the present invention provides a visual question answering method with multi-granularity text representation and image-text fusion, comprising the following steps:

[0008] Obtain the picture and the question text corresponding to the picture to obtain the picture features;

[0009] Through hierarchical dilated convolution, sentence information at different levels in the question text is extracted to form text features;

[0010] After vector concatenation of the obtained image features and text features, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, which is converted into the candidate answer dimension through linear transformation, and the prediction result of the answer is obtained through the prediction function.

[0011] The sentence information at different levels in the question text is extracted through hierarchical dilated convolution to form text features, specifically:

[0012] Use hierarchical dilated convolutional networks to obtain multi-granular semantic features of question text;

[0013] Set a gradually increasing expansion rate r = n, n = 1, 2, 3...n, and stack the expanded convolutions in layers. The length of the convolution text segment expands exponentially to cover the semantic features of different n-grams.

[0014] The output of each stacked layer L is saved as a feature map of the text at a specific level of granularity:

[0015]

[0016] Where, given the sequence of sentences: d = [x1, x2, ... x N ], the sentence sequence d is converted into a matrix d 0 =[X1,X1,......X N ], fs represents the number of filters in each layer. If there are L layers, the multi-granularity question text definition [d 0 ,d 1 ,......,d L ], the hierarchical dilated convolutional network gradually acquires lexical and semantic features from the word and phrase level with small dilation rate.

[0017] After the obtained image features and text features are vectorized, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, specifically:

[0018] The obtained image features and text features are passed into the collaborative attention network, and the updated text and image features are obtained by learning the relationship between multimodalities;

[0019] The updated text and image features are vector-concatenated, and the concatenated vectors are fused with high-order vectors of different modalities to obtain an adaptive fused feature vector, and the original connection vector is reconstructed from the automatically fused latent vector;

[0020] Minimizing the Euclidean metric between the original and reconstructed vectors ensures that the learned self-fused vector does not contain any signal from the input concatenated latent vector.

[0021] The collaborative attention network includes at least one group of connected self-attention units and guided attention units; the self-attention unit includes a multi-head attention layer and a measurement point feedforward layer connected together, which is used to learn the relationship between samples in the same modality; the guided attention unit has the same structure as the self-attention unit, using one modality to guide another modality, which is used to represent the feature relationship between different modalities.

[0022] A second aspect of the present invention provides a system for implementing the above method, comprising:

[0023] The image feature extraction module is configured to: obtain an image and a question text corresponding to the image to obtain image features; according to the question text corresponding to the image, extract sentence information of different levels in the question text through hierarchical dilated convolution to form text features;

[0024] The fusion prediction module is configured as follows: after vector concatenation of the obtained image features and text features, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, which is converted into a candidate answer dimension through a linear transformation, and the prediction result of the answer is obtained through the prediction function.

[0025] A third aspect of the present invention provides a computer-readable storage medium.

[0026] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the visual question answering method of multi-granularity text representation and image-text fusion as described above.

[0027] A fourth aspect of the present invention provides a computer device.

[0028] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the visual question answering method of multi-granularity text representation and image-text fusion as described above are implemented.

[0029] Compared with the prior art, one or more of the above technical solutions have the following beneficial effects:

[0030] 1. Multi-level description of text information in text feature representation can better retain the multi-level features of the text, and the adaptive fusion of images and texts is used instead of the traditional splicing method, thereby fusing high-order feature vectors of different modalities. It can accurately express the theme and meaning of the question from multiple levels of words, vocabulary, and sentences. The fused high-order feature vectors can dynamically calculate the attention weight of the image text and correctly focus on the image and text elements to better predict the answer.

[0031] 2. Use the automatic fusion mechanism to dynamically calculate the attention weights of image and text feature vectors to indicate the importance of information in different modalities, thereby correctly focusing on image and text elements to better predict answers and thus improve the accuracy of visual question answering. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0033] Figure 1 is a schematic diagram of the overall process of the visual question answering method provided by one or more embodiments of the present invention;

[0034] Figure 2 It is a schematic diagram of a hierarchical dilated convolutional network structure for multi-granularity text information representation provided by one or more embodiments of the present invention;

[0035] 3(a)-(c) are schematic diagrams of a Self-Attention network structure, a Guided-Attention network structure, and a Collaborative Attention module network structure, respectively, provided by one or more embodiments of the present invention;

[0036] Figure 4 is a schematic diagram of a graphic-text adaptive fusion network structure provided by one or more embodiments of the present invention;

[0037] Figure 5 is a schematic diagram of ablation experiment results using the VQA2.0 dataset on the MGMCAN model provided by one or more embodiments of the present invention;

[0038] Figure 6 It is a schematic diagram of the overall architecture of the Transformer provided by one or more embodiments of the present invention. DETAILED DESCRIPTION

[0039] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0040] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0041] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0042] As described in the background technology, in the existing related technologies and methods, the computer obtains the answer to the question by extracting text features and image features and fusing them. On the one hand, the representation of text features is mostly coarse-grained extraction, which makes the information extraction single, resulting in the loss of text information and the inability to fully utilize the deep semantics of the text; on the other hand, the multimodal fusion method of image and text is mostly based on the feature level fusion of vector splicing. This type of method fails to take into account the differences between different modalities and cannot autonomously adjust the weights of each modal feature during fusion.

[0043] Therefore, the following embodiments provide a visual question answering method and system with multi-granularity text representation and image-text fusion. In the text feature representation, a hierarchical dilated convolution method is introduced, through which multi-level text information description is performed, which can better retain the multi-level features of the text, and uses an image-text adaptive fusion method, using Transformer instead of the traditional splicing method to fuse high-order feature vectors of different modalities. At the same time, the automatic fusion mechanism is used to dynamically calculate the attention weights of the image and text feature vectors to represent the importance of different modal information, thereby correctly focusing on the image and text elements to better predict the answer, thereby improving the accuracy of visual question answering.

[0044] Embodiment 1:

[0045] like Figure 1-5 As shown, a visual question answering method with multi-granularity text representation and image-text fusion includes the following steps:

[0046] Obtain the picture and the question text corresponding to the picture to obtain the picture features;

[0047] Through hierarchical dilated convolution, sentence information at different levels in the question text is extracted to form text features;

[0048] After vector concatenation of the obtained image features and text features, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, which is converted into the candidate answer dimension through linear transformation, and the prediction result of the answer is obtained through the prediction function.

[0049] Specific:

[0050] 1 Visual and Textual Feature Representation

[0051] like Figure 1 As shown in Figure 1, visual feature representation: Faster R-CNN (the main skeleton network is ResNet-101) is used to detect the target features of the image on the visual genome. A confidence threshold is set for the detected target to obtain the dynamic target object feature N∈[10,100], where the target feature comes from the feature map after RoI pooling. For the i-th object, the convolutional features of its detection area are averaged and pooled to obtain the feature

[0052] like Figure 1-2 As shown in the figure, text feature representation: the hierarchical dilated convolutional network (HECN) is used to learn the representation of question features from multiple semantic entities. By designing the hole rate sequence [r1,...,r i ,...,r n ] to achieve full coverage of the receptive field. Use a smaller hole rate to extract word and vocabulary information, and use a larger hole rate to extract sentence information. This method can not only obtain information from a wider area, but also improve the utilization of information while keeping the size of the receptive field unchanged.

[0053] a: given sentence sequence: d = [x1, x2, ... x N ]

[0054] b: The hierarchical expansion encoder converts the sentence sequence d into a matrix: d 0 =[X1,X1,......X N ]

[0055] c: Use hierarchical convolution expansion to capture the multi-granularity semantic features of the question text. The expanded convolution has a wider receptive field by skipping r input elements at a time.

[0056] First, setting r=1 (standard convolution) for the first time can ensure full coverage of the input text information and avoid partial loss of information.

[0057] Second, by stacking dilated convolutions with wider dilation rates (r=2, r=3), the length of the convolutional text segment is exponentially expanded, using several layers (here set to 3 layers) and a moderate number of parameters to cover the semantic features of different n-grams.

[0058] In addition, to prevent the gradient from disappearing or exploding, layer normalization is applied at the end of each convolutional layer. Since irrelevant information may be introduced into the semantic unit, a multi-level expansion rate based on verification performance is designed. The output of each stacked layer L is saved as a feature map of the text at a specific granularity level, formulated as the output of each stacked layer L is saved as the feature of the text at a specific granularity level:

[0059]

[0060] Where fs represents the number of filters in each layer. If there are L layers, the multi-granularity problem text definition [d 0 ,d 1 ,......,d L ]. In this way, the Hierarchical Dilated Convolutional Network (HECN) gradually acquires lexical and semantic features from the word and phrase level with a small dilation rate, and captures long-term dependencies from the sentence level with a large dilation rate. At the same time, the calculation path is greatly shortened, reducing the negative impact of information loss caused by downsampling methods such as maximum pooling.

[0061] 2 Collaborative Attention Module

[0062] As shown in Figure 3, the extracted text and visual vectors are passed into the collaborative attention network, and the relationship between multimodalities is learned through the common attention module to obtain updated text and visual features.

[0063] The basic component of the Co-Attention Network is the Modular Co-Attention (MCA) layer, which is composed of two basic attention units, namely the Self-Attention Unit (SA) shown in Figure 3(a) and the Guided Attention Unit (GA) shown in Figure 3(b). The SA unit consists of a multi-head attention layer and a point feed-forward layer, which is used to learn the relationship between samples in the same modality. The GA unit structure is similar to the SA unit, using one modality to guide another modality, and is used to represent the feature relationship between different modalities.

[0064] 3. Adaptive Fusion of Images and Text

[0065] like Figure 4 As shown in the figure, the image text features are first concatenated into vectors, and then the concatenated vectors are fused with high-order vectors of different modalities through the Transformer (a deep learning model based on the self-attention mechanism) layer to obtain an adaptive fused feature vector. The original connection vector is then reconstructed from the automatically fused latent vector. Finally, the Euclidean metric between the original vector and the reconstructed vector is minimized. This process ensures that the learned self-fusion vector does not contain any signal from the input cascade latent vector. In addition, the correlation between the self-fusion and connection latent vectors is increased.

[0066] The image-text adaptive fusion network should preserve as much information as possible from each modality. Given n d-dimensional multimodal vectors, First concatenate them to get a concatenation vector in,

[0067] Second, the transformation τ is applied to Its dimension is reduced to t. Then use To reshape the original connection vector Finally, calculate the loss J tr , that is, calculation and The loss between.

[0068] The automatic fusion network uses the mean square error (MSE) loss function, which is consistent with the motivation of compressing multimodal features and filtering out less useful signals. For automatic fusion, the intermediate variables As a fused multimodal representation. The MSE loss of the automatic fusion network is expressed as follows:

[0069] The overall architecture of the Transformer in this embodiment is as follows Figure 6 As shown, it can be divided into four modules: input module, encoding module, decoding module and output module.

[0070] Input module: source text embedding layer and position encoder and target text embedding layer and position encoder.

[0071] Encoder module: It is composed of N encoder layers stacked together; each encoder layer consists of two sub-layer connection structures; the first sub-layer connection structure includes a multi-head self-attention sub-layer, a normalization layer and a residual connection; the second sub-layer connection structure includes a feed-forward fully connected sub-layer, a normalization layer and a residual connection.

[0072] Decoder module: It is composed of N decoder layers stacked together; each decoder layer consists of three sub-layer connection structures; the first sub-layer connection structure includes a multi-head self-attention sub-layer, a normalization layer and a residual connection; the second sub-layer connection structure includes a multi-head attention sub-layer, a normalization layer and a residual connection; the third sub-layer connection structure includes a feed-forward fully connected sub-layer, a normalization layer and a residual connection.

[0073] Output module: linear layer and layer normalized softmax.

[0074] 4Visual Question Answering Answer Prediction

[0075] After the fusion feature is linearly transformed, the dimension is converted into the candidate answer dimension, and the answer prediction result is obtained through the Sigmoid function. The binary cross entropy (BCE) is used as the loss function to train the classification problem. The loss function is as follows:

[0076]

[0077] Where N is the number of types in the multi-classification, a i ′ is the predicted value of the i-th class, a i is the label value of the i-th class.

[0078] The Sigmoid function is used to solve the binary classification problem. It is a symbolic function that maps variables to between 0 and 1.

[0079] The formula for the Sigmoid function is as follows:

[0080] The above method can effectively extract multi-level features of text, use hierarchical dilated convolution to focus on the important parts of text information, and can accurately express the theme and meaning of the question from multiple levels of words, vocabulary, and sentences. In the feature fusion process, the Transformer layer is innovatively used to fuse high-order vectors of different modalities. The implementation of this strategy can dynamically calculate the attention weight of the image text and correctly focus on the image and text elements to better predict the answer.

[0081] The evaluation indicators of the improved model have been significantly improved, as follows:

[0082] Dataset. The VQA2.0 dataset is a commonly used benchmark dataset in VQA tasks. It consists of natural images in MSCOCO and adds corresponding manually annotated questions and answers. Each image corresponds to 3 questions and each question corresponds to 10 answers. The dataset is divided into: the training set contains 80K images and 444K question-answer pairs; the validation set contains 40K images and 214 question-answer pairs; the test set contains 80K images and 448K questions. Among them, the test set contains 2 test subsets test-dev and test-standard for online evaluation of model performance. The question types in the dataset are yes or no questions, target counting questions, and other questions.

[0083] Performance evaluation.

[0084] Table 1 is a comparison of the accuracy of the method of this embodiment and the current main visual question answering models on the VQA2.0 test set.

[0085] Table 1 Accuracy comparison

[0086]

[0087] This example evaluates the model on the VQA 2.0 dataset and compares it with other advanced methods. Table 1 shows the online evaluation experimental results using Test-dev and Test-std.

[0088] As can be seen from Table 1, firstly, for the classic attention-based methods BUTD and MFH, the method of this embodiment improves the overall accuracy by 5.53% in the VQA 2.0 dataset Test-dev. The reason is that the model does not consider multi-granular modeling and the collaborative attention relationship between text and images in the text modeling process.

[0089] Secondly, unlike the traditional method, this embodiment proposes a HECN framework model for multi-granularity text feature extraction, which can extract text information from multiple granularities through a three-layer hierarchy to ensure the integrity of the information. And compared with the recently proposed DFAF and MCAN, the method of this embodiment achieves better performance. In the process of multimodal information fusion, a simple splicing fusion strategy is no longer used, but a text-image adaptive fusion method is used. The implementation of this strategy can dynamically calculate the attention weight of the image text, and can correctly focus on the image and text elements to better predict the answer.

[0090] Finally, compared with the BAN method, the overall accuracy of this embodiment is significantly improved, but because the BAN method has a dedicated object counting performance module (ie, digital type), its counting class accuracy has better performance.

[0091] Ablation experiment.

[0092] In order to analyze the contribution and role of each part in the model, extensive ablation experiments were conducted on the proposed model on the VQA2.0 validation dataset to evaluate the role of each module and demonstrate the effectiveness of each part. The ablation models of each part are as follows:

[0093] BASE (LSTM+Co-Att+sum): Question encoding uses a long short-term memory neural network (LSTM), collaborative attention is used to model the dual modality, and multi-modal fusion adopts a simple addition and splicing method.

[0094] BASE+MGT(MGT+Co-Att+sum): Question encoding uses multi-granularity text information extraction based on hierarchical dilated convolution.

[0095] BASE+ATAF(LSTM+Co-Att+ATAF): Feature fusion adopts image and text adaptive fusion method.

[0096] BASE+MGT+ATAF (MGT+Co-Att+ATAF): Question encoding adopts a multi-granularity text feature extraction method, and feature fusion adopts a graphic and text adaptive fusion method.

[0097] The results are shown in Table 2:

[0098] Table 2 Comparison of ablation experiment results

[0099] Model Overall Yes / No Number Other BASE 81.22 95.69 67.26 73.9 BASE+MGT 82.17 96.25 70.38 74.65 BASE+ITAF 82.96 96.45 70.42 75.02 BASE+MGT+ITAF(OURS) 83.23 96.49 70.41 75.54

[0100] First, adding the MGT module improves the performance of visual question answering, which shows that the multi-granularity text feature extraction method can extract more useful information from the question text and make the composition of the question vector multi-layered and multi-angle. Secondly, the ITAF module also has a significant promoting effect on the performance of the model, which verifies that the image-text adaptive fusion technology can dynamically fuse the weights between various modalities and effectively improve the interaction of information.

[0101] Embodiment 2:

[0102] This embodiment provides a system for implementing the above method, including:

[0103] The image feature extraction module is configured to: obtain an image and a question text corresponding to the image, and obtain image features;

[0104] The text feature extraction module is configured to: extract sentence information of different levels in the question text through hierarchical dilated convolution to form text features according to the question text corresponding to the image;

[0105] The fusion prediction module is configured as follows: after vector concatenation of the obtained image features and text features, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, which is converted into a candidate answer dimension through a linear transformation, and the prediction result of the answer is obtained through the prediction function.

[0106] The method implemented by the system can effectively extract multi-level features of text, use hierarchical dilation convolution to focus on the important parts of text information, and can accurately express the theme and meaning of the question from multiple levels of words, vocabulary, and sentences. In the process of feature fusion, the Transformer layer is innovatively used to fuse high-order vectors of different modalities. The implementation of this strategy can dynamically calculate the attention weight of image text and correctly focus on image and text elements to better predict the answer.

[0107] Embodiment 3

[0108] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the visual question answering method of multi-granularity text representation and image-text fusion proposed in the above-mentioned embodiment 1 are implemented.

[0109] In the visual question-answering method of multi-granular text representation and image-text fusion executed by the computer program in this embodiment, it is possible to effectively extract multi-level features of the text, use hierarchical dilated convolution to focus on the important parts of the text information, and accurately express the theme and meaning of the question from multiple levels of words, vocabulary, and sentences. In the feature fusion process, the Transformer layer is innovatively used to fuse high-order vectors of different modalities. The implementation of this strategy can dynamically calculate the attention weight of the image text and correctly focus on the image and text elements to better predict the answer.

[0110] Embodiment 4

[0111] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the visual question answering method with multi-granularity text representation and image-text fusion proposed in the first embodiment are implemented.

[0112] In the visual question-answering method of multi-granular text representation and image-text fusion executed by the processor of this embodiment, multi-level features of text can be effectively extracted, and the important parts of text information can be focused on by using hierarchical dilated convolution, which can accurately express the theme and meaning of the question from multiple levels of words, vocabulary, and sentences. In the feature fusion process, the Transformer layer is innovatively used to fuse high-order vectors of different modalities. The implementation of this strategy can dynamically calculate the attention weight of the image text and correctly focus on the image and text elements to better predict the answer.

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

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

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

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

[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A visual question answering method with multi-granular text representation and image-text fusion, Features: The following steps are involved: Obtain the picture and the question text corresponding to the picture to obtain the picture features; Through hierarchical dilated convolution, sentence information at different levels in the question text is extracted to form text features; After the obtained image features and text features are vectorized, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, which is converted into the candidate answer dimension through linear transformation, and the prediction result of the answer is obtained through the prediction function; The text features are formed by extracting sentence information of different levels in the question text through hierarchical dilated convolution, including the following steps: Use hierarchical dilated convolutional networks to obtain multi-granular semantic features of question text; Set a gradually increasing expansion rate r=n, n=1, 2, 3...n, and stack the expanded convolutions in layers. The length of the convolution text segment expands exponentially to cover the semantic features of different n-grams. The output of each stacked layer L is saved as a feature map of the text at a specific level of granularity: ; Among them, given the sequence of sentences: , sentence sequence Converted into a matrix , It represents the number of filters per layer. If there are L layers, the multi-granularity question text definition ,The hierarchical dilated convolutional network gradually acquires lexical and semantic features from the word and phrase level with small dilation rate; After the obtained image features and text features are vectorized, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, including the following steps: The obtained image features and text features are passed into the collaborative attention network, and the updated text and image features are obtained by learning the relationship between multimodalities; The updated text and image features are vector-concatenated, and the concatenated vectors are fused with high-order vectors of different modalities to obtain an adaptive fused feature vector, and the original connection vector is reconstructed from the automatically fused latent vector; Minimizing the Euclidean metric between the original and reconstructed vectors ensures that the learned self-fused vector does not contain any signal from the input concatenated latent vector.

2. A visual question answering method with multi-granularity text representation and image-text fusion as claimed in claim 1, Features: The collaborative attention network includes at least one set of self-attention units and guided attention units connected together.

3. A visual question answering method with multi-granularity text representation and image-text fusion as claimed in claim 2, Features: The self-attention unit includes a multi-head attention layer and a measurement point feedforward layer connected together, which is used to learn the relationship between samples in the same modality; the guided attention unit structure is the same as the self-attention unit, using one modality to guide another modality to represent the feature relationship between different modalities.

4. A visual question answering system with multi-granular text representation and image-text fusion, It is characterized in that include: The feature extraction module is configured to: obtain a picture and a question text corresponding to the picture, and obtain picture features; According to the question text corresponding to the image, the sentence information of different levels in the question text is extracted through hierarchical dilated convolution to form text features; The fusion prediction module is configured as follows: after vector concatenation of the obtained image features and text features, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fusion feature vector, which is converted into a candidate answer dimension through a linear transformation, and the prediction result of the answer is obtained through the prediction function; The text features are formed by extracting sentence information of different levels in the question text through hierarchical dilated convolution, including the following steps: Use hierarchical dilated convolutional networks to obtain multi-granular semantic features of question text; Set a gradually increasing expansion rate r=n, n=1, 2, 3...n, and stack the expanded convolutions in layers. The length of the convolution text segment expands exponentially to cover the semantic features of different n-grams. The output of each stacked layer L is saved as a feature map of the text at a specific level of granularity: ; Among them, given the sequence of sentences: , sentence sequence Converted into a matrix , It represents the number of filters per layer. If there are L layers, the multi-granularity question text definition ,The hierarchical dilated convolutional network gradually acquires lexical and semantic features from the word and phrase level with small dilation rate; After the obtained image features and text features are vectorized, the high-order features of different modalities are fused through the Transformer layer to obtain an adaptive fused feature vector, including the following steps: The obtained image features and text features are passed into the collaborative attention network, and the updated text and image features are obtained by learning the relationship between multimodalities; The updated text and image features are vector-concatenated, and the concatenated vectors are fused with high-order vectors of different modalities to obtain an adaptive fused feature vector, and the original connection vector is reconstructed from the automatically fused latent vector; Minimizing the Euclidean metric between the original and reconstructed vectors ensures that the learned self-fused vector does not contain any signal from the input concatenated latent vector.

5. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps in a visual question answering method of multi-granularity text representation and image-text fusion as described in any one of claims 1-3 are implemented.

6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps in the visual question answering method of multi-granularity text representation and image-text fusion as described in any one of claims 1-3 are implemented.