WO2019052403A1 - 图像文本匹配模型的训练方法、双向搜索方法及相关装置 - Google Patents

图像文本匹配模型的训练方法、双向搜索方法及相关装置 Download PDF

Info

Publication number
WO2019052403A1
WO2019052403A1 PCT/CN2018/104565 CN2018104565W WO2019052403A1 WO 2019052403 A1 WO2019052403 A1 WO 2019052403A1 CN 2018104565 W CN2018104565 W CN 2018104565W WO 2019052403 A1 WO2019052403 A1 WO 2019052403A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
text
similarity
features
global
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/104565
Other languages
English (en)
French (fr)
Inventor
马林
姜文浩
刘威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to EP18857317.4A priority Critical patent/EP3683724A4/en
Priority to KR1020197030955A priority patent/KR102235051B1/ko
Priority to JP2019564942A priority patent/JP6887026B2/ja
Publication of WO2019052403A1 publication Critical patent/WO2019052403A1/zh
Priority to US16/579,411 priority patent/US11087166B2/en
Anticipated expiration legal-status Critical
Priority to US17/349,904 priority patent/US11699298B2/en
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/76Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries based on eigen-space representations, e.g. from pose or different illumination conditions; Shape manifolds
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19173Classification techniques

Definitions

  • the present application relates to the field of artificial intelligence technologies, and in particular, to a training method for an image text matching model, a bidirectional search method, and related devices.
  • the embodiment of the present application provides a training method and related device for an image text matching model, which can comprehensively measure the matching degree between an image and a text, so that the obtained matching degree is more accurate and comprehensive.
  • the two-way search method and related device provided by the embodiments of the present application can obtain more accurate search results when performing bidirectional search of image text.
  • a method for training an image text matching model provided by an embodiment of the present application is implemented by a computer, and the method includes:
  • An embodiment of the present application provides a bidirectional search method for image text, which is implemented by a computer, and the method includes:
  • the matching model calculates a matching degree of the reference sample with a corresponding material; wherein, if the reference sample is text, the corresponding material is an image And if the reference sample is an image, the corresponding material is text; the matching model is capable of determining the reference sample and based on global features and local features of the reference sample and global features and local features of the corresponding material a degree of matching between the respective materials;
  • a corresponding material whose matching degree is greater than the specified matching degree is selected as the material matching the reference sample.
  • An embodiment of the present application provides a training apparatus for an image text matching model, where the apparatus includes:
  • An image feature extraction module configured to extract global features and local features of the image samples
  • a text feature extraction module configured to extract global features and local features of the text sample
  • a training module configured to train a matching model according to global features and local features of the extracted image samples and global features and local features of the text samples, and determine model parameters of the matching model, wherein the matching model is used according to the image Global features and local features, as well as global and local features of the text, determine the degree of matching between the image and the text.
  • An embodiment of the present application provides an image text bidirectional search device, where the device includes:
  • a reference sample receiving module configured to receive a reference sample, where the reference sample is text or an image
  • a reference sample feature extraction module configured to extract global features and local features of the reference sample
  • a search module configured to input a global feature and a local feature of the reference sample into a matching model, so that the matching model calculates a matching degree of the reference reference sample and the corresponding material; wherein, if the reference sample is text, then The corresponding material is an image; if the reference sample is an image, the corresponding material is text; the matching model can be based on global features and local features of the reference sample and global features and local features of the corresponding material Determining a degree of matching between the reference sample and the corresponding material;
  • the selection module is configured to select a corresponding material whose matching degree is greater than the specified matching degree as the material matching the reference sample.
  • An embodiment of the present application provides a computing device, including a memory and a processor, wherein the memory is used to store program instructions, the processor is used to invoke program instructions stored in the memory, and the application is executed according to the obtained program instructions.
  • the training method of the image text matching model according to any of the embodiments.
  • the embodiment of the present application provides a computer storage medium storing computer executable instructions for causing the computer to execute an image text matching model according to any one of the embodiments of the present application. Training method.
  • An embodiment of the present application provides a computing device, including a memory and a processor, where the memory is used to store program instructions, and the processor is configured to invoke program instructions stored in the memory, and execute the program according to the obtained program instructions.
  • the image text bidirectional search method described in the embodiment is applied.
  • the embodiment of the present application provides a computer storage medium storing computer executable instructions for causing the computer to perform an image text bidirectional search method as described in the embodiments of the present application.
  • FIG. 1 is a schematic diagram of an application scenario provided by some embodiments of the present application.
  • 2A is a schematic flowchart diagram of a training method of an image text matching model provided by some embodiments of the present application
  • 2B is a schematic flowchart diagram of a training method of an image text matching model provided by some embodiments of the present application.
  • FIG. 3 is a block diagram of a matching model provided by some embodiments of the present application.
  • FIG. 4 is a block diagram of a model for calculating similarity of image features provided by some embodiments of the present application.
  • FIG. 5 is a schematic diagram showing categories of image information provided by some embodiments of the present application.
  • FIG. 6 is a block diagram showing a global representation of extracting text for some embodiments of the present application.
  • FIG. 7 is a schematic flowchart diagram of a training method of an image text matching model provided by some embodiments of the present application.
  • FIG. 8 is a schematic flowchart diagram of a bidirectional search method for image text provided by some embodiments of the present application.
  • FIG. 9 is a schematic structural diagram of a training apparatus for an image text matching model according to some embodiments of the present application.
  • FIG. 10 is a schematic structural diagram of an image text bidirectional search apparatus according to some embodiments of the present application.
  • FIG. 11 is a schematic structural diagram of a computing device according to some embodiments of the present disclosure.
  • image-to-text matching is achieved in two ways:
  • the first method is to extract the global representation of the image and the text, and map the global representation to the same semantic space, and establish a matching relationship between the image and the global representation of the text in the semantic space, thereby implementing image and text matching.
  • the global representation reflects the global characteristics of the image and is used to describe the overall features of the image.
  • the global representations are, for example, color features, shape features, and texture features.
  • Method 2 Obtain a local representation of the local information of the image through a convolutional neural network.
  • the local representation of the text is obtained through the syntax tree information, and then the matching relationship between the image and the local representation of the text is learned.
  • the local representation reflects the local information of the image and is used to describe the detailed features of the image.
  • the local representation has a rich quantity in the image, and the correlation between the features is small. In the case of occlusion, the detection and matching of other features are not affected by the disappearance of some features.
  • a single aspect of information is used to match the image and the text, that is, either the global representation is used alone or the local representation is used alone.
  • the degree of matching between the image and the text can only be reflected from one level.
  • the global representation may only be able to extract color features, shape features, and texture features, but not the detailed features of the local representation, so the features that it can reflect are limited.
  • the local representation can only consider the matching relationship of the image text from the local, and can not reflect the characteristics of the global representation. Therefore, neither of the above methods can fully measure the degree of matching between images and text.
  • the image text matching model is trained according to the following method, specifically:
  • the resulting degree of matching is based on the respective global representation and local representation of the image and text. Taking the details of the image to the global feature, the matching is more accurate and comprehensive. Therefore, when the image matching text is bidirectionally searched based on the matching model provided by the embodiment of the present application, the search result is more accurate.
  • FIG. 1 is a schematic diagram of an application scenario of a bidirectional search method for image text according to an embodiment of the present application.
  • This scenario may include, for example, the terminal device 11 and the server 12.
  • the terminal device 11 can be installed with various clients, such as a blog client for social networking, a WeChat client, a news client for understanding current events, and the like.
  • the client of the terminal device 11 can extract global features and local features to the image and/or text and then send it to the server 12.
  • the client of the terminal device 11 sends the image and/or text to the server 12, which extracts global and local features of the image and/or text.
  • the server 12 searches for text matching the image based on the global model and local features of the image based on the matching model, or the server 12 searches for an image matching the text based on the matching model based on the global features and local features of the text. Then, the server 12 feeds back the search result to the terminal device 11.
  • the terminal device 11 and the server 12 can perform a communication connection through a communication network, and the network can be a local area network, a wide area network, or the like.
  • the terminal device 11 can be a mobile phone, a tablet computer, a notebook computer, a personal computer, etc.
  • the server 12 can be any server device capable of supporting training and two-way search of the corresponding image text matching model.
  • the solution provided by the embodiment of the present application is applicable to any scene that needs to retrieve an image according to a text, and/or needs to retrieve text according to an image.
  • it can be applied to cloud album management (for example, searching for matching images according to a given text), WeChat friends circle, QQ space, QQ crowd space, and searching for images and/or text in a chat environment of WeChat and QQ.
  • FIG. 2A is a schematic flowchart of a training method of an image text matching model according to an embodiment of the present application.
  • the method is implemented by a computer, and the computer may be a server 12, including the following steps:
  • S23 Training a matching model according to global features and local features of the extracted image samples and global features and local features of the text samples, and determining model parameters of the matching model, wherein the matching model is used according to global features of the image and The local features and the global and local features of the text determine the degree of matching between the image and the text.
  • the matching model is trained according to the global features and local features of the image sample and the text sample, and the local features of the image and the text are all considered to be global features, and the matching degree determined by the matching model obtained by the training is determined. More accurate and comprehensive. When the image is bidirectionally searched based on the matching model provided by the embodiment of the present application, the search result is more accurate.
  • FIG. 2B is a flowchart of a method for training an image text matching model according to an embodiment of the present application. The method may be performed by the server 12 shown in FIG. 1, and includes the following steps:
  • Step 201 Extract global features and local features of the image samples.
  • the global feature is a vector to characterize textual information of the corresponding image.
  • the local feature of the image sample is also a vector, and each dimension information of the vector represents information of the corresponding word category in the local region of the image, for example, the probability that the local region of the image contains information corresponding to the word category.
  • Step 202 Extract global features and local features of the text sample.
  • the global features of the text samples are used to characterize the overall semantic information of the text samples; the local features of the text samples are used to characterize the synthesis of local semantic information of the text, wherein the local features of the text samples are more focused on the text.
  • Local information such as words, phrases, and the like.
  • step 201 and step 202 is not limited.
  • Step 203 Train a matching model according to global features and local features of the extracted image samples and global features and local features of the text samples, and determine model parameters of the matching model, wherein the matching model is used according to the input image.
  • the method may further determine the matching degree of the image and the text according to the trained matching model after training the matching model, including:
  • Step 204 Map the respective global features of the image and the text to a specified semantic space by using the matching model for the input image and text, and calculate a global feature between the image and the text. Similarity; and mapping local features of the image and the text to the specified semantic space, calculating a similarity of local features between the image and the text; and, based on the similarity of global features
  • the preset weight, and the preset weight of the similarity of the local features are determined by weighted summation to determine the degree of matching between the image and the text.
  • FIG. 3 a block diagram of an image text matching model provided by an embodiment of the present application: in FIG. 3, for an input image 310, a partial image CNN (Convolutional Neural Network) 311 is used to extract an image.
  • a local representation also referred to as a local feature
  • a global representation also referred to as a global feature of the image is extracted using global image CNN 313 (shown as 314 in the figure).
  • a local text encoder 321 is used to extract a local representation of the text (also referred to as a local feature) (shown as 322 in the figure), and a global representation of the text is extracted using the global text encoder 323 (also known as global Features) (shown as 324 in the figure).
  • the respective local representations of the image 310 and the text 320 are mapped to the specified semantic space by local depth matching, and the image 310 and the text 320 are determined to be formed in the specified semantic space.
  • Similarity of local features between heterogeneous sample pairs also known as image text pairs
  • global features of image 310 and text 320 are mapped to a specified semantic space by global depth matching, and at the specified semantics
  • the similarity of the global features between the heterogeneous sample pairs formed by image 310 and text 320 is determined in space.
  • the matching degree of the heterogeneous sample pairs is determined by weighted summation according to the preset weights of the similarity of the global features and the preset weights of the similarities of the local features.
  • the embodiment of the present application provides a training method for an image text matching model, which is described by the following content.
  • the global representation of the image sample and the text sample is mapped to the specified semantic space. Specifically, including:
  • Mapping the respective local representations of the image samples and the text samples to the specified semantic space specifically including:
  • the fully connected layer is a layer in the basic structure of the convolutional neural network; each node of the fully connected layer is connected with all the nodes of the upper layer, and is used to combine the features extracted from the front side;
  • the fully connected layer is used to map global and local features of the image and text to the specified semantic space, wherein the full join operation refers to an operation of mapping to the specified semantic space through the fully connected layer.
  • the parameters of the fully connected layer are obtained according to a preset objective function, and the preset objective function is used to realize the semantic similarity of heterogeneous sample pairs (image text pairs) is higher than that of non-semantic related heterogeneous sample pairs;
  • the preset objective function is used to implement the similarity of the heterogeneous sample pairs of the semantic association is higher than the similarity of the heterogeneous sample pairs of the non-semantic association, and the similarity between the text samples associated with the same image sample is higher than the difference The similarity between text samples associated with an image sample.
  • the global representation and the local representation of the text and the image are accurately analyzed by a plurality of fully connected layers, so as to map the global representation and the local representation of the text and the image into the same semantic space.
  • the parameters of the fully connected layer are determined according to the preset objective function.
  • the preset objective function can be as shown in formula (1):
  • an image is generally associated with multiple samples.
  • the corresponding semantics can include birds flying in the sky and fish swimming in the water. Therefore, in order to improve the accuracy of the matching model, it is necessary to make the similarity between the texts associated with the same image semantics higher than the similarity between the texts and the texts having semantic relations with other images.
  • the preset objective function needs to simultaneously satisfy the similarity between the text samples associated with the same image sample and the similarity between the text samples associated with the different image samples, on the basis of satisfying the condition as described in the formula (1). To achieve this, the formula for the similarity between text samples associated with the same image sample is higher than the similarity between text samples associated with different image samples, as shown in equation (2):
  • L(S i , S l , S j ) represents a preset objective function that requires similarity between text samples associated with the same image sample to be higher than similarity between text samples associated with different image samples;
  • S i , S l represent text samples whose semantics are associated with the same image sample;
  • S i , S j represent text samples associated with different image samples;
  • d() represents the global representation between the text samples similarity; when determining the local similarity represented, d () represents a degree of similarity between the partial sample text representation;
  • u 3 represents a preset threshold value.
  • the formula (1) and the formula (2) can be integrated to obtain a preset objective function in the form of the formula (3) or the formula (4), and the obtained preset objective function can satisfy the above.
  • a specific mathematical expression may be designed according to the requirements of the preset objective function, which is not limited by the embodiment of the present application.
  • the depth matching model as shown in Fig. 4 can be trained.
  • the depth matching model is used to determine the degree of matching between the image and the text.
  • an image embedding of the left input image (the feature vector is a global feature or a feature vector of a local feature), and a feature embeding of the right input text (the feature vector is a feature of the global feature) Vector or local feature vector).
  • the distance between the feature vectors is calculated.
  • S m represents a feature vector of the text
  • I 1 and I n represent feature vectors of the image. In this specified semantic space, the distance between the image and the text is calculated.
  • the feature vector used is a feature vector for representing a global feature
  • the result of the calculation is the similarity between the global features.
  • the feature vector used is a feature vector representing the local feature
  • the result of the calculation is between the local features. Similarity.
  • the feature of the fully connected layer of the convolutional neural network using images represents a global representation of the image, such as the aforementioned CNN, where the CNN can be selected but not limited to VGG (Very Deep Convolutional Networks for Large-Scale Image Recognition). Deep convolutional network), ResNet (Residual Networks, Residual Networks), Inception, Inception V3, Inception V4, etc.
  • VGG Very Deep Convolutional Networks for Large-Scale Image Recognition
  • ResNet Residual Networks, Residual Networks
  • Inception Inception V3, Inception V4, etc.
  • a network model such as FCN (Fully Convolutional Networks for Semantic Segmentation) can also be used to extract the global representation of the image.
  • the maximum probability of image information of each specified category in a specified number of image blocks is selected; the local features of the image samples are formed by the maximum probability of image information of each specified category.
  • Image CNN in FIG. 5 represents a feature of extracting an image block using an image CNN.
  • the focus of the present application is that for a given image, after segmentation, the features of each image block are extracted. Assume that there are five categories of image information, namely, people, grass, sky, dogs, and cats. If it is assumed that there are four extracted image blocks, the probability that the image block includes the above five categories of image information is calculated for each image block. Then, for each category, the maximum probability is selected from the probability of the category of 4 image blocks. The global representation of the image samples is made up of the maximum probability of each category.
  • the maximum probability of the category and the corresponding probability threshold may also be compared for each category to determine whether at least one image block in the sample image contains image information of the category. For example, for the category of people, the maximum probability is 0.99 in 4 image blocks, and the corresponding probability threshold is 0.8, indicating that at least one of the 4 image blocks contains a person.
  • a vector of the participle is determined, wherein the vector lengths of the different participles are the same;
  • a convolutional neural network for extracting global features of the text to obtain a global feature of the text sample; wherein the neural network for extracting global features of the text sample includes multiple volumes And a layer of the specified size of the pooled layer connected to the plurality of convolution layers and the upper layer of the convolution layer as an input of the next layer of the convolution layer, the specified size of the field of view including the previous one The feature of at least two participle vectors extracted by the layer convolutional layer.
  • the convolution operation of the convolution layer can be expressed by the following formula (5):
  • r represents the field of view of the specified size
  • l-1 represents the layer 1 -1 convolutional layer (ie, the upper layer of convolutional layer)
  • l represents the layer 1 convolutional layer (ie, the next layer) Convolution layer)
  • W l f represents a product matrix
  • f represents the fth feature
  • i represents the i-th position information
  • the feature indicating the layer 1 convolutional layer extraction corresponds to the f feature of the i position.
  • the operation of the pooling layer can be expressed by the following formula (6):
  • the input text is "a young child run through a large field of grass", and a global representation of the text is extracted by a text convolutional neural network (ie, Sentence CNN in the figure).
  • Sentence CNN includes a plurality of convolution layer convolutions to extract features of the text, and then integrates and reduces the features extracted by the convolution layer through a maximum pooling layer (max-pooling) to obtain a global representation of the text. .
  • the embodiment of the present application implements extraction of text sample features through multiple convolution layers, and then filters useless feature information through the pooling layer.
  • a field of view of a specified size is used. Since the field of view includes features of multiple word segments, it is equivalent to learning in the global representation of text samples. The organization and interaction information between adjacent word segments makes the global representation of the final extraction more reasonable and accurate.
  • each word segmentation can be represented by a fixed length vector using the word2vec tool.
  • the neural network used to extract the global representation of the text may be a convolutional neural network or RNN (Recurrent Neural Networks).
  • the local representation of the text sample can be extracted in a variety of ways, and can be more focused on each participle, such as using the traditional TF-IDF (term frequency–inverse document frequency) representation, or the Fisher Vector acting on the vector of each participle, or The average of the vector of the word segmentation.
  • TF-IDF term frequency–inverse document frequency
  • Fisher Vector acting on the vector of each participle
  • the average of the vector of the word segmentation Such representations are more concentrated in the participle itself, rather than considering the correlation between each participle and the participle as a whole, and thus can be considered as a partial representation of the text.
  • FIG. 7 is a schematic flowchart diagram of a specific embodiment of a training method for an image text matching model provided in an embodiment of the present application, where the method includes the following steps:
  • Step 701 Extract a global representation of the image samples based on the global image representation CNN.
  • Step 702 Divide the image sample into a specified number of image blocks, calculate, according to the partial image CNN, a probability that the image information of the specified category is included in the image block for each image block; and select each specified category in the specified number of image blocks.
  • the maximum probability of image information; the local representation of the image samples is composed of the maximum probability of image information for each of the specified categories.
  • Step 703 Perform word segmentation on the text sample; for each word segment, determine a vector of the word segment, wherein the vector lengths of the different segment words are the same; input the vector of the word segmentation of the same text sample to the pre-built global representation for extracting the text a convolutional neural network, obtaining a global representation of the text sample; wherein the neural network for extracting the global representation of the text sample includes a plurality of convolution layers and a pooling layer connected after the plurality of convolution layers, and The specified size field of view of the upper convolution layer is used as input to the next layer of convolutional layer, and the specified size field of view includes features of at least two word segment vectors extracted by the upper convolution layer.
  • Step 704 Extract a partial representation of the text sample.
  • steps 701-704 is not limited.
  • Step 705 respectively map the respective global representations of the image sample and the text sample to the specified semantic space through at least two layers of the fully connected layer, and calculate a heterogeneous sample pair (image text pair) composed of the image sample and the text sample.
  • Step 706 respectively map the respective local representations of the image samples and the text samples to the specified semantic space by using at least two layers of the fully connected layer, and calculate the similarity of the local representations between the heterogeneous sample pairs (image sample pairs), wherein The parameters of the fully connected layer are obtained according to the preset objective function training.
  • step 705 and step 706 is not limited.
  • Step 707 Determine a matching degree of the heterogeneous sample pair by using a weighted summation method according to a preset weight of the similarity of the global representation and a preset weight of the similarity of the local representation.
  • the local representation of the image is extracted by the image block
  • the global representation of the text is extracted by multiple convolution layers and the pooling layer, so that the association relationship between the word segmentation of the text can be obtained, so that the extracted features are more accurate and comprehensive.
  • the similarity of the heterogeneous sample pairs of the semantic association is higher than the similarity of the heterogeneous sample pairs of the non-semantic association, and the similarity between the text samples associated with the same image sample is higher than that of the different image samples.
  • the similarity between the associated text samples so that the final similarity calculation is more in line with actual needs, improving the accuracy of image and text matching.
  • FIG. 8 is a flowchart of an image text bidirectional search method based on the matching model in the above embodiment
  • the method is implemented by a computer, and the computer may be the server 12, and the method includes the following steps:
  • Step 801 Receive a reference sample, where the reference sample is text or an image.
  • Step 802 Extract global features and local features of the reference samples.
  • Step 803 Enter a global feature and a local feature of the reference sample into a matching model, so that the matching model calculates a matching degree between the reference sample and a corresponding material; wherein, if the reference sample is text, the corresponding The material is an image; if the reference sample is an image, the corresponding material is text; the matching model is capable of determining the global feature and the local feature of the reference sample and the global feature and the local feature of the corresponding material The degree of matching between the reference sample and the corresponding material.
  • the material library can be established, and the matching degree between the reference sample and each corresponding material in the material library is calculated.
  • the method for calculating the matching degree has been described in the above embodiment, and details are not described herein again.
  • Step 804 Select a corresponding material whose matching degree is greater than the specified matching degree as the material matching the reference sample.
  • the embodiment of the present application implements a matching model based on the global representation and the local representation to search for corresponding materials of the reference samples, so that the final matching result is more accurate. For example, search for images that match the text, or search for problems that match the image.
  • the embodiment of the present application further provides a training device for an image text matching model, and the principle and the beneficial effects of the device are similar to those described in the foregoing method embodiments, and details are not described herein again.
  • FIG. 9 it is a schematic structural diagram of the device, and the device includes:
  • the image feature extraction module 901 is configured to extract global features and local features of the image samples
  • a text feature extraction module 902 configured to extract global features and local features of the text sample
  • the training module 903 is configured to train a matching model according to global features and local features of the extracted image samples and global features and local features of the text samples, and determine model parameters of the matching model, wherein the matching model is used according to the input
  • the global and local features of the image and the global and local features of the input text determine the degree of matching between the image and the text.
  • mapping the respective global features of the image and the text to a specified semantic space by the matching model calculating a similarity of global features between the image and the text; and, Mapping respective local features of the image and the text to the specified semantic space, calculating a similarity of local features between the image and the text; and, according to a preset weight of the similarity of the global feature, and a local
  • the preset weight of the similarity of the feature is determined by a weighted summation to determine the degree of matching between the image and the text.
  • the matching model includes at least two layers of fully connected layers, the matching model includes at least two layers of fully connected layers, and model parameters of the matching model include parameters of the at least two layers of fully connected layers;
  • the training module 903 specifically includes:
  • a global training unit 9031 configured to map respective global features of the image sample and the text sample to the specified semantic space by using the at least two layers of fully connected layers;
  • a local training unit 9032 configured to map respective image features and respective local features of the text sample to the specified semantic space by using the at least two layers of fully connected layers;
  • the preset objective function is used to achieve similarity between the semantically associated image text pairs and the similarity of the non-semantic associated image text pairs, and the similarity between the text samples associated with the same image sample is higher than the different image sample associations. The similarity between the text samples.
  • the preset objective function is used to implement a semantically associated image text pair having a higher degree of similarity than a non-semantic associated image text pair;
  • the mapping result includes: global features and local features of the image samples represented by parameters of the at least two layers of fully connected layers, and the text samples represented by parameters of the at least two layers of fully connected layers Global features and local features;
  • the training module 903 is configured to:
  • the preset objective function is:
  • the preset objective function is used to achieve a semantically associated image text pair having a higher degree of similarity than a non-semantic associated image text pair, and a similarity between text samples associated with the same image sample is high The similarity between text samples associated with different image samples;
  • the mapping result includes: global features and local features of the image samples represented by the at least two layers of fully connected layer parameters, and global features and local features of the text samples represented by the at least two layers of fully connected layer parameters;
  • the training module 903 is configured to:
  • Determining the at least two layers of the fully connected layer according to the global features and local features of the image samples represented by the at least two layers of fully connected layer parameters and the global features and local features of the text samples represented by the at least two layers of fully connected layer parameters
  • the similarity of the semantically associated image text pair represented by the parameter, the similarity of the non-semantic associated image text pair represented by the at least two layers of the fully connected layer parameter, and the same image sample association represented by the at least two layers of the fully connected layer parameter Similarity between text samples, similarities between text samples associated with different image samples represented by the at least two layers of fully connected layer parameters;
  • a similarity of the semantically associated image text pair represented by the at least two layers of fully connected layer parameters, a similarity of the non-semantic associated image text pairs represented by the at least two layers of fully connected layer parameters, the at least two layers The similarity between the text samples associated with the same image sample represented by the connection layer parameter, and the similarity between the text samples associated with the different image samples represented by the at least two layers of fully connected layer parameters are input into the preset objective function, and determined The parameters of the at least two layers of fully connected layers.
  • the preset objective function is determined by one of the following:
  • LY is a preset objective function
  • L(S i , S l , S j ) characterizing the similarity between the text samples associated with the same image sample
  • L(S i , S l , S j ) characterizing the similarity between the text samples associated with the same image sample
  • d() represents the similarity of the global feature of the text sample and the image sample
  • d() represents the local feature of the text sample and the image sample Similarity
  • ⁇ 1 and ⁇ 2 both represent preset coefficients
  • u 1 and u 2 both represent preset thresholds;
  • S i , S l represent text samples whose semantics are associated with the same image sample; S i , S j represent text samples associated with different image samples; when determining the similarity of global features, d() represents global features between text samples similarity; when determining the similarity of local features, d () represents a degree of similarity between the local feature text sample; u 3 represents a preset threshold value.
  • the image feature extraction module is specifically configured to divide the image sample into a specified number of image blocks, and for each image block, calculate a probability that the image block includes image information of a specified category;
  • the maximum probability of image information of each specified category in a specified number of image blocks is selected; the local features of the image samples are formed by the maximum probability of image information of each specified category.
  • the text feature extraction module is specifically configured to perform word segmentation on the text sample
  • a vector of the participle is determined, wherein the vector lengths of the different participles are the same;
  • a convolutional neural network for extracting global features of the text to obtain a global feature of the text sample; wherein the neural network for extracting global features of the text sample includes multiple volumes And a layer of the specified size of the pooled layer connected to the plurality of convolution layers and the upper layer of the convolution layer as an input of the next layer of the convolution layer, the specified size of the field of view including the previous one The feature of at least two participle vectors extracted by the layer convolutional layer.
  • the embodiment of the present application further provides an image text bidirectional search device, and the principle and the beneficial effects of the device are similar to those described in the foregoing method embodiments, and details are not described herein again.
  • FIG. 10 it is a schematic structural diagram of the device, and the device includes:
  • a reference sample receiving module 1001 configured to receive a reference sample, where the reference sample is text or an image;
  • a reference sample feature extraction module 1002 configured to extract global features and local features of the reference samples
  • a search module 1003 configured to input a global feature and a local feature of the reference sample into a matching model, so that the matching model calculates a matching degree of the reference sample with a corresponding material; wherein, if the reference sample is text, The corresponding material is an image; if the reference sample is an image, the corresponding material is text; the matching model can be based on global features and local features of the reference sample and global features and local features of the corresponding material Determining a degree of matching between the reference sample and the corresponding material;
  • the selecting module 1004 is configured to select a corresponding material whose matching degree is greater than the specified matching degree as the material matching the reference sample.
  • the embodiment of the present application further provides a computing device, which may be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), or the like.
  • the computing device may include a central processing unit (CPU) 1101, a memory 1102, an input device 1103, an output device 1104, etc.
  • the input device may include a keyboard, a mouse, a touch screen, etc.
  • the output device may include Display devices, such as liquid crystal displays (LCDs), cathode ray tubes (CRTs), and the like.
  • LCDs liquid crystal displays
  • CRTs cathode ray tubes
  • the memory can include read only memory (ROM) and random access memory (RAM) and provides the processor with program instructions and data stored in the memory.
  • the memory may be used to store the training method of the image text matching model and/or the program instruction of the image text bidirectional search method.
  • the processor is configured to execute the stored program instructions, the processor is configured to execute the obtained program instructions: extracting global features and local features of the image samples; and extracting global features and local features of the text samples; and global features according to the extracted image samples And local features and global features and local features of the text samples, training the matching model, determining model parameters of the matching model, wherein the matching model is used to globally and locally according to the input image and the global of the input text
  • the feature and local features determine the degree of matching between the image and the text.
  • the processor is configured to execute, according to the obtained program instructions, by the processor, by the processor: receiving a reference sample, the reference sample being text or an image; extracting global features and local features of the reference sample; Refer to the global feature of the sample and the local feature input matching model, so that the matching model calculates the matching degree of the reference sample with the corresponding material; wherein, if the reference sample is text, the corresponding material is an image; The reference sample is an image, and the corresponding material is text; the matching model is capable of determining the reference sample and the corresponding based on global features and local features of the reference sample and global features and local features of the corresponding material The degree of matching between the materials; selecting the corresponding material whose matching degree is greater than the specified matching degree as the material matching the reference sample.
  • the present application provides a computer storage medium for storing computer program instructions for use in the computing device described above, comprising a program for performing the above-described image text matching model training method and/or image text bidirectional search method.
  • the computer storage medium can be any available media or data storage device accessible by a computer, including but not limited to magnetic storage (eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (eg, CD, DVD, BD, HVD, etc.), and semiconductor memories (for example, ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).
  • magnetic storage eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.
  • optical storage eg, CD, DVD, BD, HVD, etc.
  • semiconductor memories for example, ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Biophysics (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

一种图像文本匹配模型的训练方法、双向搜索方法及相关装置,涉及人工智能技术领域,该训练方法包括:提取图像样本和文本样本的全局表示和局部表示(201,202),训练匹配模型,确定所述匹配模型的模型参数,所述匹配模型用以根据图像的全局表示和局部表示以及文本的全局表示和局部表示确定图像和文本之间的匹配度(203)。得到的匹配度是基于将图像的细节特征到全局特征都考量在内,得到的匹配度更加准确和全面。

Description

图像文本匹配模型的训练方法、双向搜索方法及相关装置
本申请要求于2017年9月12日提交中国专利局、申请号为201710817344.5、申请名称为“图像文本匹配模型的训练方法、双向搜索方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及图像文本匹配模型的训练方法、双向搜索方法及相关装置。
背景技术
图像与文本的理解一直是人工智能中最为重要的研究方向之一。其中一个重要的研究就是发掘图像和文本的关联关系。例如网页新闻中新闻文本内容和新闻图像表达的是相同的主题思想。也即,图像和文本之间并非绝对独立存在的,图像和文本之间存在匹配关系。故此,如何找到与给定图像匹配的文本,或者找到与给定文本匹配的图像成为业内关注的话题。
技术内容
本申请实施例提供图像文本匹配模型的训练方法及相关装置,可以全面衡量图像和文本之间的匹配度,使得得到的匹配度更加准确和全面。
本申请实施例提供的双向搜索方法及相关装置,可以在进行图像文本双向搜索时,得到更加准确的搜索结果。
本申请实施例提供的一种图像文本匹配模型的训练方法,所述方法由计算机实施,所述方法包括:
提取图像样本的全局特征和局部特征;以及,
提取文本样本的全局特征和局部特征;
根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据图像的全局特征和局部特征以及文本的全局特征和局部特征确定所述图像和所述文 本之间的匹配度。
本申请实施例提供一种图像文本双向搜索方法,所述方法由计算机实施,所述方法包括:
接收参考样本,所述参考样本为文本或图像;
提取所述参考样本的全局特征和局部特征;
将所述参考样本的全局特征和局部特征输入匹配模型,以使所述匹配模型计算所述参考样本与相应素材的匹配度;其中,若所述参考样本为文本,则所述相应素材为图像;若所述参考样本为图像,则所述相应素材为文本;所述匹配模型能够基于所述参考样本的全局特征和局部特征以及所述相应素材的全局特征和局部特征确定所述参考样本和所述相应素材之间的匹配度;
选取匹配度大于指定匹配度的相应素材,作为与所述参考样本匹配的素材。
本申请实施例提供一种图像文本匹配模型的训练装置,所述装置包括:
图像特征提取模块,用于提取图像样本的全局特征和局部特征;
文本特征提取模块,用于提取文本样本的全局特征和局部特征;
训练模块,用于根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据图像的全局特征和局部特征以及文本的全局特征和局部特征确定所述图像和所述文本之间的匹配度。
本申请实施例提供一种图像文本双向搜索装置,所述装置包括:
参考样本接收模块,用于接收参考样本,所述参考样本为文本或图像;
参考样本特征提取模块,用于提取所述参考样本的全局特征和局部特征;
搜索模块,用于将所述参考样本的全局特征和局部特征输入匹配模型,以使所述匹配模型计算所述参考参考样本与相应素材的匹配度;其中,若所述参考样本为文本,则所述相应素材为图像;若所述参考样本为图像,则所述相应素材为文本;所述匹配模型能够基于所述参考样本的全局特征和局部特征以及所述相应素材的全局特征和局部特征确定所述参考样本和所述相应素材之间的匹配度;
选择模块,用于选取匹配度大于指定匹配度的相应素材,作为与所述参考样本匹配的素材。
本申请实施例提供一种计算设备,包括存储器和处理器,其中,所述存储器用 于存储程序指令,所述处理器用于调用所述存储器中存储的程序指令,按照获得的程序指令执行本申请实施例任一所述的图像文本匹配模型的训练方法。
本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行如本申请实施例任一所述的图像文本匹配模型的训练方法。
本申请实施例提供一种计算设备,包括存储器和处理器,其中,所述存储器用于存储程序指令,所述处理器用于调用所述存储器中存储的程序指令,按照获得的程序指令执行如本申请实施例所述的图像文本双向搜索方法。
本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行如本申请实施例所述的图像文本双向搜索方法。
附图说明
图1所示为本申请一些实施例提供的应用场景示意图;
图2A所示为本申请一些实施例提供的图像文本匹配模型的训练方法的流程示意图;
图2B所示为本申请一些实施例提供的图像文本匹配模型的训练方法的流程示意图;
图3所示为本申请一些实施例提供的匹配模型的框图;
图4所示为本申请一些实施例提供的计算图像特征的相似度的模型的框图;
图5所示为本申请一些实施例提供的对图像信息的类别的示意图;
图6所示为本申请一些实施例提取文本的全局表示的框图;
图7所示为本申请一些实施例提供的图像文本匹配模型的训练方法的流程示意图;
图8所示为本申请一些实施例提供的图像文本双向搜索方法的流程示意图;
图9所示为本申请一些实施例提供的图像文本匹配模型的训练装置的结构示意图;
图10所示为本申请一些实施例提供的图像文本双向搜索装置的结构示意图;
图11为本申请一些实施例提供的计算设备的结构示意图。
具体实施方式
为了便于理解本申请实施例提供的技术方案,下面结合说明书附图对本申请实施例作详细描述。
在一些实例中,通过以下两种方法实现图像与文本的匹配:
方法一、提取图像和文本各自的全局表示,将全局表示映射到相同的语义空间,在该语义空间建立图像和文本的全局表示之间的匹配关系,进而实现图像和文本的匹配。其中,全局表示反映了图像的全局特性,用于描述图像的整体特征,全局表示例如是颜色特征、形状特征和纹理特征等。
方法二、通过卷积神经网络得到图像的局部信息的局部表示。通过语法树信息得到文本的局部表示,进而学习图像与文本的局部表示的匹配关系。其中,局部表示反映了图像的局部信息,用于描述图像局部的细节特征。与全局表示相比,局部表示具有在图像中蕴含数量丰富,特征间相关度小,遮挡情况下不会因为部分特征的消失而影响其他特征的检测和匹配等的特点。
然而,以上两种方法中均采用单一方面的信息来进行图像和文本的匹配,即要么单独采用全局表示,要么单独采用局部表示。无论采用局部表示还是全局表示进行图像和文本的匹配,仅能从一个层面反映图像和文本之间的匹配度。对于内容丰富的图像,全局表示也许仅能够提取颜色特征、形状特征和纹理特征等,却无法展现局部表示的细节特征,故其能够反映的特征有限。而局部表示仅能从局部考量图像文本的匹配关系、无法体现出全局表示的特征。故此,以上两种方法都无法全面衡量图像和文本之间的匹配度。
为了能够全面的对图像和文本进行匹配,得到更加准确的匹配度,本申请实施例中,根据以下方法训练图像文本匹配模型,具体的:
提取图像样本的全局特征和局部特征;以及,
提取文本样本的全局特征和局部特征;
根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据图像的全局特征和局部特征以及文本的全局特征和局部特征确定图像和文本之间的匹配度。
这样,得到的匹配度是基于图像和文本各自的全局表示和局部表示。将图像的细节特征到全局特征都考量在内,得到的匹配度更加准确和全面。故此,基于本申请实施例提供的匹配模型进行图像文本双向搜索时,搜索结果也会更加准确。
例如,可以参考图1,图1为本申请实施例提供的图像文本双向搜索方法的应用场景示意图。该场景例如可以包括终端设备11和服务器12。其中,所述终端设备11中可安装有各种客户端,如用于社交的博客客户端、微信客户端,用于了解时事的新闻客户端等。终端设备11的客户端和服务器12建立通信连接后,终端设备11的客户端可以对图像和/或文本提取全局特征和局部特征后发送给服务器12。或者终端设备11的客户端将图像和/或文本发送给服务器12,由服务器12提取图像和/或文本的全局特征和局部特征。然后,服务器12根据图像的全局特征和局部特征,基于该匹配模型搜索与该图像匹配的文本,或服务器12根据文本的全局特征和局部特征,基于该匹配模型搜索与该文本匹配的图像。然后,服务器12将搜索结果反馈给终端设备11。
其中,终端设备11和服务器12可通过通信网络进行通信连接,该网络可以为局域网、广域网等。终端设备11可以为手机、平板电脑、笔记本电脑、个人计算机等,服务器12可以为任何能够支持相应的图像文本匹配模型的训练和双向搜索的服务器设备。
需要说明的是,本申请实施例提供的方案,适用于任何需要根据文本检索图像,和/或,需要根据图像检索文本的场景中。例如,可以适用于云端相册管理(例如根据给定文本搜索出匹配的图像),微信朋友圈,QQ空间,QQ众创空间,以及微信与QQ的聊天环境中的图像和/或文本的搜索。
参照图2A,为本申请实施例提供的图像文本匹配模型的训练方法的流程示意图,所述方法由计算机实施,该计算机可以为服务器12,包括以下步骤:
S21:提取图像样本的全局特征和局部特征。
S22:提取文本样本的全局特征和局部特征。
S23:根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据图像的全局特征和局部特征以及文本的全局特征和局部特征确定所述图像和所 述文本之间的匹配度。
采用本申请提供的技术方案,根据图像样本及文本样本的全局特征及局部特征训练匹配模型,将图像及文本的局部特征到全局特征都考量在内,根据该训练得到的匹配模型确定的匹配度更加准确和全面。基于本申请实施例提供的匹配模型进行图像文本双向搜索时,搜索结果也会更加准确。
参照图2B,为本申请实施例提供的图像文本匹配模型的训练方法的流程图,该方法可以由图1所示的服务器12执行,包括以下步骤:
步骤201:提取图像样本的全局特征和局部特征。
在一些实施例中,所述全局特征为向量,用以表征对应图像的文本信息。图像样本的局部特征也为向量,向量的每一维信息表征图像的局部区域中含有对应词语类别的信息,例如,图像的局部区域中含有对应词语类别的信息的概率。步骤202:提取文本样本的全局特征和局部特征。
在一些实施例中,所述文本样本的全局特征用以表征文本样本的整体语义信息;文本样本的局部特征用以表征文本的局部语义信息的综合,其中,文本样本的局部特征更关注文本的局部信息,例如,单词,短语等。
需要说明的是,步骤201和步骤202的执行顺序不受限。
步骤203:根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据输入的图像的全局特征和局部特征以及输入的文本的全局特征和局部特征确定所述图像和所述文本之间的匹配度。
其中,所述方法在训练完匹配模型之后,还可根据训练的匹配模型确定图像和文本的匹配度,包括:
步骤204:针对所述输入的图像和文本,通过所述匹配模型将所述图像和所述文本各自的全局特征映射到指定语义空间,计算由所述图像和所述文本之间的全局特征的相似度;以及,将所述图像和所述文本各自的局部特征映射到所述指定语义空间,计算所述图像和所述文本之间的局部特征的相似度;并,根据全局特征的相似度的预设权值,以及局部特征的相似度的预设权值,采用加权求和的方式,确定所述图像和所述文本之间的所述匹配度。
如图3所示,为本申请实施例提供的图像文本匹配模型的一种框图:在图3中,针对输入的图像310,采用局部图像CNN(Convolutional Neural Network,卷积神经网络)311提取图像的局部表示(也称为局部特征)(如图中312所示);并,采用全局图像CNN 313提取图像的全局表示(也称为全局特征)(如图中314所示)。针对输入的文本320,采用局部文本编码器321提取文本的局部表示(也称为局部特征)(如图中322所示),并采用全局文本编码器323提取文本的全局表示(也称为全局特征)(如图中324所示)。在提取了图像310和文本320的局部表示和全局表示后,通过局部深度匹配将图像310和文本320各自的局部表示映射到指定语义空间,并在该指定语义空间中确定图像310和文本320构成的异构样本对(也称为图像文本对)之间的局部特征的相似度;同理,通过全局深度匹配将图像310和文本320各自的全局特征映射到指定语义空间,并在该指定语义空间中确定图像310和文本320构成的异构样本对之间的全局特征的相似度。然后,通过模型集成,根据全局特征的相似度的预设权值,以及局部特征的相似度的预设权值,采用加权求和的方式,确定异构样本对的匹配度。
为便于理解,本申请实施例提供图像文本匹配模型的训练方法,通过以下内容进行说明。
1)、关于映射到指定语义空间:
在一些实施例中,为了能够准确的得到图像和文本之间的全局表示的相似度以及局部表示的相似度,本申请实施例中,将图像样本和文本样本各自的全局表示映射到指定语义空间,具体包括:
分别将图像样本和文本样本各自的全局表示通过至少两层全连接层,映射到指定语义空间;
将图像样本和文本样本各自的局部表示映射到指定语义空间,具体包括:
分别将图像样本和文本样本的各自的局部表示通过至少两层全连接层映射到指定语义空间;
其中,全连接层是卷积神经网络的基本结构中的一层;全连接层的每一个结点都与上一层的所有结点相连,用来把前边提取到的特征综合起来;其中,全连接层用以将图像和文本的全局特征及局部特征映射到所述指定语义空间,其中,全连接操作指通过全连接层进行映射到指定语义空间的操作。全连接层的参数根据预置目 标函数训练获得,该预置目标函数用于实现语义关联的异构样本对(图像文本对)的相似度高于非语义关联的异构样本对的相似度;或者,该预置目标函数用于实现语义关联的异构样本对的相似度高于非语义关联的异构样本对的相似度、且同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度。
本申请实施例中,通过多个全连接层来准确的分析文本和图像各自的全局表示和局部表示,以便于将文本和图像的全局表示和局部表示映射到同一语义空间中。而且,全连接层的参数是根据预置目标函数确定的。通过预置目标函数能够实现根据实际情况,准确确定出异构文本对的相似度(该相似度为全局表示的相似度,或局部表示的相似度)。
此外,通过多个全连接层,可以对文本与图像描述进行多层的非线性变换,进而可以挖掘图像与文本之间的直接匹配关系。
若预置目标函数用于实现语义关联的异构样本对的相似度高于非语义关联的异构样本对的相似度,该预置目标函数可如公式(1)所示:
Figure PCTCN2018104565-appb-000001
其中,
Figure PCTCN2018104565-appb-000002
表示预置目标函数;
Figure PCTCN2018104565-appb-000003
Figure PCTCN2018104565-appb-000004
表示文本样本;
Figure PCTCN2018104565-appb-000005
Figure PCTCN2018104565-appb-000006
表示图像样本;当确定全局表示的相似度时,d()表示文本样本和图像样本的全局表示的相似度;当确定局部表示的相似度时,d()表示文本样本和图像样本的局部表示的相似度;λ 1和λ 2均表示预置系数;
Figure PCTCN2018104565-appb-000007
表示语义关联的异构样本对的相似度;
Figure PCTCN2018104565-appb-000008
Figure PCTCN2018104565-appb-000009
均表示非语义关联的异构样本对的相似度;μ 1和μ 2均表示预设阈值。
考虑到一般一个图像都会与多个样本语义关联。例如,一幅风景图像中天空有鸟飞过,水里有鱼儿游泳,那么对应的语义可以包括鸟儿在天空飞翔和鱼儿在水里游来游去。故此,为了提高匹配模型的准确性,需要使得与同一图像语义关联的文本之间的相似度,也要高于这些文本与其他图像具有语义关联关系的文本之间的相似度。预置目标函数在满足如公式(1)所述条件的基础上,需要同时要求同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似 度。为达到该目的,同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度的公式如公式(2)所示:
L(S i,S l,S j)=max(0,u 3+d(S i,S l)-d(S i,S j))
(2)其中,L(S i,S l,S j)表示要求同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度的预置目标函数;S i,S l表示同一图像样本语义关联的文本样本;S i,S j表示不同图像样本关联的文本样本;当确定全局表示的相似度时,d()表示文本样本之间的全局表示的相似度;当确定局部表示的相似度时,d()表示文本样本之间的局部表示的相似度;u 3表示预设阈值。
当然,具体实施时,可以将公式(1)和公式(2)进行整合,得到如公式(3)或公式(4)所述形式的预置目标函数,得到的预置目标函数能够满足上述如公式(1)和公式(2)所述的要求:
Figure PCTCN2018104565-appb-000010
Figure PCTCN2018104565-appb-000011
需要说明的是,具体实施时,可以根据预置目标函数的要求设计具体的数学表达方式,本申请实施例对此不作限定。
根据预置目标函数的作用,可以训练如图4所示的深度匹配模型。该深度匹配模型用以确定图像和文本之间的匹配度。图4中,左侧输入图像的特征向量(image embedding)(该特征向量为全局特征或局部特征的特征向量),右侧输入文本的特征向量(sentence embeding)(该特征向量为全局特征的特征向量或局部特征的特征向量)。图像和文本的特征向量映射到同一指定语义空间后,计算特征向量之间的距离。例如,图4中,
Figure PCTCN2018104565-appb-000012
S m表示文本的特征向量,I 1和I n表示图像的特征向量。在该指定语义空间中,计算图像和文本之间的距离。若采用的特征向量为用于表示全局特征的特征向量,则计算的结果为全局特征之间的相似度,若采用的特征向量为表示局部特征的特征向量,则计算的结果为局部特征之间的相似度。
2)关于图像样本全局表示(全局特征)和局部表示(局部特征)的提取:
本申请实施例对提取图像的全局特征不作限定。例如采用图像的卷积神经网络 的全连接层的特征表示图像的全局表示,如前述的CNN,这里的CNN可以选择但不限于VGG(Very Deep Convolutional Networks for Large-Scale Image Recognition,大规模图像识别的深度卷积网络),ResNet(Residual Networks,残差网络),Inception,Inception V3,Inception V4等。当然,也可以采用FCN(Fully Convolutional Networks for Semantic Segmentation,全卷积网络)等网络模型来提取图像的全局表示。
这里,对本申请实施例提供的提取图像样本的局部表示进行说明,具体可执行为:
将图像样本划分为指定数量的图像块,针对每个图像块,计算该图像块中包含指定类别的图像信息的概率;并,
选取指定数量的图像块中各指定类别的图像信息的最大概率;由各指定类别的图像信息的最大概率构成图像样本的局部特征。
例如,如图5所示,图5中Image CNN表示采用图像CNN提取图像块的特征。本申请的重点在于,对于给定的一幅图像,对其进行分块后,提取各图像块的特征。假设图像信息的类别共有5种,分别为人、草地、天空、狗和猫。若假设提取的图像块有4个,则针对每个图像块计算该图像块包括以上5种类别的图像信息的概率。然后,针对每种类别,从4个图像块的该类别的概率中选取最大概率。由各类别的最大概率构成图像样本的全局表示。
当然需要说明的是,具体实施时,也可以针对每种类别,比较该类别的最大概率与对应概率阈值,来判断样本图像中是否至少有一个图像块包含该类别的图像信息。例如,对于人这一类别,其在4个图像块中最大概率为0.99,对应概率阈值为0.8,则说明4个图像块中至少有一个图像块包含人。
3)、关于文本样本全局表示(全局特征)和局部表示(局部特征)的提取:
本申请实施例中,为了能够更好的提取出文本样本的全局表示,包括以下步骤:
对文本样本进行分词;
针对每个分词,确定该分词的向量,其中,不同分词的向量长度相同;
将同一文本样本的分词的向量,输入给用于提取文本的全局特征的卷积神经网络,得到该文本样本的全局特征;其中,用于提取文本样本的全局特征的神经网络中包括多个卷积层以及连接在该多个卷积层之后的池化层、且上一层卷积层的指定大小的视野域作为下一层卷积层的输入,该指定大小的视野域包括该上一层卷积层 提取的至少两个分词向量的特征。
例如,具体实施时可用如下公式(5)表示卷积层的卷积操作:
Figure PCTCN2018104565-appb-000013
其中,
Figure PCTCN2018104565-appb-000014
在公式(5)中,r表示指定大小的视野域;l-1表示第l-1层卷积层(即上一层卷积层);l表示第l层卷积层(即下一层卷积层);W l,f表示乘积矩阵;f表示第f个特征;i表示第i个位置信息;
Figure PCTCN2018104565-appb-000015
表示第l层卷积层提取的特征对应i位置的f特征。
其中,池化层的操作可以用如下公式(6)表示:
Figure PCTCN2018104565-appb-000016
其中,
Figure PCTCN2018104565-appb-000017
表示池化层的输出;l+1表示池化层;
Figure PCTCN2018104565-appb-000018
表示第l层提取的第M×i特征;M表示一个常数用于控制池化操作的大小。
例如如图6所示,例如输入的文本为“a young child run through a large field of grass”,通过文本卷积神经网络(即图中的Sentence CNN)来提取文本的全局表示。具体的,该Sentence CNN中包括多个卷积层convolution来提取文本的特征,然后通过最大池化层(max-pooling)来对卷积层提取的特征进行整合降维,从而得到文本的全局表示。
这样,本申请实施例通过多个卷积层实现对文本样本特征的提取,然后通过池化层来过滤无用的特征信息。而其中,在使用多个卷积层进行卷积操作时,采用的是指定大小的视野域,由于该视野域中包括了多个分词的特征,所以相当于实现了文本样本的全局表示中学习了相邻分词之间的组织以及交互信息,使得最终提取的全局表示更加合理准确。
具体实施时,可以采用word2vec工具将每个分词用一个定长的向量来表示。
此外,用于提取文本的全局表示的神经网络可以是卷积神经网络,也可以是RNN(Recurrent Neural Networks,循环神经网络)。
文本样本的局部表示可以采用多种方法提取,可以更集中于每一个分词,譬如采用传统的TF-IDF(term frequency–inverse document frequency)表示,或者Fisher Vector作用于每一个分词的向量上,或者分词的向量的平均值。这样的表示更加集 中于分词本身,而不是整体考虑每个分词跟分词之间的相关性,故此可以被认为是文本的局部表示。
下面,对本申请实施例中基于上述匹配模型的图像文本双向搜索方法进行说明。
如图7所示,为本申请实施例中提供的图像文本匹配模型的训练方法的具体实施例的流程示意图,该方法包括以下步骤:
步骤701:基于全局图像表示CNN提取图像样本的全局表示。
步骤702:将图像样本划分为指定数量的图像块,基于局部图像CNN针对每个图像块,计算该图像块中包含指定类别的图像信息的概率;并,选取指定数量的图像块中各指定类别的图像信息的最大概率;由各指定类别的图像信息的最大概率构成图像样本的局部表示。
步骤703:对文本样本进行分词;针对每个分词,确定该分词的向量,其中,不同分词的向量长度相同;将同一文本样本的分词的向量,输入给预先构建的用于提取文本的全局表示的卷积神经网络,得到该文本样本的全局表示;其中,用于提取文本样本的全局表示的神经网络中包括多个卷积层以及连接在该多个卷积层之后的池化层、且上一层卷积层的指定大小的视野域作为下一层卷积层的输入,该指定大小的视野域包括该上一层卷积层提取的至少两个分词向量的特征。
步骤704:提取文本样本的局部表示。
其中,步骤701-步骤704的执行顺序不受限。
步骤705:分别将图像样本和文本样本各自的全局表示通过至少两层全连接层,映射到指定语义空间,并计算由图像样本和文本样本构成的异构样本对(图像文本对)之间的全局表示的相似度,其中,全连接层的参数根据预置目标函数训练获得。
步骤706:分别将图像样本和文本样本的各自的局部表示通过至少两层全连接层,映射到指定语义空间,计算异构样本对(图像样本对)之间的局部表示的相似度,其中,全连接层的参数根据预置目标函数训练获得。
其中,步骤705和步骤706的执行顺序不受限。
此外,预置目标函数已在上述实施例中说明,此处不再赘述。
步骤707:根据全局表示的相似度的预设权值,以及局部表示的相似度的预设权值,采用加权求和的方式,确定异构样本对的匹配度。
本申请实施例中,通过图像块提取图像的局部表示,通过多个卷积层和池化层 提取文本的全局表示,能够得到文本的分词之间的关联关系,使得提取的特征更加准确和全面。然后,通过预置目标函数使得语义关联的异构样本对的相似度高于非语义关联的异构样本对的相似度、且同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度,从而使得最终相似度的计算更加符合实际需求,提高图像和文本匹配的准确性。
如图8所示,为基于上述实施例中的匹配模型的图像文本双向搜索方法的流程图,所述方法由计算机实施,该计算机可以为服务器12,所述方法包括以下步骤:
步骤801:接收参考样本,所述参考样本为文本或图像。
步骤802:提取所述参考样本的全局特征和局部特征。
步骤803:将所述参考样本的全局特征和局部特征输入匹配模型,以使所述匹配模型计算所述参考样本与相应素材的匹配度;其中,若所述参考样本为文本,则所述相应素材为图像;若所述参考样本为图像,则所述相应素材为文本;所述匹配模型能够基于所述参考样本的全局特征和局部特征以及所述相应素材的全局特征和局部特征确定所述参考样本和所述相应素材之间的匹配度。
其中,可以建立素材库,计算参考样本与素材库中各相应素材的匹配度。具体计算匹配度的方法已在上述实施例中说明,这里不再赘述。
步骤804:选取匹配度大于指定匹配度的相应素材,作为与所述参考样本匹配的素材。
本申请实施例实现了基于全局表示和局部表示的匹配模型来搜索参考样本的相应素材,使得最终得到的匹配结果更加准确。例如搜索与文本匹配的图像,或者搜索与图像匹配的问题。
基于与上述实施例相同的发明构思,本申请实施例还提供一种图像文本匹配模型的训练装置,该装置的原理和有益效果与上述方法实施例中所述内容相似,在此不再赘述。
如图9所示,为该装置的结构示意图,所述装置包括:
图像特征提取模块901,用于提取图像样本的全局特征和局部特征;
文本特征提取模块902,用于提取文本样本的全局特征和局部特征;
训练模块903,用于根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所 述匹配模型用以根据输入的图像的全局特征和局部特征以及输入的文本的全局特征和局部特征确定所述图像和所述文本之间的匹配度。
在一些实例中,通过所述匹配模型将所述图像和所述文本各自的全局特征映射到指定语义空间,计算所述图像和所述文本之间的全局特征的相似度;以及,将所述图像和所述文本各自的局部特征映射到所述指定语义空间,计算所述图像和所述文本之间的局部特征的相似度;并,根据全局特征的相似度的预设权值,以及局部特征的相似度的预设权值,采用加权求和的方式,确定所述图像和所述文本之间的所述匹配度。
在一些实例中,所述匹配模型包括至少两层全连接层,所述匹配模型包括至少两层全连接层,所述匹配模型的模型参数包括所述至少两层全连接层的参数;
训练模块903,具体包括:
全局训练单元9031,用于将所述图像样本和所述文本样本各自的全局特征通过所述至少两层全连接层,映射到指定语义空间;;
局部训练单元9032,用于将所述图像样本和所述文本样本的各自的局部特征通过所述至少两层全连接层,映射到所述指定语义空间;
根据映射的结果及预置目标函数确定所述至少两层全连接层的参数,其中,所述预置目标函数用于实现语义关联的图像文本对的相似度高于非语义关联的图像文本对的相似度;或者,
所述预置目标函数用于实现语义关联的图像文本对的相似度高于非语义关联的图像文本对的相似度、且同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度。
在一些实例中,所述预置目标函数用于实现语义关联的图像文本对的相似度高于非语义关联的图像文本对的相似度;
其中,所述映射结果包括:通过所述至少两层全连接层的参数表示的所述图像样本的全局特征及局部特征、以及通过所述至少两层全连接层的参数表示的所述文本样本的全局特征及局部特征;
所述训练模块903,用以:
根据所述至少两层全连接层参数表示的所述图像样本的全局特征及局部特征以及所述至少两层全连接层参数表示的所述文本样本的全局特征及局部特征,确定所 述至少两层全连接层参数表示的语义关联的图像文本对的相似度,以及所述至少两层全连接层参数表示的非语义关联的图像文本对的相似度;
将所述至少两层全连接层参数表示的语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的非语义关联的图像文本对的相似度输入所述预置目标函数,确定所述至少两层全连接层的参数。
若预置目标函数用于实现语义关联的异构样本对的相似度高于非语义关联的异构样本对的相似度,该预置目标函数为:
Figure PCTCN2018104565-appb-000019
其中,
Figure PCTCN2018104565-appb-000020
表示预置目标函数;
Figure PCTCN2018104565-appb-000021
表示文本样本;
Figure PCTCN2018104565-appb-000022
表示图像样本;当确定全局表示的相似度时,d()表示文本样本和图像样本的全局表示的相似度;当确定局部表示的相似度时,d()表示文本样本和图像样本的局部表示的相似度;λ 1和λ 2均表示预置系数;
Figure PCTCN2018104565-appb-000023
表示语义关联的异构样本对的相似度;
Figure PCTCN2018104565-appb-000024
Figure PCTCN2018104565-appb-000025
均表示非语义关联的异构样本对的相似度;μ 1和μ 2均表示预设阈值。
在一些实例中,所述预置目标函数用于实现语义关联的图像文本对的相似度高于非语义关联的图像文本对的相似度、且同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度;
其中,所述映射结果包括:所述至少两层全连接层参数表示的图像样本的全局特征及局部特征以及所述至少两层全连接层参数表示的文本样本的全局特征及局部特征;
所述训练模块903,用以:
根据所述至少两层全连接层参数表示的图像样本的全局特征及局部特征以及所述至少两层全连接层参数表示的文本样本的全局特征及局部特征,确定所述至少两层全连接层参数表示的语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的非语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的同一图像样本关联的文本样本之间的相似度、所述至少两层全连接层参数表示的不同图像样本关联的文本样本之间的相似度;
将所述至少两层全连接层参数表示的语义关联的图像文本对的相似度、所述至 少两层全连接层参数表示的非语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的同一图像样本关联的文本样本之间的相似度、所述至少两层全连接层参数表示的不同图像样本关联的文本样本之间的相似度输入所述预置目标函数,确定所述至少两层全连接层的参数。
在一些实例中,通过以下之一确定所述预置目标函数:
Figure PCTCN2018104565-appb-000026
Figure PCTCN2018104565-appb-000027
其中,
Figure PCTCN2018104565-appb-000028
其中,其中,LY为预置目标函数,
Figure PCTCN2018104565-appb-000029
表征语义关联的图像文本对的相似度与非语义关联的图像文本对的相似度之间的关系,L(S i,S l,S j)表征同一图像样本关联的文本样本之间的相似度与不同图像样本关联的文本样本之间的相似度之间的关系;
Figure PCTCN2018104565-appb-000030
表示文本样本;
Figure PCTCN2018104565-appb-000031
表示图像样本;当确定全局特征的相似度时,d()表示文本样本和图像样本的全局特征的相似度;当确定局部特征的相似度时,d()表示文本样本和图像样本的局部特征的相似度;λ 1和λ 2均表示预置系数;
Figure PCTCN2018104565-appb-000032
表示语义关联的异构样本对(图像文本对)的相似度;
Figure PCTCN2018104565-appb-000033
Figure PCTCN2018104565-appb-000034
均表示非语义关联的异构样本对(图像文本对)的相似度;u 1和u 2均表示预设阈值;
其中,L(S i,S l,S j)=max(0,u 3+d(S i,S l)-d(S i,S j))
S i,S l表示同一图像样本语义关联的文本样本;S i,S j表示不同图像样本关联的文本样本;当确定全局特征的相似度时,d()表示文本样本之间的全局特征的相似度;当确定局部特征的相似度时,d()表示文本样本之间的局部特征的相似度;u 3表示预设阈值。
在一些实施例中,图像特征提取模块,具体用于将图像样本划分为指定数量的图像块,针对每个图像块,计算该图像块中包含指定类别的图像信息的概率;并,
选取指定数量的图像块中各指定类别的图像信息的最大概率;由各指定类别的图像信息的最大概率构成图像样本的局部特征。
在一些实施例中,文本特征提取模块,具体用于对文本样本进行分词;
针对每个分词,确定该分词的向量,其中,不同分词的向量长度相同;
将同一文本样本的分词的向量,输入给用于提取文本的全局特征的卷积神经网络,得到该文本样本的全局特征;其中,用于提取文本样本的全局特征的神经网络中包括多个卷积层以及连接在该多个卷积层之后的池化层、且上一层卷积层的指定大小的视野域作为下一层卷积层的输入,该指定大小的视野域包括该上一层卷积层提取的至少两个分词向量的特征。
基于与上述实施例相同的发明构思,本申请实施例还提供一种图像文本双向搜索装置,该装置的原理和有益效果与上述方法实施例中所述内容相似,在此不再赘述。
如图10所示,为该装置的结构示意图,所述装置包括:
参考样本接收模块1001,用于接收参考样本,所述参考样本为文本或图像;
参考样本特征提取模块1002,用于提取所述参考样本的全局特征和局部特征;
搜索模块1003,用于将所述参考样本的全局特征和局部特征输入匹配模型,以使所述匹配模型计算所述参考样本与相应素材的匹配度;其中,若所述参考样本为文本,则所述相应素材为图像;若所述参考样本为图像,则所述相应素材为文本;所述匹配模型能够基于所述参考样本的全局特征和局部特征以及所述相应素材的全局特征和局部特征确定所述参考样本和所述相应素材之间的匹配度;
选择模块1004,用于选取匹配度大于指定匹配度的相应素材,作为与所述参考样本匹配的素材。
本申请实施例还提供了一种计算设备,该计算设备具体可以为桌面计算机、便携式计算机、智能手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)等。如图11所示,该计算设备可以包括中央处理器(Center Processing Unit,CPU)1101、存储器1102、输入设备1103,输出设备1104等,输入设备可以包括键盘、鼠标、触摸屏等,输出设备可以包括显示设备,如液晶显示器(Liquid Crystal Display,LCD)、阴极射线管(Cathode Ray Tube,CRT)等。
存储器可以包括只读存储器(ROM)和随机存取存储器(RAM),并向处理器提供存储器中存储的程序指令和数据。在本申请实施例中,存储器可以用于存储图像文本匹配模型的训练方法和/或图像文本双向搜索方法的程序指令。处理器通过调 用存储器存储的程序指令,处理器用于按照获得的程序指令执行:提取图像样本的全局特征和局部特征;以及,提取文本样本的全局特征和局部特征;根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据输入的图像的全局特征和局部特征以及输入的文本的全局特征和局部特征确定所述图像和所述文本之间的匹配度。
或者,处理器通过调用存储器存储的程序指令,处理器用于按照获得的程序指令执行:接收参考样本,所述参考样本为文本或图像;提取所述参考样本的全局特征和局部特征;将所述参考样本的全局特征和局部特征输入匹配模型,以使所述匹配模型计算所述参考样本与相应素材的匹配度;其中,若所述参考样本为文本,则所述相应素材为图像;若所述参考样本为图像,则所述相应素材为文本;所述匹配模型能够基于所述参考样本的全局特征和局部特征以及所述相应素材的全局特征和局部特征确定所述参考样本和所述相应素材之间的匹配度;选取匹配度大于指定匹配度的相应素材,作为与所述参考样本匹配的素材。
本申请提供了一种计算机存储介质,用于储存为上述计算设备所用的计算机程序指令,其包含用于执行上述图像文本匹配模型的训练方法和/或图像文本双向搜索方法的程序。
所述计算机存储介质可以是计算机能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NAND FLASH)、固态硬盘(SSD))等。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (16)

  1. 一种图像文本匹配模型的训练方法,所述方法由计算机实施,所述方法包括:
    提取图像样本的全局特征和局部特征;以及,
    提取文本样本的全局特征和局部特征;
    根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据输入的图像的全局特征和局部特征以及输入的文本的全局特征和局部特征确定所述图像和所述文本之间的匹配度。
  2. 根据权利要求1所述的方法,进一步包括:通过所述匹配模型将所述图像和所述文本各自的全局特征映射到指定语义空间,计算所述图像和所述文本之间的全局特征的相似度;以及,将所述图像和所述文本各自的局部特征映射到所述指定语义空间,计算所述图像和所述文本之间的局部特征的相似度;并,根据全局特征的相似度的预设权值,以及局部特征的相似度的预设权值,采用加权求和的方式,确定所述图像和所述文本之间的所述匹配度。
  3. 根据权利要求1所述的方法,其中,所述匹配模型包括至少两层全连接层,所述匹配模型的模型参数包括所述至少两层全连接层的参数;
    其中,所述根据提取的图像样本的全局特征和局部特征以及文本样本的全局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数包括:将所述图像样本和所述文本样本各自的全局特征通过所述至少两层全连接层,映射到指定语义空间;将所述图像样本和所述文本样本的各自的局部特征通过所述至少两层全连接层,映射到所述指定语义空间;
    根据映射的结果及预置目标函数确定所述至少两层全连接层的参数,其中,所述预置目标函数用于实现语义关联的图像文本对的相似度高于非语义关联的图像文本对的相似度;或者,
    所述预置目标函数用于实现语义关联的图像文本对的相似度高于非语义关联的图像文本对的相似度、且同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度。
  4. 根据权利要求3所述的方法,其中,所述预置目标函数用于实现语义关联的 图像文本对的相似度高于非语义关联的图像文本对的相似度;
    其中,所述映射结果包括:通过所述至少两层全连接层的参数表示的所述图像样本的全局特征及局部特征、以及通过所述至少两层全连接层的参数表示的所述文本样本的全局特征及局部特征;
    所述根据映射的结果及预置目标函数确定所述至少两层全连接层的参数包括:
    根据所述至少两层全连接层参数表示的所述图像样本的全局特征及局部特征以及所述至少两层全连接层参数表示的所述文本样本的全局特征及局部特征,确定所述至少两层全连接层参数表示的语义关联的图像文本对的相似度,以及所述至少两层全连接层参数表示的非语义关联的图像文本对的相似度;
    将所述至少两层全连接层参数表示的语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的非语义关联的图像文本对的相似度输入所述预置目标函数,确定所述至少两层全连接层的参数。
  5. 根据权利要求4所述的方法,其中,
    所述预置目标函数为:
    Figure PCTCN2018104565-appb-100001
    其中,
    Figure PCTCN2018104565-appb-100002
    表示预置目标函数;
    Figure PCTCN2018104565-appb-100003
    表示文本样本;
    Figure PCTCN2018104565-appb-100004
    表示图像样本;当确定全局特征的相似度时,d()表示文本样本和图像样本的全局特征的相似度;当确定局部特征的相似度时,d()表示文本样本和图像样本的局部特征的相似度;λ 1和λ 2均表示预置系数;
    Figure PCTCN2018104565-appb-100005
    表示语义关联的图像文本对的相似度;
    Figure PCTCN2018104565-appb-100006
    Figure PCTCN2018104565-appb-100007
    均表示非语义关联的图像文本对的相似度;μ 1和μ 2均表示预设阈值。
  6. 根据权利要求3所述的方法,其中,所述预置目标函数用于实现语义关联的图像文本对的相似度高于非语义关联的图像文本对的相似度、且同一图像样本关联的文本样本之间的相似度高于不同图像样本关联的文本样本之间的相似度;
    其中,所述映射结果包括:所述至少两层全连接层参数表示的图像样本的全局特征及局部特征以及所述至少两层全连接层参数表示的文本样本的全局特征及局部特征;
    其中,所述根据映射的结果及预置目标函数确定所述至少两层全连接层的参数 包括:
    根据所述至少两层全连接层参数表示的图像样本的全局特征及局部特征以及所述至少两层全连接层参数表示的文本样本的全局特征及局部特征,确定所述至少两层全连接层参数表示的语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的非语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的同一图像样本关联的文本样本之间的相似度、所述至少两层全连接层参数表示的不同图像样本关联的文本样本之间的相似度;
    将所述至少两层全连接层参数表示的语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的非语义关联的图像文本对的相似度、所述至少两层全连接层参数表示的同一图像样本关联的文本样本之间的相似度、所述至少两层全连接层参数表示的不同图像样本关联的文本样本之间的相似度输入所述预置目标函数,确定所述至少两层全连接层的参数。
  7. 根据权利要求6所述的方法,其中,通过以下之一确定所述预置目标函数:
    Figure PCTCN2018104565-appb-100008
    Figure PCTCN2018104565-appb-100009
    其中,
    Figure PCTCN2018104565-appb-100010
    其中,LY为预置目标函数,
    Figure PCTCN2018104565-appb-100011
    表征语义关联的图像文本对的相似度与非语义关联的图像文本对的相似度之间的关系,L(S i,S l,S j)表征同一图像样本关联的文本样本之间的相似度与不同图像样本关联的文本样本之间的相似度之间的关系;
    Figure PCTCN2018104565-appb-100012
    表示文本样本;
    Figure PCTCN2018104565-appb-100013
    表示图像样本;当确定全局特征的相似度时,d()表示文本样本和图像样本的全局特征的相似度;当确定局部特征的相似度时,d()表示文本样本和图像样本的局部特征的相似度;λ 1和λ 2均表示预置系数;
    Figure PCTCN2018104565-appb-100014
    表示语义关联的图像文本对的相似度;
    Figure PCTCN2018104565-appb-100015
    Figure PCTCN2018104565-appb-100016
    均表示非语义关联的图像文本对的相似度;u 1和u 2均表示预设阈值;
    其中,L(S i,S l,S j)=max(0,u 3+d(S i,S l)-d(S i,S j))
    S i,S l表示同一图像样本语义关联的文本样本;S i,S j表示不同图像样本关联的 文本样本;当确定全局特征的相似度时,d()表示文本样本之间的全局特征的相似度;当确定局部特征的相似度时,d()表示文本样本之间的局部特征的相似度;u 3表示预设阈值。
  8. 根据权利要求1所述的方法,其中,提取图像样本的局部特征包括:
    将图像样本划分为指定数量的图像块,针对每个图像块,计算该图像块中包含指定类别的图像信息的概率;并,
    选取指定数量的图像块中各指定类别的图像信息的最大概率;由各指定类别的图像信息的最大概率构成图像样本的局部特征。
  9. 根据权利要求1所述的方法,其中,提取文本样本的全局特征,具体包括:
    对文本样本进行分词;
    针对每个分词,确定该分词的向量,其中,不同分词的向量长度相同;
    将同一文本样本的分词的向量,输入给用于提取文本的全局特征的卷积神经网络,得到该文本样本的全局特征;其中,用于提取文本样本的全局特征的神经网络中包括多个卷积层以及连接在该多个卷积层之后的池化层、且上一层卷积层的指定大小的视野域作为下一层卷积层的输入,该指定大小的视野域包括该上一层卷积层提取的至少两个分词向量的特征。
  10. 一种图像文本双向搜索方法,所述方法由计算机实施,所述方法包括:
    接收参考样本,所述参考样本为文本或图像;
    提取所述参考样本的全局特征和局部特征;
    将所述参考样本的全局特征和局部特征输入匹配模型,以使所述匹配模型计算所述参考样本与相应素材的匹配度;其中,若所述参考样本为文本,则所述相应素材为图像;若所述参考样本为图像,则所述相应素材为文本;所述匹配模型能够基于所述参考样本的全局特征和局部特征以及所述相应素材的全局特征和局部特征确定所述参考样本和所述相应素材之间的匹配度;
    选取匹配度大于指定匹配度的相应素材,作为与所述参考样本匹配的素材。
  11. 一种图像文本匹配模型的训练装置,其中,所述装置包括:
    图像特征提取模块,用于提取图像样本的全局特征和局部特征;
    文本特征提取模块,用于提取文本样本的全局特征和局部特征;
    训练模块,用于根据提取的图像样本的全局特征和局部特征以及文本样本的全 局特征和局部特征,训练匹配模型,确定所述匹配模型的模型参数,其中,所述匹配模型用以根据图像的全局特征和局部特征以及文本的全局特征和局部特征确定所述图像和所述文本之间的匹配度。
  12. 一种图像文本双向搜索装置,其中,所述装置包括:
    参考样本接收模块,用于接收参考样本,所述参考样本为文本或图像;
    参考样本特征提取模块,用于提取所述参考样本的全局特征和局部特征;
    搜索模块,用于将所述参考样本的全局特征和局部特征输入匹配模型,以使所述匹配模型计算所述参考参考样本与相应素材的匹配度;其中,若所述参考样本为文本,则所述相应素材为图像;若所述参考样本为图像,则所述相应素材为文本;所述匹配模型能够基于所述参考样本的全局特征和局部特征以及所述相应素材的全局特征和局部特征确定所述参考样本和所述相应素材之间的匹配度;
    选择模块,用于选取匹配度大于指定匹配度的相应素材,作为与所述参考样本匹配的素材。
  13. 一种计算设备,其中,包括存储器和处理器,其中,所述存储器用于存储程序指令,所述处理器用于调用所述存储器中存储的程序指令,按照获得的程序指令执行如权利要求1-9任一所述的图像文本匹配模型的训练方法。
  14. 一种计算机存储介质,其中,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行如权利要求1-9任一所述的图像文本匹配模型的训练方法。
  15. 一种计算设备,其中,包括存储器和处理器,其中,所述存储器用于存储程序指令,所述处理器用于调用所述存储器中存储的程序指令,按照获得的程序指令执行如权利要求10所述的图像文本双向搜索方法。
  16. 一种计算机存储介质,其中,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行如权利要求10所述的图像文本双向搜索方法。
