A high compression ratio image compression method based on optimal transmission mapping

By employing an image compression method based on optimal transport mapping and training an image compression model using generative adversarial learning or diffusion models, the problem of image distortion under high compression ratios is solved, achieving high-quality and efficient image compression applicable to multiple application areas and image types.

CN119110084BActive Publication Date: 2026-06-09SHANGHAI INST FOR ADVANCED STUDY OF ZHEJIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI INST FOR ADVANCED STUDY OF ZHEJIANG UNIV
Filing Date
2024-08-30
Publication Date
2026-06-09

Smart Images

  • Figure CN119110084B_ABST
    Figure CN119110084B_ABST
Patent Text Reader

Abstract

The application discloses a high-compression-ratio image compression method based on optimal transport mapping, which is suitable for application scenarios such as network transmission, image storage and image transmission, and can significantly improve the image transmission efficiency and save network bandwidth and storage resources. The application can be compressed based on generative adversarial learning or diffusion model, the former uses generative adversarial learning to train the image compression model based on optimal transport mapping. The model comprises a feature extraction layer, a mapping layer, a quantization encoding layer and a decoding reconstruction layer. The mapping layer realizes the mapping and optimization of image features through optimal transport mapping based on convex mapping; the image compression model of the latter also comprises a feature extraction layer, a mapping layer, a quantization encoding layer and a decoding reconstruction layer, the feature extraction layer is responsible for encoding the preprocessed image into a low-dimensional feature representation, through the denoising network of the diffusion model, the quantized features are restored to image features, and they are decoded into high-quality compressed images close to the original images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology, and in particular relates to a high compression ratio image compression method based on optimal transport mapping. Background Technology

[0002] Image compression is a key technology used to reduce the size of image files, saving storage space and lowering transmission costs. Common image compression methods include lossy compression and lossless compression. Lossy compression achieves a higher compression ratio by sacrificing some image quality, while lossless compression maintains the integrity of the image but has a relatively lower compression ratio.

[0003] The development of high-compression-ratio image compression methods aims to achieve higher compression ratios, i.e., reducing image file size while maintaining image quality. These methods improve compression ratios by optimizing coding algorithms, data compression techniques, or image transformations, utilizing redundant information in the image, or performing appropriate transformations. The research and application of high-compression-ratio image compression methods are of great significance in fields such as digital image processing, computer vision, and image transmission.

[0004] Rate-distortion optimization (RDBDM) is a crucial problem in image compression. Given a compression ratio, RDBDM aims to minimize image distortion after compression by optimizing the coding scheme or algorithm. Distortion can be understood as a loss of image quality; therefore, the goal of RDBDM is to reduce image distortion while maintaining the required compression ratio. This involves research into image quality assessment and optimization algorithms to balance the trade-off between compression ratio and image quality.

[0005] In today's information age, the generation and transmission of images have become increasingly common and frequent. From digital photography to medical imaging, from video transmission to social media sharing, the demand for image compression is becoming more and more urgent. Traditional compression methods have achieved certain successes, but with the rise of high-resolution images and large-scale image data, the demand for higher compression rates and better image quality is also constantly growing.

[0006] Based on the aforementioned demands for higher compression ratios and better image quality, existing technologies still have the following technical problems:

[0007] [1] Distortion problem: Traditional image compression methods such as JPEG introduce significant distortion at high compression rates, especially in terms of preserving details and edges. This distortion is unacceptable for certain applications (such as medical imaging and satellite imagery). Therefore, the technical problem to be solved by this invention is how to achieve a high compression rate while reducing the degree of image distortion and improving image quality.

[0008] [2] Trade-off between compression ratio and image quality: Existing image compression methods usually involve a trade-off between compression ratio and image quality. Higher compression ratios are often accompanied by lower image quality, while better image quality may sacrifice some compression ratio. The technical problem to be solved by this invention is how to maintain good image quality while achieving a high compression ratio, so as to achieve a high-quality image compression effect.

