High-performance variable-code-rate image compression method and device

By dividing the main codec network in the image compression model into low-code rate and high-code point segmentation networks, and using the Swin Transformer network to improve the performance of high-code point points, the problem of degradation of code point performance in the existing technology is solved and efficient image compression is achieved.

CN119767021AActive Publication Date: 2025-04-04HUAZHONG NORMAL UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411715314.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-04
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The network performance of existing variable-code rate image compression techniques at higher or lower code rate points may be degraded, resulting in the existence of performance optimization space.

Method used

By dividing the main codec network in the image compression model into a low-code point segmentation network and a high-code point segmentation network, the high-code point segmentation network is constructed in series by the embedding module, two Swin Transformer network modules and the deembedding feature module.

Benefits of technology

It realizes the optimization of storage and transmission efficiency while ensuring image quality, improves the performance of image compression method with variable code rate, and makes up for the problem of degradation of higher code rate point performance caused by the transformation of a single code rate point model into a continuously variable code rate model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119767021A_ABST
    Figure CN119767021A_ABST
Patent Text Reader

Abstract

The invention provides a high-performance variable-code-rate image compression method and device, and the method specifically comprises the steps: employing a segmented network architecture design, namely segmenting and subdividing a main codec in a basic image compression model into a high-code-rate network and a low-code-rate network, the method comprises the following steps of: introducing a ResSTB module which comprises two Swin Transform network modules which are connected in series into a high bit rate network; performing variable code rate coding on the to-be-compressed image through a main coding network in the image compression model to obtain variable code rate coding features; and performing image compression based on the variable code rate coding feature to obtain a compressed image. The method provided by the invention is mainly used for solving the problem that the performance of relatively high or relatively low code rate points is reduced due to the fact that a single code rate point model is converted into a variable code rate model, and has excellent performance at each code rate segmentation point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a high-performance variable bit rate image compression method and device. Background Art

[0002] The variable bit rate image compression framework based on the gain module is a representative work in this field. This model first realizes discrete variable bit rate by embedding gain units and inverse gain units in the hyper-prior network architecture. Secondly, the continuous variable bit rate is further realized by interpolation calculation in the evaluation model, while ensuring that the increased computational complexity is kept at a low level. Finally, the reduced performance is compensated by introducing the entropy model modeling method of the asymmetric Gaussian model. However, there are still some challenges in improving the traditional single bit rate model to a model that supports variable bit rate, especially the problem that the network performance at higher or lower bit rate points may decrease. This shows that although the existing variable bit rate image compression technology has made significant progress, there is still room for optimization in performance optimization. Summary of the invention

[0003] The present invention provides a high-performance variable bit rate image compression method and device, which are used to solve the problem that the performance of the variable bit rate image compression method in the prior art needs to be further improved.

[0004] The present invention provides a high-performance variable bit rate image compression method, comprising: Obtain the image to be compressed; Based on the main codec network in the image compression model, variable rate encoding is performed on the image to be compressed to obtain variable rate encoding features; Performing image compression based on the variable bit rate coding feature to obtain a compressed image; The main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by serially connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module.

[0005] According to a high-performance variable bit rate image compression method provided by the present invention, the low bit rate point segmentation network is constructed by directly stacking multiple residual networks.

[0006] According to a high-performance variable bit rate image compression method provided by the present invention, the stacked residual network is constructed based on directly stacking three ResUnit residual units and adding a ReLu activation function.

[0007] According to a high-performance variable bit rate image compression method provided by the present invention, the image compression model is constructed by embedding a continuous adaptive bit rate gain module into a contextual joint autoregressive network; The continuous adaptive bit rate gain module is used to dynamically adjust the bit rate corresponding to the compressed image.

[0008] According to a high-performance variable bit rate image compression method provided by the present invention, the training step of the image compression model includes: Acquire sample image data and an initial image compression model, wherein the initial image compression model includes an initial low bit rate point compression model and an initial high bit rate point compression model; Based on the preset training times ratio of the first initial image compression model and the sample image data, training the initial image compression model iteratively to obtain the image compression model; The first initial image compression model is the initial low bit rate point compression model, or the initial high bit rate point compression model.

[0009] According to a high-performance variable bit rate image compression method provided by the present invention, the preset training times ratio of the first initial image compression model and the sample image data are used to iterate the training of the initial image compression model to obtain the image compression model, including: Determine a current pre-trained image compression model based on a ratio of preset training times of the first initial image compression model and a comparison with a cumulative training times of the first initial image compression model; The pre-trained image compression model is trained iteratively based on the sample image data to obtain the image compression model.

