Cross-platform image compression method, system, device and storage medium

By constructing a cross-platform image compression network and using a selection prediction network to replace traversal operations, the problem of inconsistent decoding of deep learning algorithms on different platforms is solved, and cross-platform decoding is simplified and its efficiency is improved.

CN115604467BActive Publication Date: 2025-11-28SHANGHAI SHUANGSHEN INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211070555.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2025-11-28
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

When deep learning algorithms are deployed on different platforms, it is difficult to unify the framework, which leads to inconsistent cross-platform decoding and hinders successful decoding.

Method used

A cross-platform image compression network is constructed, including an encoding network, a quantization module, a selection prediction network, and a decoding network. The probability distribution parameters are optimized through two training phases, and the selection prediction network is used to replace the traversal operation to achieve cross-platform decoding.

Benefits of technology

It solves the problem that deep learning end-to-end image compression networks cannot be cross-platform, simplifies the process, enables direct cross-platform decoding, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115604467B_ABST
    Figure CN115604467B_ABST
Patent Text Reader

Abstract

The application discloses a cross-platform image compression method, system, device and storage medium, proposes an entropy classification prediction technology, and replaces an existing convolution entropy generation network with a selection prediction network. On the one hand, the problem that a deep learning end-to-end image compression network cannot cross platforms is solved. On the other hand, the process of an existing end-to-end image compression mode is also simplified, and two-stage decoding is no longer needed, and feature coding and decoding can be directly performed through prediction information entropy. In addition, the application can be generalized and used on any type of image compression network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image compression technology, and in particular to a cross-platform image compression method, system, device and storage medium. BACKGROUND

[0002] With the rapid development of computer technology and network communication technology, real-time visual communication, multimedia communication, network television, video monitoring and other services are attracting more and more attention, and image compression technology can reduce the amount of data during image transmission.

[0003] At present, with the rapid development of end-to-end deep learning compression technology, a major disadvantage begins to appear. Because in the actual use process, the compressed image will be propagated to different platforms for decoding, therefore, cross-platform decoding is necessary. However, the framework used when deploying the deep learning algorithm on different platforms is difficult to unify, and even if the same calculation standard is defined, due to hardware differences and floating point operation sequence differences, the results of two operations will be different, and even the results of two runs on the same platform are inconsistent, which makes the probability prediction encoding and decoding inconsistent, hindering successful decoding. SUMMARY

[0004] The purpose of the present application is to provide a cross-platform image compression method, system, device and storage medium, which can realize cross-platform decoding and can be used on any type of image compression network.

[0005] The purpose of the present application is achieved by the following technical solutions:

[0006] A cross-platform image compression method, comprising:

[0007] A cross-platform image compression network is constructed, which includes an encoding network, a quantization module, a selection prediction network and a decoding network;

[0008] The training stage includes two stages; in the first training stage, a plurality of sets of probability distribution parameters are initialized to form an initial probability table, the probability distribution parameters in the probability table are used to estimate the probability of the quantized features obtained by processing the encoding network and the quantization module, and then the decoding network is used to obtain a reconstructed image, the first stage training loss function is constructed by combining the reconstructed image and the probability table, and the training is performed to obtain the trained encoding network and decoding network, and the final probability table is obtained; in the second training stage, the encoding features output by the trained encoding network are used to determine the selected probability distribution parameters by traversing the final probability table, and the selected probability distribution parameters are used to supervise the probability distribution parameters predicted by the selection prediction network, the second stage training loss function is constructed, and the trained selection prediction network is obtained.

[0009] In the testing stage, for an image to be compressed, corresponding encoding features are obtained by using the trained encoding network, the probability distribution parameters to be selected by the encoding features are predicted from the final probability table by using the trained selection prediction network, the indexes corresponding to the probability distribution parameters to be selected are recorded and saved; the encoding features are probabilistically estimated by using the predicted probability distribution parameters, and then the reconstructed image is obtained by combining the quantization module, the saved indexes corresponding to the predicted probability distribution parameters, and the decoding network.

[0010] A cross-platform image compression system comprises:

[0011] A network construction unit constructs a cross-platform image compression network, and the cross-platform image compression network comprises an encoding network, a quantization module, a selection prediction network, and a decoding network.