[0009] [3] Processing speed and computational complexity: Some existing image compression methods may require complex calculations and a large amount of computing resources, resulting in long compression times, which is not conducive to real-time applications or large-scale image processing. Therefore, the technical problem to be solved by this invention is how to improve the processing speed of image compression and reduce computational complexity to meet the needs of practical applications.

[0010] [4] Applicability to different application areas: Existing image compression methods have different applicability in different application areas. Some methods may perform well in specific fields or for specific types of images, but perform poorly in other fields or for different types of images. The technical problem to be solved by this invention is how to design a general high compression ratio image compression method that is applicable to multiple application areas and various types of images. Summary of the Invention

[0011] The purpose of this application is to provide a high compression ratio image compression method based on optimal transport mapping to solve the above-mentioned problems in related technologies.

[0012] According to a first aspect of the embodiments of this application, a high compression ratio image compression method based on optimal transfer mapping is provided, comprising:

[0013] Obtain the original image to be compressed and preprocess the original image;

[0014] Based on the preprocessed original image, a generative adversarial learning or diffusion model is used to train an image compression model based on optimal transport mapping. The image compression model based on optimal transport mapping includes a feature extraction layer, a mapping layer, a quantization coding layer, and a decoding and reconstruction layer. The mapping layer uses optimal transport mapping based on convex mapping to implement feature mapping.

[0015] The image to be compressed is obtained, and then compressed using a trained image compression model.

[0016] Furthermore, the preprocessing includes denoising, image enhancement, and color space conversion.

[0017] Furthermore, in the image compression model based on optimal transport mapping:

[0018] The feature extraction layer is used to extract features from the preprocessed image;

[0019] The mapping layer is used to map the extracted image features onto the feature space distribution based on the optimal transport mapping;

[0020] The quantization and encoding layer is used to quantize and encode the mapped features;

[0021] The decoding and reconstruction layer is used to decode and reconstruct the encoded features to obtain a compressed image.

[0022] Furthermore, in the mapping layer, a transfer matrix is ​​constructed using convex mapping, and the transfer matrix is ​​optimized, wherein the optimization problem is:

[0023]

[0024] Where λ is the regularization parameter, c(x,y) represents the transmission cost from point x to point y, x and y are points in the source feature space and the target feature space, respectively, T(x,y) represents the transmission amount from x to y, and N and M represent the number of samples in the source distribution and the target distribution, respectively.

[0025] Furthermore, in the decoding and reconstruction layer, decoding and reconstruction are achieved through a denoising network of a diffusion model or by performing the inverse operation of a mapping layer and a quantization encoding layer.

[0026] Furthermore, the training process of the image compression model based on the optimal transport mapping includes:

[0027] S21: Construct the initial transmission matrix;

[0028] S22: The feature extraction layer extracts features from the preprocessed original image. The mapping layer optimizes the transfer matrix using the extracted features and maps the features using the optimized optimal transfer matrix. The quantization and encoding layer quantizes and encodes the mapped features using the optimized optimal transfer matrix to obtain a compressed image feature representation. The decoding and reconstruction layer decodes and reconstructs the compressed image feature representation to obtain a compressed image.

[0029] S23: Based on the preprocessed original image of the compressed image and the response, calculate the training loss and update the parameters of the image compression model through the backpropagation algorithm;

[0030] S24: Repeat steps S22-S23 until the model converges.

[0031] Furthermore, in step S23, if the decoding and reconstruction layer adopts the inverse operation of the mapping layer and the quantization coding layer, it is trained by generative adversarial learning. The generator, i.e., the image compression model, is trained adversarially with the discriminator. The adversarial loss is used to calculate the training loss, and the backpropagation algorithm is used to update the model parameters.

[0032] If the decoding and reconstruction layer uses a diffusion model denoising network, then noise is added to the compressed image feature representation through the forward process of the diffusion model, and denoising is performed through the backward process of the diffusion model. The training loss is calculated based on the mean square error of the denoising target, and the model parameters are updated using the backpropagation algorithm.

[0033] According to a second aspect of the embodiments of this application, a high compression ratio image compression apparatus based on optimal transfer mapping is provided, comprising:

[0034] A preprocessing module is used to acquire the original image to be compressed and preprocess the original image;

[0035] The training module is used to train an image compression model based on optimal transport mapping based on the preprocessed original image using generative adversarial learning or a diffusion model. The image compression model based on optimal transport mapping includes a feature extraction layer, a mapping layer, a quantization coding layer, and a decoding and reconstruction layer. The mapping layer uses optimal transport mapping based on convex mapping to implement feature mapping.

[0036] The compression module is used to acquire the image to be compressed and compress it using a trained image compression model.

[0037] According to a third aspect of the embodiments of this application, an electronic device is provided, comprising:

[0038] One or more processors;

[0039] Memory, used to store one or more programs;

[0040] When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in the first aspect.

[0041] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0042] The technical solutions provided by the embodiments of this application may include the following beneficial effects:

[0043] [1] High compression ratio: This invention adopts a technical solution based on optimal transfer mapping, which realizes feature mapping by optimizing the transfer matrix, so that the image can achieve a higher compression ratio while maintaining high quality. Compared with traditional methods, this invention can significantly reduce the amount of data in the compressed image and improve the compression efficiency of the image.

[0044] [2] Maintaining image quality: Through preprocessing, feature extraction and reconstruction, this invention can effectively maintain the visual quality and detail information of the image under high compression ratio. The application of optimal transfer mapping enables the reconstructed image to have better visual effect and image fidelity. Compared with traditional compression methods, this invention can reduce problems such as image distortion, artifacts and block effects, and provide clearer and more realistic compressed images.

[0045] [3] Improved image transmission efficiency: This invention utilizes the principle of optimal transmission mapping to perform feature mapping and quantizes and encodes the mapped features, reducing redundancy and repetition of image data during transmission and storage. Compared with traditional methods, this invention can significantly improve image transmission efficiency, save network bandwidth and storage resources, and is suitable for application scenarios such as network transmission, image storage and image transmission.

[0046] [4] Good adaptability and flexibility: The technical solution of the present invention can adapt to images of different types and features, and has a certain degree of adaptability and flexibility. By optimizing the transfer matrix and feature extraction process, the present invention can optimize and adjust for the characteristics of different images to achieve better compression effect and image quality.

[0047] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0049] Figure 1 This is a flowchart illustrating a high compression ratio image compression method based on optimal transfer mapping according to an exemplary embodiment.

[0050] Figure 2 This is a block diagram illustrating a high-compression-ratio image compression apparatus based on optimal transfer mapping, according to an exemplary embodiment.

[0051] Figure 3 This is a schematic diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0052] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.

[0053] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0054] Figure 1 This is a flowchart illustrating a high-compression-ratio image compression method based on optimal transfer mapping, according to an exemplary embodiment. Figure 1 As shown, this method, when applied to a terminal, may include the following steps:

[0055] S1: Obtain the original image to be compressed and preprocess the original image;

[0056] Specifically, preprocessing includes steps such as denoising, image enhancement, and color space conversion. In one embodiment, denoising can employ a convolutional autoencoder to learn a noise model of the image and use the learned model to remove noise from the image. Image enhancement can use an adaptive histogram equalization algorithm to improve image contrast and visual effect by adjusting the distribution of image pixels. Color space conversion converts the image from RGB space to YCbCr space to separate luminance and chrominance information.

[0057] S2: Based on the preprocessed original image, the image compression model based on optimal transport mapping is trained using generative adversarial learning or diffusion model. The image compression model based on optimal transport mapping includes a feature extraction layer, a mapping layer, a quantization coding layer, and a decoding reconstruction layer. The mapping layer uses optimal transport mapping based on convex mapping to implement feature mapping.

[0058] Specifically, the image compression model based on optimal transport mapping includes:

[0059] (1) Feature extraction layer: Performs feature extraction on the preprocessed image;

[0060] In one embodiment, a pre-trained CNN model (ResNet) can be used to extract features from the image. The CNN models we use have different focuses for GAN and diffusion models, which will be detailed later.