[0010] The present invention also provides a high-performance variable bit rate image compression device, comprising: An acquisition unit, which acquires an image to be compressed; A variable rate coding unit, based on a main codec network in an image compression model, performs variable rate coding on the image to be compressed to obtain a variable rate coding feature; A compression unit, which performs image compression based on the variable bit rate coding feature to obtain a compressed image; The main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by serially connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module.

[0011] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a high-performance variable bit rate image compression method as described above is implemented.

[0012] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the high-performance variable bit rate image compression method as described above is implemented.

[0013] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the high-performance variable bit rate image compression method as described above is implemented.

[0014] The high-performance variable bit rate image compression method and device provided by the present invention divides the main codec network in the image compression model into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is mainly constructed in series based on the Swin Transformer network composed of the self-attention mechanism. The main codec network in the image compression model is used to implement variable bit rate compression of the image to be compressed, and a high-quality compressed image that meets actual needs is obtained, thereby improving the performance of the variable bit rate image compression method and compensating for the problem of performance degradation at higher bit rate points caused by the transformation of a single bit rate point model into a continuously variable bit rate model. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 It is a flowchart of a high-performance variable bit rate image compression method provided by the present invention; Figure 2 It is a schematic diagram of the comparison results of the number of bits of each part of the network after the image is compressed at different bit rates provided by the present invention; Figure 3 It is a schematic diagram of the structure of the high-code rate point segmentation network provided by the present invention; Figure 4 It is a structural schematic diagram of a low bit rate point segmentation network provided by the present invention; Figure 5 It is a structural schematic diagram of the image compression model provided by the present invention; Figure 6 This is one of the training flow diagrams of the image compression model provided by the present invention; Figure 7 This is the second schematic diagram of the training process of the image compression model provided by the present invention; Figure 8 1 is a schematic diagram for comparing the PSNR performance of the high-performance variable bit rate image compression method provided by the present invention; Fig. 9 A schematic diagram comparing the reconstructed image effects of different compression frameworks provided by the present invention; Fig.10 It is a structural schematic diagram of a high-performance variable bit rate image compression device provided by the present invention; Fig.11 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] It should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly indicate the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0019] In view of the above problems, the present invention provides a high-performance variable bit rate image compression method to improve the variable bit rate image compression performance. Figure 1 FIG. 1 is a flow chart of a high-performance variable bit rate image compression method provided by the present invention. Figure 1 As shown, the method includes: Step 110, obtaining an image to be compressed; Step 120, based on the main codec network in the image compression model, performing variable rate coding on the image to be compressed to obtain variable rate coding features; Step 130, performing image compression based on the variable bit rate coding feature to obtain a compressed image; The main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by serially connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module.

[0020] Specifically, first, the image to be compressed input by the user is obtained, that is, the original image to be compressed. Then, the image to be compressed is input into the image compression model, and the variable bit rate coding features of the image to be compressed are extracted by the main codec network in the image compression model. Here, the variable bit rate coding features refer to image features with different amounts of coded data obtained by encoding images at different bit rates according to actual needs or different image contents. Furthermore, by compressing the variable bit rate coding features, a compressed image is obtained, thereby optimizing storage and transmission efficiency while ensuring image quality.

[0021] It should be noted that Figure 2 is a schematic diagram of the comparison results of the number of bits of each part of the network after the image is compressed at different bit rates provided by the present invention, such as Figure 2 As shown, the total number of bits of the code stream after the image is compressed by the network is , the number of bits after compression by the main encoder network is , the number of bits after compression by the super prior encoder network is , the relationship between them can be expressed by the following formula, as shown below: Depend on Figure 2 It can be seen that after the image to be compressed is compressed by the general image compression model, the total number of bits of the compressed code stream is , the number of compressed bits of the main encoder network will gradually increase with the increase of bit rate, but the number of bits of the bit stream after compression by the super-prior encoder network However, no matter which bit rate is used, the number of compressed bits of the main encoder network Always within the total compressed bitstream number It occupies a dominant position. That is, the main network corresponding to the main encoder of the image compression model is the main source of image compression features.

