Progressive image compression method and system

By employing a progressive compression method based on an autoregressive image generation model and adaptive transmission feature tokens, the problem of image decompression in environments with limited and unstable network bandwidth is solved, achieving efficient and high-quality image transmission.

CN121547598APending Publication Date: 2026-02-17TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511519245.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing technologies, high-resolution images cannot be properly decompressed in environments with limited and unstable network bandwidth, resulting in poor image quality.

Method used

An autoregressive image generation model is adopted, and progressive compression is achieved by adaptively transmitting feature tokens from coarse to fine granularity to ensure the quality of decompressed images.

Benefits of technology

In environments with limited and unstable network bandwidth, it can effectively reduce data transmission volume while ensuring the quality of decompressed images and improving transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547598A_ABST
    Figure CN121547598A_ABST
Patent Text Reader

Abstract

The invention provides a progressive image compression method and system, and the method comprises the steps: obtaining a to-be-compressed image, inputting the to-be-compressed image into an image encoder, obtaining all the number of feature tokens with different scales output by the image encoder, and adaptively determining the transmission number of feature tokens in all the number of feature tokens according to a network environment; the feature tokens of different scales are gradually arranged from coarse granularity to fine granularity; based on the feature tokens of the transmission number, predicting and generating the feature tokens by adopting an autoregressive image generation model, and determining the feature tokens to be decoded; and inputting the to-be-decoded feature token into an image encoder to obtain a decompressed image output by an image decoder. Based on the autoregression image generation model, the compression rate is controlled by adaptively transmitting the feature tokens from coarse granularity to fine granularity, so that progressive compression is realized, the quality of the decompressed image can be ensured, and the method is suitable for the environment with limited and unstable network bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a progressive image compression method and system. Background Technology

[0002] With the rapid development of multimedia, the transmission of high-resolution images currently faces two major challenges. On the one hand, network transmission bandwidth is limited, making it difficult to meet the needs of transmitting large amounts of data; on the other hand, insufficient network stability easily leads to data packet loss. Under these circumstances, the image data received by the receiving end is often incomplete, which may result in the image not being able to be decompressed correctly. Summary of the Invention

[0003] This invention provides a progressive image compression method and system to address the shortcomings of existing technologies that fail to properly decompress images. Based on an autoregressive image generation model, this invention controls the compression rate by adaptively transmitting feature tokens from coarse to fine granularity, thereby achieving progressive compression. This ensures the quality of the decompressed image and is suitable for environments with limited and unstable network bandwidth.

[0004] This invention provides an image compression method, comprising: acquiring an image to be compressed; inputting the image to be compressed into an image encoder to obtain all number of feature tokens of different scales output by the image encoder, and adaptively determining the number of feature tokens to be transmitted from all number of feature tokens according to the network environment; the feature tokens of different scales are arranged in a progressive manner from coarse-grained to fine-grained; based on the number of feature tokens to be transmitted, using an autoregressive image generation model to predict and generate feature tokens, and determining the feature tokens to be decoded; inputting the feature tokens to be decoded into the image encoder to obtain the decompressed image output by the image decoder.

[0005] According to an image compression method provided by the present invention, the step of predicting and generating feature tokens based on the feature tokens of the transmission quantity using an autoregressive image generation model to determine the feature tokens to be decoded includes: inputting the feature tokens of the transmission quantity into the autoregressive image generation model to obtain the prediction probability output by the autoregressive image generation model; the prediction probability is the probability of predicting the feature tokens of the current scale based on the feature tokens of the previous scale; performing arithmetic encoding on the feature tokens of the transmission quantity according to the prediction probability to obtain an arithmetically encoded bitstream; performing arithmetic decoding on the arithmetically encoded bitstream according to the prediction probability to obtain an arithmetically decoded feature token; and determining the feature tokens to be decoded based on the arithmetically decoded feature tokens.