[0061] (2) Mapping layer: Based on the optimal transport mapping, the extracted image features are mapped onto the feature space distribution;

[0062] Specifically, optimal transport mapping is used to solve the problem of finding the optimal mapping between two probability distributions. It can be visualized as precisely moving a set of points from one distribution to another while minimizing the total cost of the movement. In image processing, optimal transport mapping optimizes the distribution of pixels, enabling optimized image deformation or alignment, thereby improving image quality and visualization.

[0063] Optimal transfer mapping minimizes the transfer cost (typically measured by a distance metric, such as Wasserstein distance) between source and target features by optimizing the transfer matrix. The transfer matrix represents the probability transition from a source distribution to a target distribution. Specifically, each element of the transfer matrix represents the transfer probability from a source feature to a target feature. In this application, an adaptive transfer matrix is ​​designed, optimized based on feature importance and relevance. This means that the construction process of the transfer matrix considers the relevance between features and their contribution to the final image quality. For example, some features may be more important to the visual effect of the image and therefore will be given higher weights in the transfer matrix. Specifically, convex mapping from optimal transfer theory is used to achieve the optimal transfer mapping between features. A convex mapping is a special type of mapping that preserves the convex structure, maintaining distance relationships in the feature space and thus better preserving the structural information of the features.

[0064] The construction and optimization of the transfer matrix typically involves numerical optimization methods, such as iterative methods or gradient descent. During optimization, the distance between source and target features, as well as the correlation and importance between features, are considered to adjust the elements of the transfer matrix to minimize the transfer cost.

[0065] In this application, the process of constructing and optimizing the transfer matrix is ​​as follows:

[0066] Suppose the source feature distribution is P and the target feature distribution is Q. These two distributions can be represented by probability density functions p(x) and q(y) in the feature space, where x and y are points in the source feature space and the target feature space, respectively.

[0067] The optimal transport problem can be described as finding a transport matrix T that minimizes the transport cost from the source distribution P to the target distribution Q. Typically, this cost can be represented by the Wasserstein distance or other metrics.

[0068]

[0069] Where c(x,y) represents the transmission cost from point x to point y (e.g., the square of the Euclidean distance), X and Y represent the source feature space and the target feature space, respectively, T(x,y) represents the transmission amount from x to y, and π(x,y) is a joint distribution function or joint probability distribution, representing the probability transfer from the source distribution x to the target distribution y. π(x,y) is defined as the quantity of "quality" or "probability" of transmission between the source point x and the target point y. It must satisfy the constraint condition of the marginal distribution:

[0070] For each source point x, the integral of π(x,y) over all y should be equal to the probability that the source is located at x;

[0071] For each target point y, the integral of π(x,y) over all x should be equal to the probability that the target is located at y.

[0072] The key to constructing a transfer matrix using convex mappings is ensuring the convexity of the mapping process. Specifically, a convex mapping φ:X→Y satisfies the following conditions:

[0073] φ(λx1+(1-λ)x2)≤λφ(x1)+(1-λ)φ(x2) for all x1, x2∈X and λ∈[0,1]

[0074] In the optimization process of the transfer matrix T, the following optimization problem needs to be solved:

[0075]

[0076] Where N and M represent the number of samples in the source distribution and the target distribution, respectively;

[0077] The constraints are:

[0078]

[0079] Where p(x) i ) and q(y j ) represent the weights (i.e. probability densities) of the source and target features at their respective positions.

[0080] Since the optimal transport problem is typically a high-dimensional optimization problem, directly solving for the transport matrix can be very complex. Iterative methods such as the Sinkhorn-Knopp algorithm can be used to solve it. The Sinkhorn-Knopp algorithm, by introducing an entropy regularization term, transforms the optimization problem into a series of solvable smaller problems:

[0081]

[0082] Where λ is the regularization parameter.

[0083] After the optimization process is complete, the output transfer matrix T* is the result of the optimal transfer mapping. This matrix contains probability transfer information from source features to target features, which can be used for subsequent feature reconstruction and image compression.