[0022] Therefore, the main codec network in the image compression model provided by the present invention is divided into a low bit rate point segmentation network and a high bit rate point segmentation network. Among them, the high bit rate point segmentation network is mainly constructed by connecting the SwinTransformer network composed of the self-attention mechanism in series. It should be noted that connecting multiple Swin Transformer networks in series can further enhance the image compression model's ability to process image details, thereby achieving better image quality at a higher bit rate.

[0023] Figure 3 is a schematic diagram of the structure of the high bit rate point segmentation network provided by the present invention, wherein Figure 3 (a) shows the overall structure diagram of the high-rate point segmentation network. Figure 3 (b) shows the schematic diagram of the structure of two series-connected Swin Transformer networks. Figure 3 As shown in (a): By adding an embedding module (PatchEmbed) and an unembedding feature module (PatchUnEmbed) before and after the two Swin Transformer network structures, and through residual connections, a high-bitrate point segmentation network, namely the Res_STB module, is formed.

[0024] like Figure 3 (b) shows: Two Swin Transformer networks based on the self-attention mechanism are connected in series to obtain the Two_SwinT module. For a single Swin Transformer network, in the neural network, the MLP (Multi-LayerPerceptron) module and the Norm module (Normalization) are used to normalize the input image data. In addition, the W-MSA (Windows Multi-head Self-Attention, multi-head self-attention mechanism with conventional window division) module and the SW-MSA (Shifted Windows Multi-head Self-Attention, multi-head self-attention mechanism with shiftable window division) module are used to reduce the complexity of image processing by window division.

[0025] In one embodiment, the GDN (Generalized DivisiveNormalization) layer in the main codec network can be replaced with the high bit rate point segmentation network proposed in the present invention. This network is more suitable for learning rich image detail features by introducing the Swin Transformer module with long-distance dependency characteristics and considering the correlation between images. Therefore, adding the Res_STB module to the high bit rate point segmentation network provided by the embodiment of the present invention further improves the relationship modeling capability based on the global relationship dependency of high bit rate points, and is more suitable for model learning of high bit rate points.

[0026] The method provided by the embodiment of the present invention divides the main codec network in the image compression model into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is mainly constructed in series based on the SwinTransformer network composed of the self-attention mechanism. The main codec network in the image compression model is used to implement variable bit rate compression of the image to be compressed, and a high-quality compressed image that meets actual needs is obtained, thereby improving the performance of the variable bit rate image compression method and compensating for the problem of performance degradation at higher bit rate points caused by the transformation of a single bit rate point model into a continuously variable bit rate model.

[0027] Based on any of the above embodiments, the low bit rate point segmentation network is constructed by directly stacking multiple residual networks. The stacked residual network is constructed by directly stacking three ResUnit residual units and adding a ReLu activation function.

[0028] Figure 4 is a schematic diagram of the structure of the low bit rate point segmentation network provided by the present invention, wherein: Figure 4 (a) shows the overall structure diagram of the low bit rate point segmentation network. Figure 4 (b) is a schematic diagram showing the structure of the stacked residual network. Figure 4 As shown in (a), the low bit rate point segmentation network is obtained by directly stacking three stacked residual networks (ResUnit). Figure 4 As shown in (b), a single stacked residual network includes: a one-dimensional convolution layer, a ReLu activation function, a three-dimensional convolution layer, a ReLu activation function, a one-dimensional convolution layer and a ReLu activation function, and a residual connection is added before the last ReLu activation function.

[0029] It should be noted that in the low-bitrate point segmentation network, a deep network structure is constructed by directly stacking three ResUnit residual unit modules. This stacking method not only helps the model capture deep features in the image, but also effectively prevents the degradation problem that occurs as the network depth increases. By fully optimizing the network parameters, this structure can achieve efficient and high-quality image reconstruction or encoding. In addition, the introduction of the ReLu activation function in each ResUnit module not only increases the nonlinear characteristics of the module, but also further enhances the expression ability of the network, thereby improving the efficiency and quality of image compression.

[0030] Based on any of the above embodiments, the image compression model is constructed by embedding a continuous adaptive rate gain module into a contextual joint autoregressive network; the continuous adaptive rate gain module is used to dynamically adjust the bit rate corresponding to the compressed image.

