Latent coding based image compression

By encoding images into a latent space and employing transform coding with a generative VQ-VAE and categorical hyper module, the method addresses the misalignment issue in traditional compression, achieving high-fidelity and high-realism image compression with reduced bit cost.

WO2025245906A1PCT designated stage Publication Date: 2025-12-04MICROSOFT TECHNOLOGY LICENSING LLC +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/096915
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-01
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

Traditional image compression methods face misalignment between pixel-space distortion and human perception, leading to a poor trade-off between visual quality and compression efficiency, especially at low bitrates.

Method used

Encoding images into a latent space using a latent encoder and applying transform coding with a quantized representation to achieve high-fidelity and high-realism compression, leveraging a generative VQ-VAE and a categorical hyper module to capture semantic visual components.

Benefits of technology

The proposed method achieves over 45% bit reduction compared to traditional methods while maintaining equivalent perceptual quality, supporting applications like image restoration and style transfer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096915_04122025_PF_FP_ABST
    Figure CN2024096915_04122025_PF_FP_ABST
Patent Text Reader

Abstract

According to implementations of the subject matter described herein, a solution for latent coding based image compression is provided. According to the solution, an image is encoded to a first representation in a latent space with a first encoder. The first representation is converted to a second representation using a first analysis transform unit. A quantized representation is obtained by quantizing the second representation. The quantized representation is further encoded into a set of bits to obtain a coding result of the image. In this way, high-fidelity and high-realism image compression may be achieved at low bitrates.
Need to check novelty before this filing date? Find Prior Art

Description

LATENT CODING BASED IMAGE COMPRESSIONBACKGROUND

[0001] Traditional image compression techniques have predominantly utilized pixel-space transform coding to reduce spatial redundancy. These methods, including established compres-sion standards and emerging learned image compression models, convert pixel data into com-pact representations through a transform module, which eliminates redundancy and reduces bit cost in the subsequent entropy coding process.SUMMARY

[0002] According to implementations of the subject matter described herein, a solution for latent coding based image compression is proposed. In this solution, an image is encoded to a first representation in a latent space with a first encoder. The first representation is converted to a second representation using a first analysis transform unit. A quantized representation is obtained by quantizing the second representation. The quantized representation is further en-coded into a set of bits to obtain a coding result of the image. In this way, high-fidelity and high-realism image compression may be achieved at low bitrates.

[0003] The Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. The Summary is neither intended to identify key features or essential features of the subject matter described herein, nor is it intended to be used to limit the scope of the subject matter described herein.BRIEF DESCRIPTION OF THE DRAWINGS

[0004] FIG. 1 illustrates a block diagram of an example environment in which various im-plementations of the subject matter described herein can be implemented;

[0005] FIG. 2 illustrates a schematic block diagram of an image codec system in accordance with some implementations of the subject matter described herein;

[0006] FIG. 3 illustrates a schematic block diagram of example architecture of transform coding in latent space in accordance with some implementations of the subject matter described herein;

[0007] FIG. 4A to FIG. 4C illustrate a schematic block diagram of example training stages  in accordance with some implementations of the subject matter described herein;

[0008] FIG. 5 illustrates a schematic block diagram of example code-prediction-based su-pervision during training in accordance with some implementations of the subject matter de-scribed herein;

[0009] FIG. 6 illustrates a flowchart of a process for image compressing in accordance with some implementations of the subject matter described herein;

[0010] FIG. 7 illustrates a flowchart of a process for image reconstructing in accordance with some implementations of the subject matter described herein; and

[0011] FIG. 8 illustrates a schematic block diagram of an electronic device in which various implementations of the subject matter described herein can be implemented.

[0012] Throughout the drawings, the same or similar reference symbols refer to the same or similar elements.DETAILED DESCRIPTION OF EMBODIMENTS

[0013] The subject matter described herein will now be described with reference to some example implementations. It is to be understood that these implementations are described only for the purpose of illustration and help those skilled in the art to better understand and thus implement the subject matter described herein, without suggesting any limitations to the scope of the subject matter described herein.

[0014] As used herein, the term “includes” and its variants are to be read as open terms that mean “includes but is not limited to. ” The term “based on” is to be read as “based at least in part on. ” The terms “an implementation” and “one implementation” are to be read as “at least one implementation. ” The term “another implementation” is to be read as “at least one other implementation. ” The term “first, ” “second, ” and the like may refer to different or the same objects. Other definitions, either explicit or implicit, may be included below.

[0015] As used herein, the term “model” may learn an association between corresponding input and output from training data, and thus a corresponding output may be generated for a given input after the training. The generation of the model may be based on machine learning techniques. Deep learning (DL) is one of machine learning algorithms that processes the input and provides the corresponding output using a plurality of layers of processing units. A neural network model is an example of a deep learning-based model. As used herein, “model” may also be referred to as “machine learning model” , “learning model” , “machine learning network”  or “learning network” , which are used interchangeably herein.

[0016] Generally, machine learning may roughly include three stages, i.e., a training stage, a test stage, and an application stage (also referred to as an interference stage) . In the training stage, a given model may be trained using a large scale of training data, with parameter values being iteratively updated until the model can obtain, from the training data, consistent interfer-ence that meets an expected target. Through the training, the model may be considered as being capable of learning the association between the input and the output (also referred to as an input-to-output mapping) from the training data. The parameter values of the trained model are de-termined. In the test stage, test inputs are applied to the trained model to test whether the model can provide correct outputs, so as to determine the performance of the model. In the interfer-ence stage, the model may be utilized to process a practical input based on the parameter values obtained from the training and to determine the corresponding output.

[0017] Example Environment