PCT/CN2018/104565 2017-09-12 2018-09-07 图像文本匹配模型的训练方法、双向搜索方法及相关装置 Ceased WO2019052403A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
EP18857317.4A EP3683724A4 (en) 2017-09-12 2018-09-07 LEARNING PROCESS FOR IMAGE-TEXT MATCHING MODEL, BIDIRECTIONAL SEARCH PROCESS, AND RELATED APPARATUS
KR1020197030955A KR102235051B1 (ko) 2017-09-12 2018-09-07 이미지-텍스트 매칭 모델을 위한 트레이닝 방법, 양방향 검색 방법 및 관련 장치
JP2019564942A JP6887026B2 (ja) 2017-09-12 2018-09-07 画像テキストマッチングモデルのトレーニング方法、双方向検索方法及び関連装置
US16/579,411 US11087166B2 (en) 2017-09-12 2019-09-23 Training method of image-text matching model, bi-directional search method, and relevant apparatus
US17/349,904 US11699298B2 (en) 2017-09-12 2021-06-16 Training method of image-text matching model, bi-directional search method, and relevant apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710817344.5A CN108288067B (zh) 2017-09-12 2017-09-12 图像文本匹配模型的训练方法、双向搜索方法及相关装置
CN201710817344.5 2017-09-12

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/579,411 Continuation US11087166B2 (en) 2017-09-12 2019-09-23 Training method of image-text matching model, bi-directional search method, and relevant apparatus

