# US 2025/0209798 A1 · Target detection model training method and apparatus, and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0209798 A1
- Document ID: US20250209798A1
- Status: Published application
- Kind: A1
- Application number: 18/783,390
- Filed: 2024-07-24
- Published: 2025-06-26
- Earliest claimed: 2023-12-23
- Assignees: Ubtech Robotics Corp Ltd
- Applicants: Ubtech Robotics Corp Ltd
- Inventors: PENGYU ZOU; Shuping Hu; Kan Wang; Pei Dong; Jianxin Pang; Huan Tan
- Web page: https://patentgrep.com/patent/US20250209798A1

## CPC

- G06V 10/7753: {Incorporation of unlabelled data, e.g. multiple instance learning [MIL]}
- G06F 18/00: Pattern recognition
- G06N 20/20: Ensemble learning
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method and an apparatus for training target detection models and an electronic device are provided. The method includes: predicting unlabeled training data through a teacher model and a student model to obtain a first prediction result output by the teacher model and a second prediction result output by the student model; determining a target pseudo-label category to which the first prediction result belongs according to the confidence in the first prediction result; calculating a current pseudo-label loss based on the first prediction result, the second prediction result, and the pseudo-label loss function corresponding to the target pseudo-label category; and updating the student model according to the current pseudo-label loss and updating the teacher model based on the updated student model, and returning to predicting the unlabeled training data through the teacher model and the student model until a preset training end condition is met.

## Claims

### Claim 1

A method, comprising:
predicting unlabeled training data through a teacher model and a student model to obtain a first prediction result output by the teacher model and a second prediction result output by the student model, wherein the teacher model and the student model have a same model structure and initial model parameter, and the first prediction result and the second prediction result both include a confidence, a detection box position, and a classification;
determining a target pseudo-label category to which the first prediction result belongs according to the confidence in the first prediction result, wherein the target pseudo-label category is one of a plurality of pseudo-label categories each corresponding to each pseudo-label loss function;
calculating a current pseudo-label loss based on the first prediction result, the second prediction result, and the pseudo-label loss function corresponding to the target pseudo-label category; and
updating the student model according to the current pseudo-label loss and updating the teacher model based on the updated student model, and returning to predicting the unlabeled training data through the teacher model and the student model until a preset training end condition is met.

### Claim 2 (depends on 1)

The method of claim 1, wherein the teacher model and the student model are target detection models; and before predicting the unlabeled training data through the teacher model and the student model, the method further comprises:
constructing a target detection model, wherein a detection head of the target detection model is divided into three branches each being for outputting the confidence, the detection box position, and the classification;
performing a supervised training on the target detection model using labeled training data; and
using the trained target detection model as the teacher model and student model in an initial state.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the target pseudo-label category to which the first prediction result belongs according to the confidence in the first prediction result comprises:
comparing the confidence in the first prediction result with preset confidence thresholds to obtain a comparison result; and
determining the target pseudo-label category according to the comparison result.

### Claim 4 (depends on 3)

The method of claim 3, wherein the pseudo-label categories include a first pseudo-label, a second pseudo-label, and a third pseudo-label each with a credibility, and the credibility of the first pseudo-label is larger than the credibility of the second pseudo-label while the credibility of the second pseudo-label is larger than the credibility of the third pseudo-label; the confidence thresholds include a first confidence threshold and a second confidence threshold, and the first confidence threshold is larger than the second confidence threshold; and determining the target pseudo-label category according to the comparison result comprises:
determining that the target pseudo-label category is the first pseudo-label, in response to the confidence in the first prediction result being larger than or equal to the first confidence threshold;
determining that the target pseudo-label category is the second pseudo-label, in response to the confidence in the first prediction result being less than the first confidence threshold and larger than the second confidence threshold; and
determining that the target pseudo-label category is the third pseudo-label, in response to the confidence in the first prediction result being less than or equal to the second confidence threshold.

### Claim 5 (depends on 4)

The method of claim 4, wherein the first prediction result output by the teacher model includes a first confidence, a first detection box position, and a first classification, and the second prediction result output by the student model includes a second confidence, a second detection box position, and a second classification; and the pseudo-label loss function is determined by a sum of a classification loss, a detection box loss, and a confidence loss; wherein:
in the pseudo-label loss function corresponding to the first pseudo-label, the detection box loss is a cross entropy loss of the first detection box position and the second detection box position, the confidence loss is a cross entropy loss of the first confidence and the second confidence, and the classification loss is a cross entropy loss of the first classification and the second classification;
in the pseudo-label loss function corresponding to the second pseudo-label, the detection box loss and the classification loss are 0, and the confidence loss is a soft cross entropy loss of the first confidence and the second confidence; and
in the pseudo-label loss function corresponding to the third pseudo-label, the detection box loss and the classification loss are 0, and the confidence loss is a cross entropy loss of the second confidence and 0.