[0018] FIG. 1 illustrates a block diagram of an example environment 100 in which var-ious implementations of the subject matter described herein can be implemented. In the environment of FIG. 1, an electronic device 110 includes an image codec 112 configured to encode and / or decode an image. An electronic device 120 includes an image codec 122 con-figured to encode and / or decode an image. The image codec 112 or 122 may include encoders and / or decoders. During the encoding, an encoder may encode an image 130 into a bitstream 132. During the decoding, a decoder may decode the bitstream 132 into the image 130.

[0019] The electronic devices 110 and 120 can communicate with each other through any appropriate communication network. In some codec scenarios, the electronic device 110 and the electronic device 120 may perform image communication, and the image codec 112 and 122 may both implement the encoding and decoding of the image. For example, the electronic device 110 may provide a bitstream obtained after image encoding to the electronic device 120 for decoding, and the electronic device 120 may decode the received bitstream to obtain the corresponding image. In addition, the electronic device 120 may also provide an image encod-ing result to the electronic device 110 for decoding. In some codec scenarios, the image codec 112 in the electronic device 110 may include an encoder for encoding an image into a bitstream. The electronic device 120 may include an image playback tool, where the image codec 122 includes a decoder for decoding the bitstream generated by the image codec 112 to obtain the image for playback.

[0020] It would be appreciated that the devices and elements shown in FIG. 1 are only ex-amples. In practical applications, there may exist more electronic devices, and each electronic device may have image encoding and / or decoding functions.

[0021] As discussed, traditional image compression methods, including established com-pression standards and emerging learned image compression models, convert pixel data into compact representations through a transform module, which eliminates redundancy and reduces bit cost in the subsequent entropy coding process.

[0022] However, a common limitation inherent in these pixel-space methods is the misalign-ment between pixel-space distortion and human perception, particularly at low bitrates. The pixel-space distortion does not always correlate with human visual perception, leading to a bad trade-off between visual quality and compression efficiency.

[0023] System Architecture of Image Coding

[0024] In the example implementations of the subject matter described herein, an improved solution for image compression is proposed. In this solution, an image is encoded to a first representation in a latent space with a first encoder. The first representation is converted to a second representation using a first analysis transform unit. A quantized representation is ob-tained by quantizing the second representation. The quantized representation is further encoded into a set of bits to obtain a coding result of the image. In this way, high-fidelity and high-realism image compression may be achieved at low bitrates.

[0025] Some example implementations of the subject matter described herein will be de-scribed in more detail below with reference to the accompanying drawings.

[0026] FIG. 2 illustrates a schematic block diagram of an image codec system 200 in accord-ance with some implementations of the subject matter described herein. The respective com-ponents in the image codec system 200 may be implemented in hardware, software, firmware or any combination thereof. The image codec system 200 may be implemented in the image codec 112 and / or 122 of FIG. 1.

[0027] As shown in FIG. 2, the image codec system 200 comprises a latent encoder 210 and an analysis transform unit 220. The latent encoder 210 may encode an image 205 into a per-ception-aligned latent space, and the analysis transform unit 220 may further perform transform coding on the latent representation for lower bitrates.

[0028] For example, as shown in FIG. 2, the input image x 205 is firstly encoded into a latent  l 215 (also referred to as a first representation) using the latent encoder E 210. Further, the analysis transform unit 220 performs an analysis transform on the latent l 215 to produce the code y (also referred to as a second representation) .

[0029] FIG. 3 illustrates a schematic block diagram 300 of example architecture of transform coding in latent space in accordance with some implementations of the subject matter described herein.

[0030] As shown in FIG. 3, the analysis transform unit 220 performs an analysis transform ga 302 on the latent l 215 to produce the code y. The analysis transform ga 302 may be imple-mented based on proper type of transforming, e.g., a non-linear transforming.

[0031] Further, the code y is provided to a quantize unit 304 to be scalar-quantized to be the code  (also referred to as quantized representation) . The code may be further encoded to a set of bits 225 for example by an arithmetic encoding unit 306 through entropy coding.

[0032] The process of image compression as discussed above may be formulated as: l=E (x) , y=ga (l)

[0033] During a process for reconstructing an image based on the coding results, the set of bits 225 may be decoded into the code for example by an arithmetic decoding unit 308 thor-ough entropy decoding.

[0034] Further, as shown in FIG. 2, the code may be provided to a synthesis transform unit 230 to obtain the synthesis latent 235 (also referred to as a synthesis representation) . As shown in FIG. 3, the synthesis transform unit 230 may perform a synthesis transform gs 310 on the code to produce the synthesis latent 235. The synthesis transform gs 310 may be imple-mented based on proper type of transforming corresponding to the analysis transform ga 302, e.g., a non-linear transforming.

[0035] Finally, the reconstructed image 245 is generated by the latent decoder D 240 based on the synthesis latent 235.

[0036] The process of image reconstruction as discussed above may be formulated as:

[0037] It shall be understood that the latent encoder E and latent decoder D may be imple-mented by any proper type of encoder and decoder. For example, the latent encoder E and the  latent decoder D may preform the image compression and reconstruction using a codebook. The codebook may comprise a set of semantic features for quantizing the latent features.

[0038] To achieve high-quality generative latent coding, how to obtain a human-perception-aligned latent space is a crucial challenge. In some implementations, a generative VQ-VAE may be employed as the latent encoder and the latent decoder (E and D) , and the latent l may comprise a first set of indices determined according to a codebook C (referred to as a first codebook) .

[0039] By mapping images into visual semantic elements within a codebook C and incorpo-rating a generative image decoding process, both semantic consistency and texture realism can be well guaranteed. Additionally, it contributes to the compression process through a sparse yet robust latent space, which is achieved by training with the discrete codebook C as a variational bottleneck.

[0040] To compress the latent representations l, a direct approach is VQ-indices-map coding. However, these methods often lack a careful consideration of the correlation among the latent, resulting in an insufficient redundancy reduction and consequently a high bit cost.