[0084] In implementation, the calculation of the transfer matrix is ​​usually accomplished through numerical optimization techniques. Optimal transfer problems can be solved using Python's OT libraries (such as the POT library), or custom optimal transfer algorithms can be manually implemented based on deep learning frameworks (such as PyTorch or TensorFlow).

[0085] (3) Quantization and encoding layer: Quantizes and encodes the mapped features;

[0086] Specifically, quantization converts continuous feature values ​​into discrete quantization indices to reduce the complexity of data representation. Encoding then encodes the quantized features to achieve data compression. In practice, vector quantization (VQ) can be used to obtain discrete features, and then adaptive arithmetic coding, Huffman coding, or arithmetic coding can be used to encode the discrete features according to their probability distribution, thereby improving compression efficiency.

[0087] (4) Decoding and reconstruction layer: Decodes and reconstructs the encoded features to obtain a compressed image;

[0088] Specifically, decoding and reconstruction can be achieved through a denoising network of a diffusion model, or by performing the inverse operation based on the mapping layer and quantization coding layer. The latter process is as follows:

[0089] If methods such as adaptive arithmetic coding are used in the decoding process, the decoding process may involve corresponding decoding algorithms, such as adaptive arithmetic decoding.

[0090] The reconstruction process uses inverse optimal transfer mapping and inverse quantization to restore the quantized features to their original form. Finally, based on the restored features and preprocessed information, the image is reconstructed and restored to obtain a high-quality compressed image. Inverse optimal transfer mapping involves remapping the decoded features back to the original feature space. In implementation, this may involve inversely transforming the decoded features according to the optimal transfer mapping algorithm used during compression to restore features that approximate the original image. Inverse quantization restores the inverse-mapped features to continuous original feature values. In practice, this can be achieved by mapping the quantization index back to the range of original feature values. For example, if uniform quantization is used, the inverse quantization process involves mapping the discrete quantization index back to the original continuous feature value range.

[0091] Finally, image reconstruction and restoration are performed by combining the restored features with the original image information after preprocessing in step S1. This involves mapping the restored features back to the original image space and applying the inverse operation of the preprocessing step to generate a high-quality compressed image. In specific implementations, various image reconstruction algorithms and techniques, such as interpolation algorithms and filtering algorithms, can be used to achieve accurate image reconstruction and restoration.

[0092] For the aforementioned model, either a diffusion model or generative adversarial learning (GAN) can be used for training to ensure high-quality and high-compression-rate compressed images. Specifically, in generative adversarial learning, the generator (i.e., the entire image compression model) is trained adversarially against the discriminator. The generator attempts to generate high-quality compressed images, while the discriminator attempts to distinguish between the compressed and original images. The generator's goal is to deceive the discriminator into believing that the compressed image is the original image. During the training of the diffusion model, mean squared error (MSE) loss or perceptual loss can be used to evaluate the differences between the compressed and original images.

[0093] Specifically, the model training process may include:

[0094] S21: Construct the initial transmission matrix;

[0095] Specifically, before training begins, an initial transfer matrix is ​​constructed using initial parameters. This initial transfer matrix can be based on preliminary statistics of the data or randomly initialized. The initial transfer matrix T_0 is used to guide the model on how to perform feature mapping in the early stages.

[0096] S22: The feature extraction layer extracts features from the preprocessed original image. The mapping layer optimizes the transfer matrix using the extracted features and maps the features using the optimized optimal transfer matrix. The quantization and encoding layer quantizes and encodes the mapped features using the optimized optimal transfer matrix to obtain a compressed image feature representation. The decoding and reconstruction layer decodes and reconstructs the compressed image feature representation to obtain a compressed image.