[0012] A training unit is used in a training stage, and the training stage comprises two stages. In the first training stage, a plurality of sets of probability distribution parameters are initialized to form an initial probability table, the quantized features obtained by processing the features by using the encoding network and the quantization module are probabilistically estimated by using the probability distribution parameters in the probability table, and then the reconstructed image is obtained by using the decoding network. The first-stage training loss function is constructed by combining the reconstructed image and the probability table, and the trained encoding network and the decoding network are obtained, and the final probability table is obtained. In the second training stage, for the encoding features output by the trained encoding network, the selected probability distribution parameters are determined by traversing the final probability table, and the selected probability distribution parameters are used to supervise the probability distribution parameters predicted by the selection prediction network. The second-stage training loss function is constructed to train the trained selection prediction network.

[0013] A testing unit is used in a testing stage, and the testing stage comprises the following steps. For an image to be compressed, corresponding encoding features are obtained by using the trained encoding network, the probability distribution parameters to be selected by the encoding features are predicted from the final probability table by using the trained selection prediction network, the indexes corresponding to the probability distribution parameters to be selected are recorded and saved; the encoding features are quantized by using the quantization module to obtain quantized features, the quantized features are probabilistically estimated by using the probability distribution parameters to be selected, and then the reconstructed image is obtained by combining the saved indexes corresponding to the probability distribution parameters to be selected and the decoding network.

[0014] A processing device comprises one or more processors, and a memory for storing one or more programs.

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the foregoing method.

[0016] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the foregoing method is implemented.

[0017] As can be seen from the technical solutions provided by the above-mentioned application, the entropy classification prediction technology is proposed, and the existing convolution entropy generation network is replaced by a selection prediction network. On the one hand, the problem that the deep learning end-to-end image compression network cannot be cross-platform is solved. On the other hand, the process of the existing end-to-end image compression method is also simplified, and the two-stage decoding is no longer needed, and the feature can be directly encoded and decoded through the predicted information entropy. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0019] Figure 1 A flow chart of a cross-platform image compression method provided by an embodiment of the present application;

[0020] Figure 2 A schematic diagram of a cross-platform image compression network provided by an embodiment of the present application;

[0021] Figure 3 A schematic diagram of a cross-platform image compression system provided by an embodiment of the present application;

[0022] Figure 4 A schematic diagram of a processing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0024] Firstly, the terms possibly used in the present text are explained as follows:

[0025] The terms "include", "contain", "have", "possess" or other similar semantic descriptions should be interpreted as non-exclusive inclusion. For example: including a technical feature element (such as raw materials, components, ingredients, carriers, dosage forms, materials, sizes, parts, components, mechanisms, devices, steps, processes, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or articles, etc.), should be interpreted as not only including the explicitly listed technical feature element, but also including other technical feature elements not explicitly listed but known in the art.

[0026] The cross-platform image compression method, system, device and storage medium provided by the present application are described in detail below. The content not described in detail in the embodiments of the present application belongs to the prior art known to those skilled in the art. If no specific conditions are specified in the embodiments of the present application, the conventional conditions or the conditions recommended by the manufacturer are used. If no manufacturer of the reagent or instrument used in the embodiments of the present application is specified, it is a conventional product that can be obtained by market purchase.

[0027] Embodiment one

[0028] The present application provides a cross-platform image compression method, as shown in the following figure, which mainly includes the following steps: Figure 1

[0029] Step 1, constructing a cross-platform image compression network.

[0030] In the embodiments of the present application, the cross-platform image compression network includes an encoding network, a quantization module, a selection prediction network and a decoding network, as shown in the following figure, which shows the main structure of the cross-platform image compression network. Figure 2

[0031] Step 2, network training.

[0032] In the embodiments of the present application, two training stages are set.

[0033] 1. First training stage.

[0034] In the first training stage, a plurality of sets of probability distribution parameters are initialized to form an initial probability table, the probability distribution parameters in the probability table are used to estimate the probability of the quantized features obtained by processing the encoding network and the quantization module, and then the reconstructed image is obtained through the decoding network, and the reconstructed image and the probability estimation result are used to construct the first stage training loss function for training, to obtain the trained encoding network and decoding network, and to obtain the final probability table. Specifically:

[0035] (1) The input original image obtains the encoding features through the encoding network.

[0036] In the embodiments of the present application, the size of the original image is set to HxWx3, wherein H and W are the width and height of the original image, respectively, and 3 is the number of channels (for example, RGB three channels); the size of the encoding features is set to (H / s)x(W / s)x C, C is the number of channels of the encoding features, s is the downsampling multiple of the encoding network, for example, s is set to 16.