[0041] In some implementations, a transform coding module compresses the latent, replac-ing the vector-quantization step for more effective reduction of latent redundancy.

[0042] As shown in FIG. 3, the latent l is transformed into code y using transformations ga and then quantized to the code Entropy coding may be further applied to based on proba-bility information, e.g., a probability p which may be estimated by a categorical hyper mod-ule as will be discussed below and a spatial context module 322, e.g., a quadtree-partition-based spatial context module.

[0043] Traditionally, a factorized hyper module is commonly employed in recent image compression schemes. However, at ultra-low bitrate, the factorized z tends to encode low-level information such as color and texture, incurring a high bit cost.

[0044] In some implementations, a categorical hyper module as shown in FIG. 3 may be em-ployed. As shown, the categorical hyper module may utilize a hyper codebook Ch 316 (referred to as a second codebook) to store the basic semantic elements rather than the low-level infor-mation. This module comprises a hyper analysis transform unit (referred to as a second analysis transform unit) ha 312, a hyper synthesis transform unit (referred to as a second synthesis trans-form unit) hs 320, a VQ-encoder 314 (referred to a second encoder) , a VQ-decoder 318 (referred to as a second decoder) and a hyper codebook Ch 316. The transformations may be formulated  as:

[0045] where z and denote hyper-codes, VQ (e, Ch) represents vector-quantization by nearest lookup in the hyper codebook Ch , and the latent may comprise a second set of indices determined according to a hyper codebook Ch. In this way, the categorical z is more inclined to capture high-level semantic information, which can be encoded with significantly fewer bits.

[0046] A notable advantage of transform coding over VQ-indices map coding is its capabil-ity for rate-variable compression, which is a core functionality for a practical image codec. Indices-map coding is limited since the codebook can only model one specified distribution, but different rates naturally need different distributions. In contrast, transform coding converts latent into a unified Gaussian distribution, and variable-rate can be achieved by variable param-eters (e.g., means and scales) of Gaussian.

[0047] In some implementations, as shown in FIG. 3, a scale parameter q may be obtained and be provided to the analysis transform ga 302 and the synthesis transform gs 310 to achieve compression at different bitrates.

[0048] According to the implementations, a Generative Latent Coding (GLC) scheme for image compression is provided, which achieves high-fidelity and high-realism image compres-sion at ultra-low bitrates. The GLC scheme operates in the latent space of a generative encoder (e.g., VQ-VAE) , leveraging its discrete codes to encapsulate semantic visual components and enable efficient compression.

[0049] Further, by employing a categorical hyper module, the GLC scheme significantly re-duces the bit cost of hyper-information and enhances the semantic consistency of the com-pressed images.

[0050] Additionally, the GLC scheme for image compression demonstrates superior perfor-mance on benchmarks, achieving over 45%bit reduction compared to traditional methods while maintaining equivalent perceptual quality, as measured by the Frechet Inception Distance (FID) . Furthermore, the GLC framework supports various vision applications, such as image restora-tion and style transfer, showcasing its versatility and practical potential in the field of image processing.

[0051] Continue referring to Fig. 2, the synthesis latent 235 can also be provided to a styl-ization decoder 250 to decode the synthesis latent 235 into an image 255 with another style.  The stylization decoder 250 may be trained with a plurality of training image pairs, each pair comprising an image with a source style and a corresponding image with a specific style. Thereby, a style transfer may be efficiently achieved based on the compression process as dis-cussed above.

[0052] Training Process

[0053] In some implementations, a three-stage progressive training manner may be em-ployed to fully leverage the potential of the GLC framework.

[0054] FIG. 4A to FIG. 4C illustrate a schematic block diagram 400A-400C of example training stages in accordance with some implementations of the subject matter described herein.

[0055] As shown in FIG. 4A, to obtain a human-perception-aligned latent space for compression, the first training stage 410 (also referred to as the first training process) may comprise training a generative VQ-VAE as the initialization of E and D. To ensure the sparsity of the latent space, an codebook C to be trained with the latent encoder and latent decoder is employed to perform nearest vector-quantization, transforming l to

[0056] As shown in FIG. 4A, at the first training stage 410, a first training image x is obtained, and a first synthesis image corresponding to the first training image x can be generated using the latent encoder (referred to a first encoder) and the latent decoder (referred to a first decoder) .

[0057] Further, a pixel-level loss (referred to as a first loss) is defined based on a first differ-ence between the first training image x and the first synthesis image and the latent encoder and the latent decoder are trained according to the pixel-level loss.

[0058] In some implementations, the pixel-level loss may comprise a reconstruction loss, a perceptual loss, an adversarial loss and a codebook loss:

[0059] where Lper corresponds to the perceptual loss, for example, the LPIPS (Learned Perceptual Im-age Patch Similarity) loss calculated using VGG extracted features. Ladv is the adversarial loss with a weight of λadv.

[0060] In some implementations, the codebook loss Lcodebookmay be formulated as:

[0061] where sg (·) denotes the stop-gradient operator and β is a parameter to control the update rates of the E and C.

[0062] Based on the loss function as shown in Equation (4) , a VQ-VAE may be trained as the encoder E and the decoder D, and the codebook C can be determined accordingly.

[0063] In this way, the first stage of training in the GLC framework establishes a perceptually aligned, sparse, and semantically rich latent space, which is essential for the high-fidelity and high-realism image compression at ultra-low bitrates. It lays the groundwork for the subsequent stages of transform coding and rate adaptation, ensuring that the compressed images retain es-sential visual and semantic content.

[0064] As shown in FIG. 4B, at the second training stage 420, given the trained latent space, the transform coding may be trained to achieve low-bitrate latent compression, while fixing the encoder E and the decoder D. In the second training stage 420, a latent loss may be determined based on the generated latent l and the synthesis latent For example, the latent loss may be determined according to the difference between the generated latent l and the synthesis latent

