Image-text matching method and system based on hierarchical feature aggregation

Through hierarchical feature aggregation and multi-modal feature fusion of the Transformer model, the problem of poor interactivity in image and text matching is solved, the accuracy and efficiency of matching are improved, and the semantic expression of objects is enhanced.

CN114491174BActive Publication Date: 2024-10-22HAINAN CHENYUN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111663219.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2024-10-22
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The existing technology cannot effectively explore the interaction between images and sentences in image-text matching, resulting in the inability to accurately retrieve the required multi-modal samples, and the inability to combine attribute information of objects and relationship information between objects, affecting semantic expression. .

Method used

Using a method based on hierarchical feature aggregation, the scene graph is obtained through image and text preprocessing, hierarchical feature aggregation is performed respectively, object features are reconstructed, and the Transformer model is used for multi-modal feature fusion, and the features are mapped to a common space. match.

Benefits of technology

It effectively reduces the complexity of cross-modal matching, improves algorithm efficiency, enhances the integrity of object semantics and the accuracy of cross-modal retrieval, and promotes the fusion of image and text features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491174B_ABST
    Figure CN114491174B_ABST
Patent Text Reader

Abstract

The present invention discloses an image-text matching method and system based on hierarchical feature aggregation, comprising: obtaining an image scene graph and a text scene graph after preprocessing an image and a text; performing hierarchical feature aggregation on the image scene graph and the text scene graph respectively to obtain the attributes of each object and the relationship between objects, thereby reconstructing the object features of the image modality and the object features of the text modality; performing multimodal feature fusion on the object features of the image modality and the object features of the text modality, mapping the fused features to a common space, measuring the distance between different modalities in the common space, and matching the image and the text according to the distance. The attribute information on each object node and the relationship information between objects are hierarchically aggregated to ensure the integrity of the object semantics, and then only the features of the object nodes are used for feature fusion, which effectively reduces the complexity of cross-modal matching and improves the efficiency of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cross-modal retrieval technology, and in particular to an image-text matching method and system based on hierarchical feature aggregation. 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] Cross-modal retrieval refers to retrieving content from all modalities (such as text) related to the query topic given a query in one modality (such as an image). The biggest challenge in modeling relationships between multimedia data is the heterogeneity gap between modalities. For example, image representations are usually continuous, while text representations are usually discrete. To address this problem, some methods leverage existing pre-trained models to obtain global features and map these features into a common space where multimodal features can be directly compared.

[0004] However, the above methods only use coarse-grained global features as sample representations and fail to explore the interaction between images and sentences, which is not conducive to accurately retrieving the required multimodal samples.

[0005] In order to more accurately align images and texts, some scholars have proposed fine-grained methods. However, there is a disadvantage in these fine-grained methods, that is, only aligning objects in the image, the text in the paragraph cannot be combined with more accurate high-level information, such as the attribute information of the object and the relationship information between objects, which is not conducive to image-text alignment; at the same time, when aligning images and texts, the attributes of the objects and the relationship between objects also have an important impact on semantic expression. Summary of the invention

[0006] In order to solve the above problems, the present invention proposes an image-text matching method and system based on hierarchical feature aggregation, which hierarchically aggregates the attribute information on each object node and the relationship information between objects to ensure the integrity of the object semantics, and then only uses the features of the object nodes for feature fusion, effectively reducing the complexity of cross-modal matching and improving the efficiency of the algorithm.

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

[0008] In a first aspect, the present invention provides an image-text matching method based on hierarchical feature aggregation, comprising:

[0009] After preprocessing the image and text, an image scene graph and a text scene graph are obtained;

[0010] Perform hierarchical feature aggregation on the image scene graph and the text scene graph respectively to obtain the attributes of each object and the relationship between objects, so as to reconstruct the object features of the image modality and the object features of the text modality;

[0011] Multimodal feature fusion is performed based on the object features of the image modality and the object features of the text modality. The fused features are mapped to the common space, the distance between different modalities is measured in the common space, and the image and text are matched based on the distance.

