A context-based progressive three-plane coding image compression algorithm and terminal device
Through the context-based progressive three-plane coding image compression algorithm, combined with the MPEG algorithm and multi-module design, the contradiction between compression efficiency and image quality in image compression is solved, achieving more efficient image compression and better image reconstruction quality, and overcoming the compatibility issues with traditional technologies.
Patent Information
- Application Number
- CN202410879262.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Image compression algorithms have conflicts between balancing compression efficiency and image quality. Traditional three-plane coding is incompatible with the autoregressive context model, resulting in loss of image quality and increased encoding and decoding time during the compression process.
Using a context-based progressive three-plane coding image compression algorithm, through the MPEG algorithm, encoder, super encoder, probability calculation module, rate reduction module and distortion reduction module, the third-order probability is predicted and key tensor information is extracted to achieve a more compact encoding and higher quality image reconstruction.
It improves compression efficiency and image detail retention, reduces image quality loss during the compression process, overcomes the compatibility problem between traditional three-plane coding and autoregressive context models, and achieves higher compression performance and better image reconstruction quality.
Smart Images

Figure CN118413675B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a context-based progressive three-plane coding image compression algorithm and a terminal device. Background Art
[0002] Image compression algorithms are a series of technologies used to reduce the size of digital image files. The purpose is to reduce the storage space and transmission bandwidth requirements without losing image quality as much as possible. It includes two main methods: lossless compression and lossy compression. Lossless compression algorithms allow the complete recovery of original image data and are suitable for scenes with extremely high image quality requirements. Lossy compression, on the other hand, achieves higher compression rates by discarding some visually less sensitive information and is widely used in applications that require the storage and transmission of large amounts of image data. With the development of deep learning and artificial intelligence technologies, the field of image compression is ushering in emerging technologies such as context-based coding, generative adversarial networks, and end-to-end learning. These advances provide new possibilities for improving compression efficiency and image quality.
[0003] The core problem of image compression algorithms lies in balancing the contradiction between compression efficiency and image quality, as well as the challenge of retaining the original information as much as possible while reducing the amount of data. Efficient compression is often accompanied by a certain degree of data loss, which is particularly evident in lossy compression. At the same time, the complex algorithm design in the compression process may increase the encoding and decoding time, posing a challenge to real-time processing and resource-constrained devices. In response to these problems, a more compact progressive coding scheme has been proposed, which aims to gradually refine the compression process through intelligent coding steps, thereby achieving a higher compression ratio while maintaining image quality, opening up a new path for the advancement of image compression technology. Summary of the invention
[0004] The purpose of the present invention is to provide an image compression algorithm and terminal device based on contextual progressive three-plane coding, which can more accurately predict the third-order probability by combining context information, thereby achieving more compact coding. Not only does it improve the compression efficiency, it also helps to retain richer image details. In addition, the algorithm also includes a distortion reduction module that can intelligently extract key tensor information from the three planes, further reducing the image quality loss during the compression process. This enables a higher level of compression performance while maintaining high-quality image reconstruction, overcoming the problem of incompatibility between traditional three-plane coding and autoregressive context models.
[0005] To achieve the above object, the present invention provides a context-based progressive three-plane coding image compression algorithm, comprising the following steps:
[0006] S1. Compress the original video stream using the MPEG algorithm and obtain a visible image encoded in the H265 format;
[0007] S2, the visible image X is converted into a latent tensor Y and a super latent tensor Z in turn through the encoder and the super encoder, and the quantized , the super decoder obtains the mean value and standard deviation of Y;
[0008] S3, evaluate the value using the mean, standard deviation and coded three planes through the probability calculation module ;
[0009] S4. Design a context-based rate reduction model (RRM) to predict the value of each three planes and fuse them through residual blocks and convolutional layers, and finally use activation functions to determine value;
[0010] S5. Design a context-based distortion reduction model (DRM) to use the partial hidden tensor to reduce any Image reconstruction is performed with values within a certain range;
[0011] S6. Finally, the improved latent tensor is used to reconstruct the image through the super decoder.
[0012] As a further solution of the present invention: S1 comprises the following steps:
[0013] It adopts the MPEG video stream image compression algorithm, and achieves good video quality at high compression ratio and low bit rate through motion compensation, discrete cosine transform (DCT) and Huffman coding technology. It is particularly good at processing motion scenes and reducing time redundancy. In addition, it makes up for the shortcomings of other series of algorithms in dynamic video compression efficiency and bandwidth adaptability, and provides a more flexible and efficient video transmission solution.
[0014] As a further solution of the present invention: S2 comprises the following steps:
[0015] The encoder extracts key features from the image and uses a convolutional neural network to progressively extract image features layer by layer, and finally outputs a latent tensor Y; the super encoder further refines and abstracts the features, further compresses the information, and obtains a super latent tensor Z;
[0016] In addition, through Calculate the quantized super potential tensor , as shown in formula (1), the super decoder is then used to obtain the mean value M and standard deviation ,
[0017] (1);
[0018] As a further solution of the present invention: S3 comprises the following steps:
[0019] The probability calculation module uses the mean, standard deviation and the coded three planes to obtain ,in , C represents the number of channels, H and W represent the height and width respectively;
[0020] Using entropy parameter M and standard deviation , and the three coded values are used to evaluate , where the entropy parameter is usually used to adjust and control the information entropy in the encoding process, thereby affecting the information loss of the compression rate.
[0021] As a further solution of the present invention: S4 comprises the following steps:
[0022] By designing a context-based rate reduction model (RRM), instead of predicting the potential elements in the raster scanning order, we predict the , In addition, the RRM module The probability estimates in are refined to produce the updated tensor , The bit ratio required in the entropy coding process is Less, thereby improving the performance of the "rate-distortion" RD.
[0023] like Figure 2 As shown in and context, and fuse them through the residual block convolution layer, where the fused tensor has the same Same spatial resolution, but channels are Four times, which is divided into an additive term by channel and a scale term ;
[0024] First, S is converted to B, as shown in Formula 2:
[0025] (2);
[0026] Specifically, each of its elements is Then, Add to and modulate it by B to produce an updated probability tensor .
[0027] As a further solution of the present invention: S5 comprises the following steps:
[0028] Unlike other context models that are used before entropy coding, this paper designs a context-based distortion reduction module (DRM), which is used after entropy decoding. Unlike non-progressive encoders, the algorithm proposed in this paper can use partial hidden tensors , for any , reconstruct the image , so in decoding The DRM module then uses the context to reduce the error, thereby reducing image distortion.
[0029] like Figure 3 As shown in the figure, the architecture of DRM is shown, with M and For context, the DRM module offsets the tensor Transform , as shown in formula (3):
[0030] (3);
[0031] Unlike RRM, DRM does not use and As context, because it contains information about The probability information of has been decoded and used to reconstruct , and Almost no offer In addition, the DRM module is a regressor for reducing distortion, while the RRM is a classifier for reducing bitrate.
[0032] After training, the DRM module can minimize the loss, as shown in formula (4):
[0033] (4);
[0034] As a further solution of the present invention: S6 comprises the following steps:
[0035] Finally, the improved latent tensor is passed through the super decoder Reconstruct the image .
[0036] To achieve the above-mentioned purpose, the present invention provides a terminal device on the other hand, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the above-mentioned image compression algorithm is implemented.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] Integration of contextual information: By developing a context-based probability reduction module, the algorithm can more accurately predict and estimate the cubic probabilities of potential elements; this integration of contextual information provides a more precise encoding basis for the data in the three planes, making the encoding process more efficient and compact.
[0039] Intelligent Tensor Extraction: By designing a context-based distortion reduction module, the module can intelligently identify and extract key latent tensor information from the three planes; this process not only optimizes data compression efficiency, but also significantly improves the quality of reconstructed images, ensuring the maximum preservation of image details during the compression process.
[0040] The improvement of the algorithm has brought new performance improvements to the field of deep progressive image compression, and is particularly suitable for application scenarios with high requirements for both compression efficiency and image quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the overall image compression method provided by an embodiment of the present invention is shown;
[0042] Figure 2 A schematic diagram of a context-based rate reduction module provided in an embodiment of the present invention is shown;
[0043] Figure 3 A schematic diagram of a context-based distortion reduction module provided by an embodiment of the present invention is shown;
[0044] Figure 4 It is a schematic diagram of the terminal device structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described below by way of examples.
[0046] like Figure 1 As shown, a context-based progressive three-plane coding image compression algorithm includes the following steps:
[0047] S1. Compress the original video stream using the MPEG algorithm and obtain a visible image encoded in the H265 format;
[0048] S2, the visible image X is converted into a latent tensor Y and a super latent tensor Z in turn through the encoder and the super encoder, and the quantized , the super decoder obtains the mean value and standard deviation of Y;
[0049] S3, evaluate the value using the mean, standard deviation and coded three planes through the probability calculation module ;
[0050] S4. Design a context-based rate reduction model (RRM) to predict the value of each three planes and fuse them through residual blocks and convolutional layers, and finally use activation functions to determine value;
[0051] S5. Design a context-based distortion reduction model (DRM) to use the partial hidden tensor to reduce any Image reconstruction is performed with values within a certain range;
[0052] S6. Finally, the improved latent tensor is used to reconstruct the image through the super decoder.
[0053] It adopts the MPEG video stream image compression algorithm, and achieves good video quality at high compression ratio and low bit rate through motion compensation, discrete cosine transform (DCT) and Huffman coding technology. It is particularly good at processing motion scenes and reducing time redundancy. In addition, it makes up for the shortcomings of other series of algorithms in dynamic video compression efficiency and bandwidth adaptability, and provides a more flexible and efficient video transmission solution.
[0054] Further, S2 includes the following steps:
[0055] Among them, the encoder extracts the key features in the image, uses the convolutional neural network to extract image features layer by layer, and finally outputs the latent tensor Y; the super encoder further refines and abstracts the features, further compresses the information, and obtains the super latent tensor Z.
[0056] In addition, through Calculate the quantized super potential tensor , as shown in formula (1), the super decoder is then used to obtain the mean value M and standard deviation ;
[0057] (1).
[0058] Furthermore, S3 includes the following steps:
[0059] The probability calculation module uses the mean, standard deviation and the coded three planes to obtain ,in , C represents the number of channels, H and W represent the height and width respectively;
[0060] Using entropy parameter M and standard deviation , and the three coded values are used to evaluate , where the entropy parameter is usually used to adjust and control the information entropy in the encoding process, thereby affecting the information loss of the compression rate.
[0061] Further, S4 includes the following steps:
[0062] By designing a context-based rate reduction model (RRM), instead of predicting the potential elements in the raster scanning order, we predict the , In addition, the RRM module The probability estimates in are refined to produce the updated tensor , The bit ratio required in the entropy coding process is Less, thereby improving the performance of the "rate-distortion" RD.
[0063] like Figure 2 As shown, RRM is divided into and context, and fuse them through the residual block convolution layer, where the fused tensor has the same Same spatial resolution, but channels are Four times, which is divided into an additive term by channel and a scale term ;
[0064] First, S is converted to B, as shown in Formula 2:
[0065] (2);
[0066] Specifically, each of its elements is Then, Add to and modulate it by B to produce an updated probability tensor .
[0067] Further, S5 includes the following steps:
[0068] Unlike other context models that are used before entropy coding, this paper designs a context-based distortion reduction module (DRM), which is used after entropy decoding. Unlike non-progressive encoders, the algorithm proposed in this paper can use partial hidden tensors , for any , reconstruct the image , so in decoding The DRM module then uses the context to reduce the error, thereby reducing image distortion.
[0069] like Figure 3 As shown in Figure 2, the architecture of DRM is shown. For context, the DRM module offsets the tensor Transform , as shown in formula (3):
[0070] (3);
[0071] Unlike RRM, DRM does not use and As context, because it contains information about The probability information of has been decoded and used to reconstruct , and Almost no offer In addition, the DRM module is a regressor for reducing distortion, while the RRM is a classifier for reducing bitrate.
[0072] After training, the DRM module can minimize the loss, as shown in formula (4):
[0073] (4);
[0074] Finally, the improved latent tensor is passed through the super decoder Reconstruct the image .
[0075] like Figure 4 As shown, a terminal device includes:
[0076] A processor, a memory, and a program or instruction stored in the memory and executable on the processor. The processor includes one or more processing cores. The processor is connected to the memory via a bus. When the processor executes the program or instruction, the image compression algorithm is implemented.
[0077] The memory can be implemented by any type of volatile or non-volatile storage device or combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0078] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned context-based progressive three-plane coding image compression algorithm are implemented. Optionally, the present invention also provides a computer program product containing instructions, which, when running on a computer, enables the computer to execute the steps of the above-mentioned context-based progressive three-plane coding image compression algorithm.
[0079] A person of ordinary skill in the art can understand that the process of implementing all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.
Claims
1. A context-based progressive three-plane coding image compression algorithm, characterized in that: The following steps are involved: S1. Compress the original video stream using the MPEG algorithm and obtain a visible image encoded in the H265 format; S2, the visible image X is converted into a latent tensor Y and a super latent tensor Z in turn through the encoder and the super encoder, and the quantized , the super decoder obtains the mean value and standard deviation of Y; S3, evaluate the value using the mean, standard deviation and coded three planes through the probability calculation module ; S4. Design a context-based rate reduction module to predict the value of each three planes and fuse them through residual blocks and convolutional layers, and finally use activation functions to determine value; S5. Design a context-based distortion reduction module that uses the partial hidden tensor to reduce the distortion of any Image reconstruction is performed with values within a certain range; S6. Finally, the improved latent tensor is used to reconstruct the image through the super decoder; The S1 comprises the following steps: Adopt MPEG video stream image compression algorithm, improve video quality at high compression ratio and low bit rate through motion compensation, discrete cosine transform (DCT) and Huffman coding technology; The S2 comprises the following steps: The encoder extracts key features from the image and uses a convolutional neural network to progressively extract image features layer by layer, and finally outputs the latent tensor Y; the super encoder further refines and abstracts the features, further compresses the information, and obtains the super latent tensor Z; pass Calculate the quantized super potential tensor , as shown in formula (1), the super decoder is then used to obtain the mean value M and standard deviation ; (1); The S3 comprises the following steps: The probability calculation module uses the mean, standard deviation and the coded three planes to obtain ,in , C represents the number of channels, H and W represent the height and width respectively; Using entropy parameter M and standard deviation , and the three coded values are used to evaluate , where the entropy parameter is usually used to adjust and control the information entropy in the encoding process, thereby affecting the information loss of the compression rate; The S4 comprises the following steps: By designing a context-based rate reduction module, instead of predicting the latent elements in raster scanning order, we predict the , ; In addition, the rate reduction module The probability estimates in are refined to produce the updated tensor , The bit ratio required in the entropy coding process is Less, thus improving the performance of "rate-distortion" RD; The rate reduction module is divided into the input and context, and fuse them through the residual block convolution layer, where the fused tensor has the same Same spatial resolution, but channels are Four times, which is divided into an additive term by channel and a scale term ; First, S is converted to B as shown in formula (2): (2); Specifically, each of its elements is Then, Add to and modulate it by B to produce an updated probability tensor ; The S5 comprises the following steps: Design a context-based distortion reduction module using a biased hidden tensor , for any , reconstruct the image , so in decoding Afterwards, the distortion reduction module uses the context to reduce the error, thereby reducing image distortion; The architecture of the distortion reduction module is based on M and For context, the distortion reduction module will offset the tensor Transform , as shown in formula (3): (3); The distortion reduction module is trained to minimize the loss, as shown in formula (4): (4); The S6 comprises the following steps: The improved latent tensor is passed through the super decoder Reconstruct the image .
2. A terminal device, characterized in that: include: A processor, a memory, and a program or instruction stored in the memory and executable on the processor; When the processor executes the program or instruction, the image compression algorithm as claimed in claim 1 is implemented.