[0065] In some implementations, as shown in Fig. 5, an auxiliary code predictor CP 510 may be employed in the second training stage 420 to enhance the semantic consistency by necessi-tating the latent to possess the capability to predict the correct VQ-indices.

[0066] As shown in FIG. 5, the generated latent l may be encoded into a first set of VQ-indices by Ml=VQ (l, C) according to a codebook 520, and the auxiliary code predictor CP 510 may subsequently determine a second set of indices by

[0067] Accordingly, the code-prediction-based latent loss can be formulated by:

[0068] where l is a training latent representation generated by the trained first encoder,  is a synthesis latent representation, CE denotes the cross entropy loss and λcode is a control parameter. Then the analysis transform unit and the synthesis transform unit can be supervised by the loss of the second training stage (referred to as a second loss) :

[0069] where R is the estimated rate and λ is a parameter used to control the trade-off, Ex~pX indicates an expectation over the probability distribution pX of the input image x.

[0070] Based on the loss function as shown in Equation (7) , with the encoder E and the decoder D trained at the first training stage, the analysis transform unit and the synthesis trans-form unit can be trained and the hyper codebook Ch can be determined accordingly at the second training stage.

[0071] As such, the second stage of training in the GLC framework may be designed to achieve low-bitrate, high-fidelity image compression by optimizing the transform coding strat-egy, enhancing semantic consistency through predictive latent representations, and balancing the trade-off between compression efficiency and image quality.

[0072] As shown in FIG. 4C, at the third training stage 430, the entire network may be fine-tuned with the pixel space supervision to achieve better compression performance. In the third training stage 430, a pixel loss may be determined based on the input image x and the recon-structed image For example, the pixel loss may be determined according to the difference between the input image x and the reconstructed image

[0073] As shown in FIG. 5, the code-prediction-based supervision may also be extended into the pixel space. Specifically, the encoder EVQ trained from the first stage encodes the training image x and the synthesis image into latent space by

[0074] The code-prediction-based pixel loss can be calculated by Dcode based on the difference between a third set of indices generated based on lp and a fourth set of indices gen-erated based on  (referred to as) according to the same formulation with Equation (6) . For example, the third set of indices may be generated according to a codebook 520 based on lp, and the fourth set of indices may be generated using the auxiliary code predictor CP 510 based on

[0075] The overall pixel supervision is defined as:

[0076] where x denotes a training image (referred to as a second training image) and denotes a syn-thesis image (referred to as a second synthesis image) .

[0077] The loss for the third training stage (referred to the third loss) with the rate-distortion  trade-off supervision may be defined as:

[0078] Based on the loss function as shown in Equation (9) , the entire network comprising the encoder E, the decoder D, the analysis transform unit and the synthesis transform unit with the codebooks C and Ch can be fine-tuned accordingly.

[0079] In this way, the third stage of training in the GLC framework aims to refine the mod-el's ability to compress images at ultra-low bitrates while preserving high perceptual quality, semantic consistency, and visual fidelity. This stage integrates various forms of supervision to ensure that the compressed images meet high standards of quality when reconstructed.

[0080] By using the code-prediction-based supervision, it enriches the latent representation with detailed semantic information, such as gestures and attributes, leading to reconstructed images with improved semantic consistency. In this way, a high-fidelity image compression at ultra-low bitrates can be achieved.

[0081] In some implementations, the codebook loss as discussed above according to equa-tion (5) can also be added to the loss functions of both the second training stage (e.g., Equation 7) and the third training stage (e.g., Equation 9) .

[0082] Further, by employing code prediction solely during the training process, it may avoid a potential performance bottleneck that can occur when a code prediction module is integrated into the decoding process. It also allows the decoder to receive more flexible input, which is essential for further fine-tuning and enhancing compression performance.

[0083] Example Process

[0084] FIG. 6 illustrates a flowchart of a process 600 for image compressing in accordance with some implementations of the subject matter described herein. The process 600 may be implemented at the image codec system 200 of FIG. 2.

[0085] At block 610, the image codec system 200 encodes an image to a first representation in a latent space with a first encoder.

[0086] At block 620, the image codec system 200 converts the first representation to a second representation using a first analysis transform unit.

[0087] At block 630, the image codec system 200 obtains a quantized representation by quantizing the second representation.

[0088] At block 640, the image codec system 200 encodes the quantized representation into a set of bits to obtain a coding result of the image.

[0089] In some implementations, encoding an image to a first representation in a latent space with a first encoder comprises: generating the first representation based on a first codebook associated with the first encoder.

[0090] In some implementations, encoding the quantized representation into a set of bits to obtain a coding result of the image comprises: converting the second representation into a third representation using a second analysis transform unit; encoding the third representation into a fourth representation using a second encoder; generating probability information for the quan-tized representation based on the third representation; and encoding the quantized representa-tion into a set of bits based on the probability information.

[0091] In some implementations, encoding the third representation into a fourth representa-tion using a second encoder comprises: generating the fourth representation based on a second codebook associated with the second encoder, the second codebook comprising a set of seman-tic elements.

[0092] In some implementations, the coding result of the image is generated further based on the fourth representation.

[0093] In some implementations, converting the first representation to a second representa-tion using a first analysis transform unit comprises: obtaining a scale parameter, the scale pa-rameter indicating a compression level; and compressing the first representation to the second representation based on a scale parameter.

[0094] In some implementations, the process 600 further comprises performing a first train-ing process, the first training process comprising: obtaining a first training image; generating a first synthesis image corresponding to the first training image using a first encoder and a first decoder; determining a first loss based on a first difference between the first training image and the first synthesis image; and training the first encoder and the first decoder according to the first loss.