[0012] As an optional implementation, the process of reconstructing object features of the image modality includes: using an attribute aggregator to perform hierarchical feature aggregation on the image scene graph, performing an average pooling operation on the attributes of each object in the image scene graph, and then obtaining the attribute features of the object through a fully connected network, passing the attribute features of the object again through a fully connected network to obtain a second attribute feature, and updating the object features based on the attribute features of the object and the second attribute features.

[0013] As an optional implementation, the process of reconstructing the object features of the text modality includes: obtaining the relationship information of the object, obtaining the relationship features of the object based on the relationship information of the object, and obtaining the object features based on the relationship information of the object and the relationship features of the object.

[0014] As an optional implementation, the process of multimodal feature fusion includes: using a Transformer model to perform multimodal feature fusion on the object features of the image modality and the global features of the text modality to obtain image fusion features.

[0015] As an optional implementation, the global features of the text modality are: obtaining an embedded vector representation of each word in the text, obtaining a sentence context representation based on the embedded vector representation, and obtaining a global feature based on the sentence context representation.

[0016] As an optional implementation, the process of multimodal feature fusion includes: using a Transformer model to perform multimodal feature fusion on the object features of the text modality and the global features of the image modality to obtain text fusion features.

[0017] As an optional implementation, the global features of the image modality are: extracting the target object features of the image, performing a linear transformation on the target object features, mapping them into a multi-dimensional space, and then using a global average pooling on the target object features to obtain the global features.

[0018] In a second aspect, the present invention provides an image-text matching system based on hierarchical feature aggregation, comprising:

[0019] A preprocessing module is configured to obtain an image scene graph and a text scene graph after preprocessing the image and the text;

[0020] A hierarchical feature aggregation module is configured to perform hierarchical feature aggregation on the image scene graph and the text scene graph respectively, obtain the attributes of each object and the relationship between objects, and thereby reconstruct the object features of the image modality and the object features of the text modality;

[0021] The cross-modal feature fusion module is configured to perform multimodal feature fusion based on the object features of the image modality and the object features of the text modality, map the fused features to a common space, measure the distance between different modalities in the common space, and match the image and text based on the distance.

[0022] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is performed.

[0023] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] The present invention proposes an image-text matching method and system based on hierarchical feature aggregation, which hierarchically aggregates the attribute information on each object node and the relationship information between objects to ensure the semantic integrity of each object, and then only uses the features of the object nodes for subsequent feature fusion, effectively reducing the complexity of cross-modal matching and improving the efficiency of the algorithm.

[0026] The present invention proposes a hierarchical feature aggregation algorithm based on graph convolutional networks, which improves the integrity of the semantic expression of objects layer by layer by integrating the attributes of each object and the relationship between objects in image and text modalities respectively.

[0027] The present invention proposes a hierarchical feature aggregation algorithm based on graph convolutional networks, which uses graph convolutional networks to hierarchically aggregate targets, attributes, and the relationships between targets to more completely express the semantic information of sentences and improve the accuracy of cross-modal retrieval.

[0028] The present invention utilizes two cross-modal Transformers and combines the target features and global features of other modalities to narrow the modality gap and promote the fusion of cross-modal features.

[0029] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] 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.

[0031] Figure 1 A flowchart of an image-text matching method based on hierarchical feature aggregation provided in Embodiment 1 of the present invention;

[0032] Figure 2 A schematic flow chart of an image-text matching method based on hierarchical feature aggregation provided in Example 1 of the present invention. DETAILED DESCRIPTION

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

[0034] 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.

[0035] 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 the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0037] Example 1

[0038] like Figure 1 As shown, this embodiment provides an image-text matching method based on hierarchical feature aggregation, including:

[0039] After preprocessing the image and text, an image scene graph and a text scene graph are obtained;

[0040] Perform hierarchical feature aggregation on the image scene graph and the text scene graph respectively to obtain the attributes of each object and the relationship between objects, so as to reconstruct the object features of the image modality and the object features of the text modality;

[0041] Multimodal feature fusion is performed based on the object features of the image modality and the object features of the text modality. The fused features are mapped to the common space, the distance between different modalities is measured in the common space, and the image and text are matched based on the distance.

