Image compression method, image compression model training method and device
By obtaining the image and its minimum observable distortion image, and using the encoder and entropy coding sub-model to process the image features, the problems of poor perceptual quality and low coding efficiency in image compression are solved, and efficient image compression is achieved.
Patent Information
- Application Number
- CN202410612667.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-17
AI Technical Summary
Existing image compression technology may lose a large amount of high-frequency information when encoding images with a large compression ratio, resulting in a decrease in the perceptual quality of the compressed image, and the end-to-end image coding method for human eye perception fails to effectively utilize perceptual priors Information removes perceptual redundancy in images, resulting in low coding efficiency.
By obtaining the image to be processed and its corresponding minimum observable distortion image, the encoder and entropy coding sub-model are used to process image features, learn the pixel correlation between images and dynamically adjust the quantization step size to remove perceptual redundancy and improve coding. efficiency.
It effectively eliminates image perception redundancy, improves image compression coding efficiency and perceived quality, and solves the problems of poor perceived quality and low coding efficiency of compressed images.
Smart Images

Figure CN118200573B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multimedia processing technology, and in particular to an image compression method, and a training method and device for an image compression model. Background Art
[0002] Image compression is an important basic technology that promotes the progress of image transmission and storage, and plays an indispensable role in many fields such as multimedia communications, medical imaging, remote sensing, and computer vision. Considering that the human eye is the final receiver of most image information, relevant researchers have proposed end-to-end image coding methods for human eye perception, which improve the perceptual quality of compressed images by considering the perceptual characteristics of the human visual system. However, these methods do not consider the use of perceptual prior information to remove perceptual redundancy in the image, and the coding efficiency still needs to be improved. Summary of the invention
[0003] In view of the above problems, the present invention provides an image compression method, and a training method and device for an image compression model.
[0004] According to a first aspect of the present invention, there is provided an image compression method, comprising:
[0005] Acquire an image to be processed and a minimum observable distortion image corresponding to the image to be processed, wherein the minimum observable distortion image is obtained by processing the image to be processed based on the observable distortion prediction model;
[0006] Inputting the image to be processed and the image with minimum perceptible distortion into the encoder, and outputting the initial features of the image and the initial features of perceptible distortion;
[0007] Inputting the initial features of the perceptible distortion into the perceptible distortion image feature compression sub-model, and outputting the perceptible distortion image compression features, wherein the perceptible distortion image feature compression sub-model is constructed based on a hyper-prior image compression network;
[0008] Input the perceptible distortion image compression features and the image initial features into the entropy coding sub-model, and output the image compression features;
[0009] The image compression features and the perceptible distortion image compression features are input into the decoder, and the compressed reconstructed image is output.
[0010] Optionally, the entropy coding sub-model includes an autoregressive layer, a quantization layer, an arithmetic codec layer, and an inverse quantization layer; wherein the perceptibly distorted image compression feature and the image initial feature are input into the entropy coding sub-model, and the image compression feature is output, including:
[0011] Input the perceptible distorted image compression features and the image initial features into the quantization layer, and output the quantized features;
[0012] Input the initial features of the image into the autoregressive layer and output the encoding parameters and decoding parameters;
[0013] Process the encoding parameters, decoding parameters and quantization features according to the arithmetic codec layer to obtain the intermediate features of the image;
[0014] The perceptibly distorted image compression features and the image intermediate features are input into the inverse quantization layer, and the image compression features are output.
[0015] Optionally, the arithmetic codec layer includes an arithmetic encoder sublayer and an arithmetic decoder sublayer;
[0016] Among them, the encoding parameters, decoding parameters and quantization features are processed according to the arithmetic codec layer to obtain the intermediate features of the image, including:
[0017] Processing coding parameters and quantization features according to the arithmetic encoder sublayer to obtain image coding features;
[0018] The decoding parameters and image coding features are processed according to the arithmetic decoder sublayer to obtain the intermediate features of the image.
[0019] Optionally, the encoder includes at least one encoding sub-model, and the encoding sub-model includes a first feature extraction layer, a second feature extraction layer, a third feature extraction layer, a fourth feature extraction layer, a feature transformation layer, a first attention network layer, and a second attention network layer;
[0020] The image to be processed and the image with minimum perceptible distortion are input to the encoder, and the initial features of the image and the initial features of perceptible distortion are output, including:
[0021] Perform feature extraction on the image to be processed according to the first feature extraction layer to obtain a first feature of the image;
[0022] Extracting features of the minimum perceptible distortion image according to the second feature extraction layer to obtain a first feature of the perceptible distortion image;
[0023] Input the first feature of the image and the first feature of the perceptibly distorted image into the feature transformation layer, and output the second feature of the image and the second feature of the perceptibly distorted image;
[0024] Extract the second feature of the image according to the third feature extraction layer to obtain the third feature of the image;
[0025] Process the third feature of the image according to the first attention network layer to obtain the initial feature of the image;
[0026] Extracting the second feature of the perceptible distorted image according to the fourth feature extraction layer to obtain a third feature of the perceptible distorted image;
[0027] The third feature of the perceptible distortion image is processed according to the second attention network layer to obtain the initial feature of the perceptible distortion.
[0028] Optionally, the feature transformation layer includes a tangent activation sublayer, a convolution sublayer, a first gating sublayer, and a second gating sublayer;
[0029] The first feature of the image and the first feature of the perceptibly distorted image are input into the feature transformation layer, and the second feature of the image and the second feature of the perceptibly distorted image are output, including:
[0030] Input the first feature of the perceptibly distorted image into the convolution sublayer, and output the second feature of the perceptibly distorted image;
[0031] Input the first feature of the image to the convolution sublayer and output the first convolution feature of the image;
[0032] Processing the first convolution feature of the image and the second feature of the perceptibly distorted image according to the first gating sublayer to obtain a weighted feature;
[0033] Processing the first convolution feature of the image and the second feature of the perceptibly distorted image according to the second gating sublayer to obtain a weight;
[0034] Processing the weighted features, the weights and the second feature of the perceptibly distorted image according to the tangent activation sublayer to obtain an enhanced feature;
[0035] According to the enhanced features, weights and the first convolutional features of the image, the second features of the image are obtained.
[0036] A second aspect of the present invention provides a method for training an image compression model, the image compression model comprising: an encoder, a perceptibly distorted image feature compression sub-model, an entropy coding sub-model and a decoder, the training method comprising:
[0037] Acquire a training sample, where the training sample includes a sample image and a sample minimum observable distortion image corresponding to the sample image, wherein the sample minimum observable distortion image is obtained by processing the sample image based on a perceptible distortion prediction model;
[0038] Input the sample image and the sample minimum observable distortion image into the encoder, and output the sample image initial features and the sample observable distortion initial features;
[0039] Inputting the sample's initial perceptible distortion features into the perceptible distortion image feature compression sub-model, and outputting the sample's perceptible distortion image compression features, wherein the perceptible distortion image feature compression sub-model is constructed based on a hyper-prior image compression network;
[0040] Input the sample observable distortion image compression feature and the sample image initial feature into the entropy coding sub-model, and output the sample image compression feature;
[0041] Input the sample image compression features and the sample observable distortion image compression features into the decoder, and output the compressed sample reconstructed image;
[0042] The image compression model is trained according to the sample image, the sample reconstructed image and the initial features of the sample observable distortion to obtain a trained image compression model.
[0043] Optionally, an image compression model is trained according to the sample image, the sample reconstructed image and the sample observable distortion initial features to obtain a trained image compression model, including:
[0044] Process the sample image and the sample reconstructed image according to the loss function to obtain a distortion loss value;
[0045] Determine a bit rate loss value according to the sample image initial features and the sample observable distortion initial features;
[0046] According to the distortion loss value and the bit rate loss value, the image compression model is trained to obtain a trained image compression model.
[0047] A third aspect of the present invention provides an image compression device, comprising:
[0048] A first acquisition module is used to acquire an image to be processed and a minimum observable distortion image corresponding to the image to be processed, wherein the minimum observable distortion image is obtained by processing the image to be processed based on the observable distortion prediction model;
[0049] A first encoding module, used for inputting the image to be processed and the minimum perceptible distortion image into an encoder, and outputting the initial features of the image and the initial features of the perceptible distortion;
[0050] A first processing module is used to input the initial features of the perceptible distortion into the perceptible distortion image feature compression sub-model, and output the perceptible distortion image compression features, wherein the perceptible distortion image feature compression sub-model is constructed based on a hyper-prior image compression network;
[0051] A first compression module is used to input the perceptibly distorted image compression features and the image initial features into the entropy coding sub-model, and output the image compression features;
[0052] The first decoding module is used to input the image compression feature and the perceptible distortion image compression feature into the decoder, and output the compressed reconstructed image.
[0053] A fourth aspect of the present invention provides a training device for an image compression model, comprising:
[0054] A second acquisition module is used to acquire training samples, where the training samples include sample images and sample minimum observable distortion images corresponding to the sample images, wherein the sample minimum observable distortion images are obtained by processing the sample images based on the observable distortion prediction model;
[0055] A second encoding module is used to input the sample image and the sample minimum observable distortion image into an encoder, and output the sample image initial features and the sample observable distortion initial features;
[0056] The second processing module is used to input the sample detectable distortion initial feature into the detectable distortion image feature compression sub-model, and output the sample detectable distortion image compression feature, wherein the detectable distortion image feature compression sub-model is constructed based on the hyper-prior image compression network;
[0057] The second compression module is used to input the sample detectable distortion image compression feature and the sample image initial feature into the entropy coding sub-model, and output the sample image compression feature;
[0058] A second decoding module is used to input the sample image compression feature and the sample detectable distortion image compression feature into a decoder, and output a compressed sample reconstructed image;
[0059] The training module is used to train the image compression model according to the sample image, the sample reconstructed image and the initial features of the sample observable distortion to obtain the trained image compression model.
[0060] According to the image compression method, image compression model training method and device provided by the present invention, the image to be processed and the minimum observable distortion image are processed by an encoder to obtain the initial features of the image and the initial features of the observable distortion; the initial features of the observable distortion are processed according to the compression sub-model of the observable distortion image feature to obtain the compression features of the observable distortion image; and the compression features of the observable distortion image and the initial features of the image are processed by the entropy coding sub-model to obtain the image compression features, thereby generating a reconstructed image. Since the encoder can learn the pixel correlation between the image to be processed and the minimum observable distortion image, the image features of some image perception insensitive areas are effectively discarded, and the image features of the perception sensitive areas are enhanced, thereby effectively eliminating the perceptual redundancy; secondly, the perceptual distortion image compression features are used in the entropy coding sub-model to dynamically adjust the quantization step size of the pixels in the initial features of the image, further removing the perceptual redundancy of the image, improving the image compression coding efficiency, and solving the problems of poor perceptual quality and low coding efficiency of the compressed image. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0062] Figure 1 A flow chart of an image compression method according to an embodiment of the present invention is shown;
[0063] Figure 2 An example schematic diagram of generating a reconstructed image according to an embodiment of the present invention is shown;
[0064] Figure 3 A flow chart of a method for training an image compression model according to an embodiment of the present invention is shown;
[0065] Figure 4 A structural block diagram of an image compression device according to an embodiment of the present invention is shown;
[0066] Figure 5 A structural block diagram of a training device for an image compression model according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0067] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.
[0068] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0069] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0070] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0071] In the process of implementing the present invention, it is found that the existing image compression standards mainly focus on optimizing rate-distortion performance from the perspective of signal fidelity. When encoding images at a high compression ratio, a large amount of high-frequency information may be lost, resulting in a significant decrease in the perceived quality of the compressed image. In addition, end-to-end image coding methods for human eye perception improve the perceived quality of compressed images by considering the perceptual characteristics of the human visual system. However, these methods do not consider the use of perceptual prior information to remove perceptual redundancy in images, and the coding efficiency still needs to be improved.
[0072] In view of this, an embodiment of the present invention provides an image compression method, an image compression model training method and a device. The method includes: obtaining an image to be processed and a minimum observable distortion image corresponding to the image to be processed, wherein the minimum observable distortion image is obtained by processing the image to be processed based on a perceptible distortion prediction model; inputting the image to be processed and the minimum observable distortion image into an encoder, outputting image initial features and perceptible distortion initial features; inputting the perceptible distortion initial features into a perceptible distortion image feature compression submodel, outputting perceptible distortion image compression features, wherein the perceptible distortion image feature compression submodel is constructed based on a hyper-prior image compression network; inputting perceptible distortion image compression features and image initial features into an entropy coding submodel, outputting image compression features; inputting image compression features and perceptible distortion image compression features into a decoder, and outputting a compressed reconstructed image.
[0073] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0074] Figure 1 A flow chart of an image compression method according to an embodiment of the present invention is shown.
[0075] like Figure 1 As shown, the method 100 includes operations S110 to S150.
[0076] In operation S110, an image to be processed and a minimum perceptible distortion image corresponding to the image to be processed are acquired.
[0077] In operation S120, the image to be processed and the image with minimum perceptible distortion are input to an encoder, and initial features of the image and initial features of perceptible distortion are output.
[0078] In operation S130 , the perceptible distortion initial feature is input into the perceptible distortion image feature compression sub-model, and the perceptible distortion image compression feature is output.
[0079] In operation S140, the perceptible distortion image compression feature and the image initial feature are input into an entropy coding sub-model, and the image compression feature is output.
[0080] In operation S150, the image compression feature and the perceptible distortion image compression feature are input to a decoder, and a compressed reconstructed image is output.
[0081] Optionally, the minimum perceptible distortion image is obtained by processing the image to be processed based on the perceptible distortion prediction model.
[0082] Optionally, the image to be processed represents an original image to be reconstructed, for example, it may be a geographical environment photo, etc. The minimum observable distortion image may be a Just Noticeable Distortion (JND) image.
[0083] In one embodiment, the perceptible distortion prediction model is shown in formula (1):
[0084] (1);
[0085] in, Represents a pixel in the image to be processed, Representation and Pixels The corresponding observable distortion information, Characterizing pixels Brightness information, Characterizing pixels Visual masking information, Characterize the gain attenuation parameter of the overlap between brightness information and visual masking information, for example, It can be 0.3.
[0086] Optionally, the perceptible distortion prediction model is used to process each pixel in the image to be processed to obtain perceptible distortion information corresponding to each pixel, thereby generating an image with minimum perceptible distortion.
[0087] Optionally, an image block group is randomly divided from each image to be processed and the minimum observable distortion image corresponding to the image to be processed, the image block group includes image blocks from the image to be processed and image blocks from the corresponding positions of the minimum observable distortion image, and the resolution of each image block can be an integer multiple of 256, such as 256*256. The image block group is input to the encoder, and the initial image features and the initial observable distortion features are output.
[0088] Optionally, the image initial feature representation is based on features obtained by the encoder processing image blocks divided from the image to be processed; the observable distortion initial feature representation is based on features obtained by the encoder processing image blocks divided from corresponding positions of the minimum observable distortion image.
[0089] Optionally, the perceptible distortion image feature compression sub-model can be constructed based on a hyper-prior image compression network. Channel splicing is performed on the perceptible distortion initial features to obtain perceptible distortion initial features that meet the processable size requirements of the perceptible distortion image feature compression sub-model, and then the perceptible distortion initial features after channel splicing are input into the perceptible distortion image feature compression sub-model to output the perceptible distortion image compression features.
[0090] Optionally, the perceptible distortion image feature compression sub-model is used to encode and decode the perceptible distortion initial feature to obtain the perceptible distortion image compression feature.
[0091] Optionally, in the entropy coding sub-model, the perceptible distortion image compression feature is used to adjust the quantization step of the initial image feature, thereby guiding the quantization and dequantization process of the initial image feature to obtain the image compression feature. The image compression feature represents the feature of the initial image feature after compression.
[0092] Optionally, the internal structures of the decoder and the encoder may be symmetrical, and the decoder is used to process the image compression features and the perceptible distortion image compression features to obtain a compressed reconstructed image.
[0093] Optionally, since the encoder can learn the pixel correlation between the image to be processed and the image with minimum detectable distortion, it effectively discards the image features of some image perceptually insensitive areas and enhances the image features of perceptually sensitive areas, thereby effectively eliminating perceptual redundancy; secondly, the perceptually distorted image compression features are used in the entropy coding sub-model to dynamically adjust the quantization step size of pixels in the initial features of the image, further removing image perceptual redundancy, improving image compression coding efficiency, and solving the problems of poor perceptual quality and low coding efficiency of compressed images.
[0094] Optionally, the perceptible distortion image compression features and the image initial features are input into the entropy coding sub-model, and the image compression features are output, including:
[0095] The perceptibly distorted image compression features and the image initial features are input into the quantization layer, and the quantization features are output; the image initial features are input into the autoregressive layer, and the encoding parameters and decoding parameters are output; the encoding parameters, decoding parameters and quantization features are processed according to the arithmetic codec layer to obtain the image intermediate features; the perceptibly distorted image compression features and the image intermediate features are input into the inverse quantization layer, and the image compression features are output.
[0096] Optionally, the entropy coding sub-model includes an autoregressive layer, a quantization layer, an arithmetic codec layer, and an inverse quantization layer.
[0097] Optionally, the initial features of the image are quantized using the perceptible distortion image compression features at the quantization layer to obtain quantized features corresponding to the initial features of the image.
[0098] In one embodiment, the quantified feature As shown in formula (2):
[0099] (2);
[0100] in, Representation quantization layer, represents the rounding function, / represents the pixel division operation, Characterize the initial features of the image, Characterizing image compression features with observable distortion.
[0101] Optionally, the autoregressive layer can be constructed based on an autoregressive entropy parameter estimation model. The autoregressive layer is used to process the initial features of the image to obtain encoding parameters and decoding parameters, and the encoding parameters and decoding parameters can both be the mean and variance obtained by processing the initial features of the image by the autoregressive layer.
[0102] Optionally, encoding parameters, decoding parameters and quantization features are processed according to an arithmetic codec layer to obtain intermediate features of the image.
[0103] In one embodiment, the image compression feature As shown in formula (3):
[0104] (3);
[0105] in, Characterize the dequantization layer, represents the multiplication operation between pixels, Characterize the intermediate features of the image, Characterizing image compression features with observable distortion.
[0106] Optionally, the perceptible distortion image compression features are used as quantization tables to dynamically guide the quantization and dequantization process of the image initial features, thereby ensuring that the scaling factor of the quantization step size remains consistent during the quantization and dequantization process, effectively removing image perceptual redundancy. In addition, the entropy coding sub-model can accurately assign different coding bits to areas with different perceptual sensitivities, thereby saving more coding bits without significantly reducing the perceptual quality.
[0107] Optionally, the arithmetic codec layer includes an arithmetic encoder sublayer and an arithmetic decoder sublayer.
[0108] Optionally, the encoding parameters, decoding parameters and quantization features are processed according to the arithmetic codec layer to obtain intermediate image features, including: processing the encoding parameters and quantization features according to the arithmetic encoder sublayer to obtain image coding features; processing the decoding parameters and image coding features according to the arithmetic decoder sublayer to obtain intermediate image features.
[0109] Optionally, the encoding parameters and quantization features are input into the arithmetic encoder sublayer for encoding processing to obtain image encoding features.
[0110] Optionally, the decoding parameters and the image coding features are input into the arithmetic decoder sublayer for decoding processing to obtain the image intermediate features. The image intermediate features represent the features after the quantized features are compressed.
[0111] Optionally, the encoder includes at least one encoding sub-model, and the encoding sub-model includes a first feature extraction layer, a second feature extraction layer, a third feature extraction layer, a fourth feature extraction layer, a feature transformation layer, a first attention network layer, and a second attention network layer.
[0112] Optionally, the parameters of the first attention network layer and the second attention network layer are the same, the parameters of the first feature extraction layer and the second feature extraction layer are the same, the parameters of the third feature extraction layer and the fourth feature extraction layer are the same, the feature extraction layer can be constructed based on the image feature extraction algorithm, the feature transformation layer can be constructed based on the feature transformation model (FeatureTransform Module, FTM), and the first attention network layer and the second attention network layer can both be constructed based on the non-local attention model.
[0113] Optionally, the network structure of each encoding sub-model in the encoder is the same.
[0114] Optionally, the image to be processed and the image with minimum perceptible distortion are input to an encoder, and the initial features of the image and the initial features of perceptible distortion are output, including:
[0115] According to the first feature extraction layer, feature extraction is performed on the image to be processed to obtain the first feature of the image; according to the second feature extraction layer, feature extraction is performed on the minimum perceptible distortion image to obtain the first feature of the perceptible distortion image; the first feature of the image and the first feature of the perceptible distortion image are input into the feature transformation layer, and the second feature of the image and the second feature of the perceptible distortion image are output; according to the third feature extraction layer, feature extraction is performed on the second feature of the image to obtain the third feature of the image; according to the first attention network layer, the third feature of the image is processed to obtain the initial feature of the image; according to the fourth feature extraction layer, feature extraction is performed on the second feature of the perceptible distortion image to obtain the third feature of the perceptible distortion image; according to the second attention network layer, the third feature of the perceptible distortion image is processed to obtain the initial feature of the perceptible distortion.
[0116] Optionally, feature extraction is performed on the image blocks divided from the image to be processed according to the first feature extraction layer to obtain the first feature of the image; and feature extraction is performed on the image blocks divided from the corresponding positions of the minimum perceptible distortion image according to the second feature extraction layer to obtain the first feature of the perceptible distortion image. The first feature of the image and the first feature of the perceptible distortion image represent the shallow features of the image block.
[0117] Optionally, the first feature of the perceptibly distorted image is processed according to the feature transformation layer to obtain a second feature of the perceptibly distorted image at a deeper level; and the first feature of the image is feature transformed according to the first feature of the perceptibly distorted image at the feature transformation layer to obtain a second feature of the image at a deeper level.
[0118] Optionally, compared with the second image feature, the third image feature has a deeper level of feature; compared with the second image feature with perceptible distortion, the third image feature with perceptible distortion has a deeper level of feature.
[0119] Optionally, the first attention network layer and the second attention network layer can learn global key features at the feature channel level. Compared with the third image feature, there is no perceptual redundancy in the initial image feature; compared with the third image feature of the perceptible distortion, the initial feature of the perceptible distortion has deeper features.
[0120] For example, taking the above-mentioned encoder composed of the first encoding sub-model and the second encoding sub-model as an example, the image to be processed and the minimum observable distortion image are input into the first encoding sub-model of the encoder, and the image initial features and the observable distortion initial features corresponding to the first encoding sub-model are output; then the image initial features and the observable distortion initial features corresponding to the first encoding sub-model are input into the second encoding sub-model, and the image initial features and the observable distortion initial features corresponding to the second encoding sub-model are output, and the image initial features and the observable distortion initial features corresponding to the second encoding sub-model are determined as the image initial features and the observable distortion initial features output by the encoder.
[0121] Optionally, the feature transformation layer includes a tangent activation sublayer, a convolution sublayer, a first gating sublayer, and a second gating sublayer.
[0122] Optionally, the tangent activation sublayer can be constructed based on the tangent activation function, the first gating sublayer can be constructed based on the memory gating unit, the second gating sublayer can be constructed based on the forgetting gating unit, and the convolution sublayer can be constructed based on a convolution network with a convolution kernel size of 3x3.
[0123] Optionally, inputting the first image feature and the first perceptibly distorted image feature into a feature transformation layer, and outputting the second image feature and the second perceptibly distorted image feature, comprises:
[0124] The first feature of the perceptibly distorted image is input into the convolution sublayer, and the second feature of the perceptibly distorted image is output; the first feature of the image is input into the convolution sublayer, and the first convolution feature of the image is output; the first convolution feature of the image and the second feature of the perceptibly distorted image are processed according to the first gating sublayer to obtain a weighted feature; the first convolution feature of the image and the second feature of the perceptibly distorted image are processed according to the second gating sublayer to obtain a weight; the weighted feature, the weight and the second feature of the perceptibly distorted image are processed according to the tangent activation sublayer to obtain an enhanced feature; the second feature of the image is obtained according to the enhanced feature, the weight and the first convolution feature of the image.
[0125] Optionally, a convolution sublayer is used to perform a convolution operation on the first feature of the perceptibly distorted image to obtain a second feature of the perceptibly distorted image; and a convolution sublayer is used to perform a convolution operation on the first feature of the image to obtain a first convolution feature of the image.
[0126] Optionally, after performing convolution operations on the first convolution feature of the image and the second feature of the perceptibly distorted image respectively, features obtained after the convolution operation are processed according to the first gating sublayer to obtain weighted features.
[0127] In one embodiment, the weighted features As shown in formula (4):
[0128] (4);
[0129] in, Characterize the Sigmoid activation function, Representing the convolutional sublayer, represents the multiplication operation between pixels, ⊗ represents the splicing operation, Characterize the first convolution feature of the image, Characterize the second feature of the observable distorted image.
[0130] Optionally, after performing convolution operations on the first convolution feature of the image and the second feature of the perceptibly distorted image respectively, the weights are obtained by processing the features obtained after the convolution operation according to the second gating sublayer.
[0131] In one embodiment, the weight As shown in formula (5):
[0132] (5);
[0133] in, Characterize the Sigmoid activation function, Representing the convolutional sublayer, represents the unit matrix with the same size as the second characteristic of the perceptible distorted image, ⊗ represents the splicing operation, Characterize the first convolution feature of the image, Characterize the second feature of the observable distorted image.
[0134] In one embodiment, the enhancement feature As shown in formula (6):
[0135] (6);
[0136] in, Represents the tangent activation function, Representing the convolutional sublayer, Characterizes the unit matrix with the same size as the second characteristic of the perceptible distorted image, Representation weight, Characterize weighted features, The second feature of the image with detectable distortion is represented, and ⊗ represents the splicing operation.
[0137] Optionally, the enhanced feature representations are features that are easily perceived by the human eye.
[0138] In one embodiment, the second feature of the image As shown in formula (7):
[0139] (7);
[0140] in, represents the multiplication operation between pixels, Representation weight, Characterize the first convolution feature of the image, Characterize enhanced features.
[0141] Optionally, pixel-by-pixel multiplication operations are performed on the first convolutional features and weights of the image to avoid the gradient explosion problem.
[0142] Optionally, the first gating sublayer and the second gating sublayer are used to mask the respective feature regions of the first convolution feature of the image and the second feature of the perceptually distorted image. The weight vector output in the second gating sublayer can discard the information of the perceptually insensitive region; the first gating sublayer can be used to retain the perceptually sensitive information, and the result of further combining the weighted feature with the second feature of the perceptually distorted image is multiplied by the weight to generate an enhanced feature that is easily perceived by the human eye.
[0143] Figure 2 An example schematic diagram of generating a reconstructed image according to an embodiment of the present invention is shown.
[0144] like Figure 2As shown, the image compression model includes an encoder, entropy coding, and a decoder. The encoder includes two encoding sub-models. Correspondingly, the decoder includes two decoding sub-models. The encoding sub-model consists of a feature extraction layer, an attention network layer, and a feature transformation layer. The feature extraction layer refers to the first feature extraction layer, the second feature extraction layer, the third feature extraction layer, and the fourth feature extraction layer. The attention network layer refers to the first attention network layer and the second attention network layer. The feature transformation layer consists of a tangent activation sub-layer, a convolution sub-layer, a first gating sub-layer, and a second gating sub-layer. Entropy coding consists of an entropy coding sub-model and a perceptible distortion image feature compression sub-model. The entropy coding sub-model consists of an autoregressive layer, a quantization layer Q, an arithmetic encoder-decoder layer (arithmetic encoder sub-layer AE, arithmetic decoder sub-layer AD), and an inverse quantization layer IQ.
[0145] Optionally, obtain an image to be processed and a detectable distorted image corresponding to the image to be processed; input the image to be processed and the image with minimum detectable distortion into an encoder, and output the initial features of the image. and initial characteristics of perceptible distortion ; Input the initial features of the perceptible distortion into the perceptible distortion image feature compression sub-model, and output the perceptible distortion image compression features ; Compress the observable distortion image features and the initial features of the image Input to the entropy coding sub-model and output image compression features ; Compress the image features and observable distortion image compression features Input to the decoder and output the compressed reconstructed image.
[0146] Figure 3 A flow chart of a method for training an image compression model according to an embodiment of the present invention is shown.
[0147] like Figure 3 As shown, the training method 300 includes operations S310 to S360.
[0148] In operation S310, a training sample is obtained, where the training sample includes a sample image and a sample minimum observable distortion image corresponding to the sample image.
[0149] In operation S320, a sample image and a sample minimum observable distortion image are input to an encoder, and a sample image initial feature and a sample minimum observable distortion initial feature are output.
[0150] In operation S330 , the sample perceptible distortion initial feature is input into the perceptible distortion image feature compression sub-model, and the sample perceptible distortion image compression feature is output.
[0151] In operation S340, the sample perceptibly distorted image compression feature and the sample image initial feature are input into an entropy coding sub-model, and the sample image compression feature is output.
[0152] In operation S350, the sample image compression feature and the sample perceptible distortion image compression feature are input to a decoder, and a compressed sample reconstructed image is output.
[0153] In operation S360, an image compression model is trained according to the sample image, the sample reconstructed image, and the sample observable distortion initial features to obtain a trained image compression model.
[0154] Optionally, the image compression model includes: an encoder, a perceptible distortion image feature compression sub-model, an entropy coding sub-model and a decoder.
[0155] Optionally, the sample images may come from the Flicker 2W dataset, which contains a total of 20,745 sample images. Each sample image is processed using the perceptible distortion prediction model to obtain a sample minimum perceptible distortion image corresponding to each sample image. The training samples include 20,745 sample images and 20,745 sample minimum perceptible distortion images.
[0156] Optionally, a sample image block group is randomly divided for each sample image and the sample minimum observable distortion image corresponding to the sample image, the sample image block group includes image blocks from the sample image division and image blocks from the sample minimum observable distortion image division at corresponding positions, the resolution of each image block can be 256×256, 20745 sample image block groups are input into the encoder, and the sample image initial features and the sample observable distortion initial features are output.
[0157] Optionally, the sample minimum perceptible distortion image is obtained by processing the sample image based on the perceptible distortion prediction model. Channel splicing is performed on the sample perceptible distortion initial features to obtain the sample perceptible distortion initial features that meet the processable size requirements of the perceptible distortion image feature compression sub-model, and then the channel spliced sample perceptible distortion initial features are input into the perceptible distortion image feature compression sub-model to output the sample perceptible distortion image compression features.
[0158] Optionally, in the entropy coding sub-model, the sample observable distortion image compression feature is used to adjust the quantization step of the initial image feature, thereby guiding the quantization and dequantization process of the initial image feature to obtain the sample image compression feature. Since the rounding function of the quantization process is not continuously differentiable, uniform noise with variable upper and lower limits is used to simulate the quantization process during the training process, and the variation range of the uniform noise is the same as the quantization step.
[0159] Optionally, the internal structures of the decoder and the encoder may be symmetrical, and the decoder is used to process the sample image compression features and the sample detectable distortion image compression features to obtain the compressed sample reconstructed image.
[0160] For example, taking the above encoder composed of the first encoding sub-model and the second encoding sub-model as an example, the structures of the first encoding sub-model and the second encoding sub-model are the same. The sample image and the sample minimum observable distortion image are input into the first encoding sub-model of the encoder, and the sample image initial features and the sample observable distortion initial features corresponding to the first encoding sub-model are output; the sample image initial features and the sample observable distortion initial features corresponding to the first encoding sub-model are input into the second encoding sub-model, and the sample image initial features and the sample observable distortion initial features corresponding to the second encoding sub-model are output, and the sample image initial features and the sample observable distortion initial features corresponding to the second encoding sub-model are determined as the sample image initial features and the sample observable distortion initial features output by the encoder.
[0161] Correspondingly, taking the decoder including the first decoding sub-model and the second decoding sub-model as an example, the first encoding sub-model is symmetrical with the first decoding sub-model, and the second encoding sub-model is symmetrical with the second decoding sub-model, the sample image compression features and the sample detectable distortion image compression features are input into the second decoding sub-model, and the sample reconstructed image corresponding to the second decoding sub-model is output, and then the sample reconstructed image corresponding to the second decoding sub-model is input into the first decoding sub-model, and the sample reconstructed image corresponding to the first decoding sub-model is output, and the sample reconstructed image corresponding to the first decoding sub-model is determined as the compressed sample reconstructed image output by the decoder.
[0162] Optionally, the performance of the model can be evaluated based on the sample image, the sample reconstructed image and the initial features of the sample observable distortion, and then the parameters of the image compression model can be adjusted to iteratively train the image compression model.
[0163] Optionally, an image compression model is trained according to the sample image, the sample reconstructed image and the sample observable distortion initial features to obtain a trained image compression model, including:
[0164] The sample image and the sample reconstructed image are processed according to the loss function to obtain the distortion loss value; the bit rate loss value is determined according to the initial features of the sample image and the initial features of the sample observable distortion; the image compression model is trained according to the distortion loss value and the bit rate loss value to obtain the trained image compression model.
[0165] Optionally, the loss function may include mean square error (MSE) and learned perceptual image patch similarity (LPIPS). For example, when the allocation ratio is 1:1000, the loss function is composed of MSE+1000*LPIPS. The sample image and the sample reconstructed image are processed according to the loss function to obtain a distortion loss value.
[0166] Optionally, the bit rate loss value includes a bit rate loss generated based on processing an initial feature of a perceptible distortion of the sample and a bit rate loss generated based on processing an initial feature of the sample image and processing a sample quantization feature corresponding to the initial feature of the sample image.
[0167] For example, the quantization layer processes the sample observable distortion image compression features and the sample image initial features to obtain the sample quantization features, and the autoregressive layer processes the sample image initial features to obtain the sample autoregressive features. The bit rate loss value includes the bit rate loss generated when the observable distortion image feature compression sub-model processes the sample observable distortion initial features, the bit rate loss generated when the autoregressive layer processes the sample image initial features, and the bit rate loss generated when the arithmetic codec layer processes the sample autoregressive features and the sample quantization features.
[0168] Optionally, when training models at different bitrate points, the weights of the distortion loss values in the loss function are set to 0.002, 0.004, 0.008, and 0.016, respectively. The optimizer for the image compression model can be Adaptive Moment Estimation (Adam). In the first 50,000 iterations, the learning rate is initially set to 0.000l, and then the learning rate is reduced by half every 20,000 iterations. The rate-distortion performance of the model is obtained based on the distortion loss value and the bitrate loss value, and the model parameters are updated by backpropagation until the rate-distortion performance of the model reaches a preset threshold. The model can be set to train for 50 rounds, and the server saves the model and parameters with the best rate-distortion performance during the training process.
[0169] Optionally, the test images can be from the Kodak, Tecnick, and BSD500 datasets, and the test images are processed to obtain the minimum observable distortion images for the test. The hardware platform for the test is an NVIDIA 3090Ti GPU with 24GB of video memory, and the operating environment is Ubuntu 20.04 LTS. The images are evaluated on the three datasets using Learned Perceptual Image Patch Similarity (LPIPS), Image Quality Similarity (Fréchet Inception Distance, FID), and Image Unbiased Estimation (Kernel Inception Distance, KID) to compare the encoding performance of the image compression method and six existing methods. In order to accurately quantify the improvement in encoding performance, (BD-rate) is used to evaluate the bit rate savings, and Bjontegaard Delta rate -Learned Perceptual Image PatchSimilarity (BD LPIPS), Bjontegaard Delta rate - Fréchet Inception Distance (BD-FID) and Bjontegaard Delta rate - Kernel Inception Distance (BD-KID) are used to evaluate image quality. The smaller the value, the better the encoding effect.
[0170] Table 1 schematically shows the encoding performance of the existing method and the method provided by the embodiment of the present invention on three data sets.
[0171]
[0172] Optionally, the models in method 1, method 2, method 4 and method 5 are all constructed based on a generative image compression model of a generative adversarial network (GAN); the model in method 3 is constructed based on an image compression network of a Transformer; method 4 combines adversarial loss and style loss in the loss function, and method 5 adds content adaptive loss to the loss function; the model in method 6 is constructed based on a compression network with a decoupled architecture.
[0173] Optionally, it can be seen from Table 1 that the present invention has achieved the best average coding performance in the three evaluation indicators (LPIPS, FID, KID). In terms of LPIPS of the three test data sets, the BD-LPIPS and BD-rate of the present invention are (-0.059, -68.979%), (-0.034, 64.139%) and (-0.056, -64.600%), respectively, achieving the best coding performance. In addition, the average values of BD-KID and BD-rate of the present invention in the three test data sets are (-0.008, -66.684%), (-0.001, -61.160%) and (-0.033, -75.983%), respectively, with the best coding performance. In terms of FID of the three test data sets, the present invention also achieves the largest BD-rate saving rate and BD-FID comparable to other comparison methods, namely (-43.923, -57.787%), (-11.034, -45.333%) and (-72.960, -58.042%). These results show that in image compression targeting human visual perception, compared with the other six existing methods, the present invention effectively removes image perception redundancy and greatly improves image compression coding efficiency.
[0174] Based on the above image compression method, the present invention also provides an image compression device. Figure 4 The device is described in detail.
[0175] Figure 4 A structural block diagram of an image compression device according to an embodiment of the present invention is shown.
[0176] like Figure 4 As shown, the image compression device 400 of this embodiment includes a first acquisition module 410 , a first encoding module 420 , a first processing module 430 , a first compression module 440 and a first decoding module 450 .
[0177] The first acquisition module 410 is used to acquire the image to be processed and the minimum observable distortion image corresponding to the image to be processed, wherein the minimum observable distortion image is obtained by processing the image to be processed based on the observable distortion prediction model. In one embodiment, the first acquisition module 410 can be used to perform the operation S110 described above, which will not be repeated here.
[0178] The first encoding module 420 is used to input the image to be processed and the minimum perceptible distortion image into the encoder, and output the image initial features and the perceptible distortion initial features. In one embodiment, the first encoding module 420 can be used to perform the operation S120 described above, which will not be described in detail here.
[0179] The first processing module 430 is used to input the initial feature of the perceptible distortion into the perceptible distortion image feature compression sub-model, and output the perceptible distortion image compression feature, wherein the perceptible distortion image feature compression sub-model is constructed based on the hyper-prior image compression network. In one embodiment, the first processing module 430 can be used to perform the operation S130 described above, which will not be repeated here.
[0180] The first compression module 440 is used to input the perceptibly distorted image compression feature and the image initial feature into the entropy coding sub-model, and output the image compression feature. In one embodiment, the first compression module 440 can be used to perform the operation S140 described above, which will not be described in detail here.
[0181] The first decoding module 450 is used to input the image compression feature and the perceptible distortion image compression feature into the decoder, and output the compressed reconstructed image. In one embodiment, the first decoding module 450 can be used to perform the operation S150 described above, which will not be described in detail here.
[0182] Optionally, the first compression module 440 includes a quantization submodule, an autoregression submodule, a compression submodule and a dequantization submodule.
[0183] The quantization submodule is used to input the compression features of the perceptibly distorted image and the initial features of the image into the quantization layer and output the quantized features.
[0184] The autoregressive submodule is used to input the initial features of the image into the autoregressive layer and output encoding parameters and decoding parameters.
[0185] The compression submodule is used to process the encoding parameters, decoding parameters and quantization features according to the arithmetic codec layer to obtain the intermediate features of the image.
[0186] The inverse quantization submodule is used to input the perceptible distortion image compression features and the image intermediate features into the inverse quantization layer and output the image compression features.
[0187] Optionally, the compression submodule includes an arithmetic encoding unit and an arithmetic decoding unit.
[0188] The arithmetic coding unit is used to process the coding parameters and quantization features according to the arithmetic encoder sublayer to obtain image coding features.
[0189] The arithmetic decoding unit is used to process the decoding parameters and the image coding features according to the arithmetic decoder sublayer to obtain the intermediate features of the image.
[0190] Optionally, the first encoding module 420 includes a first encoding submodule, a second encoding submodule, a third encoding submodule, a fourth encoding submodule, a fifth encoding submodule, a sixth encoding submodule and a seventh encoding submodule.
[0191] The first encoding submodule is used to extract features from the image to be processed according to the first feature extraction layer to obtain a first feature of the image.
[0192] The second encoding submodule is used to extract features of the minimum perceptible distortion image according to the second feature extraction layer to obtain a first feature of the perceptible distortion image.
[0193] The third encoding submodule is used to input the first image feature and the first perceptibly distorted image feature into the feature transformation layer, and output the second image feature and the second perceptibly distorted image feature.
[0194] The fourth encoding submodule is used to extract the second feature of the image according to the third feature extraction layer to obtain the third feature of the image.
[0195] The fifth encoding submodule is used to process the third feature of the image according to the first attention network layer to obtain the initial feature of the image.
[0196] The sixth encoding submodule is used to extract the second feature of the perceptible distorted image according to the fourth feature extraction layer to obtain the third feature of the perceptible distorted image.
[0197] The seventh encoding submodule is used to process the third feature of the perceptible distortion image according to the second attention network layer to obtain the initial feature of the perceptible distortion.
[0198] Optionally, the third encoding submodule includes a first encoding unit, a second encoding unit, a third encoding unit, a fourth encoding unit, a fifth encoding unit and a sixth encoding unit.
[0199] The first encoding unit is used to input the first feature of the perceptibly distorted image into the convolution sublayer, and output the second feature of the perceptibly distorted image.
[0200] The second encoding unit is used to input the first feature of the image into the convolution sublayer and output the first convolution feature of the image.
[0201] The third encoding unit is used to process the first convolution feature of the image and the second feature of the perceptibly distorted image according to the first gating sublayer to obtain a weighted feature.
[0202] The fourth encoding unit is used to process the first convolution feature of the image and the second feature of the perceptibly distorted image according to the second gating sublayer to obtain a weight.
[0203] The fifth encoding unit is used to process the weighted features, the weights and the second features of the perceptible distorted image according to the tangent activation sublayer to obtain enhanced features.
[0204] The sixth encoding unit is used to obtain the second feature of the image according to the enhanced feature, the weight and the first convolution feature of the image.
[0205] Based on the above-mentioned image compression model training method, the present invention also provides an image compression model training device. Figure 5 The device is described in detail.
[0206] Figure 5 A structural block diagram of an image compression device according to an embodiment of the present invention is shown.
[0207] like Figure 5 As shown, the image compression model training device 500 of this embodiment includes a second acquisition module 510, a second encoding module 520, a second processing module 530, a second compression module 540, a second decoding module 550 and a training module 560.
[0208] The second acquisition module 510 is used to acquire a training sample, wherein the training sample includes a sample image and a sample minimum observable distortion image corresponding to the sample image, wherein the sample minimum observable distortion image is obtained by processing the sample image based on the observable distortion prediction model. In one embodiment, the second acquisition module 510 can be used to perform the operation S310 described above, which will not be described in detail herein.
[0209] The second encoding module 520 is used to input the sample image and the sample minimum observable distortion image into the encoder, and output the sample image initial features and the sample observable distortion initial features. In one embodiment, the second encoding module 520 can be used to perform the operation S320 described above, which will not be repeated here.
[0210] The second processing module 530 is used to input the sample perceptible distortion initial feature into the perceptible distortion image feature compression sub-model, and output the sample perceptible distortion image compression feature, wherein the perceptible distortion image feature compression sub-model is constructed based on the hyper-prior image compression network. In one embodiment, the second processing module 530 can be used to perform the operation S330 described above, which will not be repeated here.
[0211] The second compression module 540 is used to input the sample perceptibly distorted image compression feature and the sample image initial feature into the entropy coding sub-model, and output the sample image compression feature. In one embodiment, the second compression module 540 can be used to perform the operation S340 described above, which will not be repeated here.
[0212] The second decoding module 550 is used to input the sample image compression feature and the sample perceptible distortion image compression feature into the decoder, and output the compressed sample reconstructed image. In one embodiment, the second decoding module 550 can be used to perform the operation S350 described above, which will not be repeated here.
[0213] The training module 560 is used to train the image compression model according to the sample image, the sample reconstructed image and the sample observable distortion initial features to obtain the trained image compression model. In one embodiment, the training module 560 can be used to perform the operation S360 described above, which will not be described in detail here.
[0214] Optionally, the training module 560 includes a first training submodule, a second training submodule and a third training submodule.
[0215] The first training submodule is used to process the sample image and the sample reconstructed image according to the loss function to obtain a distortion loss value.
[0216] The second training submodule is used to determine the bit rate loss value according to the sample image initial feature and the sample minimum initial feature.
[0217] The third training submodule is used to train the image compression model according to the distortion loss value and the bit rate loss value to obtain the trained image compression model.
[0218] Optionally, any multiple modules among the modules, submodules, units, and subunits can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. Optionally, at least one of the modules, submodules, units, and subunits can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the modules, submodules, units, and subunits can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0219] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present invention can be combined and / or combined in various ways, even if such a combination or combination is not explicitly recorded in the present invention. In particular, without departing from the spirit and teaching of the present invention, the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present invention.
[0220] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination. The scope of the present invention is defined by the attached claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. An image compression method, characterized in that: The method comprises: Acquire an image to be processed and a minimum observable distortion image corresponding to the image to be processed, wherein the minimum observable distortion image is obtained by processing the image to be processed based on a perceptible distortion prediction model; Inputting the image to be processed and the minimum perceptible distortion image into an encoder, and outputting initial image features and initial perceptible distortion features, including: Extracting features of the image to be processed according to the first feature extraction layer to obtain a first feature of the image; extracting features of the minimum perceptible distortion image according to the second feature extraction layer to obtain a first feature of the perceptible distortion image; inputting the first feature of the image and the first feature of the perceptible distortion image into a feature transformation layer, and outputting a second feature of the image and a second feature of the perceptible distortion image, including: Input the first feature of the perceptibly distorted image into a convolution sublayer, and output the second feature of the perceptibly distorted image; input the first feature of the image into a convolution sublayer, and output the first convolution feature of the image; process the first convolution feature of the image and the second feature of the perceptibly distorted image according to the first gating sublayer to obtain a weighted feature; process the first convolution feature of the image and the second feature of the perceptibly distorted image according to the second gating sublayer to obtain a weight; process the weighted feature, the weight, and the second feature of the perceptibly distorted image according to the tangent activation sublayer to obtain an enhanced feature; obtain the second feature of the image according to the enhanced feature, the weight, and the first convolution feature of the image, wherein the feature transformation layer includes the tangent activation sublayer, the convolution sublayer, the first gating sublayer, and the second gating sublayer; According to the third feature extraction layer, feature extraction is performed on the second feature of the image to obtain the third feature of the image; according to the first attention network layer, the third feature of the image is processed to obtain the initial feature of the image; according to the fourth feature extraction layer, feature extraction is performed on the second feature of the perceptible distortion image to obtain the third feature of the perceptible distortion image; according to the second attention network layer, the third feature of the perceptible distortion image is processed to obtain the initial feature of the perceptible distortion, wherein the encoder includes at least one encoding sub-model, and the encoding sub-model includes the first feature extraction layer, the second feature extraction layer, the third feature extraction layer, the fourth feature extraction layer, the feature transformation layer, the first attention network layer, and the second attention network layer; Inputting the perceptible distortion initial feature into a perceptible distortion image feature compression sub-model, and outputting perceptible distortion image compression features, wherein the perceptible distortion image feature compression sub-model is constructed based on a hyper-prior image compression network; Inputting the perceptible distortion image compression feature and the image initial feature into an entropy coding sub-model, and outputting the image compression feature; The image compression feature and the perceptible distortion image compression feature are input into a decoder, and a compressed reconstructed image is output.
2. The method according to claim 1, characterized in that The entropy coding sub-model includes an autoregressive layer, a quantization layer, an arithmetic codec layer, and an inverse quantization layer; The process of inputting the perceptible distorted image compression feature and the image initial feature into an entropy coding sub-model and outputting the image compression feature comprises: Inputting the perceptibly distorted image compression feature and the image initial feature into the quantization layer, and outputting the quantized feature; Inputting the initial features of the image into the autoregressive layer, and outputting encoding parameters and decoding parameters; Processing the encoding parameter, the decoding parameter and the quantization feature according to the arithmetic codec layer to obtain an intermediate image feature; The perceptible distortion image compression feature and the image intermediate feature are input into the dequantization layer, and the image compression feature is output.
3. The method according to claim 2, characterized in that The arithmetic codec layer includes an arithmetic encoder sublayer and an arithmetic decoder sublayer; The step of processing the encoding parameter, the decoding parameter and the quantization feature according to the arithmetic codec layer to obtain the intermediate image feature comprises: Processing the encoding parameters and the quantization features according to the arithmetic encoder sublayer to obtain image encoding features; The decoding parameters and the image coding features are processed according to the arithmetic decoder sublayer to obtain the image intermediate features.
4. The method according to claim 1, characterized in that: The image compression model includes: the encoder, the perceptible distortion image feature compression sub-model, the entropy coding sub-model and the decoder. The training method of the image compression model includes the following operations: Acquire a training sample, wherein the training sample includes a sample image and a sample minimum observable distortion image corresponding to the sample image, wherein the sample minimum observable distortion image is obtained by processing the sample image based on a perceptible distortion prediction model; Input the sample image and the sample minimum observable distortion image into the encoder, and output the sample image initial features and the sample minimum observable distortion initial features; Inputting the sample observable distortion initial feature into the observable distortion image feature compression sub-model, and outputting the sample observable distortion image compression feature, wherein the observable distortion image feature compression sub-model is constructed based on a hyper-prior image compression network; Inputting the sample observable distortion image compression feature and the sample image initial feature into the entropy coding sub-model, and outputting the sample image compression feature; Inputting the sample image compression feature and the sample observable distortion image compression feature into the decoder, and outputting a compressed sample reconstructed image; An image compression model is trained according to the sample image, the sample reconstructed image and the sample detectable distortion initial features to obtain a trained image compression model.
5. The method according to claim 4, characterized in that Training an image compression model according to the sample image, the sample reconstructed image and the sample detectable distortion initial features to obtain a trained image compression model includes: Process the sample image and the sample reconstructed image according to the loss function to obtain a distortion loss value; Determining a bit rate loss value according to the sample image initial features and the sample observable distortion initial features; The image compression model is trained according to the distortion loss value and the bit rate loss value to obtain a trained image compression model.
6. An image compression device, characterized in that: The device comprises: A first acquisition module is used to acquire an image to be processed and a minimum observable distortion image corresponding to the image to be processed, wherein the minimum observable distortion image is obtained by processing the image to be processed based on a perceptible distortion prediction model; The first encoding module is used to input the image to be processed and the minimum perceptible distortion image into an encoder, and output the initial image features and the initial perceptible distortion features, including: Extracting features of the image to be processed according to the first feature extraction layer to obtain a first feature of the image; extracting features of the minimum perceptible distortion image according to the second feature extraction layer to obtain a first feature of the perceptible distortion image; inputting the first feature of the image and the first feature of the perceptible distortion image into a feature transformation layer, and outputting a second feature of the image and a second feature of the perceptible distortion image, including: Input the first feature of the perceptibly distorted image into a convolution sublayer, and output the second feature of the perceptibly distorted image; input the first feature of the image into a convolution sublayer, and output the first convolution feature of the image; process the first convolution feature of the image and the second feature of the perceptibly distorted image according to the first gating sublayer to obtain a weighted feature; process the first convolution feature of the image and the second feature of the perceptibly distorted image according to the second gating sublayer to obtain a weight; process the weighted feature, the weight, and the second feature of the perceptibly distorted image according to the tangent activation sublayer to obtain an enhanced feature; obtain the second feature of the image according to the enhanced feature, the weight, and the first convolution feature of the image, wherein the feature transformation layer includes the tangent activation sublayer, the convolution sublayer, the first gating sublayer, and the second gating sublayer; According to the third feature extraction layer, feature extraction is performed on the second feature of the image to obtain the third feature of the image; according to the first attention network layer, the third feature of the image is processed to obtain the initial feature of the image; according to the fourth feature extraction layer, feature extraction is performed on the second feature of the perceptible distortion image to obtain the third feature of the perceptible distortion image; according to the second attention network layer, the third feature of the perceptible distortion image is processed to obtain the initial feature of the perceptible distortion, wherein the encoder includes at least one encoding sub-model, and the encoding sub-model includes the first feature extraction layer, the second feature extraction layer, the third feature extraction layer, the fourth feature extraction layer, the feature transformation layer, the first attention network layer, and the second attention network layer; A first processing module, configured to input the perceptible distortion initial feature into a perceptible distortion image feature compression sub-model, and output a perceptible distortion image compression feature, wherein the perceptible distortion image feature compression sub-model is constructed based on a hyper-prior image compression network; A first compression module, used for inputting the perceptibly distorted image compression feature and the image initial feature into an entropy coding sub-model, and outputting an image compression feature; The first decoding module is used to input the image compression feature and the perceptible distortion image compression feature into a decoder, and output a compressed reconstructed image.