[0095] In some implementations, the process 600 further comprises performing a second training process after the first training process, the second training process comprising: obtain-ing a training latent representation generated by the trained first encoder; generating a synthesis latent representation corresponding to the training latent representation using a first analysis transform unit and a first synthesis transform unit; determining a second loss based on a second  difference between the training latent representation and the synthesis latent representation; and training the first analysis transform unit and the first synthesis transform unit according to the second loss.

[0096] In some implementations, determining a second loss comprises: converting the train-ing latent representation into a first set of indices based on a first codebook associated with the first encoder; generating a second set of indices based on the synthesis latent representation using a code predictor; and determining the second loss based on the second difference and a third difference between the first set of indices and the second set of indices.

[0097] In some implementations, the process 600 further comprises comprising performing a third training process after the second training process, the third training process comprises: obtaining a second training image; generating a second synthesis image corresponding to the second training image using the first encoder, the first decoder, the first analysis transform unit and the first synthesis transform unit; determining a third loss based on a fourth difference between the second training image and the second synthesis image; and training the first en-coder, the first decoder, the first analysis transform unit and the first synthesis transform unit according to the third loss.

[0098] In some implementations, determining a third loss comprises: encoding the second training image to a first training representation with the first encoder; encoding the second syn-thesis image to a second training representation with the first encoder; generating a third set of indices based on the first training representation using a first codebook associated with the first encoder; generating a fourth set of indices based on the second training representation using the code predictor; and determining the third loss based on the fourth difference and a fifth differ-ence between the third set of indices and the fourth set of indices.

[0099] FIG. 7 illustrates a flowchart of a process 700 for image reconstructing in accordance with some implementations of the subject matter described herein. The process 700 may be implemented at the image codec system 200 of FIG. 2.

[0100] At block 710, the image codec system 200 receives a coding result of an image, the coding result comprising a set of bits.

[0101] At block 720, the image codec system 200 decodes the set of bits to obtain a decoded representation.

[0102] At block 730, the image codec system 200 converts the decoded representation to a synthesis representation using a first synthesis transform unit.

[0103] At block 740, the image codec system 200 constructs a target image based on the synthesis representation using a first decoder.

[0104] In some implementations, converting the decoded representation to a synthesis rep-resentation using a first synthesis transform unit comprises: generating the synthesis represen-tation based on a first codebook associated with the first synthesis transform unit.

[0105] In some implementations, the coding result of the image further comprises a fourth representation, and decoding the set of bits to obtain a decoded representation comprises: con-verting the fourth representation to a fifth representation using a second decoder; determining probability information based on the fifth representation using a second synthesis transform unit; and decoding the set of bits to obtain the decoded representation according to the proba-bility information.

[0106] In some implementations, converting the fourth representation to a fifth representa-tion using a second decoder comprises: generating the fifth representation based on a second codebook associated with the second decoder, the second codebook comprising a set of seman-tic elements.

[0107] Example Device

[0108] FIG. 8 illustrates a schematic block diagram of an electronic device in which various implementations of the subject matter described herein can be implemented. It would be appreciated that the electronic device 800 as shown in FIG. 8 is merely provided as an example, without suggesting any limitation to the functionalities and scope of im-plementations of the subject matter described herein. One or more electronic devices 800 may, for example, be used to implement the image codec system 200 of FIG. 2.

[0109] As shown in FIG. 8, the electronic device 800 is in form of a general-purpose computing device. Components of the electronic device 800 may include, but are not limited to, one or more processors or processing devices 810, a memory 820, a storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860.

[0110] In some implementations, the electronic device 800 may be implemented as a device with computing capability, such as a computing device, a computing system, a server, a mainframe and the like.

[0111] The processing device 810 can be a physical or virtual processor and can execute various processing based on the programs stored in the memory 820. In a multi-processor system, a plurality of processing units execute computer-executable instructions in paral-lel so as to enhance parallel processing capability of the electronic device 800. The pro-cessing device 810 may include a central processing unit (CPU) , a graphics processing unit (GPU) , a microprocessor, a controller, and / or a microcontroller.

[0112] The electronic device 800 usually includes various computer storage medium. Such medium may be any available medium accessible by the electronic device 800, in-cluding but not limited to, volatile and non-volatile medium, or detachable and non-de-tachable medium. The memory 820 may be a volatile memory (for example, a register, cache, Random Access Memory (RAM) ) , non-volatile memory (for example, a Read-Only Memory (ROM) , Electrically Erasable Programmable Read-Only Memory (EEPROM) , a flash memory) , or any combination thereof. The storage device 830 may be any detacha-ble or non-detachable medium and may include computer-readable medium such as a memory, a flash memory drive, a magnetic disk or any other medium that can be used for storing information and / or data and are accessible by the electronic device 800.

[0113] The electronic device 800 may further include additional detachable / non-detach-able, volatile / non-volatile memory medium. Although not shown in FIG. 8, there may be provided a disk drive for reading from or writing into a detachable and non-volatile disk, and an optical disk drive for reading from and writing into a detachable non-volatile op-tical disc. In such cases, each drive may be connected to a bus (not shown) via one or more data medium interfaces.

[0114] The communication unit 840 implements communication with another compu-ting device via the communication medium. In addition, the functionalities of components in the electronic device 800 may be implemented by a single computing cluster or a plu-rality of computing machines that can communicate with each other via communication connections. Thus, the electronic device 800 may operate in a networked environment using a logic connection with one or more other servers, network personal computers (PCs) , or further general network nodes.

[0115] The input device 850 may include one or more of a variety of input devices, such as a mouse, keyboard, data import device and the like. The output device 860 may be one or more output devices, such as a display, data export device and the like. By means of  the communication unit 840, the electronic device 800 may further communicate with one or more external devices (not shown) such as storage devices and display devices, one or more devices that enable the user to interact with the electronic device 800, or any devices (such as a network card, a modem and the like) that enable the electronic device 800 to communicate with one or more other computing devices, if required. Such communica-tion may be performed via input / output (I / O) interfaces (not shown) .