[0042] This embodiment proposes a new image-text matching. First, a GCN-based feature aggregator is used to aggregate the attributes of each object and the relationship information between objects layer by layer to make the object feature representation more complete. Then the object features and the global features of other modalities are input into the Transformer. The Transformers of different modalities have the same structure but no shared parameters. Finally, the fused features of different modalities are mapped into a common space, and the distance between samples is directly measured in the common space. This method is inspired by supervised and unsupervised learning domain adaptation to learn the interaction between modalities, and by the effectiveness of graph learning. It has been widely used in many fields, such as extracting node features based on adjacency relationships. In addition, inspired by the widespread use of Transformer, it has been found to effectively select meaningful features to achieve the main goal of representation learning.

[0043] like Figure 2 As shown in the figure, the hierarchical feature aggregation algorithm consists of two parts: a hierarchical graph convolutional network (H-GCN) and a cross-modal Transformer for images and text. Specifically, the image and text are preprocessed to obtain the image scene graph and the text scene graph respectively; the object features, object attributes and the relationship between objects in the scene graph are input into the H-GCN to reconstruct the object representation; the reconstructed target representation and the global features of other modalities are input into the Transformer for multi-modal feature fusion; finally, the fused features are mapped to the common space to measure the distance between different modalities.

[0044] In this embodiment, let the dataset D contain image and text modalities, denoted as I and S respectively. Where n represents the number of image-text pairs; D i =(I i ,S i ), I i and S i are the original image and text of the i-th instance.

[0045] In step S1, the process of obtaining an image scene graph and a text scene graph after preprocessing the image and the text includes:

[0046] S1-1: Construct text representation and sentence scene graph, including:

[0047] First, each word is passed through the embedding layer to obtain an embedded vector representation; then, the embedded vector representation is input into the bidirectional gated recurrent unit network (GRU) to obtain the sentence context representation of each step; finally, based on the sentence context representation, the average of the last step in both directions is taken as the global sentence feature

[0048] This embodiment uses a sentence scene graph extractor to process the fine-grained features of sentences and uses a fixed rule-based language parser to convert sentences into sentence scene graphs.

[0049] Define a scene graph G = (N, E), where N represents a node and E represents an edge. In this embodiment, nodes are divided into three categories: object nodes o p , attribute node a p,l and relationship node r pq . o p represents the pth object, a p,l Indicates o p The lth attribute, r pq Indicates o p and q For the edge set E, define the direction of each edge.

[0050] If o p There is an attribute a p,l , then there is a line from o p to a p,l Directed edges, using the triple {o p ,r pq ,o q} indicates this relationship; if two objects o p and q is related to a predicate verb, then the directions of the edges in the sentence graph are o p to r pq and r pq to p .

[0051] Each node in the sentence graph is represented by an h-dimensional vector after being processed by the embedding layer. The parameters used in the embedding layer are Then the node vector can be used in the algorithm of this embodiment.

[0052] S1-2: Construct image representation and image scene graph, including:

[0053] For images, this embodiment uses fine-grained information, such as regional features with specific meanings in the image. The fast R-CNN algorithm pre-trained on MSCOCO is used to obtain region proposals, and then a convolutional neural network (CNN) is used to extract features of each region proposal.

[0054] Using this method, the present embodiment can extract the target object features of each image, and then perform linear transformation on these target object features, map each target in the h-dimensional space, and use global average pooling (GAP) to obtain a global feature representation.

[0055] Generate image scene graph using a method similar to text I ; In order to obtain the relationship information between objects, a visual scene graph detector is used to extract the relationship between each pair of targets; in order to obtain the attribute information of the extracted region proposal, a classifier pre-trained on the Visual Genome dataset is used.

[0056] The image scene graph consists of three types of nodes: objects, attributes, and relationships. Faster R-CNN extracts object features for each object proposal as the original features of each object; the class label embedding layer is used to learn the relationship and attribute features. The parameters used are expressed as