[0037] ​​(2) Different from the prior art, the application no longer needs a super parameter probability prediction module to estimate parameters (generally mean and variance of Gaussian distribution / Laplacian distribution) of a probability distribution through a convolution network (involving floating point operation), but directly initializes multiple sets of probability distribution parameters to form an initial probability table, and the size of the initial probability table is NxCxk, wherein N is the number of probability distributions, and k is the number of parameters required by a function of the predicted probability distribution.

[0038] Taking a Laplace distribution as an example:

[0039]

[0040] The parameters required for predicting the probability distribution are mu and sigma (mean and variance), and k=2.

[0041] The Laplace distribution is a conventional probability distribution, and the predicted probability distribution is obtained by predicting different mu and sigma, and then arithmetic coding is performed, wherein y in the above formula represents a feature to be coded, and y i represents the i-th feature to be coded.

[0042] (3) All different probability distribution parameters in the initial probability table are traversed (floop) for each position feature element of the coded feature, the probability distribution parameter that minimizes the information entropy is found, a set of minimum probability distribution parameters corresponding to the coded feature is obtained, the number is (H / s) x (W / s) x Cxk, and the set of minimum probability distribution parameters is used for probability estimation of the coded feature.

[0043] In the embodiment of the application, the size of the coded feature is (H / s) x (W / s) x C, each position refers to (H / s) x (W / s) positions, and the length of each position is C, that is, each position contains C elements. The size of the initial probability table is NxCxk, that is, there are N groups of probability distribution parameters with a length of C, each position selects one from the N groups of Cxk tables, that is, each position has N choices, and a group of Cxk with the minimum probability estimation is selected, therefore, the number of the selected group of minimum probability distribution parameters is (H / s) x (W / s) x Cxk, and in general cases, (H / s) x (W / s) is greater than C, and therefore a large number of different positions select the same group of parameters.

[0044] In the embodiment of the application, for the length-C feature in each position, the N groups of probability distribution parameters in the table are traversed (floop), the corresponding probability distribution parameter with the minimum information entropy is found, and the corresponding index in the initial probability table is recorded; each position corresponds to an index, therefore, the length of the index is (H / s) x (H / s), and the range of the index is [0, N-1].

[0045] The code feature of the encoding network output is a floating point number, which must be quantized and stored, therefore, the encoding feature is quantized by the quantization module to obtain quantized features, and then the probability distribution parameters and the quantized features are used for probability estimation.

[0046] (4) Entropy encoding and entropy decoding are performed in combination with the probability estimation result, and a reconstructed image is obtained through the decoding network.

[0047] In the embodiment of the application, the aforementioned step uses a set of minimum prediction parameters obtained by traversal to perform probability estimation on the quantized features to obtain information entropy, at this time, actual encoding can be performed according to the information entropy through arithmetic encoding (one of entropy encoding), and then the arithmetic decoding (one of entropy decoding) is performed and input to the decoding network.

[0048] As shown in Figure 2 , the quantized features are arithmetically encoded into a binary file for storage. During decoding, arithmetic decoding is performed, and since this step is lossless, the features after arithmetic decoding are the quantized features, which are input to the decoding network to obtain a reconstructed image. Figure 2 The part of arithmetic decoding is omitted in the reconstructed image, and the quantization module directly points to the decoding network.

[0049] (5) The first stage training loss function is constructed in combination with the reconstructed image and the probability table to train the cross-platform image compression network. The first stage training loss function is represented as: Loss = R + λD, wherein λ is a parameter for balancing the image loss and the code word required for storage, R represents the code word size required for storing the quantized encoding features according to the probability table, and D is the image loss calculated using the reconstructed image and the original image, which can be changed according to the specific task of compression, and is generally MSE / MAE / MSSSIM (mean square error / mean absolute error / multi-scale structural similarity index).

[0050] In the embodiment of the application, the loss function of the first stage training not only optimizes the parameters of the encoding network and the decoding network in the cross-platform image compression network, but also optimizes the probability table. The size of the probability table is fixed and unchanged, and the probability distribution parameters are updated. The optimized probability table is referred to as the final probability table.