[0097] Specifically, the training process begins with the model's feature extraction part. The feature extraction network (e.g., a pre-trained CNN model like ResNet) extracts features from the input image, generating a latent space representation. In GANs, the feature extraction layer is primarily used for generation and classification. The generator progressively transforms low-dimensional noise into a high-resolution image, while the discriminator progressively extracts features from the image to determine its authenticity. In this process, the feature extraction layer is designed to progressively construct or deconstruct the image, generating or distinguishing image details from coarse to fine. In Diffusion, the feature extraction layer focuses on capturing and preserving the global semantic information of the image and supports the addition and removal of noise during the diffusion process. The feature extraction layer is designed to encode the image into a feature representation suitable for processing, enabling effective denoising in high-dimensional noise spaces. At this point, the parameters of the feature extraction network can be updated. After feature extraction, the current feature representation and optimal transfer theory are used to calculate the update of the current transfer matrix. Here, the optimization of the transfer matrix can be achieved using a numerical method (e.g., the Sinkhorn-Knopp algorithm). When updating the transfer matrix, a distance metric (e.g., Wasserstein distance) between the currently extracted feature distribution and the target distribution is considered. Parameters associated with the transfer matrix are also updated during this process. Based on the latest transfer matrix, the quantization and encoding layers discretize and encode the features. The output of this step is a compressed image feature representation. The decoding and reconstruction layer decodes and reconstructs the compressed features to reconstruct the compressed image.

[0098] S23: Based on the preprocessed original image of the compressed image and the response, calculate the training loss and update the parameters of the image compression model through the backpropagation algorithm;

[0099] Specifically, if the decoding and reconstruction layer employs the inverse operations of the mapping and quantization encoding layers, it can be trained using generative adversarial learning. The generator (i.e., the entire image compression model) trains adversarially against the discriminator. The generator attempts to generate high-quality compressed images, while the discriminator tries to distinguish between the compressed and original images. The generator's goal is to deceive the discriminator into believing that the compressed image is the original image. Adversarial loss is used to calculate the training loss, and backpropagation is used to update the model parameters.

[0100] If the decoding and reconstruction layer uses a diffusion model denoising network, then the training method of the diffusion model is used, which consists of two main processes:

[0101] 1. Forward Process (Diffusion Process): Noise is gradually added to image features to generate a series of progressively noisier representations. In this application, noise is gradually added to the encoded features (compressed image representations) to diffuse them into a simple Gaussian noise distribution. By gradually adding noise, a series of intermediate representations from the original features to Gaussian noise are generated.

[0102] The forward pass is a Markov chain process that starts with the original feature x0 (i.e., the compressed image representation) and progressively adds noise to generate a series of intermediate representations x1, x2, ..., xn. T Finally, the noise x is obtained. T .

[0103] Given the original feature x0, the noise-enhanced feature x at step t. t Generate in the following way:

[0104]

[0105] Where, β t It is a predefined constant that increases with time step t (called the noise scheduler), and its value is usually between (0,1).

[0106] Based on the properties of Markov chains, the above process can be represented as a one-step Gaussian distribution:

[0107]

[0108] in,

[0109] x can be generated from x0 in one step t :

[0110]

[0111] in It is noise sampled from a standard normal distribution.

[0112] 2. Reverse Process (Denoising Process): Gradually denoise the noisy representation to restore the original image features. In this application, it is the decoding and reconstruction process of the decoding and reconstruction layer (i.e., the denoising network of the diffusion model).