[0057] In step S2, in order to represent the features of each object, this embodiment constructs a hierarchical graph convolutional network (H-GCN) to enrich the semantic information of each object layer by layer from the perspective of the object's attributes and the relationship between objects; first, an attribute aggregator is used to aggregate the attributes of each object to obtain a new vector representation of each object; then, a more complete object feature representation is reconstructed using the newly generated object features and relationship information. The specific operations are as follows:

[0058] Attribute Aggregator: First, an average pooling operation is added to the attribute feature of each object, and then the feature is fed into a fully connected network fc2 to obtain the attribute feature of the object. At the same time, the object features are input into another fully connected network fc1 to obtain the attribute features of the object The object characteristics are updated as follows:

[0059]

[0060] The parameters used in the attribute aggregator are and

[0061] Relation Aggregator: This embodiment also enriches the object representation at the relational level. Nouns can act as subjects or objects; for example, "the puppy runs to the little boy" and "the little boy runs to the puppy" describe different scenes. The role of "the little boy" acts as the object and subject in these two scenes respectively, which has different effects on the feature representation of the object, so they need to be analyzed separately.

[0062] This embodiment defines two different directions for each node: o q ∈obj(o p ) means o p Acting as subject, o q Act as o p An object of; p ∈sbj(o q ), which means o p Acting as an object, o q Act as o p A subject of p =|sbj(o p )|+|obj(o p )| used to calculate o p The number of relation triples in which .

[0063] In order to better express o p , this embodiment uses object o p All relationship information of p Relationship characteristics The definition is as follows:

[0064]

[0065] Among them, R pq is to pq The vector injected into the embedding layer, g in and g out are two fully connected networks, R pq Mapped into d-dimensional space.

[0066] Object Representation Further updates as follows:

[0067]

[0068] The parameters used in the relation aggregator are denoted as θ in image and text modalities respectively. relav and θ relat .

[0069] In the step S3, an image Transformer and a text Transformer are used to perform multimodal feature fusion on the object features of the image modality and the object features of the text modality; specifically: the Transformer model is used to perform multimodal feature fusion on the object features of the image modality and the global features of the text modality to obtain image fusion features; the Transformer model is used to perform multimodal feature fusion on the object features of the text modality and the global features of the image modality to obtain text fusion features.

[0070] The formula of the Transformer encoder is as follows:

[0071]

[0072] The calculation of Transformer's attention features is based on the input vector x, which is linearly transformed to obtain key (K)-value (V) pairs and queries (Q), where d is the dimension of K.

[0073] In order to better integrate features from different modalities and eliminate the semantic gap between modalities, this embodiment simultaneously inputs features from two modalities into the Transformer to generate modality-specific text and image representations, thereby mapping image and text features to a common space for cross-modal retrieval.

[0074] Specifically:

[0075] Image Transformer: Suppose there is an image containing m objects And global feature embedding Assume that a text has m' objects denoted as And global feature embedding In order to absorb and fuse information from another modality, this embodiment simultaneously inputs features of the two modalities into the Transformer;

[0076] For the image modality, let K = V = I i , Q v Defined as:

[0077]

[0078] Among them, w1 represents the learnable transformation weight and b1 is the bias of the image modality.

[0079] The image representation is defined as follows:

[0080]

[0081] in, isI i The dimension of the image transformer is w. v express.

[0082] Text Transformer: Use the same method, setting K=V=S i , we can get the text representation:

[0083]

[0084]

[0085] Among them, w2 represents the learnable conversion weight, b2 is the bias of the text form, YesS i The parameters used in the text transformer are represented by w t .

[0086] Using this method, the final feature embedding of the image and text modalities can be obtained in this embodiment as:

[0087]

[0088] In order to make the matching image-text pairs in the common space closer and the mismatched image-text pairs farther, this embodiment uses triple ranking loss to train the model end-to-end. In order to improve the training efficiency, only the hardest negative examples closest to the target in the batch are considered. The objective function formula is as follows:

[0089]

[0090] Where [x] + =max(x,0), f(x,y) is the semantic similarity function between x and y, and N is the batch size.