[0051] In the embodiment of the application, the encoding network, the quantization module and the decoding network can be realized by conventional techniques, and the application will not be described in detail; at the same time, the process of optimizing the parameters of the encoding network and the decoding network through the loss function can also be realized by conventional techniques, and therefore, the application will not be described in detail.

[0052] 2. Second training stage.

[0053] Considering that the calculation process needs to traverse the entire probability table for each position of the encoded feature element to find the set of parameters with the minimum entropy, the matrix size for entropy calculation is N x (H / s) x (W / s) x C, the resource requirement for calculation is large, and the acceleration of the elementwise operation (element-by-element calculation operation) is not ideal for general platforms, which greatly reduces the network performance, therefore, in the embodiment of the present application, after the first training stage is completed, a classification network (selection prediction network) is trained through the second training stage, and the feature element position is corresponded to the position of the probability table by using the network. In the second training stage, for the encoded feature output by the trained encoding network, the selected probability distribution parameters are determined by traversing the final probability table, and the probability distribution parameters predicted by the selection prediction network are supervised based on the selected probability distribution parameters, a second training loss function is constructed for training, and a trained selection prediction network is obtained. Specifically:

[0054] (1) The selected probability distribution parameters of the feature of each position with a length of C in the final probability table are determined by traversing the final probability table (in the same way as the first training stage), and finally, the probability distribution parameters corresponding to the entire encoded feature are selected, and the corresponding index is recorded as label (tag). Similar to the first stage, the recorded index includes the index corresponding to each position, therefore, the size of the label is (H / s) x (W / s), and the range of the index corresponding to each position is 0- N-1, N is the number of probability distributions.

[0055] (2) The selection prediction network is set, the input is the unquantized feature (that is, the encoded feature output by the trained encoding network), and the output is the predicted index. The probability distribution parameters corresponding to the encoded feature are predicted by using the selection prediction network, and the index corresponding to the predicted probability distribution parameters is recorded as index.

[0056] In the embodiment of the present application, the selection prediction network can be realized by using a conventional classification network, which is not described in detail in the present application. According to the number of probability tables, the larger N is, the more complex the classification task is, and the more complex the classification network is.

[0057] In the embodiment of the present application, the selection prediction network is a network to be trained, and the index (prediction result) predicted by the selection prediction network is supervised by using the label as a supervision signal. Since the label is obtained by traversing the table to obtain the actual result, the selection prediction network learns the label, that is, the actual label is predicted.

[0058] In the embodiment of the present application, the selection prediction network is trained so that the trained selection prediction network can directly predict the index corresponding to the probability distribution parameter without traversal operation in actual inference, even if there is a slight deviation between the prediction result and the actual result (i.e. suboptimal solution), but the work efficiency can be greatly improved.

[0059] (3) Calculate the second stage training loss function using index and label.

[0060] In the embodiment of the present application, the cross-entropy loss function is used, and the second stage training loss function is represented as:

[0061]

[0062] where (H / s) x (W / s) is the size of label (i.e. the number of position of encoded features, the length of each position is C, one position selects one index, and the index range is 0- N-1), s is the down-sampling multiple of the encoding network, H and W are the width and height of the original image respectively, j represents the position index in the encoded feature, p represents the real distribution, i.e. label, and q represents the predicted distribution, which is estimated by the output index of the selection prediction network. j , q j respectively represent the corresponding distribution at the position index j.

[0063] (4) Continuously update the selection prediction network so that the predicted information entropy (i.e. the information entropy obtained by using the probability distribution parameter corresponding to the index to estimate the probability of the encoded feature) and the minimum information entropy obtained by floop (i.e. the information entropy obtained by using the probability distribution parameter corresponding to the label to estimate the probability of the encoded feature) are continuously close to each other.

[0064] The actual test shows that for the selection prediction network realized by any classification network, when the IOU (Intersection over Union) value of the network reaches 0.5-0.6, the predicted information entropy is basically the same as the minimum information entropy. In the training, the termination condition of the training can be designed by using the value of IOU, and generally speaking, the higher the value of IOU is, the better. However, when the value of IOU is 0.5-0.6, even if there is a gap between index and label, the predicted information entropy is basically the same as the minimum information entropy. Based on the above introduction of principle, the way of introducing the selection prediction network to predict the probability distribution parameter can be understood as an entropy classification prediction technology.