[0113] The reverse process is a learned denoising process used to gradually reduce x T Restored to x0. The core task of the diffusion model is to learn the conditional probability p. θ (x t-1 |x tThis is achieved through neural networks (such as UNet).

[0114] For the t-th step of the reverse process, it is approximately in the following form:

[0115]

[0116] Where μ θ (x t ,t) and Σ θ (x t ,t) are the mean and covariance matrices of the neural network parameterization.

[0117] In the simplest case, we can assume Σ θ (x t Since t is a constant, the training objective of the reverse process is to learn the denoising network ∈ θ (x t ,t), to estimate the noise ∈:

[0118]

[0119] Here ∈ θ (x t ,t) is the output of the network, representing the estimate of the added noise ∈.

[0120] The loss function used during training is typically based on the mean squared error (MSE) of the denoising target, as shown in the following formula:

[0121]

[0122] By minimizing this loss function, the denoising network ∈ θ It can predict noise more accurately, thereby gradually removing noise during the reverse process and ultimately restoring high-quality image features.

[0123] S24: Repeat steps S22-S23 until the model converges, i.e., the loss function no longer decreases significantly or the predetermined number of training iterations is reached.

[0124] In summary, this application proposes two image compression schemes:

[0125] Solution 1: Image compression method based on generative adversarial learning

[0126] First, the original image to be compressed is acquired and preprocessed, including denoising, image enhancement, and color space conversion. Next, based on the preprocessed image, a generative adversarial learning-based image compression model using optimal transport mapping is trained. This model comprises a feature extraction layer, a mapping layer, a quantization encoding layer, and a decoding and reconstruction layer. The mapping layer maps and optimizes image features using optimal transport mapping based on convex mapping. The trained model effectively compresses the input image and reduces data redundancy through quantization encoding. The decoding and reconstruction layer during compression maps the compressed features back to the original image space, reconstructing a high-quality image.

[0127] Option 2: Image compression method based on diffusion model

[0128] This approach also begins by preprocessing the image to be compressed. Then, a diffusion model is used to train an image compression model based on optimal transport mapping. The feature extraction layer in the diffusion model encodes the preprocessed image into low-dimensional feature representations. Next, the mapping layer optimizes and maps these features in the feature space using optimal transport mapping based on convex mapping. During compression, the quantization encoding layer quantizes the mapped features to reduce data redundancy. Finally, in the decoding and reconstruction stages, the quantized features are restored to image features through the inverse denoising process of the diffusion model (i.e., a progressive denoising network), and decoded into a high-quality compressed image close to the original image.

[0129] In this application, the optimization of the transfer matrix and the training of other parts of the model are performed alternately. Through this dynamic optimization method, the transfer matrix can be continuously adjusted to better match the changes in the feature space, while optimizing the feature extraction and compression processes; the loss function includes not only the reconstruction error but also a regularization term for the transfer cost, which helps to learn a better feature mapping; in each iteration, the transfer matrix is ​​recalculated or updated based on the current feature representation and target distribution to ensure that the learning direction of the model is continuously optimized.

[0130] S3: Obtain the image to be compressed and compress it using the trained image compression model;

[0131] Specifically, compression is performed using the feature extraction layer, mapping layer, and quantization coding layer in the trained image compression model. The image to be compressed should have the same or similar category as the original image to be compressed in S1.

[0132] Corresponding to the aforementioned embodiments of the high compression ratio image compression method based on optimal transfer mapping, this application also provides embodiments of a high compression ratio image compression apparatus based on optimal transfer mapping.

[0133] Figure 2This is a block diagram of a high-compression-ratio image compression apparatus based on optimal transfer mapping, according to an exemplary embodiment. (Refer to...) Figure 2 The device may include:

[0134] The preprocessing module 21 is used to acquire the original image to be compressed and preprocess the original image;

[0135] Training module 22 is used to train an image compression model based on optimal transport mapping based on the preprocessed original image using generative adversarial learning or a diffusion model. The image compression model based on optimal transport mapping includes a feature extraction layer, a mapping layer, a quantization coding layer, and a decoding reconstruction layer. The mapping layer uses optimal transport mapping based on convex mapping to implement feature mapping.

[0136] Compression module 23 is used to acquire the image to be compressed and compress it using the trained image compression model.

[0137] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0138] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0139] Accordingly, this application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the high compression ratio image compression method based on optimal transfer mapping as described above.

[0140] Accordingly, this application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the high compression ratio image compression method based on optimal transfer mapping as described above. Figure 3 The diagram shown is a hardware structure diagram of any data processing-capable device where a deep learning dataset access system is located, according to an embodiment of the present invention. Except for... Figure 3In addition to the processor, memory, and network interface shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0141] Accordingly, this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the high-compression-ratio image compression method based on optimal transfer mapping as described above. The computer-readable storage medium can be an internal storage unit of any data-processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data-processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data-processing device, and can also be used to temporarily store data that has been output or will be output.