[0031] Specifically, in one embodiment, Figure 5It is a structural schematic diagram of the image compression model provided by the present invention, such as Figure 5 As shown in Figure 1, the model includes: main codec network, continuous adaptive rate gain unit, context joint autoregressive network, decompression module and image reconstruction module. The continuous adaptive rate gain unit includes a gain unit and an inverse gain unit. The continuous adaptive rate gain module is used to dynamically adjust the bit rate corresponding to the compressed image, and the context joint autoregressive network is used to achieve image compression. In the process of compressing the image to be compressed, the image to be compressed ( ) is input into the image compression model, and the low bit rate point segmentation network and the high bit rate point segmentation network in the main encoder of the image compression model are used to perform image encoding on the regions with different bit rate encoding parameters in the image to be compressed, thereby obtaining the corresponding low bit rate encoding features. , and high bit rate coding features . These features together constitute the variable rate coding features. Then, the variable rate coding features are input into the continuous adaptive rate gain module. This module realizes discrete variable bit rate by dynamically adjusting the bit rate setting corresponding to the compressed image. After that, the context-joint autoregressive network is used to further process the encoded image features, complete the image compression, and generate the image features to be decoded. Then, the image features to be decoded can be input into the inverse gain unit, and after decoding, the final decompressed reconstructed image is obtained. .

[0032] The image compression model provided by the embodiment of the present invention makes up for the problem of performance degradation at higher or lower bit rate points caused by the transformation of a single bit rate point model into a continuously variable bit rate model.

[0033] Based on any of the above embodiments, the step of training the image compression model includes: Acquire sample image data and an initial image compression model, wherein the initial image compression model includes an initial low bit rate point compression model and an initial high bit rate point compression model; Based on the preset training times ratio of the first initial image compression model and the sample image data, training the initial image compression model iteratively to obtain the image compression model; The first initial image compression model is the initial low bit rate point compression model, or the initial high bit rate point compression model.

[0034] Specifically, each iteration of model training will traverse all batches of data in the training set, and each batch contains batch-size images. At the beginning of the iteration, the training times ratio is preset, and the number of trained batches of the first initial image compression model is initialized.

[0035] The method provided by the embodiment of the present invention can control the ratio of training times of another bit rate point compression model by controlling the preset ratio of training times of the initial low bit rate point compression model or the initial high bit rate point compression model, and then customize the ratio of training times of compression models at different bit rate points to enable the network to select a more appropriate ratio to train the overall image compression model, so that the performance of the trained image compression model is better without wasting a large amount of computing resources.

[0036] Figure 6 FIG. 1 is one of the training process diagrams of the image compression model provided by the present invention, showing the training process of the Seg_JGRCN framework. Figure 6 As shown, at the beginning of the training phase of the image compression model, s is randomly initialized, where s corresponds to the subscript of the compression model at different discrete bit rate points. There are n discrete bit rate models in total. , it is divided into low bit rate point compression models, and the rest are high bit rate point compression models. Then, through the high and low bit rate ratio control module, based on whether the current training times of the low bit rate point compression model exceed its own preset training times, it is determined whether to train the low bit rate point. When the current training times of the low bit rate point compression model exceed its own preset training times, the high bit rate segmentation network is trained, that is, the initial high bit rate point compression model is trained. When the current training times of the low bit rate point compression model do not exceed its own preset training times, the low bit rate segmentation network is trained, that is, the initial low bit rate point compression model is trained. Finally, the main encoding and decoding network in the final image compression model is obtained through the trained low bit rate segmentation network and high bit rate segmentation network.

[0037] Based on any of the above embodiments, the method of iterating the training of the initial image compression model based on the preset training times ratio of the first initial image compression model and the sample image data to obtain the image compression model includes: Determine a current pre-trained image compression model based on a ratio of preset training times of the first initial image compression model and a comparison with a cumulative training times of the first initial image compression model; The pre-trained image compression model is trained iteratively based on the sample image data to obtain the image compression model.