[0006] According to an image compression method provided by the present invention, determining the feature token to be decoded based on the arithmetically decoded feature token includes: when the number of transmitted features is less than the total number of features, inputting the arithmetically decoded feature token into the autoregressive image generation model to obtain the feature tokens of the untransmitted number output by the autoregressive image generation model; wherein, the total number of features is equal to the number of transmitted features plus the number of untransmitted features; the granularity of the feature tokens of the untransmitted number of features is finer than the granularity of the feature tokens of the arithmetically decoded feature token; and obtaining the feature token to be decoded based on the arithmetically decoded feature token and the feature tokens of the untransmitted number of features.

[0007] According to an image compression method provided by the present invention, the method further includes: inputting the image to be compressed into an image annotation model to obtain content description information of the image to be compressed output by the image annotation model; and inputting the content description information of the image to be compressed into an autoregressive image generation model to guide the autoregressive image generation model to output a number of feature tokens that have not been transmitted based on the content description information of the image to be compressed.

[0008] According to an image compression method provided by the present invention, determining the feature token to be decoded based on the arithmetically decoded feature token includes: when the number of transmissions is equal to the total number, using the arithmetically decoded feature token as the feature token to be decoded.

[0009] According to an image compression method provided by the present invention, before predicting and generating feature tokens based on the feature tokens of the transmission quantity using an autoregressive image generation model and determining the feature tokens to be decoded, the method further includes: a mask-based binary multi-scale residual quantization method to group the feature tokens of the transmission quantity by scale, wherein the element changes in the feature tokens of different groups are represented in ascending order of bits.

[0010] The present invention also provides an image compression system, comprising: a first determining module, configured to acquire an image to be compressed, input the image to be compressed into an image encoder, obtain all number of feature tokens of different scales output by the image encoder, and adaptively determine the number of feature tokens transmitted among all number of feature tokens according to the network environment; the feature tokens of different scales are arranged in a progressive manner from coarse-grained to fine-grained; a second determining module, configured to predict and generate feature tokens using an autoregressive image generation model based on the number of transmitted feature tokens, and determine the feature tokens to be decoded; and a decompression module, configured to input the feature tokens to be decoded into the image encoder to obtain the decompressed image output by the image decoder.

[0011] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the image compression method as described above.

[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image compression method as described above.

[0013] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the image compression method as described above.

[0014] The present invention provides a progressive image compression method and system, which is based on an autoregressive image generation model and controls the compression rate by adaptively transmitting feature tokens from coarse to fine granularity, thereby achieving progressive compression. This method can guarantee the quality of decompressed images and is suitable for environments with limited and unstable network bandwidth. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating an image compression method provided by the present invention.

[0017] Figure 2 This is a schematic diagram of the structure of an image compression system provided by the present invention.

[0018] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0020] Progressive image compression technology transmits image content sequentially based on its importance. It first transmits essential information such as image structure and contours, then gradually transmits more detailed information. This allows the receiving end to correctly decompress the image even before receiving all the encoded data. Progressive image compression is suitable for unstable network conditions, ensuring correct decompression regardless of whether the receiving end has received all the image encoding.

[0021] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an image compression method provided by the present invention.

[0022] This invention provides an image compression method, comprising: 101: Obtain the image to be compressed, input the image to be compressed into the image encoder, obtain all the feature tokens of different scales output by the image encoder, and adaptively determine the number of feature tokens to be transmitted from all the feature tokens according to the network environment; the feature tokens of different scales are arranged in a progressive manner from coarse-grained to fine-grained. 102: Based on the number of transmissions, an autoregressive image generation model is used to predict and generate feature tokens to determine the feature tokens to be decoded; 103: Input the feature token to be decoded into the image encoder to obtain the decompressed image output by the image decoder.

[0023] To address the technical problems existing in the prior art, this invention provides a progressive image compression method. The sending end inputs the image to be compressed into an image encoder, which maps an image to... K (Total) different scales, each with a resolution of ,in, Each scale contains Each feature token is a unique token. A vector, where each element is +1 or -1, is used to represent image features.

