# US 2023/0068516 A1 · On-the-fly calibration of an image classifier

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

- Number: US 2023/0068516 A1
- Document ID: US20230068516A1
- Status: Published application
- Kind: A1
- Application number: 17/885,046
- Filed: 2022-08-10
- Published: 2023-03-02
- Earliest claimed: 2021-08-30
- Assignees: Robert Bosch GmbH
- Applicants: Robert Bosch GmbH
- Inventors: Kanil Patel; Liangyu Zhong
- Web page: https://patentgrep.com/patent/US20230068516A1

## CPC

- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06V 10/764: using classification, e.g. of video objects
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06V 10/751: {Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching}
- G06V 10/771: Feature selection, e.g. selecting representative features from a multi-dimensional feature space
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A method of training an image classifier. The image classifier determines a prediction vector of class probabilities for an input image. First, one or more initial training steps are performed, resulting in current values for the trainable parameters of the image classifier. A training image and corresponding class label are selected, and a current label vector is determined for training the image classifier on the training image. To this end, the image classifier is applied to the training image according to the current parameter values. If the class predicted by the image classifier is equal to the class label, the current label vector is determined as a soft label based on the prediction vector. A current training step of training the image classifier on the training image is performed using the current label vector.

## Claims

### Claim 1

A computer-implemented method of training an image classifier, the image classifier being configured to determine a prediction vector for an input image, the prediction vector including class probabilities for multiple respective classes, the method comprising the following steps:
accessing trainable parameters of the image classifier and a training dataset including multiple training images and corresponding class labels;
performing one or more initial training steps of training the image classifier to obtain current parameter values for the trainable parameters;
selecting a training image and a corresponding class label from the training dataset;
determining a current label vector for training the image classifier on the training image by: applying the image classifier to the training image according to the current parameter values to obtain a prediction vector; inferring a predicted class of the multiple classes from the prediction vector; comparing the predicted class to the class label; and, when the predicted class is equal to the class label, determining the current label vector as a soft label based on the prediction vector; and
performing a current training step of training the image classifier on the training image using the current label vector.

### Claim 2 (depends on 1)

The method of claim 1, further comprising the following steps:
performing one or more previous training steps of the image classifier according to a previous learning rate and according to previous label vectors;
decaying the previous learning rate;
performing one or more further training steps of training the image classifier according to the decayed learning rate and the previous label vectors to obtain updated parameter values for the trainable parameters;
determining the current label vector for the training image by applying the image classifier according to the updated parameter values; and
performing the current training step according to the current label vector and the decayed learning rate.

### Claim 3 (depends on 2)

The method of claim 2, wherein the one or more further training steps form one training epoch.

### Claim 4 (depends on 1)

The method of claim 1, further comprising performing the one or more initial training steps using label vectors determined independently of the image classifier.

### Claim 5 (depends on 1)

The method of claim 1, wherein the image classifier is a semantic segmentation model configured to compute class probabilities of the multiple classes for respective portions of the input image, and wherein the method further comprises determining and using current label vectors for the respective portions of the input image.

### Claim 6 (depends on 1)

The method of claim 1, wherein the input image is represented by pixel values or voxel values or a point cloud.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
when the predicted class is not equal to the class label, determining the current label vector based on the class label independently of the prediction vector.

### Claim 8 (depends on 1)

The method of claim 1, wherein the determining of the current label vector based on the prediction vector includes applying a post-hoc calibration model to the prediction vector.

### Claim 9 (depends on 8)

The method of claim 8, further comprising training the post-hoc calibration model for the image classifier.

### Claim 10