[0065] The main processes of the two training stages are introduced above, and the principles of the two training stages are described as follows: (1) The first training stage introduces a probability table, which is actually data of N sets of probability distribution parameters. Each set of probability distribution parameters is numbered. For each position of the encoding feature, the estimated entropy is calculated for each probability distribution parameter, and the probability distribution parameter corresponding to the minimum estimated entropy is selected. The corresponding index is recorded. Since the probability distribution parameters used at the encoding and decoding ends are the same, the recorded index is transmitted to the decoding end. (2) The core of the second stage is to remove the traversal operation, because each position needs to be calculated N times, so the traversal operation is extremely time-consuming. The second stage introduces a selection prediction network to predict the actual result obtained by the traversal operation.

[0066] After the above two training stages, the traversal operation can be directly replaced by the selection prediction network in the actual encoding process. The prediction result (index) output by the selection prediction network is stored losslessly during encoding, and the corresponding probability distribution parameter of the probability table is selected according to the index for decoding.

[0067] Step 3, network testing.

[0068] In the embodiment of the application,

[0069] In the test stage, for the image to be compressed, the corresponding encoding feature is obtained through the trained encoding network, the probability distribution parameter to be selected by the encoding feature is predicted from the final probability table by the trained selection prediction network, the index corresponding to the probability distribution parameter to be selected is recorded and saved (the probability table is fixed after being updated in the first stage, and the content is no longer updated, so the predicted probability distribution parameter is actually the selection of the existing probability table, and different selections correspond to different probability distribution parameters); the probability of the encoding feature is estimated by using the probability distribution parameter to be selected in combination with the quantization module, and the reconstructed image is obtained by combining the saved index corresponding to the probability distribution parameter to be selected and the decoding network. Specifically: (1) the encoding part.

[0070] The input image to be compressed is obtained by the trained encoding network, and the encoding feature is input into the trained selection prediction network. The probability distribution parameter to be selected for each position in the encoding feature is predicted from the final probability table by the trained selection prediction network, and the index corresponding to the probability distribution parameter to be selected is recorded and saved.

[0071] The quantized features are obtained by quantizing the encoded features through a quantization module, the predicted information entropy is obtained by using the selected probability distribution parameters to estimate the probability of the quantized features, and the encoding code stream is obtained through entropy coding.

[0072] (2) Decoding part.

[0073] Since the probability distribution parameters used by the decoding part are determined according to the index corresponding to the predicted probability distribution parameters, the corresponding information entropy is consistent on any platform, and therefore the problem of deep learning end-to-end image compression network being unable to cross platforms can be solved.

[0074] The encoding code stream is entropy decoded according to the index corresponding to the selected probability distribution parameters, and since lossless entropy coding and lossless entropy decoding are adopted, the features obtained through entropy decoding are the quantized encoded features (output of the quantization module), which are then input into the trained decoding network to obtain the reconstructed image.

[0075] The above-mentioned scheme of the embodiment of the present application proposes an entropy classification prediction technology, and the existing convolution entropy generation network is replaced by a selection prediction network, which on the one hand solves the problem of deep learning end-to-end image compression network being unable to cross platforms, and on the other hand simplifies the process of the existing end-to-end image compression method, and the two-stage decoding is no longer needed, and the features can be directly encoded and decoded through the predicted information entropy.

[0076] Embodiment two

[0077] The present application also provides a cross-platform image compression system, which is mainly realized based on the method provided in the foregoing embodiments, as shown in the figure, the system mainly includes: Figure 3

[0078] A network construction unit is configured to construct a cross-platform image compression network, and the cross-platform image compression network includes an encoding network, a quantization module, a selection prediction network, and a decoding network.

[0079] ​The training unit is used in the training phase, which consists of two stages. In the first training stage, multiple sets of probability distribution parameters are initialized to form an initial probability table. The probability distribution parameters in the probability table are used to estimate the probability of the quantized features obtained after processing by the encoding network and quantization module. Then, the reconstructed image is obtained through the decoding network. The first-stage training loss function is constructed by combining the reconstructed image and the probability table for training, resulting in the trained encoding network and decoding network, and the final probability table. In the second training stage, for the encoded features output by the trained encoding network, the selected probability distribution parameters are determined by traversing the final probability table. These parameters are then used to supervise the probability distribution parameters predicted by the selection prediction network. The second-stage training loss function is constructed for training, resulting in the trained selection prediction network.