[0024] Therefore, during transmission, if an element in the vector is +1, then 1 is transmitted; if it is -1, then 0 is transmitted. This transmission method naturally satisfies the requirements for bitstream transmission. The number of feature tokens to be transmitted is adaptively determined based on the bandwidth and stability of the current network environment. For example, when bandwidth is sufficient and the network is stable, all tokens can be transmitted. K Each scale of feature tokens; however, in situations with limited bandwidth or unstable network, only the first few may be selected. k (Number of transmissions) Scale-based feature tokens are transmitted to reduce the amount of data transmitted and adapt to network conditions. If the network bandwidth is large, then... kA larger value indicates a smaller network bandwidth. k The value of is relatively small. The image encoder ensures that earlier scales represent coarse-grained features of the image, such as image contours, while later scales contain more fine-grained features, such as image texture details. The autoregressive image generation model based on next-scale prediction controls the compression ratio by transmitting information at different scales, thus achieving progressive compression. Since the autoregressive image generation model predicts based on discrete features, the encoding process is deterministic and does not require randomness to be shared between the sending and receiving ends.

[0025] This method utilizes an autoregressive image generation model with a "coarse-grained to fine-grained" generation approach. First, coarse-grained information from the first few scales is transmitted, then detailed information is gradually added. For any missing detailed information, it is generated and supplemented at the receiving end using an autoregressive model. Compression at different rates can be achieved using only a single model. Image features (feature tokens to be decoded) at all scales are upsampled. The images are then added together and input into the image decoder to obtain the reconstructed image (decompressed image).

[0026] The method of this invention can adapt to environments with limited and unstable network bandwidth. Furthermore, due to the low computational complexity of the autoregressive generative model generation process, the image encoding and decoding time is reduced. The powerful generation capability of the autoregressive image generation model can also ensure the quality of the decompressed image, achieving a human-perceptually friendly compression scheme. It achieves state-of-the-art perceptual fidelity at extremely low bit rates and has higher decompression efficiency.

[0027] It should be noted that the image encoder, image decoder, and autoregressive image generation model of this invention are all pre-trained.

[0028] This invention is applicable to all image transmission and reception scenarios that allow lossy image compression, including situations with limited network bandwidth, unstable network environment, and real-time changes in network bandwidth.

[0029] This invention requires adding stored information, including model parameters, to both the transmitting and receiving devices.

[0030] In a preferred embodiment, based on the feature token of the transmission quantity, an autoregressive image generation model is used to predict and generate the feature token to be decoded, including: inputting the feature token of the transmission quantity into the autoregressive image generation model to obtain the prediction probability output by the autoregressive image generation model; the prediction probability is the probability of predicting the feature token of the current scale based on the feature token of the previous scale; performing arithmetic encoding on the feature token of the transmission quantity according to the prediction probability to obtain an arithmetic-encoded bitstream; performing arithmetic decoding on the arithmetic-encoded bitstream according to the prediction probability to obtain an arithmetic-decoded feature token; and determining the feature token to be decoded based on the arithmetic-decoded feature token.

[0031] In this embodiment, at the sending end, feature tokens based on the number of transmissions (starting from the first scale feature token and ending when all tokens are transmitted) are sent. k (feature tokens at each scale are stopped), using an autoregressive image generation model based on the previous... n -1 scale feature tokens for the first n Prediction using scale feature tokens The predicted probabilities are obtained, which are the probabilities that each element of the feature token is +1 or -1. Each feature token can be naturally represented as a 0-1 bitstream. To further improve the compression ratio, this invention uses lossless entropy coding—arithmetic coding. Based on the predicted probabilities, the CDF (Cumulative Distribution Function) table required for arithmetic coding can be calculated, thereby performing lossless compression on the bitstream corresponding to the feature token, thus further improving the compression ratio. The receiving end performs lossless decompression after receiving the arithmetic-coded bitstream.