[0091] In this embodiment, f(.) is a cosine function, and an image and text pair with a superscript “-” indicates that the sample does not match the query, otherwise it is a matching sample; α is a marginal value and is the only parameter that needs to be adjusted.

[0092] This example is implemented on the currently popular deep learning computing platform pytorch 1.4.0. The experiment is conducted on an Intel(R) Xeon(R) Gold 6130 CPU with a processor frequency of 2.10GHz and two Titan XPs. The dimension h of all vectors used in the algorithm is set to 256 and α is set to 0.5. During training, the batch size is set to 100 and the learning rate is 0.0002. Adam optimizer is used for random optimization.

[0093] To evaluate the effectiveness of the proposed method, experiments are conducted on the largest image-text alignment datasets MSCOCO and Flickr30K. The widely used evaluation metric recall at k (R@k) is used for the image-text alignment task, which measures the percentage of correct matching pairs in the top-k model ranking results. Set k = 1, 5 and 10 to evaluate the performance of the model. The MSCOCO dataset contains 123287 images, each with 5 captions, which is divided into a training set containing 82783 images and a test set containing 5000 images, and the rest are used as validation sets. 1k and 5k images in the test set are used to evaluate the model. Flickr30K contains 31014 images, each with 5 captions. The dataset is divided into three parts: 1014 images as validation set, 1000 images as test set, and the rest as training set.

[0094] This embodiment proposes a Transformer algorithm based on hierarchical feature aggregation, which maps the fused features of image and text modalities to a common space, where the feature distance can be directly measured. By using a hierarchical graph convolutional network (H-GCN), the attribute information of the object and the relationship information between the objects are hierarchically utilized to make the semantic expression of the object more complete; then, the image Transformer and text Transformer are used to fuse cross-modal features respectively to eliminate the heterogeneity of the features. Experimental results show that this embodiment achieves better results based on the evaluation indicators.

[0095] The pseudo code of this embodiment is as follows:

[0096] Input: Divide the dataset into training set, validation set and test set; image set I = {I train ,I val ,I test} and text set S = {S train ,S val ,S test}; batch size batch.

[0097] Output: Fusion feature representation of image and text modalities and

[0098] Initialization: Random initialization w v 、w t , we get the sentence scene graph and image scene graph as shown in III.A and III.B.

[0099] The following statements are executed in a loop:

[0100] 1.

[0101] 2.

[0102] 3.

[0103] 4.

[0104] 5.

[0105] 6.

[0106] 7. Update w according to equations (5) and (7) v 、w t .

[0107] 8. Update the parameters by descending stochastic gradient according to equation (9).

[0108] Until convergence, we finally get and

[0109] In order to fully demonstrate the superiority of the effect of this embodiment, 11 image-text matching methods were selected and compared with the method of this embodiment on two widely used data sets. It can be seen from Tables 1, 2 and 3 that the method provided by this embodiment is generally superior to other methods in retrieval performance on different data sets.

[0110] Table 1 Results on the MSCOCO 1K dataset

[0111]

[0112] Table 2 Results on the MSCOCO 5K dataset

[0113]

[0114] Table 3 Results on the Flickr30K dataset

[0115]

[0116]

[0117] Example 2

[0118] This embodiment provides an image-text matching system based on hierarchical feature aggregation, including:

[0119] A preprocessing module is configured to obtain an image scene graph and a text scene graph after preprocessing the image and the text;

[0120] A hierarchical feature aggregation module is configured to perform hierarchical feature aggregation on the image scene graph and the text scene graph respectively, obtain the attributes of each object and the relationship between objects, and thereby reconstruct the object features of the image modality and the object features of the text modality;

[0121] The cross-modal feature fusion module is configured to perform multimodal feature fusion based on the object features of the image modality and the object features of the text modality, map the fused features to a common space, measure the distance between different modalities in the common space, and match the image and text based on the distance.

[0122] It should be noted that the above modules correspond to the steps described in Example 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.

[0123] In further embodiments, there is also provided:

[0124] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, it will not be described in detail here.

[0125] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0126] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0127] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in Example 1 is completed.