[0116] In some implementations, as an alternative of being integrated on a single device, some or all components of the electronic device 800 may also be arranged in the form of cloud computing architecture. In the cloud computing architecture, the components may be provided remotely and work together to implement the functionalities described in the subject matter described herein. In some implementations, cloud computing provides computing, software, data access and storage service, which will not require end users to be aware of the physical locations or configurations of the systems or hardware provision-ing these services. In various implementations, the cloud computing provides the services via a wide area network (such as Internet) using proper protocols. For example, a cloud computing provider provides applications over the wide area network, which may be ac-cessed through a web browser or any other computing components. The software or com-ponents of the cloud computing architecture and corresponding data may be stored in a server at a remote position. The computing resources in the cloud computing environment may be aggregated or distributed at locations of remote data centers. Cloud computing infrastructure may provide the services through a shared data center, though they behave as a single access point for the users. Therefore, the cloud computing infrastructure may be utilized to provide the components and functionalities described herein from a service provider at remote locations. Alternatively, they may be provided from a conventional server or may be installed directly or otherwise on a client device.

[0117] The electronic device 800 may be used to implement resource management in accordance with various implementations of the subject matter described herein. The memory 820 may include one or more modules having one or more program instructions. These modules may be accessed and run by the processing unit 810 to perform functions of various implementations described herein. For example, the memory 820 may include an image coding module 822 for performing image coding using an image codec. As shown in FIG. 8, the electronic device 800 may obtain an image to be encoded or a bitstream to be decoded through the input device 850 and provide the encoded bitstream or the decoded  image through the output device 860. In some implementations, the electronic device 800 may further receive the input from other devices (not shown) via the communication unit 840.

[0118] Some example implementations of the subject matter described herein are listed below.

[0119] In an aspect, the subject matter described herein provides a computer-imple-mented method. The method comprises: encoding an image to a first representation in a latent space with a first encoder; converting the first representation to a second represen-tation using a first analysis transform unit; obtaining a quantized representation by quan-tizing the second representation; and encoding the quantized representation into a set of bits to obtain a coding result of the image.

[0120] In some implementations, encoding an image to a first representation in a latent space with a first encoder comprises: generating the first representation based on a first codebook associated with the first encoder.

[0121] In some implementations, generating a first coding result for the image by encoding the quantized representation into a set of bits comprises: converting the second representation into a third representation using a second analysis transform unit; encoding the third represen-tation into a fourth representation using a second encoder; generating probability information for the quantized representation based on the third representation; and encoding the quantized representation into a set of bits based on the probability information.

[0122] In some implementations, encoding the third representation into a fourth representa-tion using a second encoder comprises: generating the fourth representation based on a second codebook associated with the second encoder, the second codebook comprising a set of seman-tic elements.

[0123] In some implementations, the coding result of the image is generated further based on the fourth representation.

[0124] In some implementations, converting the first representation to a second representa-tion using a first analysis transform unit comprises: obtaining a scale parameter, the scale pa-rameter indicating a compression level; and compressing the first representation to the second representation based on a scale parameter.

[0125] In some implementations, the method further comprises performing a first training process, the first training process comprising: obtaining a first training image; generating a first  synthesis image corresponding to the first training image using a first encoder and a first de-coder; determining a first loss based on a first difference between the first training image and the first synthesis image; and training the first encoder and the first decoder according to the first loss.

[0126] In some implementations, the method further comprises performing a second training process after the first training process, the second training process comprising: obtaining a train-ing latent representation generated by the trained first encoder; generating a synthesis latent representation corresponding to the training latent representation using a first analysis transform unit and a first synthesis transform unit; determining a second loss based on a second difference between the training latent representation and the synthesis latent representation; and training the first analysis transform unit and the first synthesis transform unit according to the second loss.

[0127] In some implementations, determining a second loss comprises: converting the train-ing latent representation into a first set of indices based on a first codebook associated with the first encoder; generating a second set of indices based on the synthesis latent representation using a code predictor; and determining the second loss based on the second difference and a third difference between the first set of indices and the second set of indices.

[0128] In some implementations, the method further comprises comprising performing a third training process after the second training process, the third training process comprises: obtaining a second training image; generating a second synthesis image corresponding to the second training image using the first encoder, the first decoder, the first analysis transform unit and the first synthesis transform unit; determining a third loss based on a fourth difference between the second training image and the second synthesis image; and training the first en-coder, the first decoder, the first analysis transform unit and the first synthesis transform unit according to the third loss.

[0129] In some implementations, determining a third loss comprises: encoding the second training image to a first training representation with the first encoder; encoding the second syn-thesis image to a second training representation with the first encoder; generating a third set of indices based on the first training representation using a first codebook associated with the first encoder; generating a fourth set of indices based on the second training representation using the code predictor; and determining the third loss based on the fourth difference and a fifth differ-ence between the third set of indices and the fourth set of indices.

[0130] In another aspect, the subject matter described herein provides a computer-imple-mented method. The method comprises: receiving a coding result of an image, the coding result comprising a set of bits; decoding the set of bits to obtain a decoded representation; converting the decoded representation to a synthesis representation using a first synthesis transform unit; and constructing a target image based on the synthesis representation using a first decoder.

[0131] In some implementations, converting the decoded representation to a synthesis rep-resentation using a first synthesis transform unit comprises: generating the synthesis represen-tation based on a first codebook associated with the first synthesis transform unit.

[0132] In some implementations, the coding result of the image further comprises a fourth representation, and decoding the set of bits to obtain a decoded representation comprises: con-verting the fourth representation to a fifth representation using a second decoder; determining probability information based on the fifth representation using a second synthesis transform unit; and decoding the set of bits to obtain the decoded representation according to the proba-bility information.