[0038] Figure 7 This is the second schematic diagram of the training process of the image compression model provided by the present invention. Figure 7As shown, at the beginning, set the low bit rate point training ratio, that is, the first initial image compression model is the initial low bit rate point compression model, and the low bit rate point training ratio here is the preset training times ratio. Then, initialize the number of low bit rate point training to 0, and the number of iterations i=0. And set the total number of iterations. Randomly initialize s, s corresponds to different discrete bit rate point compression model subscripts. There are n discrete bit rate models in total. Then start to traverse the enumerated data set. At the beginning of each small batch in each iteration, a value will be randomly selected from the range of [0, n-1]. This value corresponds to the set of trade-off factors. The index is defined by different weighting factors The set composed of , is the corresponding subscript, thereby achieving the training trade-off factor The purpose of the corresponding code rate point compression model, where the trade-off factor values ​​are {0.05, 0.03, 0.018, 0.01, 0.007,0.003, 0.0018, 0.001, 0.0007, 0.0003}. After obtaining the random s, by judging Whether it is established, that is, confirm whether the model of the current batch training is a low bit rate point model. If it is a low bit rate point model, the number of low bit rate point model training is increased by one, and it is determined whether the number of low bit rate point batches trained exceeds the set ratio. If it does not exceed the low bit rate point training ratio, the model training is performed; if it exceeds the low bit rate ratio, the high bit rate point training is changed. s is reset to [0, ] If s is used to determine that the training itself is a high bit rate point, then the training is performed directly and repeatedly until all data sets of the iteration are traversed, and the iteration ends.

[0039] It should be noted that Figure 8 : is a schematic diagram of PSNR performance comparison of the high-performance variable bit rate image compression method provided by the present invention, showing the comparison of PSNR (Peak Signal-to-Noise Ratio) performance between the existing method and the variable bit rate image compression method provided by the present invention. Figure 8 As shown, this figure shows the rate-distortion results under different bit rates when PSNR is used as the evaluation indicator, especially the performance under higher and lower bit rate segments. In terms of performance results, the Seg_JGRCN framework (i.e., the variable bit rate image compression method provided by the present invention) has achieved better results than both the traditional image compression framework and the end-to-end image compression framework, especially for the performance degradation problem at higher or lower bit rate points caused by the transformation from a single bit rate model to a continuous bit rate variable model. The method provided by the present invention has also been well solved. Except for higher or lower bit rate points, the variable bit rate image compression method provided by the present invention has significantly improved the performance of each segment bit rate.

[0040] in addition, Fig. 9 This is a schematic diagram comparing the reconstructed image effects of different compression frameworks provided by the present invention, showing the reconstructed image visualization images based on kodim06 using different image compression methods, such as Fig. 9 As shown, Fig. 9 The reconstructed image effects of five different compression frameworks based on kodim06 images with a bit rate of about 0.2bpp are shown. From the reconstructed images, it can be found that the line display of the Seg_JGRCN framework proposed in the present invention based on the low bit rate model will not be confused with the image information of the similar color domain, and its details are clearer than other image compression methods, while other image compression methods will ignore small lines and areas with similar colors.

[0041] Based on any of the above embodiments, Fig.10 is a schematic diagram of the structure of a high-performance variable bit rate image compression device provided by the present invention. Fig.10 As shown, the device comprises: An acquisition unit 1010 acquires an image to be compressed; A variable rate coding unit 1020 performs variable rate coding on the image to be compressed based on a main codec network in the image compression model to obtain a variable rate coding feature; A compression unit 1030 performs image compression based on the variable bit rate coding feature to obtain a compressed image; The main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by serially connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module.

[0042] The device provided by the embodiment of the present invention divides the main codec network in the image compression model into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is mainly constructed by two Swin Transformer networks in series. Based on the main codec network in the image compression model, variable bit rate compression is implemented for the compressed image to obtain a high-quality compressed image that meets actual needs, thereby improving the performance of the variable bit rate image compression method and compensating for the problem of performance degradation at higher bit rate points caused by the transformation of a single bit rate point model into a continuously variable bit rate model.

[0043] Based on any of the above embodiments, the low bit rate point segmentation network is constructed by directly stacking multiple residual networks.

[0044] Based on any of the above embodiments, the stacked residual network is constructed by directly stacking three ResUnit residual units and adding a ReLu activation function.

[0045] Based on any of the above embodiments, the image compression model is constructed by embedding a continuous adaptive rate gain module into a contextual joint autoregressive network; The continuous adaptive bit rate gain module is used to dynamically adjust the bit rate corresponding to the compressed image.

[0046] Based on any of the above embodiments, the device further includes a training unit, and the training unit is specifically used for: Acquire sample image data and an initial image compression model, wherein the initial image compression model includes an initial low bit rate point compression model and an initial high bit rate point compression model; Based on the preset training times ratio of the first initial image compression model and the sample image data, training the initial image compression model iteratively to obtain the image compression model; The first initial image compression model is the initial low bit rate point compression model, or the initial high bit rate point compression model.