[0128] The method in Example 1 can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.

[0129] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in conjunction with this embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0130] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. An image-text matching method based on hierarchical feature aggregation, characterized in that: include: After preprocessing the image and text, an image scene graph and a text scene graph are obtained; Perform hierarchical feature aggregation on the image scene graph and the text scene graph respectively to obtain the attributes of each object and the relationship between objects, so as to reconstruct the object features of the image modality and the object features of the text modality; Multimodal feature fusion is performed based on the object features of the image modality and the object features of the text modality, the fused features are mapped to a common space, the distance between different modalities is measured in the common space, and the image and text are matched based on the distance; The process of reconstructing the object features of the image modality includes: using an attribute aggregator to perform hierarchical feature aggregation on the image scene graph, performing an average pooling operation on the attributes of each object in the image scene graph, and then obtaining the attribute features of the object through a fully connected network, passing the attribute features of the object through the fully connected network again to obtain a second attribute feature, and updating the object features according to the attribute features of the object and the second attribute features; Specifically, the attribute aggregator is as follows: first, an average pooling operation is added to each object's attribute, and then the attribute is fed into a fully connected network to obtain the object's attribute features. ; At the same time, the attribute features of the object are input into another fully connected network to obtain the attribute features of the object ; Object features are updated to .

2. The image-text matching method based on hierarchical feature aggregation according to claim 1, characterized in that: The process of reconstructing the object features of the text modality includes: obtaining the relationship information of the object, obtaining the relationship features of the object according to the relationship information of the object, and obtaining the object features according to the relationship information of the object and the relationship features of the object.

3. The image-text matching method based on hierarchical feature aggregation as claimed in claim 1, characterized in that: The process of multimodal feature fusion includes: using the Transformer model to perform multimodal feature fusion on the object features of the image modality and the global features of the text modality to obtain image fusion features.

4. The image-text matching method based on hierarchical feature aggregation as claimed in claim 3, characterized in that: The global features of the text modality are: obtaining the embedding vector representation of each word in the text, obtaining the sentence context representation based on the embedding vector representation, and obtaining the global features based on the sentence context representation.

5. The image-text matching method based on hierarchical feature aggregation as claimed in claim 1, characterized in that: The process of multimodal feature fusion includes: using the Transformer model to perform multimodal feature fusion on the object features of the text modality and the global features of the image modality to obtain text fusion features.

6. The image-text matching method based on hierarchical feature aggregation as claimed in claim 5, characterized in that: The global features of the image modality are: extracting the target object features of the image, performing linear transformation on the target object features, mapping them into a multidimensional space, and then using global average pooling on the target object features to obtain the global features.

7. An image-text matching system based on hierarchical feature aggregation, characterized in that: include: A preprocessing module is configured to obtain an image scene graph and a text scene graph after preprocessing the image and the text; A hierarchical feature aggregation module is configured to perform hierarchical feature aggregation on the image scene graph and the text scene graph respectively, obtain the attributes of each object and the relationship between objects, and thereby reconstruct the object features of the image modality and the object features of the text modality; The process of reconstructing the object features of the image modality includes: using an attribute aggregator to perform hierarchical feature aggregation on the image scene graph, performing an average pooling operation on the attributes of each object in the image scene graph, and then obtaining the attribute features of the object through a fully connected network, passing the attribute features of the object through the fully connected network again to obtain a second attribute feature, and updating the object features according to the attribute features of the object and the second attribute features; Specifically, the attribute aggregator is as follows: first, an average pooling operation is added to each object's attribute, and then the attribute is fed into a fully connected network to obtain the object's attribute features. ; At the same time, the attribute features of the object are input into another fully connected network to obtain the attribute features of the object ; Object features are updated to ; The cross-modal feature fusion module is configured to perform multimodal feature fusion based on the object features of the image modality and the object features of the text modality, map the fused features to a common space, measure the distance between different modalities in the common space, and match the image and text based on the distance.

8. An electronic device, characterized in that: The method comprises a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 6 is completed.

9. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the method described in any one of claims 1 to 6.