# US 11,120,305 B2 · Learning of detection model using loss function

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

- Number: US 11,120,305 B2
- Document ID: US11120305B2
- Status: Granted
- Kind: B2
- Application number: 16/507,625
- Filed: 2019-07-10
- Published: 2020-10-01
- Granted: 2021-09-14
- Earliest claimed: 2019-03-28
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Takuya Goto; Hiroki Nakano; Masaharu Sakamoto
- Web page: https://patentgrep.com/patent/US11120305B2

## CPC

- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06F 18/217: {Validation; Performance evaluation; Active pattern learning techniques}
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/09: Supervised learning
- G06V 10/25: Determination of region of interest [ROI] or a volume of interest [VOI]
- G06V 10/776: Validation; Performance evaluation
- G06V 10/82: using neural networks
- G06V 2201/03: Recognition of patterns in medical or anatomical images
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

There is a desire to accurately learn a detection model. Provided is a computer-implemented method including acquiring an input image; acquiring an annotated image designating a region of interest in the input image; inputting the input image to a detection model that generates an output image showing a target region from the input image; calculating an error between the output image and the annotated image, using a loss function that weights an error inside the region of interest more heavily than an error outside the region of interest; and updating the detection model in a manner to reduce the error.

## Claims

### Claim 1

A computer-implemented method comprising:
acquiring an input image;
acquiring an annotated image designating a region of interest in the input image, wherein pixels of the annotated image are labelled with respective values of a class associated with the region of interest;
inputting the input image to a detection model that generates an output image showing a target region from the input image, wherein pixels of the output image are labelled with respective values of the class based on the target region;
calculating an error between the output image and the annotated image, using a weighted cross entropy loss function that includes multiplying a value of a label of a pixel of the annotated image by a logarithm of a value of a label of a corresponding pixel of the output image, and applying a weight associated with the class; and
updating the detection model in a manner to reduce the error.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the weighted cross entropy loss function is shown by a following expression, in which X is a collection of all pixels i in the input image, C is a collection of all classes c, Wc is a weight of the class c, pic is a value of the class c at the pixel i in the annotated image, and qic is the value of the class c at the pixel i in the output image;
ℒ
=
∑
i
∈
X
⁢
∑
c
∈
C
⁢
w
c
⁢
p
i
c
⁢
log
⁢
q
i
c
.
expression
⁢
⁢
1

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the detection model includes, between an input and an output, one or a plurality of convolution layers, one or a plurality of pooling layers, one or a plurality of deconvolution layers, and one or a plurality of batch normalization layers.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein the plurality of batch normalization layers is arranged respectively every predetermined number of layers in at least one of a first path including some of the plurality of convolution layers and the plurality of pooling layers and a second path including the rest of the plurality of convolution layers and the plurality of deconvolution layers.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
acquiring at least one coordinate in the input image; and
specifying the region of interest according to the at least one coordinate.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein the specifying the region of interest according to the at least one coordinate includes specifying a predetermined range, with the at least one coordinate as a reference, as the region of interest.

### Claim 7 (depends on 5)

The computer-implemented method of claim 5, wherein the specifying the region of interest according to the at least one coordinate includes specifying a range having a texture similar to a texture at the at least one coordinate as the region of interest.

### Claim 8 (depends on 5)

The computer-implemented method of claim 5, wherein the specifying the region of interest according to the at least one coordinate includes specifying a range surrounded by a set of a plurality of coordinates as the region of interest.

### Claim 9 (depends on 5)

The computer-implemented method of claim 5, further comprising:
displaying the specified region of interest; and
while the region of interest is being displayed, receiving user input and modifying the region of interest.

### Claim 10

A computer-implemented method comprising:
acquiring an input image and an indication of at least one coordinate in the input image;
specifying a predetermined range of the input image as a region of interest in the input image, resulting in an annotated image, using the at least one coordinate as a reference;
inputting the input image to a detection model that generates an output image showing a target region from the input image;
calculating an error between the output image and the annotated image, using a weighted loss function that weights an error inside the region of interest more heavily than an error outside the region of interest; and
updating the detection model in a manner to reduce the error between the output image and the annotated image.

### Claim 11 (depends on 10)

The computer-implemented method of claim 10, wherein the weighted loss function is shown by a following expression, in which X is a collection of all pixels i in the input image, C is a collection of all classes c, Wc is a weight of the class c, pic is a value of the class c at the pixel i in the annotated image, and qic is the value of the class c at the pixel i in the output image;
ℒ
=
∑
i
∈
X
⁢
∑
c
∈
C
⁢
w
c
⁢
p
i
c
⁢
log
⁢
q
i
c
.
expression
⁢
⁢
1

### Claim 12 (depends on 10)

The computer-implemented method of claim 10, wherein the detection model includes, between an input and an output, one or a plurality of convolution layers, one or a plurality of pooling layers, one or a plurality of deconvolution layers, and one or a plurality of batch normalization layers.

### Claim 13 (depends on 12)

