# US 12,183,051 B2 · Image processing method, device and apparatus

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

- Number: US 12,183,051 B2
- Document ID: US12183051B2
- Status: Granted
- Kind: B2
- Application number: 17/615,367
- Filed: 2019-09-29
- Published: 2023-08-10
- Granted: 2024-12-31
- Earliest claimed: 2019-08-16
- Assignees: Inspur Electronic Information Industry Co., Ltd.
- Applicants: Inspur Electronic Information Industry Co., Ltd.
- Inventors: Lingyan Liang; Gang Dong; Yaqian Zhao; Qichun Cao; Haiwei Liu; Hongbin Yang
- Web page: https://patentgrep.com/patent/US12183051B2

## CPC

- G06V 10/28: Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
- G06V 10/82: using neural networks
- G06V 10/48: by mapping characteristic values of the pattern into a parameter space, e.g. Hough transformation
- G06V 40/16: Human faces, e.g. facial parts, sketches or expressions
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

An image processing method is provided. Since in the present invention, the first quantization threshold obtained by the saturated mapping method and the second quantization threshold obtained by the unsaturated mapping method are weighted, it is equivalent to fusing two quantization threshold values. The obtained optimal quantization threshold can be applied to most activations, to more effectively retain the effective information of the activations and use in subsequent image processing, thereby improving the accuracy of inference computations of the quantified deep neural network on low-bit-width hardware platforms. An image processing device and apparatus have the same beneficial effects as the above image processing method.

## Claims

### Claim 1

An image processing method, comprising: calculating a first quantization threshold of activation output layer in a network model of a deep neural network using a saturation mapping method according to a calibrated data set composed of pre-selected images; calculating a second quantization threshold of the activation output layer using a non-saturated mapping method according to the calibrated data set; performing weighted calculation according to the first quantization threshold value and the second quantization threshold value to obtain an optimal quantization threshold value; quantizing the network model according to the optimal quantization threshold value; and deploying the quantized neural network to a hardware side and processing the images to be processed, wherein, the performing weighted calculation according to the first quantization threshold and the second quantization threshold to obtain an optimal quantization threshold is specifically:
S
sat
=
log
2
⁢
T
sat
2
n
-
1
-
1
;
⁢
S
no
-
sat
=
log
2
⁢
1
γ
*
T
no
-
sat
2
n
-
1
-
1
;
⁢
S
best
=
α
*
S
sat
+
β
*
S
no
-
sat
;
⁢
T
best
=
(
2
n
-
1
-
1
)
*
2
ceil
(
S
best
)
;
Tsat is the first quantization threshold value, Tno-sat is the second quantization threshold value, γ is a preset value and is greater than or equal to 1, Ssat is the form of the first quantization threshold value with a base of 2, Sno-sat is the form of the second quantization threshold value with a base of 2, Sbest is a scale factor, Tbest is the optimal quantization threshold value, a is the weight of the first quantization threshold value, p is the weight of the second quantization threshold value, ceil is an upward rounding function, and n is the number of positioning bits needing to be quantized.

### Claim 2 (depends on 1)

The image processing method according to claim 1, wherein, the target hardware side is a fixed-point computing hardware platform; the quantizing the network model according to the optimal quantization threshold value is specifically calculating to obtain a scale factor according to the optimal quantization threshold value; and quantizing the network model according to the scale factor in the form of a power of 2.

### Claim 3 (depends on 1)

The image processing method according to claim 1, wherein, the calculating process of the scale factor is as follows: calculating the candidate scale factors corresponding to each group of the combinations according to a plurality of preset a and p combinations; obtaining the optimal scale factor according to the respective cumulative probability distribution value of the candidate scale factor and the quantization error and the preset comparison standard.

### Claim 4 (depends on 3)

The image processing method according to claim 3, wherein, the preset comparison standard is as follows: if the cumulative probability distribution values of a plurality of candidate scale factors are equal, then the candidate scale factor with the smallest quantization error is taken as the optimal scale factor; if the cumulative probability distribution values of a plurality of candidate scale factors are not all equal, the candidate scale factor with the largest cumulative probability distribution value is taken as the optimal scale factor.

### Claim 5 (depends on 1)

The image processing method according to claim 1, wherein, the saturation mapping method is a relative entropy method or a mean squared error method.

### Claim 6 (depends on 2)

The image processing method according to claim 2, wherein, the saturation mapping method is a relative entropy method or a mean squared error method.

### Claim 7 (depends on 1)

The image processing method according to claim 1, wherein, the saturation mapping method is a relative entropy method or a mean squared error method.

### Claim 8 (depends on 3)

The image processing method according to claim 3, wherein, the saturation mapping method is a relative entropy method or a mean squared error method.

### Claim 9 (depends on 4)

The image processing method according to claim 4, wherein, the saturation mapping method is a relative entropy method or a mean squared error method.

### Claim 10 (depends on 1)

An image processing device, comprising: a memory, configured to store a computer program; and a processor, configured to implement the step of the image processing method as claimed in claim 1 when executing the computer program.
