Multi-Label Image Recognition Model Training with Weighted Loss

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep neural network models trained on large-scale multi-label image datasets face accuracy and visual performance issues due to unbalanced positive and negative labels, leading to low accuracy in image recognition tasks.

Innovation Solution

A model training method that uses a cross-entropy loss function with a weight greater than 1 for positive labels, combined with adaptive attenuation of cross-entropy loss and downsampling of negative samples, to balance the training process and improve model accuracy and visual performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a deep neural network model is trained on a large-scale multi-label image dataset with unbalanced positive and negative labels, then the model can process a wide variety of image labels, but the accuracy and visual performance deteriorate due to label unbalance

Engineering Contradiction:
Improvemulti-label processing capabilityVSAvoidimage recognition accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The patent applies local quality by assigning different weights to different label types within the loss function. Specifically, positive labels (which indicate actual objects in images) are given higher weights than negative labels, allowing the model to focus more on learning from informative positive examples while still processing the full multi-label dataset. This differential weighting resolves the contradiction by maintaining multi-label versatility while improving accuracy through localized attention to critical label types.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the parameter distribution in the training process by implementing downsampling of negative samples and using a weighted cross-entropy loss function. The weight parameter for positive labels is set greater than 1, and the overall loss function parameters are adjusted to balance the contribution of positive and negative labels. This parameter modification allows the model to handle unbalanced multi-label data effectively, improving recognition accuracy while maintaining the ability to process diverse labels.

Inventive Principle:
Principle #35Parameter changes

2Ease of manufacture

If standard cross-entropy loss function is used for training, then the training process is simple, but the model accuracy deteriorates due to unbalanced positive and negative labels

Engineering Contradiction:
Improvetraining process simplicityVSAvoidmodel accuracy
Core Design Contradiction:
Ease of manufactureVSMeasurement precision

Solution Approach 1:

The patent modifies the standard cross-entropy loss function by introducing weight parameters that differentiate between positive and negative labels. The weight for positive labels is set to a value greater than 1, which maintains relative simplicity in the training process while significantly improving model accuracy. This parameter change allows the loss function to remain computationally efficient while addressing the label unbalance problem.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements preliminary downsampling of negative samples before training, which prepares the data in advance to reduce the impact of label unbalance. This preliminary action is performed once before the main training process, maintaining ease of training while improving accuracy by preventing the model from being overwhelmed by excessive negative labels.

Inventive Principle:
Principle #10Preliminary action

3Quantity of substance

If all training images are used for training, then the training completeness is high, but the training efficiency and model performance deteriorate due to excessive negative samples

Engineering Contradiction:
Improvetraining data completenessVSAvoidtraining efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent extracts and removes excessive negative samples from the training set through downsampling. By taking out the redundant negative labels that do not contribute meaningfully to learning, the training efficiency is improved while maintaining the essential training data completeness. This extraction process removes the harmful excess of negative samples that were degrading model performance.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies local quality by differentiating between positive and negative samples in the training process. Rather than treating all training images uniformly, the method applies selective downsampling to negative samples while preserving positive samples. This localized treatment improves training efficiency by reducing the burden of processing excessive negative samples while maintaining training completeness for the critical positive label examples.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12169875B2Model training method and apparatus for image recognition, network device, and storage medium
Publication Date: 2024.12.17 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12169875B2 patent drawing
  • US12169875B2 patent drawing
  • US12169875B2 patent drawing

AI summary

A model training method and apparatus for image recognition, and a non-transitory storage medium are provided. The model training method includes: obtaining a multi-label image training set including a plurality of training images each annotated with a plurality of sample labels; selecting target training images from the multi-label image training set for training a current model; performing label prediction on each target training image using the current model, to obtain a plurality of predicted labels of the each target training image; obtaining a cross-entropy loss function corresponding to the plurality of sample labels of the each target training image, a positive label loss being greater than a negative label loss and having a weight greater than 1; converging the predicted labels and the sample labels of the each target training image according to the cross-entropy loss function, and updating parameters of the current model, to obtain a trained model.