A computer-implemented method of using a trained image classifier, the method comprising:
accessing trained parameters of the image classifier, the image classifier being configured to determine a prediction vector for an input image, the prediction vector including class probabilities for multiple respective classes, the image classifier being trained by:
accessing trainable parameters of the image classifier and a training dataset including multiple training images and corresponding class labels,
performing one or more initial training steps of training the image classifier to obtain current parameter values for the trainable parameters,
selecting a training image and a corresponding class label from the training dataset,
determining a current label vector for training the image classifier on the training image by: applying the image classifier to the training image according to the current parameter values to obtain a prediction vector; inferring a predicted class of the multiple classes from the prediction vector; comparing the predicted class to the class label; and, when the predicted class is equal to the class label, determining the current label vector as a soft label based on the prediction vector, and
performing a current training step of training the image classifier on the training image using the current label vector;
obtaining an input image;
(i) applying the image classifier to the input image to determine a prediction vector for the input image and outputting a prediction based on the prediction vector; and/or (ii) applying a part of the image classifier to the input image to obtain a feature space representation of the input image and outputting the feature space representation.

### Claim 11 (depends on 10)

The method of claim 10, further comprising determining an out-of-distribution score for the input image from the prediction vector.

### Claim 12 (depends on 10)

The method of claim 10, wherein the input image represents a computer-controlled system and/or its environment, and wherein the method further comprises applying the part of the image classifier to obtain the feature space representation and applying a further trained model to the feature space representation to infer control data for controlling the computer-controlled system.

### Claim 13

A system for training an image classifier, the image classifier being configured to determine a prediction vector for an input image, the prediction vector including class probabilities for multiple respective classes, the system comprising:
a data interface for accessing a training dataset including multiple training images and corresponding class labels, and for accessing trainable parameters of the image classifier; and
a processor subsystem configured to train the image classifier by:
performing one or more initial training steps of training the image classifier to obtain current parameter values for the trainable parameters;
selecting a training image and a corresponding class label from the training dataset;
determining a current label vector for training the image classifier on the training image by: applying the image classifier to the training image according to the current parameter values to obtain a prediction vector; inferring a predicted class of the multiple classes from the prediction vector; comparing the predicted class to the class label; and, if the predicted class is equal to the class label, determining the current label vector as a soft label based on the prediction vector; and
performing a current training step of training the image classifier on the training image using the current label vector.

### Claim 14

A system for using an image classifier, the system comprising:
a storage including comprising trained parameters of the image classifier, the image classifier being configured to determine a prediction vector for an input image, the prediction vector including class probabilities for multiple respective classes, the image classifier being trained by:
accessing trainable parameters of the image classifier and a training dataset including multiple training images and corresponding class labels,
performing one or more initial training steps of training the image classifier to obtain current parameter values for the trainable parameters,
selecting a training image and a corresponding class label from the training dataset,
determining a current label vector for training the image classifier on the training image by: applying the image classifier to the training image according to the current parameter values to obtain a prediction vector; inferring a predicted class of the multiple classes from the prediction vector; comparing the predicted class to the class label; and, when the predicted class is equal to the class label, determining the current label vector as a soft label based on the prediction vector, and
performing a current training step of training the image classifier on the training image using the current label vector;
a processor subsystem configured to:
obtain an input image, and
(i) apply the image classifier to the input image to determine a prediction vector for the input image and output a prediction based on the prediction vector; and/or (ii) apply a part of the image classifier to the input image to obtain a feature space representation of the input image and output the feature space representation.

### Claim 15

A non-transitory computer-readable medium on which is stored a computer program training an image classifier, the image classifier being configured to determine a prediction vector for an input image, the prediction vector including class probabilities for multiple respective classes, the computer program, when executed by a processor system, causing the processor system to perform the following steps:
accessing trainable parameters of the image classifier and a training dataset including multiple training images and corresponding class labels;
performing one or more initial training steps of training the image classifier to obtain current parameter values for the trainable parameters;
selecting a training image and a corresponding class label from the training dataset;
determining a current label vector for training the image classifier on the training image by: applying the image classifier to the training image according to the current parameter values to obtain a prediction vector; inferring a predicted class of the multiple classes from the prediction vector; comparing the predicted class to the class label; and, when the predicted class is equal to the class label, determining the current label vector as a soft label based on the prediction vector; and
performing a current training step of training the image classifier on the training image using the current label vector.