### Claim 6 (depends on 1)

The method of claim 1, wherein updating the teacher model based on the updated student model comprises:
updating the teacher model by exponential moving average based on the updated student model.

### Claim 7 (depends on 1)

The method of claim 1, wherein predicting unlabeled training data through the teacher model and the student model to obtain the first prediction result output by the teacher model and the second prediction result output by the student model comprises:
obtaining first training data by enhancing the unlabeled training data using a preset first data enhancement method;
obtaining second training data by enhancing the first training data using a preset second data enhancement method;
obtaining the first prediction result by predicting the first training data through the teacher model; and
obtaining the second prediction result by predicting the second training data through the student model.

### Claim 8

An electronic device, comprising:
a processor;
a memory coupled to the processor; and
one or more computer programs stored in the memory and executable on the processor;
wherein, the one or more computer programs comprise:
instructions for predicting unlabeled training data through a teacher model and a student model to obtain a first prediction result output by the teacher model and a second prediction result output by the student model, wherein the teacher model and the student model have a same model structure and initial model parameter, and the first prediction result and the second prediction result both include a confidence, a detection box position, and a classification;
instructions for determining a target pseudo-label category to which the first prediction result belongs according to the confidence in the first prediction result, wherein the target pseudo-label category is one of a plurality of pseudo-label categories each corresponding to each pseudo-label loss function;
instructions for calculating a current pseudo-label loss based on the first prediction result, the second prediction result, and the pseudo-label loss function corresponding to the target pseudo-label category; and
instructions for updating the student model according to the current pseudo-label loss and updating the teacher model based on the updated student model, and returning to predicting the unlabeled training data through the teacher model and the student model until a preset training end condition is met.

### Claim 9 (depends on 8)

The electronic device of claim 8, wherein the teacher model and the student model are target detection models; and the one or more computer programs further comprise:
instructions for constructing a target detection model, wherein a detection head of the target detection model is divided into three branches each being for outputting the confidence, the detection box position, and the classification;
instructions for performing a supervised training on the target detection model using labeled training data; and
instructions for using the trained target detection model as the teacher model and student model in an initial state.

### Claim 10 (depends on 8)

The electronic device of claim 8, wherein the instructions for determining the target pseudo-label category to which the first prediction result belongs according to the confidence in the first prediction result comprise:
instructions for comparing the confidence in the first prediction result with preset confidence thresholds to obtain a comparison result; and
instructions for determining the target pseudo-label category according to the comparison result.

### Claim 11 (depends on 10)

The electronic device of claim 10, wherein the pseudo-label categories include a first pseudo-label, a second pseudo-label, and a third pseudo-label each with a credibility, and the credibility of the first pseudo-label is larger than the credibility of the second pseudo-label while the credibility of the second pseudo-label is larger than the credibility of the third pseudo-label; the confidence thresholds include a first confidence threshold and a second confidence threshold, and the first confidence threshold is larger than the second confidence threshold; and the instructions for determining the target pseudo-label category according to the comparison result comprise:
instructions for determining that the target pseudo-label category is the first pseudo-label, in response to the confidence in the first prediction result being larger than or equal to the first confidence threshold;
instructions for determining that the target pseudo-label category is the second pseudo-label, in response to the confidence in the first prediction result being less than the first confidence threshold and larger than the second confidence threshold; and
instructions for determining that the target pseudo-label category is the third pseudo-label, in response to the confidence in the first prediction result being less than or equal to the second confidence threshold.

### Claim 12 (depends on 11)

The electronic device of claim 11, wherein the first prediction result output by the teacher model includes a first confidence, a first detection box position, and a first classification, and the second prediction result output by the student model includes a second confidence, a second detection box position, and a second classification; and the pseudo-label loss function is determined by a sum of a classification loss, a detection box loss, and a confidence loss; wherein:
in the pseudo-label loss function corresponding to the first pseudo-label, the detection box loss is a cross entropy loss of the first detection box position and the second detection box position, the confidence loss is a cross entropy loss of the first confidence and the second confidence, and the classification loss is a cross entropy loss of the first classification and the second classification;
in the pseudo-label loss function corresponding to the second pseudo-label, the detection box loss and the classification loss are 0, and the confidence loss is a soft cross entropy loss of the first confidence and the second confidence; and
in the pseudo-label loss function corresponding to the third pseudo-label, the detection box loss and the classification loss are 0, and the confidence loss is a cross entropy loss of the second confidence and 0.

