# US 12,602,834 B2 · Long-range context model in neural image compression

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

- Number: US 12,602,834 B2
- Document ID: US12602834B2
- Status: Granted
- Kind: B2
- Application number: 18/458,595
- Filed: 2023-08-30
- Published: 2024-06-27
- Granted: 2026-04-14
- Earliest claimed: 2022-12-27
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Yang Sui; Ding Ding; Xiaozhong Xu; Shan Liu
- Web page: https://patentgrep.com/patent/US12602834B2

## CPC

- G06T 9/00: Image coding (bandwidth or redundancy reduction for static pictures H04N1/41; coding or decoding of static colour picture signals H04N1/64; methods or arrangements for coding, decoding, compressing or decompressing digital video signals H04N19/00)
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/048: Activation functions
- G06N 3/063: using electronic means
- G06N 3/08: Learning methods
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06T 7/13: Edge detection
- G06T 9/002: {using neural networks}
- G06V 10/44: Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- H04N 19/91: Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
- G06T 2207/20164: Salient point detection; Corner detection
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Methods and apparatuses for decoding a compressed image using a neural image compression network are provided. The method may include generating context parameters associated with a compressed image, the context parameters corresponding to a first area. The method may also include determining that a long range global dependency exists between a first latent and a second latent in a long-range global area within the compressed image and predicting a plurality of context features using a transformer-based long-range context prediction model. The method may then include reconstructing the compressed image based on the predicted plurality of context features.

## Claims

### Claim 1

A method for decoding a compressed image using a neural image compression network, the method being executed by at least one processor, the method comprising:
generating context parameters associated with a compressed image;
determining that a long range global dependency exists between a first latent and a second latent in a long-range global area within the compressed image;
predicting a plurality of context features using a transformer-based long-range context prediction model, the predicting the plurality of context features further comprising:
predicting first context features using the transformer-based long-range context prediction model and first context parameters, the first context parameters corresponding to first locations in a first area, and the first context features that are predicted using the first context parameters corresponding to second locations in the first area, and
predicting second context features using the transformer-based long-range context prediction model and second context parameters, the second context parameters corresponding to the second locations in the first area, and the second context features that are predicted using the second context parameters corresponding to third locations in the first area; and
reconstructing the compressed image based on the predicted plurality of context features.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first locations in the first area are corner locations in the first area,
wherein the second locations in the first area are locations at mid-points between one or more of the corner locations, and
wherein the third locations in the first area are locations at mid-points between one or more of the second locations.

### Claim 3 (depends on 1)

The method of claim 1, wherein the first locations in the first area are edge locations in the first area,
wherein the second locations in the first area are locations at mid-points between one or more of the edge locations or corner locations associated respective edges of the first area, and
wherein the third locations in the first area are locations at mid-points between one or more of the second locations.

### Claim 4 (depends on 1)

The method of claim 1, wherein predicting the first context features comprises:
generating respective mean and scale pairs associated with each of the first context parameters;
decoding first latents based on the respective mean and scale pairs; and
inputting the first latents into the transformer-based long-range context prediction model to predict the first context features.

### Claim 5 (depends on 1)

The method of claim 1, wherein predicting the second context features comprises:
generating respective mean and scale pairs associated with each of the second context parameters;
decoding second latents based on the respective mean and scale pairs; and
inputting the second latents into the transformer-based long-range context prediction model to predict the second context features.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first area is one of a square area or a rectangle area.

### Claim 7

An apparatus for decoding a compressed image using a neural image compression network, the apparatus comprising:
at least one memory configured to store computer program code; and
at least one processor configured to read the computer program code and operate as instructed by the computer program code, the computer program code including:
generating code configured to cause the at least one processor to generate context parameters associated with a compressed image;
first determining code configured to cause the at least one processor to determine that a long range global dependency exists between a first latent and a second latent in a long-range global area within the compressed image;
context feature predicting code configured to cause the at least one processor to predict a plurality of context features using a transformer-based long-range context prediction model, the context predicting code further comprising:
first predicting code configured to cause the at least one processor to predict first context features using a long-range context prediction model and first context parameters, the first context parameters corresponding to first locations in a first area, and the first context features that are predicted using the first context parameters corresponding to second locations in the first area; and
second predicting code configured to cause the at least one processor to predict second context features using the long-range context prediction model and second context parameters, the second context parameters corresponding to the second locations in the first area, and the second context features that are predicted using the second context parameters corresponding to third locations in the first area; and
reconstructing code configured to cause the at least one processor to reconstruct the compressed image based on the predicted plurality of context features.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the first locations in the first area are corner locations in the first area,
wherein the second locations in the first area are locations at mid-points between one or more of the corner locations, and
wherein the third locations in the first area are locations at mid-points between one or more of the second locations.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the first locations in the first area are edge locations in the first area,
wherein the second locations in the first area are locations at mid-points between one or more of the edge locations or corner locations associated respective edges of the first area, and
wherein the third locations in the first area are locations at mid-points between one or more of the second locations.

### Claim 10 (depends on 7)

The apparatus of claim 7, wherein the first predicting code is further configured to cause the at least one processor to:
generate respective mean and scale pairs associated with each of the first context parameters;
decode first latents based on the respective mean and scale pairs; and
input the first latents into the long-range context prediction model to predict the first context features.

### Claim 11 (depends on 7)

The apparatus of claim 7, wherein the second predicting code is further configured to cause the at least one processor to:
generate respective mean and scale pairs associated with each of the second context parameters;
decode second latents based on the respective mean and scale pairs; and
input the second latents into the long-range context prediction model to predict the second context features.

### Claim 12 (depends on 7)

The apparatus of claim 7, wherein the first area is one of a square area or a rectangle area.

### Claim 13

A non-transitory computer-readable medium storing instructions that, when executed by at least one processor of an apparatus for decoding a compressed image using a neural image compression network, cause the at least one processor to:
generate context parameters associated with a compressed image;
determine that a long range global dependency exists between a first latent and a second latent in a long-range global area within the compressed image;
predict a plurality of context features using a transformer-based long-range context prediction model, the predicting the plurality of context features further comprising:
predicting first context features using the transformer-based long-range context prediction model and first context parameters, the first context parameters corresponding to first locations in a first area, and the first context features that are predicted using the first context parameters corresponding to second locations in the first area, and
predicting second context features using the transformer-based long-range context prediction model and second context parameters, the second context parameters corresponding to the second locations in the first area, and the second context features that are predicted using the second context parameters corresponding to third locations in the first area; and
reconstruct the compressed image based on the predicted plurality of context features.

### Claim 14 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the first locations in the first area are corner locations in the first area,
wherein the second locations in the first area are locations at mid-points between one or more of the corner locations, and
wherein the third locations in the first area are locations at mid-points between one or more of the second locations.

### Claim 15 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the first locations in the first area are edge locations in the first area,
wherein the second locations in the first area are locations at mid-points between one or more of the edge locations or corner locations associated respective edges of the first area, and
wherein the third locations in the first area are locations at mid-points between one or more of the second locations.

### Claim 16 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein predicting the first context features comprises:
generating respective mean and scale pairs associated with each of the first context parameters;
decoding first latents based on the respective mean and scale pairs; and
inputting the first latents into the long-range context prediction model to predict the first context features.

### Claim 17 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein predicting the second context features comprises:
generating respective mean and scale pairs associated with each of the second context parameters;
decoding second latents based on the respective mean and scale pairs; and
inputting the second latents into the long-range context prediction model to predict the second context features.