Publications (1)

Publication Number Publication Date
WO2019052403A1 true WO2019052403A1 (zh) 2019-03-21

Family

ID=62831544

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104565 Ceased WO2019052403A1 (zh) 2017-09-12 2018-09-07 图像文本匹配模型的训练方法、双向搜索方法及相关装置

Country Status (6)

Country Link
US (2) US11087166B2 (zh)
EP (1) EP3683724A4 (zh)
JP (1) JP6887026B2 (zh)
KR (1) KR102235051B1 (zh)
CN (2) CN108288067B (zh)
WO (1) WO2019052403A1 (zh)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209859A (zh) * 2019-05-10 2019-09-06 腾讯科技(深圳)有限公司 地点识别及其模型训练的方法和装置以及电子设备
CN111581418A (zh) * 2020-04-29 2020-08-25 山东科技大学 一种基于图像关联人物信息的目标人员搜索方法
CN111666969A (zh) * 2020-04-22 2020-09-15 北京百度网讯科技有限公司 计算图文相似度的方法、装置、电子设备和可读存储介质
CN112000803A (zh) * 2020-07-28 2020-11-27 北京小米松果电子有限公司 文本分类方法及装置、电子设备及计算机可读存储介质
CN112052352A (zh) * 2020-09-07 2020-12-08 北京达佳互联信息技术有限公司 视频排序方法、装置、服务器及存储介质
CN112529986A (zh) * 2019-09-19 2021-03-19 百度在线网络技术(北京)有限公司 图文相关性的计算模型建立方法、计算方法及装置
KR20210089597A (ko) * 2020-01-08 2021-07-16 바이두 온라인 네트웍 테크놀러지 (베이징) 캄파니 리미티드 비디오 검색 방법, 장치, 기기 및 매체
CN113221680A (zh) * 2021-04-26 2021-08-06 西北工业大学 基于文本动态引导视觉特征提炼的文本行人检索方法
CN113535829A (zh) * 2020-04-17 2021-10-22 阿里巴巴集团控股有限公司 排序模型的训练方法、装置、电子设备及存储介质
CN114154512A (zh) * 2021-12-09 2022-03-08 京东科技信息技术有限公司 小样本学习处理方法、装置、设备及存储介质
CN114283428A (zh) * 2021-08-12 2022-04-05 腾讯科技(深圳)有限公司 一种图像处理方法、装置及计算机设备
JP2022530868A (ja) * 2019-05-09 2022-07-04 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 機械学習に基づくターゲットオブジェクト属性予測方法、関連機器及びコンピュータプログラム
JP2022543052A (ja) * 2020-06-29 2022-10-07 北京市商▲湯▼科技▲開▼▲發▼有限公司 文書処理方法、文書処理装置、文書処理機器、コンピュータ可読記憶媒体及びコンピュータプログラム
CN115496140A (zh) * 2022-09-19 2022-12-20 北京邮电大学 一种多模态虚假新闻检测方法及系统
WO2024011814A1 (zh) * 2022-07-12 2024-01-18 苏州元脑智能科技有限公司 一种图文互检方法、系统、设备及非易失性可读存储介质
CN118013069A (zh) * 2024-04-09 2024-05-10 杭州海康威视数字技术股份有限公司 一种图像检索方法、装置、存储介质和电子设备
US12613892B2 (en) 2023-12-04 2026-04-28 Toyota Research Institute, Inc. System and method for learning and communicating implicit stylistic preferences from historical user interaction data in text-to-image prompt engineering