[0142] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0143] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A high-compression-ratio image compression method based on optimal transfer mapping, characterized in that, include: Obtain the original image to be compressed and preprocess the original image; Based on the preprocessed original image, a generative adversarial learning or diffusion model is used to train an image compression model based on optimal transport mapping. The image compression model based on optimal transport mapping includes a feature extraction layer, a mapping layer, a quantization coding layer, and a decoding and reconstruction layer. The mapping layer uses optimal transport mapping based on convex mapping to implement feature mapping. Obtain the image to be compressed and compress it using the trained image compression model; In the mapping layer, a transfer matrix is ​​constructed using convex mapping, and the transfer matrix is ​​optimized. The optimization problem is as follows: , Where λ is the regularization parameter, This represents the transmission cost from point x to point y, where x and y are points in the source and target feature spaces, respectively. This represents the amount of data transmitted from x to y, where N and M represent the number of samples in the source and target distributions, respectively.

2. The method according to claim 1, characterized in that, The preprocessing includes noise reduction, image enhancement, and color space conversion.

3. The method according to claim 1, characterized in that, In the image compression model based on optimal transport mapping: The feature extraction layer is used to extract features from the preprocessed image; The mapping layer is used to map the extracted image features onto the feature space distribution based on the optimal transport mapping; The quantization and encoding layer is used to quantize and encode the mapped features; The decoding and reconstruction layer is used to decode and reconstruct the encoded features.

4. The method according to claim 3, characterized in that, In the decoding and reconstruction layer, decoding and reconstruction are achieved through a denoising network of a diffusion model or by performing the inverse operation of a mapping layer and a quantization encoding layer.

5. The method according to claim 1, characterized in that, The training process of the image compression model based on optimal transport mapping includes: S21: Construct the initial transmission matrix; S22: The feature extraction layer extracts features from the preprocessed original image. The mapping layer optimizes the transfer matrix using the extracted features and maps the features using the optimized optimal transfer matrix. The quantization and encoding layer quantizes and encodes the mapped features using the optimized optimal transfer matrix to obtain a compressed image feature representation. The decoding and reconstruction layer decodes and reconstructs the compressed image feature representation. S23: Based on the decoded and reconstructed image and the preprocessed original image of the response, calculate the training loss and update the parameters of the image compression model through the backpropagation algorithm; S24: Repeat steps S22-S23 until the model converges.

6. The method according to claim 5, characterized in that, In step S23, if the decoding and reconstruction layer adopts the inverse operation of the mapping layer and the quantization coding layer, it is trained by generative adversarial learning. The generator, i.e., the image compression model, is trained adversarially with the discriminator. The adversarial loss is used to calculate the training loss, and the backpropagation algorithm is used to update the model parameters. If the decoding and reconstruction layer uses a diffusion model denoising network, then noise is added to the compressed image feature representation through the forward process of the diffusion model, and denoising is performed through the backward process of the diffusion model. The training loss is calculated based on the mean square error of the denoising target, and the model parameters are updated using the backpropagation algorithm.

7. A high-compression-ratio image compression device based on optimal transfer mapping, characterized in that, include: A preprocessing module is used to acquire the original image to be compressed and preprocess the original image; The training module is used to train an image compression model based on optimal transport mapping based on the preprocessed original image using generative adversarial learning or a diffusion model. The image compression model based on optimal transport mapping includes a feature extraction layer, a mapping layer, a quantization coding layer, and a decoding and reconstruction layer. The mapping layer uses optimal transport mapping based on convex mapping to implement feature mapping. The compression module is used to acquire the image to be compressed and compress it using the trained image compression model. In the mapping layer, a transfer matrix is ​​constructed using convex mapping, and the transfer matrix is ​​optimized. The optimization problem is as follows: , Where λ is the regularization parameter, This represents the transmission cost from point x to point y, where x and y are points in the source and target feature spaces, respectively. This represents the amount of data transmitted from x to y, where N and M represent the number of samples in the source and target distributions, respectively.

8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.

9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-6.