[0133] In some implementations, converting the fourth representation to a fifth representa-tion using a second decoder comprises: generating the fifth representation based on a second codebook associated with the second decoder, the second codebook comprising a set of seman-tic elements.

[0134] In another aspect, the subject matter described herein provides an electronic de-vice. The electronic device comprises a processor; and a memory coupled to the processor and comprising instructions stored thereon which, when executed by the processor, cause the device to perform acts comprising: encoding an image to a first representation in a latent space with a first encoder; converting the first representation to a second represen-tation using a first analysis transform unit; obtaining a quantized representation by quan-tizing the second representation; and encoding the quantized representation into a set of bits to obtain a coding result of the image.

[0135] In some implementations, encoding an image to a first representation in a latent space with a first encoder comprises: generating the first representation based on a first codebook associated with the first encoder.

[0136] In some implementations, generating a first coding result for the image by encoding the quantized representation into a set of bits comprises: converting the second representation  into a third representation using a second analysis transform unit; encoding the third represen-tation into a fourth representation using a second encoder; generating probability information for the quantized representation based on the third representation; and encoding the quantized representation into a set of bits based on the probability information.

[0137] In some implementations, encoding the third representation into a fourth representa-tion using a second encoder comprises: generating the fourth representation based on a second codebook associated with the second encoder, the second codebook comprising a set of seman-tic elements.

[0138] In some implementations, the coding result of the image is generated further based on the fourth representation.

[0139] In some implementations, converting the first representation to a second representa-tion using a first analysis transform unit comprises: obtaining a scale parameter, the scale pa-rameter indicating a compression level; and compressing the first representation to the second representation based on a scale parameter.

[0140] In some implementations, the method further comprises performing a first training process, the first training process comprising: obtaining a first training image; generating a first synthesis image corresponding to the first training image using a first encoder and a first de-coder; determining a first loss based on a first difference between the first training image and the first synthesis image; and training the first encoder and the first decoder according to the first loss.

[0141] In some implementations, the method further comprises performing a second training process after the first training process, the second training process comprising: obtaining a train-ing latent representation generated by the trained first encoder; generating a synthesis latent representation corresponding to the training latent representation using a first analysis transform unit and a first synthesis transform unit; determining a second loss based on a second difference between the training latent representation and the synthesis latent representation; and

[0142] training the first analysis transform unit and the first synthesis transform unit accord-ing to the second loss.

[0143] In some implementations, determining a second loss comprises: converting the train-ing latent representation into a first set of indices based on a first codebook associated with the first encoder; generating a second set of indices based on the synthesis latent representation using a code predictor; and determining the second loss based on the second difference and a  third difference between the first set of indices and the second set of indices.

[0144] In some implementations, the method further comprises comprising performing a third training process after the second training process, the third training process comprises: obtaining a second training image; generating a second synthesis image corresponding to the second training image using the first encoder, the first decoder, the first analysis transform unit and the first synthesis transform unit; determining a third loss based on a fourth difference between the second training image and the second synthesis image; and training the first en-coder, the first decoder, the first analysis transform unit and the first synthesis transform unit according to the third loss.

[0145] In some implementations, determining a third loss comprises: encoding the second training image to a first training representation with the first encoder; encoding the second syn-thesis image to a second training representation with the first encoder; generating a third set of indices based on the first training representation using a first codebook associated with the first encoder; generating a fourth set of indices based on the second training representation using the code predictor; and determining the third loss based on the fourth difference and a fifth differ-ence between the third set of indices and the fourth set of indices.

[0146] In another aspect, the subject matter described herein provides an electronic device. The electronic device comprises a processor; and a memory coupled to the processor and com-prising instructions stored thereon which, when executed by the processor, cause the device to perform acts comprising: receiving a coding result of an image, the coding result comprising a set of bits; decoding the set of bits to obtain a decoded representation; converting the decoded representation to a synthesis representation using a first synthesis transform unit; and construct-ing a target image based on the synthesis representation using a first decoder.

[0147] In some implementations, converting the decoded representation to a synthesis rep-resentation using a first synthesis transform unit comprises: generating the synthesis represen-tation based on a first codebook associated with the first synthesis transform unit.

[0148] In some implementations, the coding result of the image further comprises a fourth representation, and decoding the set of bits to obtain a decoded representation comprises: con-verting the fourth representation to a fifth representation using a second decoder; determining probability information based on the fifth representation using a second synthesis transform unit; and decoding the set of bits to obtain the decoded representation according to the proba-bility information.

[0149] In some implementations, converting the fourth representation to a fifth representa-tion using a second decoder comprises: generating the fifth representation based on a second codebook associated with the second decoder, the second codebook comprising a set of seman-tic elements.

[0150] In yet another aspect, the subject matter described herein provides a computer-readable medium having computer executable instructions stored thereon that, when exe-cuted by a device, cause the device to perform one or more example implementations of the method in the above aspect.

[0151] In yet another aspect, the subject matter described herein provides one or more computer-readable media having stored thereon encoded data in a bitstream, the encoded data being organized to facilitate decoding, with a computing device that implements a video decoder, by operations comprising: receiving the encoded data comprising a set of bits; decoding the set of bits to obtain a decoded representation; converting the decoded representation to a synthesis representation using a first synthesis transform unit; and con-structing a target image based on the synthesis representation using a first decoder.

[0152] The functionalities described herein can be performed, at least in part, by one or more hardware logic components. As an example, and without limitation, illustrative types of hardware logic components that can be used include field-programmable gate arrays (FPGAs) , Application-specific Integrated Circuits (ASICs) , application-specific standard products (ASSPs) , system-on-a-chip systems (SOCs) , complex programmable logic devices (CPLDs) , and the like.