[0032] The process begins with the first scale. Arithmetic decoding is performed based on the predicted probabilities output by the autoregressive image generation model to obtain the feature token for the first scale. Then, the probability of the feature token for the second scale is predicted based on the first scale's feature token. This probability is then used to decompress the arithmetic code, yielding the feature token for the second scale, and so on. Since arithmetic coding is lossless compression coding, this process is lossless, and the feature token obtained by the receiver after decompression is identical to the feature token sent by the sender. Based on the arithmetically decoded feature token, the feature token to be decoded can be determined.

[0033] The autoregressive image generation model of this invention minimizes the KL divergence between the true and predicted distributions, following the following: , in, K This represents the total number of scales. i For the i-th scale, To provide a given model parameter Under the conditions, the firsti Feature tokens at each scale All previous scale feature tokens The probability of occurrence under certain conditions.

[0034] This embodiment effectively utilizes an autoregressive image generation model to predict and generate missing feature tokens, thereby achieving high-quality image decompression. This method is particularly suitable for unstable network environments or situations with limited bandwidth, reducing data transmission volume and improving transmission efficiency while maintaining image quality.

[0035] As a preferred embodiment, determining the feature token to be decoded based on the arithmetically decoded feature token includes: when the number of transmitted tokens is less than the total number, inputting the arithmetically decoded feature tokens into an autoregressive image generation model to obtain the feature tokens of the untransmitted number output by the autoregressive image generation model; wherein, the total number is equal to the number of transmitted tokens plus the number of untransmitted tokens; the granularity of the feature tokens of the untransmitted number is finer than the granularity of the feature tokens of the arithmetically decoded number; and obtaining the feature token to be decoded based on the arithmetically decoded feature tokens and the feature tokens of the untransmitted number.

[0036] In this embodiment, in terms of the number of transmissions k Less than the total number K In this case, it means that only a portion of the feature tokens are transmitted, while the remaining feature tokens need to be predicted and generated at the receiving end using an autoregressive image generation model. These untransmitted feature tokens typically contain finer-grained image information, such as more detailed texture and color variations, which are crucial to the visual quality of the image. (After decompression...) k After the feature tokens at each scale, based on the previous k Each scale of feature tokens, the receiver uses an autoregressive image generation model to process the subsequent... K - k (Number of untransmitted) feature tokens are generated. This process is based on the generative capability of an autoregressive model, which can infer missing information from existing information.

[0037] Because autoregressive models learn the statistical properties of a large amount of image data during training, they can generate feature tokens that are highly similar to the features of the original image. However, the generated content is not identical to that of the sending end. K - k The feature tokens at each scale are identical, therefore this process is a lossy decompression process. Based on the feature tokens after arithmetic decoding and the number of feature tokens not transmitted, we obtain... K After the feature tokens of each scale, all K Each scale of feature token (the feature token to be decoded) is input into the image decoder to obtain the decompressed image.

[0038] As a preferred embodiment, the method further includes: inputting the image to be compressed into an image annotation model to obtain content description information of the image to be compressed output by the image annotation model; inputting the content description information of the image to be compressed into an autoregressive image generation model to guide the autoregressive image generation model to output the number of feature tokens that have not been transmitted based on the content description information of the image to be compressed.

[0039] In this embodiment, to further enhance the quality of generated feature tokens, the sending end also employs an image annotation model to provide a brief overview of the content of the image to be compressed, and transmits the content description information of the image to be compressed to the receiving end. Both the content description information of the image to be compressed and the number of transmitted feature tokens are input into the autoregressive image generation model. During the prediction process of the autoregressive model, the content description information of the image to be compressed helps the model better understand the overall structure and details of the image, thus enabling it to more accurately reflect the true content of the image when generating untransmitted feature tokens. This not only improves the image compression efficiency but also ensures that the decompressed image retains as much of the visual quality and detail as possible from the original image.

[0040] It should be noted that the image annotation model of this invention was pre-trained.