### Claim 13 (depends on 8)

The electronic device of claim 8, wherein the instructions for updating the teacher model based on the updated student model comprise:
instructions for updating the teacher model by exponential moving average based on the updated student model.

### Claim 14 (depends on 8)

The electronic device of claim 8, wherein the instructions for predicting unlabeled training data through the teacher model and the student model to obtain the first prediction result output by the teacher model and the second prediction result output by the student model comprise:
instructions for obtaining first training data by enhancing the unlabeled training data using a preset first data enhancement method;
instructions for obtaining second training data by enhancing the first training data using a preset second data enhancement method;
instructions for obtaining the first prediction result by predicting the first training data through the teacher model; and
instructions for obtaining the second prediction result by predicting the second training data through the student model.

### Claim 15

A non-transitory computer-readable storage medium for storing one or more computer programs, wherein the one or more computer programs comprise:
instructions for predicting unlabeled training data through a teacher model and a student model to obtain a first prediction result output by the teacher model and a second prediction result output by the student model, wherein the teacher model and the student model have a same model structure and initial model parameter, and the first prediction result and the second prediction result both include a confidence, a detection box position, and a classification;
instructions for determining a target pseudo-label category to which the first prediction result belongs according to the confidence in the first prediction result, wherein the target pseudo-label category is one of a plurality of pseudo-label categories each corresponding to each pseudo-label loss function;
instructions for calculating a current pseudo-label loss based on the first prediction result, the second prediction result, and the pseudo-label loss function corresponding to the target pseudo-label category; and
instructions for updating the student model according to the current pseudo-label loss and updating the teacher model based on the updated student model, and returning to predicting the unlabeled training data through the teacher model and the student model until a preset training end condition is met.

### Claim 16 (depends on 15)

The storage medium of claim 15, wherein the teacher model and the student model are target detection models; and the one or more computer programs further comprise:
instructions for constructing a target detection model, wherein a detection head of the target detection model is divided into three branches each being for outputting the confidence, the detection box position, and the classification;
instructions for performing a supervised training on the target detection model using labeled training data; and
instructions for using the trained target detection model as the teacher model and student model in an initial state.

### Claim 17 (depends on 15)

The storage medium of claim 15, wherein the instructions for determining the target pseudo-label category to which the first prediction result belongs according to the confidence in the first prediction result comprise:
instructions for comparing the confidence in the first prediction result with preset confidence thresholds to obtain a comparison result; and
instructions for determining the target pseudo-label category according to the comparison result.

### Claim 18 (depends on 17)

The storage medium of claim 17, wherein the pseudo-label categories include a first pseudo-label, a second pseudo-label, and a third pseudo-label each with a credibility, and the credibility of the first pseudo-label is larger than the credibility of the second pseudo-label while the credibility of the second pseudo-label is larger than the credibility of the third pseudo-label; the confidence thresholds include a first confidence threshold and a second confidence threshold, and the first confidence threshold is larger than the second confidence threshold; and the instructions for determining the target pseudo-label category according to the comparison result comprise:
instructions for determining that the target pseudo-label category is the first pseudo-label, in response to the confidence in the first prediction result being larger than or equal to the first confidence threshold;
instructions for determining that the target pseudo-label category is the second pseudo-label, in response to the confidence in the first prediction result being less than the first confidence threshold and larger than the second confidence threshold; and
instructions for determining that the target pseudo-label category is the third pseudo-label, in response to the confidence in the first prediction result being less than or equal to the second confidence threshold.

### Claim 19 (depends on 18)

The storage medium of claim 18, wherein the first prediction result output by the teacher model includes a first confidence, a first detection box position, and a first classification, and the second prediction result output by the student model includes a second confidence, a second detection box position, and a second classification; and the pseudo-label loss function is determined by a sum of a classification loss, a detection box loss, and a confidence loss; wherein:
in the pseudo-label loss function corresponding to the first pseudo-label, the detection box loss is a cross entropy loss of the first detection box position and the second detection box position, the confidence loss is a cross entropy loss of the first confidence and the second confidence, and the classification loss is a cross entropy loss of the first classification and the second classification;
in the pseudo-label loss function corresponding to the second pseudo-label, the detection box loss and the classification loss are 0, and the confidence loss is a soft cross entropy loss of the first confidence and the second confidence; and
in the pseudo-label loss function corresponding to the third pseudo-label, the detection box loss and the classification loss are 0, and the confidence loss is a cross entropy loss of the second confidence and 0.

### Claim 20 (depends on 15)

The storage medium of claim 15, wherein the instructions for updating the teacher model based on the updated student model comprise:
instructions for updating the teacher model by exponential moving average based on the updated student model.