[0080] The testing unit is used in the testing phase, which includes: for the image to be compressed, obtaining the corresponding coding features through the trained coding network, predicting the probability distribution parameters to be selected for the coding features from the final probability table by the trained selection prediction network, recording and saving the index corresponding to the selected probability distribution parameters; quantizing the coding features through the quantization module to obtain the quantized features, estimating the probability of the quantized features using the selected probability distribution parameters, and then combining the saved index corresponding to the selected probability distribution parameters with the decoding network to obtain the reconstructed image.

[0081] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.

[0082] Example 3

[0083] The present invention also provides a processing device, such as Figure 4 As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the foregoing embodiments.

[0084] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.

[0085] In this embodiment of the invention, the specific types of the memory, input device, and output device are not limited; for example:

[0086] The input device can be a touch screen, an image acquisition device, a physical button, or a mouse, etc.

[0087] The output device can be a display terminal.

[0088] The memory can be a random access memory (RAM), or a non-volatile memory, such as a disk memory.

[0089] Embodiment Four

[0090] The application further provides a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method provided by the foregoing embodiments is realized.

[0091] The readable storage medium in the embodiments of the application as a computer readable storage medium can be arranged in the foregoing processing device, for example, as a memory in the processing device. In addition, the readable storage medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, and various media that can store program codes.

[0092] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered in the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. A cross-platform image compression method, characterized in that, include: A cross-platform image compression network is constructed, which includes: an encoding network, a quantization module, a selection prediction network, and a decoding network; The training phase comprises two stages. In the first stage, multiple sets of probability distribution parameters are initialized to form an initial probability table. The probability distribution parameters in the probability table are used to estimate the probability of the quantized features obtained after processing by the encoding network and quantization module. Then, the reconstructed image is obtained through the decoding network. The first-stage training loss function is constructed by combining the reconstructed image and the probability table for training. The parameters of the encoding and decoding networks, as well as the probability distribution parameters in the probability table, are optimized to obtain the trained encoding and decoding networks and the final probability table. Specifically, the input original image is encoded by the encoding network to obtain encoded features. For each feature element at each position of the encoded feature, all different probability distribution parameters are traversed in the initial probability table to find the probability distribution parameters that minimize the information entropy. A set of minimum probability distribution parameters corresponding to the encoded feature is obtained, and the probability of the encoded feature is estimated using this set of minimum probability distribution parameters. In the second stage, for the encoded features output by the trained encoding network, the selected probability distribution parameters are determined by traversing the final probability table. These parameters are then used to supervise the probability distribution parameters predicted by the selection prediction network. The second-stage training loss function is constructed for training to obtain the trained selection prediction network. During the testing phase, for the image to be compressed, the corresponding coding features are obtained through the trained coding network. The trained selection prediction network predicts the probability distribution parameters to be selected for the coding features from the final probability table, records and saves the index corresponding to the selected probability distribution parameters. The probability of the coding features is estimated using the predicted probability distribution parameters, and then the image is reconstructed by combining the quantization module, the saved index corresponding to the predicted probability distribution parameters, and the decoding network.

2. The cross-platform image compression method according to claim 1, characterized in that, The step of using the probability distribution parameters in the probability table to estimate the probability of the quantized features obtained after processing by the encoding network and quantization module, and then obtaining the reconstructed image through the decoding network includes: The input raw image is processed by an encoding network to obtain encoded features. For each position of the encoded feature, all different probability distribution parameters are traversed in the initial probability table to find the probability distribution parameters that minimize the information entropy, thus obtaining a set of minimum probability distribution parameters corresponding to the encoded feature. The encoded features are quantized by the quantization module to obtain quantized features, and the probability of the quantized features is estimated using a set of minimum probability distribution parameters. The quantized features are entropy encoded and entropy decoded by combining the probability estimation results, and then the reconstructed image is obtained through a decoding network.

3. The cross-platform image compression method according to claim 1, characterized in that, The initial probability table has a size of N×C×k, where C is the number of channels for encoding features, N is the number of probability distributions, and k is the number of parameters required for the function to predict the probability distribution.

4. The cross-platform image compression method according to claim 1, characterized in that, The step of combining the reconstructed image and the probability table to construct the first-stage training loss function for training includes: The loss function for the first stage of training is expressed as: Loss=R+λD Where R represents the codeword size required to store the quantized encoded features based on the probability table, which is determined by probability estimation; D is the image loss calculated using the reconstructed image and the original image; and λ is the balance parameter. The parameters of the encoding and decoding networks are optimized using the first-stage training loss function, and the probability distribution parameters in the initial probability are also optimized.