[0047] Based on any of the above embodiments, the training unit is further specifically used for: Determine a current pre-trained image compression model based on a ratio of preset training times of the first initial image compression model and a comparison with a cumulative training times of the first initial image compression model; The pre-trained image compression model is trained iteratively based on the sample image data to obtain the image compression model.

[0048] Fig.11 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.11 As shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140. The processor 1110 may call the logic instructions in the memory 1130 to execute a high-performance variable bit rate image compression method, the method comprising: obtaining an image to be compressed; performing variable bit rate encoding on the image to be compressed based on the main codec network in the image compression model to obtain a variable bit rate encoding feature; performing image compression based on the variable bit rate encoding feature to obtain a compressed image; the main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by sequentially connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module in series.

[0049] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0050] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the high-performance variable bit rate image compression method provided by the above methods, the method including: obtaining an image to be compressed; based on the main codec network in the image compression model, performing variable bit rate encoding on the image to be compressed to obtain variable bit rate coding features; compressing the image based on the variable bit rate coding features to obtain a compressed image; the main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module in series in sequence.

[0051] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the high-performance variable bit rate image compression method provided by the above-mentioned methods, the method comprising: obtaining an image to be compressed; based on a main codec network in an image compression model, performing variable bit rate encoding on the image to be compressed to obtain variable bit rate coding features; performing image compression based on the variable bit rate coding features to obtain a compressed image; the main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by sequentially connecting an embedding module, two Swin Transformer network modules, and a de-embedding feature module in series.

[0052] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0053] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0054] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A high-performance variable bit rate image compression method, characterized in that: include: Obtain the image to be compressed; Based on the main codec network in the image compression model, variable rate encoding is performed on the image to be compressed to obtain variable rate encoding features; Performing image compression based on the variable bit rate coding feature to obtain a compressed image; The main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by serially connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module.

2. The high-performance variable bit rate image compression method according to claim 1, characterized in that: The low bit rate point segmentation network is constructed by directly stacking multiple residual networks.

3. The high-performance variable bit rate image compression method according to claim 2, characterized in that: The stacked residual network is constructed by directly stacking three ResUnit residual units and adding a ReLu activation function.

4. The high-performance variable bit rate image compression method according to any one of claims 1 to 3, characterized in that: The image compression model is constructed by embedding a continuous adaptive rate gain module into a contextual joint autoregressive network; The continuous adaptive bit rate gain module is used to dynamically adjust the bit rate corresponding to the compressed image.

5. The high-performance variable bit rate image compression method according to any one of claims 1 to 3, characterized in that: The training step of the image compression model includes: Acquire sample image data and an initial image compression model, wherein the initial image compression model includes an initial low bit rate point compression model and an initial high bit rate point compression model; Based on the preset training times ratio of the first initial image compression model and the sample image data, training the initial image compression model iteratively to obtain the image compression model; The first initial image compression model is the initial low bit rate point compression model, or the initial high bit rate point compression model.

6. The high-performance variable bit rate image compression method according to claim 5, characterized in that: The method of training the initial image compression model iteratively based on the preset training times ratio of the first initial image compression model and the sample image data to obtain the image compression model includes: Determine a current pre-trained image compression model based on a ratio of preset training times of the first initial image compression model and a comparison with a cumulative training times of the first initial image compression model; The pre-trained image compression model is trained iteratively based on the sample image data to obtain the image compression model.

7. A high-performance variable bit rate image compression device, characterized in that: include: An acquisition unit, which acquires an image to be compressed; A variable rate coding unit, based on a main codec network in an image compression model, performs variable rate coding on the image to be compressed to obtain a variable rate coding feature; A compression unit, which performs image compression based on the variable bit rate coding feature to obtain a compressed image; The main codec network is divided into a low bit rate point segmentation network and a high bit rate point segmentation network; the high bit rate point segmentation network is constructed by serially connecting an embedding module, two Swin Transformer network modules and a de-embedding feature module.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the high-performance variable bit rate image compression method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the high-performance variable bit rate image compression method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the high-performance variable bit rate image compression method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Multi-level image compression method using Transform

    CN113709455A

  • Multi-rate neural image compression method and apparatus with stackable nested model structure

    CN114450938A

  • Variable code rate image compression method and system

    CN115439567A

  • Variable code rate image compression method, system and device, terminal and storage medium

    CN115988215A

  • Video encoding method and apparatus, electronic device and storage medium

    WO2024124911A1