Families Citing this family (86)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6333871B2 (ja) * 2016-02-25 2018-05-30 ファナック株式会社 入力画像から検出した対象物を表示する画像処理装置
CN108288067B (zh) 2017-09-12 2020-07-24 腾讯科技(深圳)有限公司 图像文本匹配模型的训练方法、双向搜索方法及相关装置
US11216512B2 (en) * 2018-10-08 2022-01-04 Fujitsu Limited Accessible machine learning backends
CN110147806B (zh) * 2018-10-08 2023-04-07 腾讯科技(深圳)有限公司 图像描述模型的训练方法、装置及存储介质
CN109858555B (zh) 2019-02-12 2022-05-17 北京百度网讯科技有限公司 基于图像的数据处理方法、装置、设备及可读存储介质
CN111666437A (zh) * 2019-03-07 2020-09-15 北京奇虎科技有限公司 一种基于局部匹配的图文检索方法及装置
CN109933802B (zh) * 2019-03-25 2023-05-26 腾讯科技(深圳)有限公司 图文匹配方法、装置及存储介质
CN110134965B (zh) * 2019-05-21 2023-08-18 北京百度网讯科技有限公司 用于信息处理的方法、装置、设备和计算机可读存储介质
CN112182341A (zh) * 2019-07-05 2021-01-05 北京奇虎科技有限公司 资讯图文匹配模型的训练方法、装置及计算设备
CN110516085B (zh) 2019-07-11 2022-05-17 西安电子科技大学 基于双向注意力的图像文本互检索方法
CN110598739B (zh) * 2019-08-07 2023-06-23 广州视源电子科技股份有限公司 图文转换方法、设备、智能交互方法、设备及系统、客户端、服务器、机器、介质
CN110532414B (zh) * 2019-08-29 2022-06-21 深圳市商汤科技有限公司 一种图片检索方法及装置
CN112528624B (zh) * 2019-09-03 2024-05-14 阿里巴巴集团控股有限公司 文本处理方法、装置、搜索方法以及处理器
CN112580658B (zh) * 2019-09-29 2024-03-12 中国移动通信集团辽宁有限公司 图像语义描述方法、装置、计算设备及计算机存储介质
CN110825901B (zh) * 2019-11-11 2024-08-06 腾讯科技(北京)有限公司 基于人工智能的图文匹配方法、装置、设备及存储介质
WO2021098585A1 (en) * 2019-11-22 2021-05-27 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image search based on combined local and global information
CN111091010B (zh) * 2019-11-22 2024-12-03 京东方科技集团股份有限公司 相似度确定、网络训练、查找方法及装置和存储介质
CN110991533B (zh) * 2019-12-03 2023-08-04 Oppo广东移动通信有限公司 图像识别方法、识别装置、终端设备及可读存储介质
CN111309950A (zh) * 2020-01-18 2020-06-19 青柠知享科技(深圳)有限公司 电商交易信息交互方法、电商平台和可读存储介质
CN111309951A (zh) * 2020-01-23 2020-06-19 北京达佳互联信息技术有限公司 广告语获取方法及其装置、存储介质
CN111626058B (zh) * 2020-04-15 2023-05-30 井冈山大学 基于cr2神经网络的图像-文本双编码实现方法及系统
CN111522986B (zh) * 2020-04-23 2023-10-10 北京百度网讯科技有限公司 图像检索方法、装置、设备和介质
CN111666753B (zh) * 2020-05-11 2023-04-18 清华大学深圳国际研究生院 基于全局和局部匹配的短文本匹配方法及系统
CN111639484A (zh) * 2020-05-15 2020-09-08 北京青牛技术股份有限公司 坐席通话内容的分析方法
CN113849679B (zh) * 2020-06-28 2025-07-15 京东科技控股股份有限公司 图像检索方法、装置、电子设备及存储介质
CN112148839A (zh) * 2020-09-29 2020-12-29 北京小米松果电子有限公司 图文匹配方法、装置及存储介质
CN114416915A (zh) * 2020-10-09 2022-04-29 阿里巴巴集团控股有限公司 判断查询文本与目标文本相似度的方法及装置
CN112347791B (zh) * 2020-11-06 2023-10-13 北京奇艺世纪科技有限公司 文本匹配模型的构建方法、系统、计算机设备及存储介质
CN112231347B (zh) * 2020-11-12 2025-06-24 腾讯科技(深圳)有限公司 一种数据处理方法、装置、计算机设备及存储介质
CN113516142A (zh) * 2020-11-26 2021-10-19 腾讯科技(深圳)有限公司 文本图像匹配方法、装置、设备及存储介质
CN112650867B (zh) * 2020-12-25 2024-09-24 北京中科闻歌科技股份有限公司 图片匹配方法、装置、电子设备以及存储介质
KR102311644B1 (ko) * 2021-01-29 2021-10-12 한국과학기술정보연구원 데이터분석장치 및 그 동작 방법
CN113392254A (zh) * 2021-03-29 2021-09-14 西安理工大学 一种基于上下文感知注意的图像文本检索方法
CN113283497A (zh) * 2021-05-21 2021-08-20 广东博智林机器人有限公司 文本的匹配方法、装置、存储介质和处理器
CN113255667B (zh) * 2021-06-16 2021-10-08 北京世纪好未来教育科技有限公司 文本图像相似度评估方法、装置、电子设备及存储介质
CN113868459B (zh) * 2021-06-25 2025-09-12 之江实验室 模型训练方法、跨模态表征方法、无监督图像文本匹配方法及装置
CN113343664B (zh) * 2021-06-29 2023-08-08 京东科技信息技术有限公司 图像文本之间的匹配度的确定方法及装置
CN113283551B (zh) * 2021-07-22 2021-10-29 智者四海(北京)技术有限公司 多模态预训练模型的训练方法、训练装置及电子设备
JP7686490B2 (ja) * 2021-07-29 2025-06-02 富士フイルム株式会社 学習装置、方法およびプログラム、並びに情報処理装置、方法およびプログラム
CN113642673B (zh) * 2021-08-31 2023-12-22 北京字跳网络技术有限公司 图像生成方法、装置、设备及存储介质
CN113869392B (zh) * 2021-09-24 2026-03-20 北京沃东天骏信息技术有限公司 图片分析模型训练方法、广告图片选择方法及电子设备
CN113987115B (zh) * 2021-09-26 2024-10-15 华润数字科技(西安)有限公司 一种文本相似度计算方法、装置、设备及存储介质
CN115909374B (zh) * 2021-09-30 2024-06-18 腾讯科技(深圳)有限公司 一种信息识别方法、装置、设备及存储介质、程序产品
CN113947700A (zh) * 2021-10-18 2022-01-18 北京百度网讯科技有限公司 模型确定方法、装置、电子设备和存储器
CN113742556B (zh) * 2021-11-03 2022-02-08 南京理工大学 一种基于全局和局部对齐的多模态特征对齐方法
CN114022735B (zh) * 2021-11-09 2023-06-23 北京有竹居网络技术有限公司 视觉语言预训练模型的训练方法、装置、设备及介质
KR102775683B1 (ko) * 2021-11-17 2025-03-05 주식회사 Lg 경영개발원 변분 오토인코딩 장치, 방법 및 프로그램
US12080050B2 (en) 2021-12-20 2024-09-03 KLA Corp. Machine learning using a global texture characteristic for semiconductor-based applications
CN114299194B (zh) * 2021-12-23 2023-06-02 北京百度网讯科技有限公司 图像生成模型的训练方法、图像生成方法及装置
CN114549874B (zh) * 2022-03-02 2024-03-08 北京百度网讯科技有限公司 多目标图文匹配模型的训练方法、图文检索方法及装置
CN114579792A (zh) * 2022-03-22 2022-06-03 中国平安人寿保险股份有限公司 基于语音的绘图方法、装置、电子设备及存储介质
CN114723969B (zh) * 2022-03-31 2025-01-03 福建农林大学 基于多尺度稀疏语义动态图的高质量特征匹配选择方法
CN114863135A (zh) * 2022-04-15 2022-08-05 同济大学 一种基于双流分层相似性推理的图像文本匹配方法
CN114782722B (zh) * 2022-04-29 2023-02-03 北京百度网讯科技有限公司 图文相似度的确定方法、装置及电子设备
CN114998607B (zh) * 2022-05-11 2023-01-31 北京医准智能科技有限公司 超声图像的特征提取方法、装置、电子设备及存储介质
CN114972910B (zh) * 2022-05-20 2023-05-23 北京百度网讯科技有限公司 图文识别模型的训练方法、装置、电子设备及存储介质
CN115017356B (zh) * 2022-06-01 2025-05-27 复旦大学 图像文本对的判断方法和装置
CN115203459B (zh) * 2022-06-23 2025-09-26 齐鲁工业大学(山东省科学院) 基于Bert和自注意机制的图文匹配方法及系统
CN115169577A (zh) * 2022-06-28 2022-10-11 阿里巴巴(中国)有限公司 模型训练方法和数据处理方法
CN115858859A (zh) * 2022-07-07 2023-03-28 腾讯科技(深圳)有限公司 视频搜索方法、装置及计算机可读存储介质
CN115239955B (zh) * 2022-07-15 2026-04-10 平安科技(深圳)有限公司 不对等像素的图像匹配方法、装置、计算机设备及存储介质
US12596955B2 (en) * 2022-07-20 2026-04-07 Hitachi, Ltd. Reward feedback for learning control policies using natural language and vision data
JP7366204B1 (ja) 2022-07-21 2023-10-20 株式会社エクサウィザーズ 情報処理方法、コンピュータプログラム及び情報処理装置
CN115393606B (zh) * 2022-08-11 2026-04-17 支付宝(杭州)数字服务技术有限公司 图像识别的方法和系统
CN115392389B (zh) * 2022-09-01 2023-08-29 北京百度网讯科技有限公司 跨模态信息匹配、处理方法、装置、电子设备及存储介质
CN115359492B (zh) * 2022-09-01 2025-12-09 上海鱼尔网络科技有限公司 文本图像匹配模型训练方法、图片标注方法、装置、设备
CN116152837A (zh) * 2022-09-07 2023-05-23 支付宝(杭州)信息技术有限公司 一种模型训练的方法、业务执行的方法及装置
KR20240076861A (ko) * 2022-11-23 2024-05-31 한국전자기술연구원 영상-언어 정렬 모델에서 객체의 속성값을 이용한 이미지/텍스트 표현 벡터의 세분화된 표현 강화 방법
KR102594547B1 (ko) * 2022-11-28 2023-10-26 (주)위세아이텍 멀티모달 특성 기반의 이미지 검색 장치 및 방법
CN116340558A (zh) * 2023-03-14 2023-06-27 平安科技(深圳)有限公司 图文跨模态检索方法、装置、设备及存储介质
JP7836276B2 (ja) * 2023-03-28 2026-03-26 Kddi株式会社 データ拡張生成装置、データ拡張生成方法及びデータ拡張生成プログラム
US12518477B1 (en) * 2023-03-30 2026-01-06 Electronic Arts Inc. Controllable three-dimensional object generation
CN116450778A (zh) * 2023-04-27 2023-07-18 支付宝(杭州)信息技术有限公司 用于训练语义特征向量生成模型和语义搜索的方法和装置
CN116541707A (zh) * 2023-05-16 2023-08-04 中电信数智科技有限公司 一种图文匹配模型训练方法、装置、设备及存储介质
CN116308221B (zh) * 2023-05-25 2023-07-21 成都信通信息技术有限公司 一种基于人工智能的低碳奖章自动生成系统
CN117633279A (zh) * 2023-09-27 2024-03-01 杭州阿里巴巴海外互联网产业有限公司 表征方法、搜索方法、模型训练方法、设备及存储介质
CN117521013B (zh) * 2023-11-24 2025-08-01 山东交通学院 基于图推理下注意力与相似度融合的图文匹配方法及系统
CN117591901B (zh) * 2024-01-17 2024-05-03 合肥中科类脑智能技术有限公司 绝缘子破损检测方法、装置、存储介质和电子设备
WO2025183528A1 (ko) * 2024-02-29 2025-09-04 숭실대학교 산학협력단 뉴스 이미지-텍스트 비관련성 탐지 장치, 방법 및 기록매체
CN118245760B (zh) * 2024-03-22 2025-03-25 北京智源人工智能研究院 基于ai生成内容匹配度评测的ai评测方法及系统
CN118279925B (zh) * 2024-06-04 2024-07-30 鲁东大学 一种融合局部和全局语义的图像文本匹配算法
CN121597858A (zh) * 2024-08-14 2026-03-03 北京三星通信技术研究有限公司 由电子设备执行的方法、电子设备、存储介质及程序产品
CN119169638B (zh) * 2024-08-26 2025-10-14 华中科技大学 一种基于图文双模态匹配的分布外数据检测系统和方法
CN119107540B (zh) * 2024-09-24 2026-03-13 中国医学科学院医学信息研究所 一种基于RadFM的医学多模态模型的预训练方法、装置及相关产品
CN119206261B (zh) * 2024-09-25 2025-07-29 北京邮电大学 图像美学质量评估方法、装置、电子设备及存储介质
CN118965024B (zh) * 2024-10-17 2025-01-07 杭州联汇科技股份有限公司 一种图文匹配方法、图文匹配多模态大模型及大模型训练方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629275A (zh) * 2012-03-21 2012-08-08 复旦大学 面向跨媒体新闻检索的人脸-人名对齐方法及系统
CN103353875A (zh) * 2013-06-09 2013-10-16 华中科技大学 基于可视搜索的媒体交互方法及系统
CN104376105A (zh) * 2014-11-26 2015-02-25 北京航空航天大学 一种社会媒体中图像低层视觉特征与文本描述信息的特征融合系统及方法
CN106095829A (zh) * 2016-06-01 2016-11-09 华侨大学 基于深度学习与一致性表达空间学习的跨媒体检索方法
CN108288067A (zh) * 2017-09-12 2018-07-17 腾讯科技(深圳)有限公司 图像文本匹配模型的训练方法、双向搜索方法及相关装置