[0153] Program code for carrying out the methods of the subject matter described herein may be written in any combination of one or more programming languages. The program code may be provided to a processor or controller of a general-purpose computer, special purpose computer, or other programmable data processing flowchart such that the pro-gram code, when executed by the processor or controller, causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely or partly on a machine, executed as a stand-alone software pack-age partly on the machine, partly on a remote machine, or entirely on the remote machine or server.

[0154] In the context of the subject matter described herein, a machine-readable me-dium may be any tangible medium that may contain or store a program for use by or in  connection with an instruction execution system, flowchart, or device. The machine-read-able medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, flowchart, or de-vice, or any suitable combination of the foregoing. More specific examples of the ma-chine-readable storage medium would include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random-access memory (RAM) , a read-only memory (ROM) , an erasable programmable read-only memory (EPROM or Flash memory) , an optical fiber, a portable compact disc read-only memory (CD-ROM) , an op-tical storage device, a magnetic storage device, or any suitable combination of the fore-going.

[0155] Further, although the operations are depicted in a particular order, this should not be understood as requiring that such operations are performed in the particular order shown or in sequential order, or that all illustrated operations are performed to achieve the desired results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are contained in the above discussions, these should not be construed as limitations on the scope of the subject matter described herein, but rather as descriptions of features that may be specific to particular implementations. Certain features that are described in the context of sepa-rate implementations may also be implemented in combination in a single implementation. Rather, various features described in a single implementation may also be implemented in various implementations separately or in any suitable sub-combination.

[0156] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter specified in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of imple-menting the claims.

Claims

1.A computer-implemented method comprising:encoding an image to a first representation in a latent space with a first encoder;converting the first representation to a second representation using a first analysis transform unit;obtaining a quantized representation by quantizing the second representation; andencoding the quantized representation into a set of bits to obtain a coding result of the image.2.The method of claim 1, wherein encoding an image to a first representation in a latent space with a first encoder comprises:generating the first representation based on a first codebook associated with the first encoder.3.The method of claim 1, wherein obtaining a coding result of the image by encoding the quantized representation into a set of bits comprises:converting the second representation into a third representation using a second analysis transform unit;encoding the third representation into a fourth representation using a second encoder;generating probability information for the quantized representation based on the third representation; andencoding the quantized representation into a set of bits based on the probability information.4.The method of claim 3, wherein encoding the third representation into a fourth representation using a second encoder comprises:generating the fourth representation based on a second codebook associated with the second encoder, the second codebook comprising a set of semantic elements.5.The method of claim 3, wherein the coding result of the image is generated further based on the fourth representation.6.The method of claim 1, wherein converting the first representation to a second  representation using a first analysis transform unit comprises:obtaining a scale parameter, the scale parameter indicating a compression level; andcompressing the first representation to the second representation based on a scale parameter.7.The method of claim 1, further comprising performing a first training process, the first training process comprising:obtaining a first training image;generating a first synthesis image corresponding to the first training image using a first encoder and a first decoder;determining a first loss based on a first difference between the first training image and the first synthesis image; andtraining the first encoder and the first decoder according to the first loss.8.The method of claim 7, further comprising performing a second training process after the first training process, the second training process comprising:obtaining a training latent representation generated by the trained first encoder;generating a synthesis latent representation corresponding to the training latent representation using a first analysis transform unit and a first synthesis transform unit;determining a second loss based on a second difference between the training latent representation and the synthesis latent representation; andtraining the first analysis transform unit and the first synthesis transform unit according to the second loss.9.The method of claim 8, wherein determining a second loss comprises:converting the training latent representation into a first set of indices based on a first codebook associated with the first encoder;generating a second set of indices based on the synthesis latent representation using a code predictor; anddetermining the second loss based on the second difference and a third difference between the first set of indices and the second set of indices.10.The method of claim 7, further comprising performing a third training process after the second training process, the third training process comprising:obtaining a second training image;generating a second synthesis image corresponding to the second training image using the first encoder, the first decoder, the first analysis transform unit and the first synthesis transform unit;determining a third loss based on a fourth difference between the second training image and the second synthesis image; andtraining the first encoder, the first decoder, the first analysis transform unit and the first synthesis transform unit according to the third loss.11.A computer-implemented method comprising:receiving a coding result of an image, the coding result comprising a set of bits;decoding the set of bits to obtain a decoded representation;converting the decoded representation to a synthesis representation using a first synthesis transform unit; andconstructing a target image based on the synthesis representation using a first decoder.12.The method of claim 11, wherein converting the decoded representation to a synthesis representation using a first synthesis transform unit comprises:generating the synthesis representation based on a first codebook associated with the first synthesis transform unit.13.The method of claim 11, wherein the coding result of the image further comprises a fourth representation, and decoding the set of bits to obtain a decoded representation comprises:converting the fourth representation to a fifth representation using a second decoder;determining probability information based on the fifth representation using a second synthesis transform unit; anddecoding the set of bits to obtain the decoded representation according to the probability information.14.An electronic device comprising:a processor; anda memory coupled to the processor and comprising instructions stored thereon which, when executed by the processor, cause the device to perform acts comprising:receiving a coding result of an image, the coding result comprising a set of bits;decoding the set of bits to obtain a decoded representation;converting the decoded representation to a synthesis representation using a first synthesis transform unit; andconstructing a target image based on the synthesis representation using a first decoder.15.One or more computer-readable media having stored thereon encoded data in a bitstream, the encoded data being organized to facilitate decoding, with a computing device that implements a video decoder, by operations comprising:receiving the encoded data comprising a set of bits;decoding the set of bits to obtain a decoded representation;converting the decoded representation to a synthesis representation using a first synthesis transform unit; andconstructing a target image based on the synthesis representation using a first decoder.