Image-Text Matching Model Training with Semantic Tagging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies face challenges in effectively training image-text matching models to accurately retrieve images based on text inputs, particularly in retaining semantic information and improving the matching accuracy.

Innovation Solution

The method involves training an image-text matching model by obtaining sample texts and images, labeling semantic tags, and adjusting parameters of text and image coding sub-models based on loss functions and contrast losses to enhance feature representations and matching capabilities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional image-text matching models are trained, then basic image retrieval function is achieved, but semantic information is lost and matching accuracy is insufficient

Engineering Contradiction:
Improvematching accuracyVSAvoidsemantic information
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The model is divided into separate text coding sub-model and image coding sub-model, each responsible for processing specific modality. The text coding sub-model extracts semantic tags and features from text, while the image coding sub-model extracts visual features from images. This segmentation allows each sub-model to focus on its specific task, preventing semantic information loss while improving overall matching accuracy through specialized processing.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A contrast loss function is introduced as an intermediary mechanism to bridge the text and image coding sub-models. The contrast loss calculates the difference between text feature representations and image feature representations, using this discrepancy to adjust model parameters. This intermediary loss function ensures that semantic information is preserved and transferred effectively between modalities, resolving the information loss problem while enhancing matching precision.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If model parameters are adjusted to improve matching capability, then retrieval effectiveness increases, but training complexity increases

Engineering Contradiction:
Improveretrieval effectivenessVSAvoidtraining complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The training process is segmented into distinct phases: first training the text coding sub-model to extract semantic tags and features, then training the image coding sub-model to extract visual features, and finally integrating them through contrast loss. This segmentation of the training process reduces overall complexity by handling each sub-task independently before integration, making the complex model adjustment more manageable and systematic.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The contrast loss function provides feedback on the mismatch between text and image feature representations. By calculating the difference between these representations and using this feedback to adjust model parameters, the system efficiently optimizes retrieval effectiveness without requiring complex manual tuning. The feedback mechanism automates the parameter adjustment process, reducing training complexity while improving retrieval performance.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12333837B2Method for training image-text matching model, computing device, and storage medium
Publication Date: 2025.06.17 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US12333837B2 patent drawing
  • US12333837B2 patent drawing
  • US12333837B2 patent drawing

AI summary

A computer-implemented method is provided. The method includes: obtaining a sample text and a sample image corresponding to the sample text; labeling a true semantic tag for the sample text according to a first preset rule; obtaining a text feature representation of the sample text and a predicted semantic tag output by a text coding sub-model; obtaining an image feature representation of the sample image output by an image coding sub-model; calculating a first loss based on the true semantic tag and the predicted semantic tag; calculating a contrast loss based on the text feature representation of the sample text and the image feature representation of the sample image; adjusting parameters of the text coding sub-model based on the first loss and the contrast loss; and adjusting parameters of the image coding sub-model based on the contrast loss.