[0041] This embodiment demonstrates a progressive image compression method that combines image annotation and an autoregressive image generation model. This method improves the efficiency and quality of image compression and is suitable for various application scenarios that require efficient image processing and transmission.

[0042] As a preferred embodiment, determining the feature token to be decoded based on the arithmetically decoded feature token includes: when the number of transmissions is equal to the total number, using the arithmetically decoded feature token as the feature token to be decoded.

[0043] In this embodiment, when the number of transmissions equals the total number, meaning all feature tokens have been transmitted, no additional feature token prediction or generation is required. This means the receiving end has obtained complete image feature information and can directly use this information for image decompression.

[0044] Specifically, the receiving end first performs arithmetic decoding on the received arithmetic-encoded bitstream. Arithmetic decoding is a lossless decoding process that accurately recovers the original feature token, ensuring that the decoded feature token is completely identical to the feature token encoded by the sending end. This step is crucial in the image decompression process because it directly affects the quality of the final decompressed image.

[0045] After decoding, the receiving end uses the arithmetically decoded feature tokens as the feature tokens to be decoded. These feature tokens contain complete image information from coarse to fine granular, and can comprehensively represent all the details of the original image.

[0046] Next, the receiving end inputs these feature tokens to be decoded into the image decoder. The image decoder reconstructs the decompressed image based on these feature tokens. Because the feature tokens contain complete image information, the decoder can accurately reconstruct a decompressed image that is highly similar to the original image, thus ensuring the visual quality and detail of the image.

[0047] Furthermore, since all signature tokens have been transmitted and decoded, this method achieves optimal image decompression results, especially under stable network conditions and sufficient bandwidth. This method not only makes full use of network resources but also ensures high-quality image transmission and decompression.

[0048] As a preferred embodiment, based on the feature tokens of the transmission quantity, an autoregressive image generation model is used to predict and generate feature tokens. Before determining the feature tokens to be decoded, the method further includes: a mask-based binary multi-scale residual quantization method to group the feature tokens of the transmission quantity by scale, wherein the element changes in the feature tokens of different groups are represented in ascending order of bits.

[0049] In this embodiment, in order to further improve the image compression rate, the mask-based binary multi-scale residual quantization method uses fewer bits to represent the coarse-grained information of the first few scales, while the remaining channels are always set to the same elements.

[0050] Specifically, the image encoder scales can be grouped into roughly three groups. The first four scales present large color blocks, establishing the macroscopic color layout of the image, and the subsequent scales... All elements are set to -1, only the first element is set to -1. The elements will change according to the input. The next five scales begin to show the basic outline and structure of the object, but still lack detail, resulting in blurred edges. The elements are set to -1. The last four scales significantly improve the fine texture of the image, with all elements varying with the input. This ensures that fewer bits can be used when transmitting the first few scales, thereby further improving the image compression ratio.

[0051] The image compression system provided by the present invention is described below. The image compression system described below can be referred to in correspondence with the image compression method described above.

[0052] Please refer to Figure 2 , Figure 2This is a schematic diagram of the structure of an image compression system provided by the present invention.

[0053] The present invention also provides an image compression system, comprising: a first determining module 201, configured to acquire an image to be compressed, input the image to be compressed into an image encoder, obtain all number of feature tokens of different scales output by the image encoder, and adaptively determine the number of feature tokens transmitted among all number of feature tokens according to the network environment; the feature tokens of different scales are arranged progressively from coarse-grained to fine-grained; a second determining module 202, configured to predict and generate feature tokens based on the number of transmitted feature tokens using an autoregressive image generation model, and determine the feature tokens to be decoded; and a decompression module 203, configured to input the feature tokens to be decoded into the image encoder to obtain the decompressed image output by the image decoder.