The computer-implemented method of claim 12, wherein the plurality of batch normalization layers is arranged respectively every predetermined number of layers in at least one of a first path including some of the plurality of convolution layers and the plurality of pooling layers and a second path including the rest of the plurality of convolution layers and the plurality of deconvolution layers.

### Claim 14

A computer-implemented method comprising:
acquiring an input image and an indication of at least one coordinate in the input image;
specifying a region of interest in the input image, resulting in an annotated image, the region of interest having a texture similar to a texture of the at least one coordinate;
inputting the input image to a detection model that generates an output image showing a target region from the input image;
calculating an error between the output image and the annotated image, using a weighted loss function that weights an error inside the region of interest more heavily than an error outside the region of interest; and
updating the detection model in a manner to reduce the error between the output image and the annotated image.

### Claim 15 (depends on 14)

The computer-implemented method of claim 14, wherein the weighted loss function is shown by a following expression, in which X is a collection of all pixels i in the input image, C is a collection of all classes c, Wc is a weight of the class c, pic is a value of the class c at the pixel i in the annotated image, and qic is the value of the class c at the pixel i in the output image;
ℒ
=
∑
i
∈
X
⁢
∑
c
∈
C
⁢
w
c
⁢
p
i
c
⁢
log
⁢
q
i
c
.
expression
⁢
⁢
1

### Claim 16 (depends on 14)

The computer-implemented method of claim 14, wherein the detection model includes, between an input and an output, one or a plurality of convolution layers, one or a plurality of pooling layers, one or a plurality of deconvolution layers, and one or a plurality of batch normalization layers.

### Claim 17 (depends on 16)

The computer-implemented method of claim 16, wherein the plurality of batch normalization layers is arranged respectively every predetermined number of layers in at least one of a first path including some of the plurality of convolution layers and the plurality of pooling layers and a second path including the rest of the plurality of convolution layers and the plurality of deconvolution layers.

### Claim 18

A computer-implemented method comprising:
acquiring an input image and an indication of at least one coordinate in the input image;
specifying a region of interest in the input image according to the at least one coordinate, resulting in an annotated image, the region of interest having a range surrounded by a set of a plurality of coordinates;
inputting the input image to a detection model that generates an output image showing a target region from the input image;
calculating an error between the output image and the annotated image, using a weighted loss function that weights an error inside the region of interest more heavily than an error outside the region of interest; and
updating the detection model in a manner to reduce the error between the output image and the annotated image.

### Claim 19 (depends on 18)

The computer-implemented method of claim 18, wherein the weighted loss function is shown by a following expression, in which X is a collection of all pixels i in the input image, C is a collection of all classes c, Wc is a weight of the class c, pic is a value of the class c at the pixel i in the annotated image, and qic is the value of the class c at the pixel i in the output image;
ℒ
=
∑
i
∈
X
⁢
∑
c
∈
C
⁢
w
c
⁢
p
i
c
⁢
log
⁢
q
i
c
.
expression
⁢
⁢
1

### Claim 20 (depends on 18)

The computer-implemented method of claim 18, wherein the detection model includes, between an input and an output, one or a plurality of convolution layers, one or a plurality of pooling layers, one or a plurality of deconvolution layers, and one or a plurality of batch normalization layers.

### Claim 21 (depends on 20)

The computer-implemented method of claim 20, wherein the plurality of batch normalization layers is arranged respectively every predetermined number of layers in at least one of a first path including some of the plurality of convolution layers and the plurality of pooling layers and a second path including the rest of the plurality of convolution layers and the plurality of deconvolution layers.

### Claim 22

A computer-implemented method comprising:
acquiring an input image and an indication of at least one coordinate in the input image;
specifying a region of interest in the input image according to the at least one coordinate, resulting in an annotated image;
displaying the region of interest;
while the region of interest is being displayed, receiving user input and modifying the region of interest;
inputting the input image to a detection model that generates an output image showing a target region from the input image;
calculating an error between the output image and the annotated image, using a weighted loss function that weights an error inside the region of interest more heavily than an error outside the region of interest; and
updating the detection model in a manner to reduce the error between the output image and the annotated image.

### Claim 23 (depends on 22)

The computer-implemented method of claim 22, wherein the weighted loss function is shown by a following expression, in which X is a collection of all pixels i in the input image, C is a collection of all classes c, Wc is a weight of the class c, pic is a value of the class c at the pixel i in the annotated image, and qic is the value of the class c at the pixel i in the output image;
ℒ
=
∑
i
∈
X
⁢
∑
c
∈
C
⁢
w
c
⁢
p
i
c
⁢
log
⁢
q
i
c
.
expression
⁢
⁢
1

### Claim 24 (depends on 22)

The computer-implemented method of claim 22, wherein the detection model includes, between an input and an output, one or a plurality of convolution layers, one or a plurality of pooling layers, one or a plurality of deconvolution layers, and one or a plurality of batch normalization layers.

### Claim 25 (depends on 24)

The computer-implemented method of claim 24, wherein the plurality of batch normalization layers is arranged respectively every predetermined number of layers in at least one of a first path including some of the plurality of convolution layers and the plurality of pooling layers and a second path including the rest of the plurality of convolution layers and the plurality of deconvolution layers.
