End-to-end image compression method and system based on window local attention and generalized checkerboard space channel context
By constructing an end-to-end image compression method based on window local attention and generalized chessboard space channel context, the problems of insufficient utilization of global semantic information and low efficiency of entropy model in the existing technology are solved, and high-efficiency image compression and rate-distortion performance are achieved.
Patent Information
- Application Number
- CN202510909071.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-11-18
AI Technical Summary
Existing image compression methods do not make sufficient use of global semantic information and have low entropy model efficiency, which limits the improvement of rate-distortion performance. Furthermore, autoregressive components increase encoding and decoding latency, making it difficult to meet real-time requirements.
An end-to-end image compression method based on window local attention and generalized chessboard spatial channel context is adopted. By constructing a transformation network based on attention modules and stacked residual blocks, combined with the generalized chessboard spatial channel context model, entropy coding is performed to achieve adaptive transformation and efficient feature extraction.
Redundancy is eliminated to the greatest extent possible, achieving superior rate-distortion performance and high-throughput parallel computing efficiency, thereby improving image compression quality and transmission efficiency.
Smart Images

Figure CN120976326A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an end-to-end image compression method and system based on window local attention and generalized chessboard spatial channel context. Background Technology
[0002] In related technologies, analytical synthesis transform networks are not powerful enough, and the effectiveness of global semantic information in image compression is not significant. Mainstream GDN layers are more like non-linear activation functions than normalization layers, and their stacking often leads to difficulties in training convergence. Entropy models in related technologies are inefficient. The PixelCNN-based implementation introduced autoregressive components into an end-to-end image compression model for the first time, but it significantly increased encoding and decoding latency, which is unacceptable for applications with high real-time requirements. Two-step chessboard context models have insufficient utilization of spatial information, a deficiency that is particularly pronounced when enhancing transform networks, severely impacting rate-distortion performance improvements. Summary of the Invention
[0003] The main objective of this application is to provide an end-to-end image compression method and system based on window local attention and generalized chessboard space channel context.
[0004] The technical solution adopted in this invention is:
[0005] On one hand, embodiments of the present invention provide an end-to-end image compression method based on window local attention and generalized chessboard spatial channel context. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context includes the following steps:
[0006] A transformation network based on attention modules and stacked residual blocks is constructed; the transformation network based on attention modules and stacked residual blocks is used to perform adaptive transformation of content through dynamic representation and neighborhood information embedding to obtain latent features;
[0007] A generalized chessboard space channel context model is established; the generalized chessboard space channel context model is used for entropy encoding of the latent features;
[0008] Image compressed data is obtained based on the transformation network based on the attention module and stacked residual blocks and the generalized chessboard space channel context model.
[0009] Furthermore, the construction of the transformation network based on attention modules and stacked residual blocks includes the following steps:
[0010] A window module is constructed; the window module is used to divide the feature map into several local windows, perform nonlocal network operations on each local window, and stitch the local windows after nonlocal network operations back into the feature map;
[0011] Based on the window module, a window local attention module is constructed; the window local attention module includes a main branch, a residual branch, and a mask branch; the main branch is used to generate basic features; the residual branch is used to accelerate convergence; and the mask branch is used to generate an attention mask.
[0012] Construct a bottleneck residual block; the bottleneck residual block includes a dimension reduction convolutional layer, a feature extraction convolutional layer, a dimension increase convolutional layer, and residual connections;
[0013] An encoder and a decoder are established based on the window local attention module and the bottleneck residual block; the encoder includes several downsampling modules, several window local attention modules, and several bottleneck residual blocks; the decoder includes several upsampling modules, several window local attention modules, and several bottleneck residual blocks.
[0014] Based on the encoder and the decoder, the overall architecture of the transform network based on the attention module and the stacked residual block is completed, and the transform network based on the attention module and the stacked residual block is obtained.
[0015] Furthermore, the formulas used in the nonlocal network operation include:
[0016]
[0017] Among them, V i C(U) represents the feature output after nonlocal network operations; C(U) represents the normalization factor; U represents the feature input from the local window; f(U) i U j ) represents the feature U at position i i Features of position j j Similarity between them; θ(U i ) = W θ U i ; g(U j ) = W g U j W θ This is the first weight matrix; W is the second weight matrix; g This is the third weight matrix.
[0018] Furthermore, the establishment of the generalized chessboard space channel context model includes the following steps:
[0019] A four-step generalized chessboard context model is constructed; the four-step generalized chessboard context model is used to perform one-step parallel encoding to obtain prediction entropy parameters or to perform multi-step parallel decoding to obtain reconstructed features;
[0020] A non-uniform channel grouping condition model is constructed; the non-uniform channel grouping condition model is used to accelerate the encoding and decoding process and balance compression performance and running speed.
[0021] Based on the four-step generalized chessboard context model and the non-uniform channel grouping condition model, the generalized chessboard space channel context model is obtained.
[0022] Furthermore, the step of performing one-step parallel encoding to obtain the prediction entropy parameter includes the following steps:
[0023] The latent features are divided into several 2×2 feature blocks according to spatial dimensions; each feature block includes a first latent feature block, a second latent feature block, a third latent feature block, and a fourth latent feature block; in the feature blocks, the positions of the first latent feature block and the second latent feature block are centrally symmetrical, and the positions of the third latent feature block and the fourth latent feature block are centrally symmetrical.
[0024] The entropy parameter of the first latent feature block is obtained by predicting the entropy parameter of the first latent feature block using the super-prior parameter and the channel context parameter.
[0025] The entropy parameter of the second potential feature block is obtained by using 3×3 mask convolution to process the spatial context parameters, prior parameters, and channel context parameters of the four first potential feature blocks adjacent to the second potential feature block.
[0026] The entropy parameter of the third potential feature block is obtained by using mask convolution to process the spatial context parameters, prior parameters, and channel context parameters obtained from the spatial potential features adjacent to the third potential feature block.
[0027] The entropy parameter of the fourth potential feature block is obtained by using mask convolution to process the spatial context parameters, prior parameters, and channel context parameters obtained from the spatial potential features adjacent to the fourth potential feature block.
[0028] The predicted entropy parameter is obtained based on the entropy parameter of the first potential feature block, the entropy parameter of the second potential feature block, the entropy parameter of the third potential feature block, and the entropy parameter of the fourth potential feature block.
[0029] Furthermore, the process of performing multi-step parallel decoding to obtain reconstructed features includes the following steps:
[0030] The entropy parameter of the first latent feature block is predicted using the super-prior parameter and the channel context parameter. It is then applied to arithmetic decoding to obtain the reconstructed first latent feature block. The four reconstructed first latent feature blocks adjacent to the second latent feature block are processed using 3×3 mask convolution to generate the spatial context parameter required for the second latent feature block.
[0031] Based on the spatial context parameters, prior parameters, and channel context parameters required for the second potential feature block, the entropy parameter of the second potential feature block is calculated and the second potential feature block is reconstructed to obtain the reconstructed second potential feature block. The spatial context parameters required for the third potential feature block are generated through mask convolution.
[0032] By combining the spatial context parameters, prior parameters, and channel context parameters required for the third potential feature block, the third potential feature block is decoded to obtain the reconstructed third potential feature block, and the spatial context parameters required for the fourth potential feature block are generated through mask convolution.
[0033] By combining the spatial context parameters, prior parameters, and channel context parameters required for the fourth latent feature block, the fourth latent feature block is decoded to obtain the reconstructed fourth latent feature block;
[0034] The reconstructed features are obtained based on the reconstructed first potential feature block, the reconstructed second potential feature block, the reconstructed third potential feature block, and the reconstructed fourth potential feature block.
[0035] Furthermore, the formulas used to construct the non-uniform channel grouping condition model include:
[0036]
[0037] in, This represents the channel context parameters of the k-th slice; the slice is obtained by using latent features with M channels. The slices are obtained by splitting along the channel dimension according to the number of channels {16, 16, 32, 64, M-128}; the slices include This represents the CNN model that processes the k-th slice; Concatenate() represents the concatenation operation.
[0038] Further, obtaining image compression data based on the transformation network based on the attention module and stacked residual blocks and the generalized chessboard space channel context model includes the following steps:
[0039] Obtain the input image;
[0040] The input image is encoded using the transformation network based on the attention module and stacked residual blocks to generate latent features;
[0041] Based on the potential features, entropy encoding is performed using the generalized chessboard space channel context model to obtain encoded data;
[0042] Based on the encoded data, image reconstruction is performed to obtain compressed image data.
[0043] On the other hand, embodiments of the present invention also provide an end-to-end image compression system based on window local attention and generalized chessboard space channel context. The system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0044] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0045] The embodiments of this application include at least the following beneficial effects: This application provides an end-to-end image compression method and system based on window local attention and generalized chessboard space channel context. The steps of this invention include constructing a transform network based on attention modules and stacked residual blocks; using the transform network based on attention modules and stacked residual blocks to perform adaptive transformation of content through dynamic representation and neighborhood information embedding to obtain latent features; establishing a generalized chessboard space channel context model; using the generalized chessboard space channel context model to entropy encode the latent features; and obtaining image compressed data based on the transform network based on attention modules and stacked residual blocks and the generalized chessboard space channel context model. This invention can eliminate redundancy to the greatest extent and achieve excellent rate-distortion performance, while ensuring high-throughput parallel computing efficiency. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of an end-to-end image compression method based on window local attention and generalized chessboard space channel context provided in an embodiment of the present invention;
[0047] Figure 2 This is a WB framework diagram provided in an embodiment of the present invention;
[0048] Figure 3 This is a WAM framework diagram provided in an embodiment of the present invention;
[0049] Figure 4 This is a schematic diagram of the bottleneck residual block structure provided in an embodiment of the present invention;
[0050] Figure 5This is a schematic diagram of the overall architecture of the transform network based on attention modules and stacked residual blocks provided in an embodiment of the present invention;
[0051] Figure 6(a) is a diagram of the 4-Step GCP one-step parallel encoding process provided in an embodiment of the present invention;
[0052] Figure 6(b) is a diagram of the 4-Step GCP multi-step parallel decoding process provided in the embodiment of the present invention;
[0053] Figure 7 This is a schematic diagram of a non-uniform channel grouping condition model with M-channel input provided in an embodiment of the present invention;
[0054] Figure 8 The SCCTX provided in this embodiment of the invention + Model diagram;
[0055] Figure 9 This is a schematic diagram of the overall architecture of the end-to-end image compression model provided in this embodiment of the invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0057] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0058] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0060] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0061] 1) GDN (Generalized Divisive Normalization);
[0062] 2) IGDN (Inverse GDN), the inverse generalized normalization layer;
[0063] 3) PixelCNN, a pixel-based convolutional neural network;
[0064] 4) WB (Window Block), the window module;
[0065] 5) WAM (Window Attention Module);
[0066] 6) 4-Step GCP (4-Step Generalized Checkerboard Pattern), a four-step generalized checkerboard context model;
[0067] 7) STE (Straight-Through Estimator);
[0068] 8) NLN (Non-Local Network);
[0069] 9) SCCTX (Space-Channel ConTeXt), a spatial channel context model;
[0070] 10) SCCTX + Generalized chessboard space channel context model;
[0071] 11) DBA (Deeper Bottleneck Architectures), bottleneck residual block;
[0072] 12) RB (Residual Block);
[0073] 13) AD (Arithmetic Decoding);
[0074] 14) VAE (Variational Autoencoder);
[0075] 15) CompressAI platform, an AI compression platform;
[0076] 16) ImageNet training set, a large-scale image dataset;
[0077] 17) MSE (Mean Squared Error);
[0078] 18) Adam optimizer, an adaptive moment estimation optimization algorithm;
[0079] 19) GMM (Gaussian Mixture Models);
[0080] 20) CLIC Professional Test, high-quality test images for the General Image Compression Challenge;
[0081] 21) CLIC Mobile Test, a test image for low-resolution mobile devices;
[0082] 22) Kodak, the Kodak test set;
[0083] 23) Kodim07, the 7th image in the Kodak dataset;
[0084] 24) Kodim21, the 21st image in the Kodak dataset;
[0085] 25) VVC (Versatile Video Coding), a multi-functional video encoding method;
[0086] 26) BD-Rate, percentage bitrate saving, measures the change in bitrate compared to a baseline;
[0087] 27) BD-PSNR, PSNR improvement value, measures the quality change compared to the baseline;
[0088] 28) Baseline model He2022, a baseline model;
[0089] 29) RDO, Rate-Distortion Optimization;
[0090] 30) Cheng2020, a model;
[0091] 31) BPG, better portable graphics;
[0092] 32) CNN (Convolutional Neural Network);
[0093] 33) Sigmoid, a logical activation function.
[0094] The focus of this invention is to implement and optimize an end-to-end image compression model based on deep learning to further improve rate-distortion performance. This is significant for reducing the bit rate required for image transmission and improving the quality of reconstructed images after compression. This invention selects a window-based local attention module in the analytical synthesis transform network and replaces the GDN layer with multiple stacked bottleneck residual blocks. The aim is to enable the network to adaptively aggregate image neighborhood information, improving the model's rate-distortion performance with reasonable computational complexity. This invention introduces a four-step generalized chessboard context model into the channel-conditional autoregressive entropy model, dividing the latent representation into four parts. Available feature points are used step-by-step according to a pre-defined spatial channel order, using richer spatial information conditions combined with sophisticated mask convolution. The aim is to enable the entropy model to more fully utilize the spatial neighborhood information aggregated in the latent representation, perform parallelized accurate probability distribution estimation, and reduce the bit rate of image transmission and storage.
[0095] This invention employs a two-stage training strategy. In the early stages of model training, uniformly distributed noise is added as input to the entropy model, and a straight-through gradient quantizer (STE) for the latent representation is used as input to the synthesis transform, enabling faster one-step encoding for training. In the later stages of model training, an STE for the mean-de-meaned latent representation is used as input to both the synthesis transform and the entropy model. This invention prioritizes training models at higher bitrates, while fine-tuning models at other bitrates using an STE training method for the mean-de-meaned latent representation. Using higher rate-distortion tradeoff parameters during training reduces distortion and increases bitrate, helping low-bitrate models avoid suboptimal entropy models.
[0096] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0097] On one hand, embodiments of the present invention provide an end-to-end image compression method based on window local attention and generalized chessboard spatial channel context, referring to... Figure 1 An end-to-end image compression method based on window local attention and generalized chessboard spatial channel context includes the following steps:
[0098] S100. Construct a transformation network based on attention modules and stacked residual blocks; the transformation network based on attention modules and stacked residual blocks is used to perform adaptive transformation of content through dynamic representation and neighborhood information embedding to obtain latent features;
[0099] S200. Establish a generalized chessboard space channel context model; the generalized chessboard space channel context model is used for entropy encoding of latent features;
[0100] S300. Based on the transformation network with attention modules and stacked residual blocks and the generalized chessboard space channel context model, image compression data is obtained.
[0101] The S100 method disclosed in this embodiment of the invention for constructing a transform network based on attention modules and stacked residual blocks includes the following steps:
[0102] S110. Build the window module; the window module is used to divide the feature map into several local windows, perform non-local network operations on each local window, and stitch the local windows after non-local network operations back into the feature map.
[0103] S120. Based on the window module, construct the window local attention module; the window local attention module includes a main branch, a residual branch, and a mask branch; the main branch is used to generate basic features; the residual branch is used to accelerate convergence; the mask branch is used to generate the attention mask;
[0104] S130. Construct the bottleneck residual block; the bottleneck residual block includes a dimension reduction convolutional layer, a feature extraction convolutional layer, a dimension increase convolutional layer, and residual connections;
[0105] S140. Based on the window local attention module and the bottleneck residual block, establish an encoder and a decoder; the encoder includes several downsampling modules, several window local attention modules, and several bottleneck residual blocks; the decoder includes several upsampling modules, several window local attention modules, and several bottleneck residual blocks.
[0106] S150. Based on the encoder and decoder, complete the overall architecture of the transform network based on the attention module and stacked residual blocks, and obtain the transform network based on the attention module and stacked residual blocks.
[0107] The non-local network operations disclosed in this invention include the following formulas:
[0108]
[0109] Among them, V i C(U) represents the output feature after nonlocal network operations; C(U) represents the normalization factor; U represents the input feature from the local window; f(U) i U j ) represents the feature U at position i i Features of position j j Similarity between them; θ(U i ) = W θ U i ; g(U j ) = W g U j W θ This is the first weight matrix; W is the second weight matrix; g This is the third weight matrix.
[0110] The S200 method for establishing a generalized chessboard space channel context model disclosed in this embodiment of the invention includes the following steps:
[0111] S210. Construct a four-step generalized chessboard context model; the four-step generalized chessboard context model is used to perform one-step parallel encoding to obtain prediction entropy parameters or to perform multi-step parallel decoding to obtain reconstructed features;
[0112] S220. Construct a non-uniform channel grouping condition model; the non-uniform channel grouping condition model is used to accelerate the encoding and decoding process and balance compression performance and running speed.
[0113] S230. Based on the four-step generalized chessboard context model and the non-uniform channel grouping condition model, the generalized chessboard space channel context model is obtained.
[0114] The present invention discloses a method for obtaining prediction entropy parameters by performing one-step parallel encoding, which includes the following steps:
[0115] S211. Divide the latent features into several 2×2 feature blocks according to the spatial dimension; each feature block includes a first latent feature block, a second latent feature block, a third latent feature block, and a fourth latent feature block; in the feature block, the positions of the first latent feature block and the second latent feature block are centrally symmetrical, and the positions of the third latent feature block and the fourth latent feature block are centrally symmetrical.
[0116] S212. Predict the entropy parameter of the first latent feature block using the prior parameter and the channel context parameter to obtain the entropy parameter of the first latent feature block.
[0117] S213. By using 3×3 mask convolution to process the spatial context parameters, prior parameters and channel context parameters of the four first potential feature blocks adjacent to the second potential feature block, the entropy parameter of the second potential feature block is obtained.
[0118] S214. By using mask convolution to process the spatial context parameters, prior parameters and channel context parameters obtained from the spatial latent features adjacent to the third latent feature block, the entropy parameter of the third latent feature block is obtained for prediction.
[0119] S215. By using mask convolution to process the spatial context parameters, prior parameters, and channel context parameters obtained from the spatial latent features adjacent to the fourth latent feature block, the entropy parameters of the fourth latent feature block are predicted.
[0120] S216. Based on the entropy parameters of the first potential feature block, the second potential feature block, the third potential feature block, and the fourth potential feature block, the predicted entropy parameter is obtained.
[0121] The present invention discloses a method for obtaining reconstructed features by performing multi-step parallel decoding, including the following steps:
[0122] S217. Predict the entropy parameter of the first latent feature block using the super prior parameter and channel context parameter, apply it to arithmetic decoding to obtain the reconstructed first latent feature block, use 3×3 mask convolution to process the four reconstructed first latent feature blocks adjacent to the second latent feature block, and generate the spatial context parameter required for the second latent feature block.
[0123] S218. Based on the spatial context parameters, prior parameters, and channel context parameters required for the second potential feature block, calculate the entropy parameter of the second potential feature block and reconstruct the second potential feature block to obtain the reconstructed second potential feature block. Generate the spatial context parameters required for the third potential feature block through mask convolution.
[0124] S219. Combining the spatial context parameters, prior parameters, and channel context parameters required for the third latent feature block, decode the third latent feature block to obtain the reconstructed third latent feature block, and generate the spatial context parameters required for the fourth latent feature block through mask convolution.
[0125] S21A. Combining the spatial context parameters, prior parameters, and channel context parameters required for the fourth latent feature block, decode the fourth latent feature block to obtain the reconstructed fourth latent feature block.
[0126] S21B. Based on the reconstructed first potential feature block, the reconstructed second potential feature block, the reconstructed third potential feature block, and the reconstructed fourth potential feature block, the reconstructed features are obtained.
[0127] The formulas used in S220 of this invention to construct a non-uniform channel grouping condition model include:
[0128]
[0129] in, This represents the channel context parameters of the k-th slice; slicing is done by using latent features with M channels. The slices are obtained by splitting along the channel dimension according to the number of channels {16, 16, 32, 64, M-128}; the slices include This represents the CNN model that processes the k-th slice; Concatenate() represents the concatenation operation.
[0130] The S300 method disclosed in this embodiment of the invention obtains image compression data based on a transform network with attention modules and stacked residual blocks and a generalized chessboard space channel context model, including the following steps:
[0131] S310. Obtain the input image;
[0132] S320. Encode the input image using a transform network based on attention modules and stacked residual blocks to generate latent features;
[0133] S330. Based on the latent features, entropy encoding is performed using the generalized chessboard space channel context model to obtain the encoded data;
[0134] S340. Based on the encoded data, perform image reconstruction to obtain compressed image data.
[0135] As an optional implementation, the end-to-end image compression method based on window local attention and generalized chessboard spatial channel context of this invention includes:
[0136] I. Transformation Network Based on Attention Module and Stacked Residual Blocks
[0137] This invention considers that adaptive transformation of content can effectively represent the local neighborhood distribution information of dynamic input. However, related research has significant limitations in terms of effective adaptive transformation and computational complexity. Locally perceptual attention promises to achieve efficient adaptive transformation, thereby further improving the performance of image compression models while maintaining reasonable computational complexity. The first section of this embodiment mainly introduces the structure of the window local attention module and the bottleneck residual block, and presents the transformation network framework of the proposed model.
[0138] 1. Window Local Attention Module
[0139] In image compression tasks, global semantic information is not as effective as in other computer vision tasks. Instead, this invention considers that spatially adjacent elements have stronger correlations, and therefore should aggregate neighborhood information to form an adaptive transformation. A window-based local attention module (WAM) can effectively meet these requirements. WAM uses window blocks (WBs) as its basic blocks, such as... Figure 2As shown, the input feature map is divided into several local windows U of size S×S. A non-local network (NLN) operation is performed on each local window, and then the local windows are concatenated back into the feature map. The NLN calculates the output V at index i by weighting the transformed features of the input U. i The expression is as follows:
[0140]
[0141] Among them, the Gaussian embedding function f() is used to calculate the similarity between features of the input U; θ(U i ) = W θ U i , g(U j ) = W g U j The three components interact across channels via a 1×1 convolution operation. θ This is the first weight matrix; W is the second weight matrix; g This is the third weight matrix; C(U) is the normalization factor; f(U) i U j The exponential part of the expression is processed by a softmax operation to obtain the attention score, which can be represented in matrix form as follows:
[0142]
[0143] Furthermore, a 1×1 convolution operation is performed again, and residual connections are introduced to accelerate convergence, resulting in an output that enhances local correlation:
[0144]
[0145] The local window approach to attention mechanisms helps the network focus on more effective neighborhood information, eliminating the influence of irrelevant global information and improving the efficiency of the attention mechanism. Furthermore, Web of Brush (WB) is more computationally efficient. For an input tensor of size h×w with feature dimension C, the computational complexity of WB is:
[0146] Ω(WB)=4hwC 2 +2S 2 hwC
[0147] When the window size parameter S is fixed, it is only linearly related to hw, which successfully solves the problem of quadratic computational complexity of the global attention mechanism.
[0148] WAM's framework is as follows Figure 3As shown, it comprises three main branches: the main branch stacks three residual blocks to generate features; the residual branch is used to accelerate convergence; the mask branch first applies the WB module, then stacks three residual blocks for further abstraction, and finally uses a 1×1 convolution and a sigmoid activation function to generate an attention mask. Considering minimizing the total bit rate of the image, allocating more bits to visually sensitive regions such as high-frequency edges and fewer bits to low-sensitivity regions can effectively improve rate-distortion performance. Compared to encoding auxiliary information to convey importance masks, the implicit generation method using an attention mechanism is simpler and more efficient. Furthermore, by using the WB module to generate the attention mask, local image correlations can be effectively embedded, achieving the goal of adaptively representing neighborhood information.
[0149] 2. Bottleneck Residual Block
[0150] Deeper Bottleneck Architectures (DBAs) are used due to their excellent feature extraction capabilities and controllable computational complexity. Their structure is as follows: Figure 4 As shown. Compared to a typical residual block (RB), the main difference in DBA lies in the introduction of two 1×1 convolutional layers for flexible adjustment of feature dimensions. Specifically, the first 1×1 convolutional layer reduces the dimensionality of the input features, followed by a 3×3 convolutional layer for feature extraction, and finally, a second 1×1 convolutional layer restores the feature dimensions to match the dimension of the input in the residual connection. Thanks to this bottleneck structure design, DBA can handle high-dimensional feature inputs with a smaller number of parameters and computational cost while maintaining powerful feature extraction capabilities. Therefore, DBA is suitable for deep convolutional neural networks, and this embodiment of the invention uses DBA instead of RB.
[0151] In this embodiment of the invention, stacked DBAs are also used as an alternative to GDN layers. GDN layers have long been widely used in end-to-end image compression, but research has shown that GDN layers have compatibility issues with attention mechanisms. GDN layers are more like non-linear activation functions than normalization layers, and stacking GDN layers often leads to difficulties in convergence during training. In contrast, stacked DBAs have stronger non-linear modeling capabilities, enabling the network to extract features better and achieve a rate-distortion tradeoff. Furthermore, the stacked DBA approach improves the model's scalability; by adjusting the number of stacked DBAs, the computational complexity of the network can be flexibly controlled.
[0152] 3. Overall architecture of the transformation network of the proposed model
[0153] The overall architecture of the transformation network is as follows Figure 5 As shown. Using encoder g aFor example, its structure can be divided into four stages, each separated by a 5×5 convolutional layer. The first three stages begin with 5×5 convolutional layers and downsample the data by setting the convolution stride to 2 to achieve dimensionality reduction. Then, three DBAs are stacked in each stage to enhance the network's non-linear fitting ability. Specifically, WAM is added at the end of the second stage to aggregate neighborhood information to form an adaptive transformation. The last stage does not contain DBAs but also adds WAM. Decoder g s It can be regarded as encoder g a The inverse process is similar in structure to the encoder, except that the downsampling operation in the 5×5 convolutional layer is replaced with an upsampling operation to achieve image reconstruction.
[0154] In summary, the first section of this invention proposes a transformation network based on the Window Local Attention Module (WAM) and the Stacked Bottleneck Residual Block (DBA). This network dynamically represents and embeds neighborhood information of the input through WAM to achieve adaptive transformation of the content. By replacing GDN / IGDN with stacked DBA, the nonlinear representation capability of the network is enhanced, further improving the rate-distortion performance of the model.
[0155] II. Generalized Chessboard Space Channel Context Model
[0156] The combined use of super-prior and spatial channel context modeling can significantly improve rate-distortion performance. However, existing methods still have significant limitations: the two-step checkerboard spatial channel context model, due to its limited spatial condition grouping, struggles to fully utilize the aggregated neighborhood information in latent features, a limitation particularly pronounced when analyzing synthetic transformation enhancement. Therefore, this invention sets a more reasonable spatial channel autoregressive order in the context model, employing a four-step generalized checkerboard pattern (4-Step GCP) and a non-uniform channel grouping conditional model. This approach combines richer spatial channel information with sophisticated mask convolution to more effectively utilize the aggregated neighborhood information in latent features, achieving more accurate probability distribution estimation while meeting high-throughput parallel computation requirements. This section first introduces the 4-Step GCP model and the non-uniform channel grouping conditional model, followed by the proposed generalized checkerboard spatial channel context model (SCCTX). + () framework.
[0157] 1. Four-move generalized chessboard context model
[0158] The one-step parallel encoding process of the 4-Step GCP is shown in Figure 6(a). First, the latent features are divided into 2×2 feature blocks according to the spatial dimension. Among them, the entropy parameter of the step#0 latent feature (the first latent feature block) marked "0" in the upper left corner is predicted only by the super-prior parameter and the channel context parameter. At the same time, the entropy parameter of the step#1 latent feature (the second latent feature block) marked "1" in the lower right corner is predicted by the spatial context parameter, super-prior parameter, and channel context parameter obtained by applying a 3×3 mask convolution to four adjacent step#0 latent features. Similarly, the entropy parameters of the step#2 latent feature (the third latent feature block) marked "2" in the upper right corner and the step#3 latent feature (the fourth latent feature block) marked "3" in the lower left corner are predicted by the spatial context parameter, super-prior parameter, and channel context parameter obtained by applying a mask convolution to the progressively available adjacent spatial latent features.
[0159] The multi-step parallel decoding process of the 4-Step GCP is shown in Figure 6(b). This process reconstructs latent features step by step through four consecutive steps. Due to the autoregressive order dependency in the decoding process, parallel computation can only be achieved within the same step. The specific steps are as follows:
[0160] 1) Step 1: Predict the entropy parameters of the step#0 latent features using the super-prior parameters and channel context parameters, and apply them to arithmetic decoding to obtain the step#0 latent features (the first latent feature patch after reconstruction). Subsequently, use 3×3 mask convolution to generate the spatial context parameters required for the step#1 latent features.
[0161] 2) Step Two: Based on the spatial context parameters, prior parameters, and channel context parameters generated from the latent features of step #0, calculate the entropy parameters of the latent features of step #1 and reconstruct the features to obtain the reconstructed second latent feature patch. Then, generate the spatial context parameters required for the latent features of step #2 through mask convolution.
[0162] 3) Step 3: Combining the spatial context parameters, prior parameters and channel context parameters generated in the previous step, decode the latent features of step #2 to obtain the reconstructed third latent feature block, and generate the spatial context parameters required for the latent features of step #3 through mask convolution.
[0163] 4) Step 4: Reconstruct the latent features of step #3 using the same method as the previous steps to obtain the reconstructed fourth latent feature block, and finally complete the reconstruction of all latent features.
[0164] The autoregressive spatial context model can be expressed by the following formula:
[0165]
[0166] Where, φ sp,i The spatial context parameter for step i, g sp ( ) indicates a mask convolution operation. For a 4-Step GCP, each of its four stages has different decoded features.
[0167]
[0168] in, It is an empty set. This represents the first potential feature patch after reconstruction. This represents the second potential feature block after reconstruction. This represents the third potential feature block after reconstruction. This represents the fourth potential feature block after reconstruction.
[0169] 2. Non-uniform channel grouping condition model
[0170] The channel-conditional approach results in group-level ordering, where channels in earlier encoded groups have higher entropy and are therefore allocated more bits. Since subsequent channels frequently reference previous channels, the main information is shifted forward, reducing redundancy between channels. Therefore, this invention proposes a non-uniform channel grouping scheme. This scheme reduces the number of channels in earlier groups for finer processing and gradually increases the number of channels in subsequent groups to accelerate the encoding and decoding process, thus more effectively balancing compression performance and running speed. Figure 7 As shown, Figure 7 The dashed arrows in the diagram indicate additional steps required for decoding, for potential features with M channels. The slices are divided into 5 segments along the channel dimension according to the number of channels {16, 16, 32, 64, M-128}: All latent features are decoded using a channel autoregressive approach with five parallel computations, achieving high-throughput parallel processing. The formula is as follows:
[0171]
[0172] in, This represents the channel context parameter of the k-th slice. This indicates that the CNN model is processing the k-th slice, and the decoded features are stacked along the channel dimension.
[0173] 3. Generalized chessboard space channel context model architecture
[0174] The proposed generalized chessboard space channel context model (SCCTX) +This invention combines a 4-Step GCP in the spatial dimension with a non-uniform channel grouping conditional model in the channel dimension, effectively eliminating redundancy in both spatial and channel dimensions. Since the spatial and channel dimensions are orthogonal, this invention assumes that their redundancy is also orthogonal. Therefore, by progressively using neighborhood information according to a predetermined spatial and channel order, SCCTX... + It can completely eliminate redundancy, achieve accurate probability distribution estimation, and maintain high-throughput parallel processing efficiency.
[0175] SCCTX + The architecture of the model is as follows Figure 8 As shown, Figure 8 The dashed arrows indicate additional steps required for decoding. In the k-th non-uniformly grouped slice, the 4-Step GCP is used. To identify spatial redundancy and apply Network identification channel redundancy. The neighborhood information of the spatial and channel branches aggregated in the i-th step of the k-th slice. and The entropy parameter estimation network g, which is input along with the prior parameter ψ for spatial single-point prediction, is... ep To predict the parameters of a single Gaussian entropy model for latent features and Entropy parameter The estimate can be expressed by the following formula:
[0176]
[0177] During the decoding process, the predicted entropy parameter is fed into the arithmetic decoding AD to generate Return it to SCCTX + The input terminal is used for autoregressive operations.
[0178] In summary, Section 2 proposes a generalized chessboard space channel context model, SCCTX. + In the spatial dimension, a four-step generalized chessboard context model (4-Step GCP) is used, which adds spatial conditional grouping and makes more detailed use of aggregated neighborhood information. In the channel dimension, a non-uniform channel grouping conditional model is used to design a more reasonable grouping mode based on the importance of different channel features, further improving the rate-distortion performance of the model.
[0179] III. Overall Architecture and Training Method of the Proposed Model
[0180] This section first describes the overall architecture of the proposed end-to-end image compression model, and then introduces the model's two-stage training strategy and bitrate fine-tuning method.
[0181] 1. Overall architecture of the proposed model
[0182] Designing an end-to-end image compression model with excellent rate-distortion performance and controllable complexity is challenging. The key lies in intelligently and effectively aggregating and utilizing neighborhood information in the transform and entropy coding modules to completely eliminate redundancy. For analytical synthetic transforms, implementations based on global attention mechanisms suffer from excessively high computational complexity, while simplified attention modules lead to a decline in rate-distortion performance. For entropy models, the two-step chessboard spatial context model cannot fully utilize spatial neighborhood information, resulting in inaccurate probability distribution estimation.
[0183] To address the above problems, embodiments of the present invention propose the following... Figure 9 The model shown Figure 9 The dashed arrows indicate additional steps required for decoding. It continues the end-to-end VAE framework for constructing the master encoder-decoder and super encoder-decoder, combining hyper-prior and context prediction entropy parameters for probability distribution estimation, and using the following formula as the loss function for end-to-end optimization:
[0184]
[0185] in, This indicates that for an input image x, the distribution of its true data p x The expectation of mid-sampling; Represents the latent features after quantization The probability distribution; The super-prior predicted by the super-prior model. The probability distribution; R represents the reconstructed image; R represents the bit rate, used to minimize the number of bits required for encoding; λ represents the Lagrange multiplier, used to control the weight of bit rate and distortion; D represents the distortion metric, used to optimize the visual quality of the image.
[0186] Building upon this, a WAM-based adaptive transformation is proposed, dynamically representing and embedding neighborhood information of the input through a local attention mechanism. Subsequently, SCCTX based on a 4-Step GCP and a non-uniform channel grouping conditional model is employed. + The model uses aggregated neighborhood information in a step-by-step manner according to a predefined spatial channel sequence to perform accurate probability distribution estimation. This model not only best maintains the performance of autoregressive models but also enables parallel processing of high-throughput computations.
[0187] 2. Two-stage training strategy and bitrate fine-tuning method
[0188] This invention implements the proposed model on the CompressAI platform. The largest 200K images in the ImageNet training set are selected as the training set, and the next 4K images are selected as the validation set. The images are then cropped into 256×256 blocks. For each MSE-optimized bitrate model, this embodiment uses different Lagrange multipliers λ for training, specifically set λ = {16, 32, 75, 150, 300, 450} × 10⁻⁶. -4 The number of channels was set to M = 320. All models used the Adam optimizer with an initial learning rate of 10. -4 The batch size is set to 16. This invention prioritizes training a high bitrate model with λ = 0.015, and further fine-tunes other bitrate models based on this model. Next, embodiments of this invention will detail other training aspects of the proposed model, including the two-stage training strategy for the high bitrate model and fine-tuning methods for other bitrate models.
[0189] This invention divides the training process of a high bitrate model with λ = 0.015 into two stages. In stage one, mean-removing quantization is not used. Instead, this invention employs a hybrid quantization estimator, which simulates the quantization process by adding uniformly distributed noise to learn SCCTX. + Entropy model, and in passing the quantized latent features to the synthetic transformation g s In this stage, latent features with added noise are replaced with latent features processed by STE. This method helps optimize the single Gaussian entropy model, bringing its performance close to that of the Gaussian Mixture Models (GMM) entropy model. Simultaneously, it allows for more parallel one-step encoding during training, thus improving training efficiency. In stage two, mean-free quantization is used, and SCCTX is learned using STE(y-μ)+μ. + And pass it to g s This stage helps to further optimize the single Gaussian entropy model, but because it requires step-by-step estimation of the entropy mean parameter μ of the latent features, it cannot be directly implemented using one-step parallel encoding, resulting in low training efficiency. To improve training efficiency while ensuring model performance, this invention adopts a two-stage training strategy: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] -4 The initial learning rate was used, and training was conducted for 1.9M iterations in Phase 1, followed by 0.6M iterations in Phase 2. During the training in Phase 2, the learning rate was reduced to 10 at 0.3M iterations. -5 And at 0.5M iterations, the learning rate is further decayed to 10. -6 .
[0190] By using a higher λ for training, distortion can be effectively reduced and the bit rate increased, which helps low-bit-rate models avoid suboptimal entropy models. Therefore, for the remaining five bit-rate models, this invention fine-tunes the high-bit-rate model with λ = 0.015. Specifically, a two-stage training method is adopted, with a bit rate of 10... -4 The initial learning rate was set, and the total number of training iterations was 0.75M, with the learning rate being reduced to 10 at iteration number 0.31M. -5 And at the 0.62Mth iteration, the learning rate was further decayed to 10. -6 .
[0191] In summary, in Section 3, this invention proposes a method based on the Local Window Attention Module (WAM) and the Generalized Chessboard Space Channel Context Model (SCCTX). + An end-to-end image compression model is proposed. First, WAM dynamic representation and embedding of input neighborhood information are used to achieve adaptive content transformation. Then, spatial conditional grouping is added through 4-Step GCP to more finely utilize aggregated neighborhood information, thereby achieving accurate probability distribution estimation. Simultaneously, in the analysis of the synthetic transformation, the bottleneck residual block DBA replaces GDN / IGDN, and in SCCTX... + The proposed model employs a non-uniformly grouped channel context model. Furthermore, this invention details the two-stage training strategy and bitrate fine-tuning method for the proposed model. Final experimental results show that, on the commonly used CLIC Professional Test and Kodak datasets, using VVC as a benchmark, the proposed model reduces BD-Rate by 8.88% and 5.67%, respectively, and improves BD-PSNR by 0.33 dB and 0.22 dB, respectively, demonstrating superior rate-distortion performance compared to the baseline model He2022.
[0192] This invention aims to realize and optimize an end-to-end image compression model based on deep learning. It focuses on designing transformation and entropy models that intelligently aggregate and fully utilize neighborhood information to minimize redundancy and achieve superior rate-distortion performance, while ensuring high-throughput parallel computing efficiency. To this end, this invention innovatively proposes a model based on the local window attention module (WAM) and the generalized chessboard space channel context model (SCCTX). + An end-to-end lossy image compression model. Specific innovations are as follows:
[0193] 1. This model employs a local window attention mechanism to achieve content-adaptive transformation, dynamically representing and embedding neighborhood information of the input content. This enables the network to intelligently focus on complex regions in the image, achieving precise bit allocation and effectively avoiding quadratic computational complexity. Stacked DBA layers replace the GDN layers, enhancing the model's rate-distortion performance with stronger nonlinear fitting capabilities. By flexibly adjusting the number of stacked DBA layers, a balance is achieved between model capacity and computational complexity, improving the model's scalability.
[0194] 2. Improved Entropy Model SCCTX + By adding spatial conditional grouping through 4-Step GCP and combining it with sophisticated mask convolution operations, we can make full use of aggregated spatial neighborhood information and pair it with a channel context model that considers the channel group level order of non-uniform grouping. This allows for more accurate probability distribution estimation while meeting the requirements of high-throughput parallel computing, thereby further reducing the bit rate.
[0195] 3. The two-stage training strategy effectively combines the advantages of hybrid quantization estimators and mean-free encoding / decoding, and maximizes model training efficiency through a single encoding step. The bitrate fine-tuning method significantly reduces training time costs while maintaining model performance at other bitrate points.
[0196] This invention has conducted extensive experiments. In comparative experiments on rate-distortion performance and encoding / decoding speed, the proposed model exhibits superior rate-distortion performance and reasonable encoding / decoding latency. Its similar encoding and decoding speeds contribute to the real-time transmission of high-quality images. The proposed model also demonstrates excellent performance in the subjective visual quality of reconstructed images, with clearer structure and texture, and significant suppression of noise and artifacts. Furthermore, this invention further verifies the necessity of each module in the proposed model through ablation experiments; removing any module leads to a decrease in rate-distortion performance.
[0197] This invention compares the rate-distortion performance and encoding / decoding speed of the proposed model with existing end-to-end image compression models. Compared to the baseline model He2022, the proposed model achieves superior rate-distortion performance without significantly reducing encoding / decoding speed. Using VVC as a benchmark, on the CLIC Professional Test dataset, the proposed model reduces BD-Rate by 8.88% and improves BD-PSNR by 0.33 dB. This invention also plots the rate-distortion curves of the proposed model and the comparison models. On the Kodak, CLIC Professional Test, and CLIC Mobile Test datasets, the proposed model demonstrates superior rate-distortion performance compared to He2022 and VVC, fully demonstrating the robustness of the proposed model. In particular, on the high-resolution CLIC Professional Test dataset captured by professional cameras, the proposed model shows a more significant improvement in encoding efficiency. This is because high-resolution images typically have higher local correlations, making it easier for the model to utilize neighborhood information to improve compression efficiency. Specifically, WAM achieves adaptive transformation through a local attention mechanism, and the 4-Step GCP, by adding conditional grouping with spatial dimensions, can more effectively utilize aggregated neighborhood information, making the proposed model perform better when processing high-resolution images with rich textures. Furthermore, VVC employs a complex Rate-Distortion Optimization (RDO) search process during the encoding stage, resulting in encoding latency that is hundreds of times higher than decoding latency on typical Kodak datasets. In contrast, the proposed model does not require a complex RDO search process and has an encoding speed similar to the decoding speed, which helps to achieve real-time transmission of high-quality images.
[0198] To further verify the subjective visual quality of the proposed model, this invention uses Kodim07 and Kodim21 from the Kodak dataset as examples, comparing the reconstruction results of the proposed model with those of Cheng2020, VVC, BPG, and JPEG. At similar bitrates, the proposed model exhibits better visual quality, with clearer structure and texture in the reconstructed images, and significantly reduced noise and artifacts. For example, in image Kodim07, the details of tile stripes and petals are clearer; in image Kodim21, the details of house structures and clouds are better preserved. The proposed model demonstrates the best reconstruction performance in all the aforementioned test images.
[0199] On the other hand, embodiments of the present invention also provide an end-to-end image compression system based on window local attention and generalized chessboard space channel context. The system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned method.
[0200] The processor and memory can be connected via a bus or other means. Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0201] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method.
[0202] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0203] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. An end-to-end image compression method based on window local attention and generalized chessboard spatial channel context, characterized in that, The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context includes the following steps: A transformation network based on attention modules and stacked residual blocks is constructed; the transformation network based on attention modules and stacked residual blocks is used to perform adaptive transformation of content through dynamic representation and neighborhood information embedding to obtain latent features; A generalized chessboard space channel context model is established; the generalized chessboard space channel context model is used for entropy encoding of the latent features; Image compressed data is obtained based on the transformation network based on the attention module and stacked residual blocks and the generalized chessboard space channel context model.
2. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context according to claim 1, characterized in that, The construction of the transform network based on attention modules and stacked residual blocks includes the following steps: A window module is constructed; the window module is used to divide the feature map into several local windows, perform nonlocal network operations on each local window, and stitch the local windows after nonlocal network operations back into the feature map; Based on the window module, a window local attention module is constructed; the window local attention module includes a main branch, a residual branch, and a mask branch; the main branch is used to generate basic features; the residual branch is used to accelerate convergence; and the mask branch is used to generate an attention mask. Construct a bottleneck residual block; the bottleneck residual block includes a dimension reduction convolutional layer, a feature extraction convolutional layer, a dimension increase convolutional layer, and residual connections; An encoder and a decoder are established based on the window local attention module and the bottleneck residual block; the encoder includes several downsampling modules, several window local attention modules, and several bottleneck residual blocks; the decoder includes several upsampling modules, several window local attention modules, and several bottleneck residual blocks. Based on the encoder and the decoder, the overall architecture of the transform network based on the attention module and the stacked residual block is completed, and the transform network based on the attention module and the stacked residual block is obtained.
3. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context according to claim 2, characterized in that, The formulas used in the nonlocal network operations include: Among them, V i C(U) represents the feature output after nonlocal network operations; C(U) represents the normalization factor; U represents the feature input from the local window; f(U) i U j ) represents the feature U at position i i Features of position j j Similarity between them; θ(U i ) = W θ U i ; g(U j ) = W g U j W θ This is the first weight matrix; W is the second weight matrix. g This is the third weight matrix.
4. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context according to claim 1, characterized in that, The establishment of the generalized chessboard space channel context model includes the following steps: A four-step generalized chessboard context model is constructed; the four-step generalized chessboard context model is used to perform one-step parallel encoding to obtain prediction entropy parameters or to perform multi-step parallel decoding to obtain reconstructed features; A non-uniform channel grouping condition model is constructed; the non-uniform channel grouping condition model is used to accelerate the encoding and decoding process and balance compression performance and running speed. Based on the four-step generalized chessboard context model and the non-uniform channel grouping condition model, the generalized chessboard space channel context model is obtained.
5. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context according to claim 4, characterized in that, The step of performing one-step parallel encoding to obtain the prediction entropy parameters includes the following steps: The latent features are divided into several 2×2 feature blocks according to spatial dimensions; each feature block includes a first latent feature block, a second latent feature block, a third latent feature block, and a fourth latent feature block; in the feature blocks, the positions of the first latent feature block and the second latent feature block are centrally symmetrical, and the positions of the third latent feature block and the fourth latent feature block are centrally symmetrical. The entropy parameter of the first latent feature block is obtained by predicting the entropy parameter of the first latent feature block using the super-prior parameter and the channel context parameter. The entropy parameter of the second potential feature block is obtained by using 3×3 mask convolution to process the spatial context parameters, prior parameters, and channel context parameters of the four first potential feature blocks adjacent to the second potential feature block. The entropy parameter of the third potential feature block is obtained by using mask convolution to process the spatial context parameters, prior parameters, and channel context parameters obtained from the spatial potential features adjacent to the third potential feature block. The entropy parameter of the fourth potential feature block is obtained by using mask convolution to process the spatial context parameters, prior parameters, and channel context parameters obtained from the spatial potential features adjacent to the fourth potential feature block. The predicted entropy parameter is obtained based on the entropy parameter of the first potential feature block, the entropy parameter of the second potential feature block, the entropy parameter of the third potential feature block, and the entropy parameter of the fourth potential feature block.
6. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context according to claim 4, characterized in that, The process of performing multi-step parallel decoding to obtain reconstructed features includes the following steps: The entropy parameter of the first latent feature block is predicted using the super-prior parameter and the channel context parameter. It is then applied to arithmetic decoding to obtain the reconstructed first latent feature block. The four reconstructed first latent feature blocks adjacent to the second latent feature block are processed using 3×3 mask convolution to generate the spatial context parameter required for the second latent feature block. Based on the spatial context parameters, prior parameters, and channel context parameters required for the second potential feature block, the entropy parameter of the second potential feature block is calculated and the second potential feature block is reconstructed to obtain the reconstructed second potential feature block. The spatial context parameters required for the third potential feature block are generated through mask convolution. By combining the spatial context parameters, prior parameters, and channel context parameters required for the third potential feature block, the third potential feature block is decoded to obtain the reconstructed third potential feature block, and the spatial context parameters required for the fourth potential feature block are generated through mask convolution. By combining the spatial context parameters, prior parameters, and channel context parameters required for the fourth latent feature block, the fourth latent feature block is decoded to obtain the reconstructed fourth latent feature block; The reconstructed features are obtained based on the reconstructed first potential feature block, the reconstructed second potential feature block, the reconstructed third potential feature block, and the reconstructed fourth potential feature block.
7. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context according to claim 4, characterized in that, The formulas used to construct the non-uniform channel grouping condition model include: in, This represents the channel context parameters of the k-th slice; the slice is obtained by using latent features with M channels. The slices are obtained by splitting along the channel dimension according to the number of channels {16, 16, 32, 64, M-128}; the slices include This represents the CNN model that processes the k-th slice; Concatenate() represents the concatenation operation.
8. The end-to-end image compression method based on window local attention and generalized chessboard spatial channel context according to claim 1, characterized in that, The process of obtaining image compression data based on the transformation network using the attention module and stacked residual blocks, and the generalized chessboard space channel context model, includes the following steps: Obtain the input image; The input image is encoded using the transformation network based on the attention module and stacked residual blocks to generate latent features; Based on the potential features, entropy encoding is performed using the generalized chessboard space channel context model to obtain encoded data; Based on the encoded data, image reconstruction is performed to obtain compressed image data.
9. An end-to-end image compression system based on window local attention and generalized chessboard spatial channel context, characterized in that, The system includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.
Citation Information
Cited By
Double-chessboard autoregression entropy coding method based on context prior learning
CN121940555A