[0054] In a preferred embodiment, based on the feature token of the transmission quantity, an autoregressive image generation model is used to predict and generate the feature token to be decoded, including: inputting the feature token of the transmission quantity into the autoregressive image generation model to obtain the prediction probability output by the autoregressive image generation model; the prediction probability is the probability of predicting the feature token of the current scale based on the feature token of the previous scale; performing arithmetic encoding on the feature token of the transmission quantity according to the prediction probability to obtain an arithmetic-encoded bitstream; performing arithmetic decoding on the arithmetic-encoded bitstream according to the prediction probability to obtain an arithmetic-decoded feature token; and determining the feature token to be decoded based on the arithmetic-decoded feature token.

[0055] As a preferred embodiment, determining the feature token to be decoded based on the arithmetically decoded feature token includes: when the number of transmitted tokens is less than the total number, inputting the arithmetically decoded feature tokens into an autoregressive image generation model to obtain the feature tokens of the untransmitted number output by the autoregressive image generation model; wherein, the total number is equal to the number of transmitted tokens plus the number of untransmitted tokens; the granularity of the feature tokens of the untransmitted number is finer than the granularity of the feature tokens of the arithmetically decoded number; and obtaining the feature token to be decoded based on the arithmetically decoded feature tokens and the feature tokens of the untransmitted number.

[0056] As a preferred embodiment, the method further includes: inputting the image to be compressed into an image annotation model to obtain content description information of the image to be compressed output by the image annotation model; inputting the content description information of the image to be compressed into an autoregressive image generation model to guide the autoregressive image generation model to output the number of feature tokens that have not been transmitted based on the content description information of the image to be compressed.

[0057] As a preferred embodiment, determining the feature token to be decoded based on the arithmetically decoded feature token includes: when the number of transmissions is equal to the total number, using the arithmetically decoded feature token as the feature token to be decoded.

[0058] As a preferred embodiment, based on the feature tokens of the transmission quantity, an autoregressive image generation model is used to predict and generate feature tokens. Before determining the feature tokens to be decoded, the method further includes: a mask-based binary multi-scale residual quantization method to group the feature tokens of the transmission quantity by scale, wherein the element changes in the feature tokens of different groups are represented in ascending order of bits.

[0059] Figure 3 An example is a schematic diagram of the structure of an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 301, a communications interface 302, a memory 303, and a communication bus 304. The processor 301, communications interface 302, and memory 303 communicate with each other via the communication bus 304. The processor 301 can call logical instructions in the memory 303 to execute an image compression method. This method includes: acquiring an image to be compressed; inputting the image to be compressed into an image encoder; obtaining all the feature tokens of different scales output by the image encoder; adaptively determining the number of feature tokens to be transmitted from all the feature tokens based on the network environment; the feature tokens of different scales are progressively arranged from coarse-grained to fine-grained; based on the number of transmitted feature tokens, using an autoregressive image generation model to predict and generate feature tokens to determine the feature tokens to be decoded; and inputting the feature tokens to be decoded into the image encoder to obtain the decompressed image output by the image decoder.

[0060] Furthermore, the logical instructions in the aforementioned memory 303 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0061] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image compression method provided by the above methods. The method includes: acquiring an image to be compressed; inputting the image to be compressed into an image encoder; obtaining all the feature tokens of different scales output by the image encoder; and adaptively determining the number of feature tokens to be transmitted from all the feature tokens according to the network environment; the feature tokens of different scales are arranged progressively from coarse-grained to fine-grained; based on the number of feature tokens to be transmitted, using an autoregressive image generation model to predict and generate feature tokens to determine the feature tokens to be decoded; and inputting the feature tokens to be decoded into the image encoder to obtain the decompressed image output by the image decoder.

[0062] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the image compression method provided by the above methods. The method includes: acquiring an image to be compressed; inputting the image to be compressed into an image encoder; obtaining all number of feature tokens of different scales output by the image encoder; and adaptively determining the number of feature tokens to be transmitted among all the feature tokens according to the network environment; the feature tokens of different scales are arranged progressively from coarse-grained to fine-grained; based on the number of feature tokens to be transmitted, using an autoregressive image generation model to predict and generate feature tokens, and determining the feature tokens to be decoded; and inputting the feature tokens to be decoded into the image encoder to obtain the decompressed image output by the image decoder.