5. The cross-platform image compression method according to claim 1, characterized in that, The selection of probability distribution parameters is determined by traversing the final probability table. This includes: determining the probability distribution parameters selected for each position of the encoded feature in the final probability table; selecting the probability distribution parameters corresponding to the entire encoded feature; recording the corresponding index as the label; the recorded index contains the index corresponding to each position; the label size is (H / s)×(W / s); the range of the index corresponding to each position is 0 to N-1; N is the number of probability distributions; s is the downsampling factor of the encoding network; and H and W are the width and height of the original image, respectively.

6. The cross-platform image compression method according to claim 5, characterized in that, The step of supervising the probability distribution parameters predicted by the selected prediction network and constructing a second-stage training loss function for training includes: The probability distribution parameters corresponding to the coding features are predicted using the selected prediction network, and the index corresponding to the predicted probability distribution parameters is recorded as index; The label is used as a supervision signal to supervise the index predicted by the selection prediction network. The second-stage training loss function is constructed using the cross-entropy loss function, as follows: Where (H / s)×(W / s) is the size of the label, i.e., the number of locations of the encoded features; s is the downsampling factor of the encoding network; H and W are the width and height of the original image, respectively; j represents the location index in the encoded features; p represents the true distribution, i.e., the label; and q represents the predicted distribution, estimated by selecting the output index of the prediction network. j q j These represent the corresponding distributions at position index j.

7. The cross-platform image compression method according to claim 1, characterized in that, The steps of obtaining corresponding encoded features through a trained encoding network, predicting the probability distribution parameters to be selected for the encoded features from the final probability table using a trained selection prediction network, recording and saving the index corresponding to the selected probability distribution parameters, performing probability estimation on the encoded features using the predicted probability distribution parameters, and then combining the quantization module, the saved index corresponding to the predicted probability distribution parameters, and the decoding network to obtain the reconstructed image include: Encoding section: The input image to be compressed is trained by an encoding network to obtain encoded features. The encoded features are then input into a trained selection prediction network. The trained selection prediction network predicts the probability distribution parameter to be selected at each position in the encoded features from the final probability table, records and saves the index corresponding to the selected probability distribution parameter. After the encoded features are quantized by the quantization module, the quantized features are obtained. The probability of the quantized features is then estimated using the selected probability distribution parameter to obtain the predicted information entropy. Finally, entropy encoding is used to obtain the encoded bitstream. Decoding section: The encoded bitstream is entropy decoded according to the index corresponding to the selected probability distribution parameters, and then input into the trained decoding network to obtain the reconstructed image.

8. A cross-platform image compression system, characterized in that, Based on the method described in any one of claims 1 to 7, the system comprises: The network construction unit builds a cross-platform image compression network, which includes: an encoding network, a quantization module, a selection prediction network, and a decoding network. The training unit is used in the training phase, which consists of two stages. In the first training stage, multiple sets of probability distribution parameters are initialized to form an initial probability table. The probability distribution parameters in the probability table are used to estimate the probability of the quantized features obtained after processing by the encoding network and quantization module. Then, the reconstructed image is obtained through the decoding network. The first-stage training loss function is constructed by combining the reconstructed image and the probability table for training, resulting in the trained encoding network and decoding network, and the final probability table. In the second training stage, for the encoded features output by the trained encoding network, the selected probability distribution parameters are determined by traversing the final probability table. These parameters are then used to supervise the probability distribution parameters predicted by the selection prediction network. The second-stage training loss function is constructed for training, resulting in the trained selection prediction network. The testing unit is used in the testing phase, which includes: for the image to be compressed, obtaining the corresponding coding features through the trained coding network, predicting the probability distribution parameters to be selected for the coding features from the final probability table by the trained selection prediction network, recording and saving the index corresponding to the selected probability distribution parameters; quantizing the coding features through the quantization module to obtain the quantized features, estimating the probability of the quantized features using the selected probability distribution parameters, and then combining the saved index corresponding to the selected probability distribution parameters with the decoding network to obtain the reconstructed image.

9. A processing device, characterized in that, include: One or more processors; Memory, used to store one or more programs; Wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in any one of claims 1 to 7.

10. A readable storage medium storing a computer program, characterized in that, When a computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Computation apparatus and compression method

    JP2022127884A