Family Cites Families (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4955060A (en) * 1987-07-02 1990-09-04 Nippon Sheet Glass Co., Ltd. Image recognition apparatus
US5491758A (en) * 1993-01-27 1996-02-13 International Business Machines Corporation Automatic handwriting recognition using both static and dynamic parameters
JP2011221794A (ja) * 2010-04-09 2011-11-04 Kddi Corp 画像選定装置
CN102012939B (zh) * 2010-12-13 2012-11-14 中国人民解放军国防科学技术大学 综合颜色和局部不变特征匹配的动画场景自动标注方法
US8798362B2 (en) * 2011-08-15 2014-08-05 Hewlett-Packard Development Company, L.P. Clothing search in images
US9082035B2 (en) * 2011-08-29 2015-07-14 Qualcomm Incorporated Camera OCR with context information
CN104036277A (zh) * 2014-06-03 2014-09-10 中国科学院电子学研究所 一种提取道路特征的方法和设备
WO2016004330A1 (en) * 2014-07-03 2016-01-07 Oim Squared Inc. Interactive content generation
CN104199826B (zh) * 2014-07-24 2017-06-30 北京大学 一种基于关联分析的异构媒体相似性计算方法和检索方法
CN104778242B (zh) * 2015-04-09 2018-07-13 复旦大学 基于图像动态分割的手绘草图图像检索方法及系统
CN104834747B (zh) * 2015-05-25 2018-04-27 中国科学院自动化研究所 基于卷积神经网络的短文本分类方法
US9501724B1 (en) * 2015-06-09 2016-11-22 Adobe Systems Incorporated Font recognition and font similarity learning using a deep neural network
US9836671B2 (en) * 2015-08-28 2017-12-05 Microsoft Technology Licensing, Llc Discovery of semantic similarities between images and text
CN106547744B (zh) * 2015-09-16 2020-11-06 杭州海康威视数字技术股份有限公司 一种图像检索方法及系统
JP6370281B2 (ja) * 2015-09-18 2018-08-08 ヤフー株式会社 情報提供装置、情報提供方法および情報提供プログラム
WO2017113232A1 (zh) * 2015-12-30 2017-07-06 中国科学院深圳先进技术研究院 一种基于深度学习的产品分类方法及装置
US11934450B2 (en) * 2016-06-24 2024-03-19 Skusub LLC System and method for object matching using 3D imaging
CN106295631A (zh) * 2016-07-27 2017-01-04 新疆大学 一种图像维吾尔文单词识别方法及装置
CN106503055B (zh) * 2016-09-27 2019-06-04 天津大学 一种从结构化文本到图像描述的生成方法
CN107330100B (zh) * 2017-07-06 2020-04-03 北京大学深圳研究生院 基于多视图联合嵌入空间的图像-文本双向检索方法
KR102466676B1 (ko) * 2017-08-16 2022-11-14 삼성전자주식회사 생체 센서의 성능 평가 방법, 생체 영상을 이용한 인증 방법 및 인증 방법을 적용한 전자 기기
US10740386B2 (en) * 2017-12-29 2020-08-11 MorphoTrak, LLC Multi-stage image matching techniques
KR102455468B1 (ko) * 2018-06-22 2022-10-19 한국전자통신연구원 객체의 3차원 모델을 복원하는 방법 및 장치
US20200293874A1 (en) * 2019-03-12 2020-09-17 Microsoft Technology Licensing, Llc Matching based intent understanding with transfer learning
US10949702B2 (en) * 2019-04-16 2021-03-16 Cognizant Technology Solutions India Pvt. Ltd. System and a method for semantic level image retrieval
CN110490946B (zh) * 2019-07-15 2023-07-04 同济大学 基于跨模态相似度和生成对抗网络的文本生成图像方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629275A (zh) * 2012-03-21 2012-08-08 复旦大学 面向跨媒体新闻检索的人脸-人名对齐方法及系统
CN103353875A (zh) * 2013-06-09 2013-10-16 华中科技大学 基于可视搜索的媒体交互方法及系统
CN104376105A (zh) * 2014-11-26 2015-02-25 北京航空航天大学 一种社会媒体中图像低层视觉特征与文本描述信息的特征融合系统及方法
CN106095829A (zh) * 2016-06-01 2016-11-09 华侨大学 基于深度学习与一致性表达空间学习的跨媒体检索方法
CN108288067A (zh) * 2017-09-12 2018-07-17 腾讯科技(深圳)有限公司 图像文本匹配模型的训练方法、双向搜索方法及相关装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3683724A4 *

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022530868A (ja) * 2019-05-09 2022-07-04 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 機械学習に基づくターゲットオブジェクト属性予測方法、関連機器及びコンピュータプログラム
JP7191443B2 (ja) 2019-05-09 2022-12-19 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 機械学習に基づくターゲットオブジェクト属性予測方法、関連機器及びコンピュータプログラム
CN110209859A (zh) * 2019-05-10 2019-09-06 腾讯科技(深圳)有限公司 地点识别及其模型训练的方法和装置以及电子设备
CN110209859B (zh) * 2019-05-10 2022-12-27 腾讯科技(深圳)有限公司 地点识别及其模型训练的方法和装置以及电子设备
CN112529986B (zh) * 2019-09-19 2023-09-22 百度在线网络技术(北京)有限公司 图文相关性的计算模型建立方法、计算方法及装置
CN112529986A (zh) * 2019-09-19 2021-03-19 百度在线网络技术(北京)有限公司 图文相关性的计算模型建立方法、计算方法及装置
KR102510640B1 (ko) 2020-01-08 2023-03-15 바이두 온라인 네트웍 테크놀러지 (베이징) 캄파니 리미티드 비디오 검색 방법, 장치, 기기 및 매체
JP2021114287A (ja) * 2020-01-08 2021-08-05 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド ビデオ検索方法、装置、デバイス及び媒体
JP7304370B2 (ja) 2020-01-08 2023-07-06 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド ビデオ検索方法、装置、デバイス及び媒体
KR20210089597A (ko) * 2020-01-08 2021-07-16 바이두 온라인 네트웍 테크놀러지 (베이징) 캄파니 리미티드 비디오 검색 방법, 장치, 기기 및 매체
CN113535829A (zh) * 2020-04-17 2021-10-22 阿里巴巴集团控股有限公司 排序模型的训练方法、装置、电子设备及存储介质
CN113535829B (zh) * 2020-04-17 2022-04-29 阿里巴巴集团控股有限公司 排序模型的训练方法、装置、电子设备及存储介质
CN111666969A (zh) * 2020-04-22 2020-09-15 北京百度网讯科技有限公司 计算图文相似度的方法、装置、电子设备和可读存储介质
CN111581418A (zh) * 2020-04-29 2020-08-25 山东科技大学 一种基于图像关联人物信息的目标人员搜索方法
JP2022543052A (ja) * 2020-06-29 2022-10-07 北京市商▲湯▼科技▲開▼▲發▼有限公司 文書処理方法、文書処理装置、文書処理機器、コンピュータ可読記憶媒体及びコンピュータプログラム
CN112000803A (zh) * 2020-07-28 2020-11-27 北京小米松果电子有限公司 文本分类方法及装置、电子设备及计算机可读存储介质
CN112000803B (zh) * 2020-07-28 2024-05-14 北京小米松果电子有限公司 文本分类方法及装置、电子设备及计算机可读存储介质
CN112052352A (zh) * 2020-09-07 2020-12-08 北京达佳互联信息技术有限公司 视频排序方法、装置、服务器及存储介质
CN112052352B (zh) * 2020-09-07 2024-04-30 北京达佳互联信息技术有限公司 视频排序方法、装置、服务器及存储介质
CN113221680A (zh) * 2021-04-26 2021-08-06 西北工业大学 基于文本动态引导视觉特征提炼的文本行人检索方法
CN113221680B (zh) * 2021-04-26 2024-05-28 西北工业大学 基于文本动态引导视觉特征提炼的文本行人检索方法
CN114283428A (zh) * 2021-08-12 2022-04-05 腾讯科技(深圳)有限公司 一种图像处理方法、装置及计算机设备
CN114154512A (zh) * 2021-12-09 2022-03-08 京东科技信息技术有限公司 小样本学习处理方法、装置、设备及存储介质
WO2024011814A1 (zh) * 2022-07-12 2024-01-18 苏州元脑智能科技有限公司 一种图文互检方法、系统、设备及非易失性可读存储介质
CN115496140A (zh) * 2022-09-19 2022-12-20 北京邮电大学 一种多模态虚假新闻检测方法及系统
US12613892B2 (en) 2023-12-04 2026-04-28 Toyota Research Institute, Inc. System and method for learning and communicating implicit stylistic preferences from historical user interaction data in text-to-image prompt engineering
CN118013069A (zh) * 2024-04-09 2024-05-10 杭州海康威视数字技术股份有限公司 一种图像检索方法、装置、存储介质和电子设备

Also Published As

Publication number Publication date
KR102235051B1 (ko) 2021-03-31
EP3683724A4 (en) 2021-02-17
US11087166B2 (en) 2021-08-10
CN110532571B (zh) 2022-11-18
JP6887026B2 (ja) 2021-06-16
EP3683724A1 (en) 2020-07-22
KR20190129110A (ko) 2019-11-19
US20210312211A1 (en) 2021-10-07
US20200019807A1 (en) 2020-01-16
CN108288067A (zh) 2018-07-17
JP2020522791A (ja) 2020-07-30
CN108288067B (zh) 2020-07-24
CN110532571A (zh) 2019-12-03
US11699298B2 (en) 2023-07-11

Similar Documents

Publication Publication Date Title
US11699298B2 (en) Training method of image-text matching model, bi-directional search method, and relevant apparatus
US11093560B2 (en) Stacked cross-modal matching
CN110162593B (zh) 一种搜索结果处理、相似度模型训练方法及装置
CN113297369B (zh) 基于知识图谱子图检索的智能问答系统
US10678786B2 (en) Translating search queries on online social networks
CN110019732B (zh) 一种智能问答方法以及相关装置
CN115359383A (zh) 跨模态特征提取、检索以及模型的训练方法、装置及介质
US12108120B2 (en) Method for processing video, device and storage medium
CN112463914B (zh) 一种用于互联网服务的实体链接方法、装置及存储介质
WO2022199504A1 (zh) 内容识别方法、装置、计算机设备和存储介质
WO2019242297A1 (zh) 基于机器阅读理解的智能对话方法、装置、终端
CN114782722B (zh) 图文相似度的确定方法、装置及电子设备
WO2020155423A1 (zh) 一种跨模态信息检索方法、装置和存储介质
US11893990B2 (en) Audio file annotation
CN108268600A (zh) 基于ai的非结构化数据管理方法及装置
WO2023168997A9 (zh) 一种跨模态搜索方法及相关设备
WO2019029714A1 (zh) 基于图像内容的展示对象确定方法、装置、介质及设备
CN115129908A (zh) 一种模型优化方法、装置、设备、存储介质及程序产品
CN111126084B (zh) 数据处理方法、装置、电子设备和存储介质
CN116628281A (zh) 遥感资源数据的检索方法、装置、设备以及存储介质
CN117573817A (zh) 模型训练方法、相关性确定方法、装置、设备及存储介质
CN117435685A (zh) 文档检索方法、装置、计算机设备、存储介质和产品
CN116226353A (zh) 图文检索模型的训练方法、图文检索方法、装置及设备
CN116958852A (zh) 视频与文本的匹配方法、装置、电子设备和存储介质
CN109472032A (zh) 一种实体关系图的确定方法、装置、服务器及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18857317

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20197030955

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2019564942

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018857317

Country of ref document: EP

Effective date: 20200414