[0063] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0064] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image compression method characterized by, The method comprises the following steps: acquiring a to-be-compressed image, inputting the to-be-compressed image into an image encoder, obtaining a plurality of feature tokens of different scales output by the image encoder, and adaptively determining a quantity of feature tokens to be transmitted from the plurality of feature tokens according to a network environment; the feature tokens of different scales are arranged in a progressive manner from coarse granularity to fine granularity; based on the quantity of feature tokens to be transmitted, performing feature token prediction and generation by using an autoregressive image generation model to determine to-be-decoded feature tokens; inputting the to-be-decoded feature tokens into the image encoder to obtain a decompressed image output by the image decoder.

2. The image compression method of claim 1, wherein, The method comprises the following steps: inputting the quantity of feature tokens to be transmitted into the autoregressive image generation model to obtain a prediction probability output by the autoregressive image generation model; the prediction probability is a probability of predicting a feature token of a current scale according to a feature token of a previous scale; performing arithmetic encoding on the quantity of feature tokens to be transmitted according to the prediction probability to obtain an arithmetic-encoded bit stream; performing arithmetic decoding on the arithmetic-encoded bit stream according to the prediction probability to obtain an arithmetic-decoded feature token; determining the to-be-decoded feature tokens according to the arithmetic-decoded feature token.

3. The image compression method of claim 2, wherein, The method comprises the following steps: in a case where the quantity of feature tokens to be transmitted is less than the total quantity, inputting the arithmetic-decoded feature token into the autoregressive image generation model to obtain a quantity of feature tokens not to be transmitted output by the autoregressive image generation model; wherein the total quantity is equal to the quantity of feature tokens to be transmitted plus the quantity of feature tokens not to be transmitted; the granularity of the quantity of feature tokens not to be transmitted is finer than that of the arithmetic-decoded feature token; obtaining the to-be-decoded feature tokens according to the arithmetic-decoded feature token and the quantity of feature tokens not to be transmitted.

4. The image compression method of claim 3, wherein, The method further comprises the following steps: inputting the to-be-compressed image into an image annotation model to obtain content description information of the to-be-compressed image output by the image annotation model; inputting the content description information of the to-be-compressed image into the autoregressive image generation model to guide the autoregressive image generation model to output the quantity of feature tokens not to be transmitted according to the content description information of the to-be-compressed image.

5. The image compression method of claim 2, wherein, The method comprises the following steps: in a case where the quantity of feature tokens to be transmitted is equal to the total quantity, taking the arithmetic-decoded feature token as the to-be-decoded feature token.

6. The image compression method according to any one of claims 1 to 5, characterized in that, Before the step of determining the to-be-decoded feature tokens based on the quantity of feature tokens to be transmitted by using the autoregressive image generation model to perform feature token prediction and generation, the method further comprises the following steps: based on a mask-based binary multi-scale residual quantization method, grouping the quantity of feature tokens to be transmitted by scale, and the elements in feature tokens of different groups change in a bit-increasing order.

7. An image compression system characterized by, The method comprises the following steps: The first determining module is configured to acquire a to-be-compressed image, input the to-be-compressed image into an image encoder, obtain a plurality of feature tokens of different scales output by the image encoder, and determine a quantity of feature tokens to be transmitted from the plurality of feature tokens according to a network environment. The feature tokens of different scales are arranged in a progressive manner from coarse granularity to fine granularity. The second determining module is configured to perform feature token prediction and generation by using an autoregressive image generation model based on the quantity of feature tokens to be transmitted, and determine to-be-decoded feature tokens. The decompression module is configured to input the to-be-decoded feature tokens into the image encoder, and obtain a decompressed image output by the image decoder.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the image compression method according to any one of claims 1 to 6. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the image compression method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the image compression method according to any one of claims 1 to 6.