Coding method, apparatus and device, decoding method, apparatus and device, storage medium, and computer program

By correcting the output feature map of each network layer in the super-encoding network, the stability and coding performance bottleneck problems of image compression methods in deep learning technology are solved, and more efficient image compression and reconstruction effects are achieved.

WO2024164591A1PCT designated stage expired Publication Date: 2024-08-15HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2023/129996
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-08
Filing Date
2023-11-06
Publication Date
2024-08-15

AI Technical Summary

Technical Problem

Existing image compression methods based on deep learning technology have bottlenecks in encoding and decoding performance and stability, especially the problems of excessive code rate after encoding and abnormal reconstructed images.

Method used

A coding and decoding method is proposed by introducing multiple network layers into the super-encoding network and correcting the output feature map of each network layer using specific correction parameters (such as maximum correction value, minimum correction value, correction coefficient ) to ensure that the feature values ​​are within the normal range, thereby improving the stability and compression rate of the encoding network output.

Benefits of technology

It effectively improves the stability and coding performance of the image compression method, ensures the quality of the encoded code stream and reconstructed images, and avoids the problems of abnormal code rates and reduced image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023129996_15082024_PF_FP
    Figure CN2023129996_15082024_PF_FP
Patent Text Reader

Abstract

The present application relates to the field of image compression, and discloses a coding method, apparatus and device, a decoding method, apparatus and device, a storage medium, and a computer program. The coding method comprises: inputting a target image into a coding network to obtain an image feature of the target image; inputting the image feature into a hypercoding network to obtain a hyperprior feature of the target image, wherein the hypercoding network comprises a plurality of first network layers, and in the process of determining the hyperprior feature on the basis of the hypercoding network, according to a first correction parameter corresponding to each of the plurality of first network layers, an output feature map of each first network layer is corrected; inputting the hyperprior feature into a hyperdecoding network to obtain a probability distribution of the image feature; and coding the hyperprior feature into a bit stream, and coding the image feature into the bit stream on the basis of the probability distribution of the image feature. The output feature maps of the first network layers in the hypercoding network are corrected, so that there is no abnormality in the bit stream of the target image having undergone coding.
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method, device, equipment, storage medium and computer program

[0001] This application claims priority to Chinese patent application No. 202310126941.9 filed on February 8, 2023, entitled “Encoding and decoding method, apparatus, device, storage medium and computer program”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] The present application relates to the field of image compression, and in particular to a coding and decoding method, apparatus, device, storage medium and computer program. Background Art

[0003] Image compression is a technique that exploits image data characteristics such as spatial redundancy, visual redundancy, and statistical redundancy to represent the original image pixel matrix with fewer bits, either losslessly or losslessly. This enables efficient transmission and storage of image information, playing a crucial role in the current media age, where the variety and volume of image information are increasing. Image compression technology involves encoding and decoding images, and encoding and decoding performance (reflecting image quality) and encoding and decoding efficiency (reflecting encoding and decoding time) are key considerations in image compression technology.

[0004] In related technologies, after long-term research and optimization by technical personnel, lossy image compression standards such as JPEG have been established. However, these more traditional image compression technologies have encountered bottlenecks in improving encoding and decoding performance and can no longer meet the needs of the era of increasing multimedia application data. With the widespread application of deep learning technology in fields such as image recognition and object detection, deep learning technology has also been applied to image compression tasks. This image compression method based on deep learning technology outperforms traditional image compression methods in terms of encoding and decoding efficiency and image compression effect. For example, using a variational auto-encoder (VAE) based on deep learning technology for image encoding and decoding can significantly improve encoding and decoding performance and image compression effect.

[0005] However, image compression methods based on deep learning technology have problems with poor stability. For example, the bit rate after encoding the image is too high and the reconstructed image has anomalies.

[0006] Summary of the Invention

[0007] This application provides a coding and decoding method, apparatus, device, storage medium, and computer program that can, to a certain extent, solve the problem of poor coding and decoding network stability in related technologies. The technical solution is as follows:

[0008] In a first aspect, a coding method is provided, in which a target image is input into a coding network to obtain image features of the target image, and the image features are input into a super-coding network to obtain super-prior features of the target image; wherein the super-coding network includes multiple first network layers, the image features are processed by the multiple first network layers of the super-coding network, and an output feature map is obtained after each first network layer is processed. In the process of determining the super-prior features based on the super-coding network, the output feature map of each first network layer is corrected according to the first correction parameters corresponding to each first network layer in the multiple first network layers, and the corrected output feature map of the last network layer in the multiple first network layers is used to determine the super-prior features, and the super-prior features are input into a super-decoding network to obtain a probability distribution of the image features, and the super-prior features are encoded into a bitstream, and based on the probability distribution of the image features, the image features are encoded into the bitstream.

[0009] That is to say, after the image features of the target image are determined by the encoding network, the image features are input into the super encoding network, the super encoding network includes multiple first network layers, the image features are processed by the multiple first network layers of the super encoding network, and an output feature map is obtained after each first network layer is processed. The output feature map of each first network layer is corrected according to the first correction parameters corresponding to each first network layer in the multiple first network layers, and the super encoding network finally outputs the super prior features of the target image.

[0010] In order to clarify the reasons for the abnormal bit rate and / or reconstructed image after the image passes through the codec network, the technicians conducted statistics on the output feature maps of normal sample images and abnormal sample images in each layer of the codec network, and found that the value range of the feature values ​​of each group of feature points in the feature map corresponding to the normal sample image is smaller than the value range of the feature values ​​of the corresponding group of feature points in the feature map corresponding to the abnormal sample image. Based on this, the present application proposes a coding method that can correct the output feature map of each first network layer in the super coding network to improve the stability of the super prior features output by the super coding network, thereby ensuring the stability of the code stream after encoding the target image, so that there is no abnormality in the code stream after encoding the target image.

[0011] It should be noted that the above-mentioned coding network is used to determine the image features of the target image, that is, after the target image is input into the coding network, the coding network can output the image features of the target image. The above-mentioned super-coding network is used to determine the super-prior features of the target image, that is, after the image features of the target image are input into the super-coding network, the super-coding network can output the super-prior features of the target image. An image can output a feature map after passing through a network layer. Since the super-coding network contains multiple first network layers, after the image features of the target image are input into the super-coding network, each first network layer in the super-coding network can output the corresponding feature map to obtain the output feature map corresponding to each first network layer. The coding method provided in the present application can respectively correct the output feature map of each first network layer in the super-coding network.

[0012] Among them, the multiple first network layers included in the super encoding network can generally be considered to be connected in series, that is, the output of the previous network layer in the multiple first network layers serves as the input of the next network layer. Of course, in different situations, the internal architecture of the multiple first network layers may be different, and some network layers in the multiple first network layers may also be connected in parallel. The multiple second network layers included in the encoding network, the multiple third network layers included in the super decoding network, the multiple fourth network layers included in the super decoding network, and the multiple fifth network layers included in the decoding network can generally be considered to be connected in series, but the situation of some network layers being connected in parallel is not ruled out.

[0013] Each data in the output feature map can be called a feature point, which is obtained by performing a convolution operation on the image features of the target image, and the feature points in the output feature map can represent the features of the target image.

[0014] Optionally, the output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points; the output feature map of each first network layer is corrected according to the first correction parameters corresponding to each first network layer in the multiple first network layers, including: based on the correction parameters in the first correction parameters corresponding to each group of feature points, each group of feature points is corrected separately so that the characteristic value of each feature point in each corrected group of feature points is within the range corresponding to the respective correction parameters.

[0015] Since each first network layer has its own corresponding first correction parameter, and each group of feature points in the output feature map of each first network layer also has its own corresponding correction parameter, each group of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each group of feature points can be corrected separately in a targeted manner so that the characteristic value of each feature point after correction is within the range corresponding to the respective correction parameter, thereby effectively improving the stability of the code stream of the encoded target image.

[0016] Optionally, the correction parameters corresponding to the target group feature points include a maximum correction value and a minimum correction value, and the target group feature points are any group of feature points in multiple groups of feature points; based on the correction parameters in the first correction parameters corresponding to each group of feature points, each group of feature points is corrected separately, including: when the characteristic value of the target feature point is greater than or equal to the maximum correction value, the characteristic value of the target feature point is corrected to the maximum correction value, and the target feature point is any feature point in the target group of feature points; when the characteristic value of the target feature point is less than or equal to the minimum correction value, the characteristic value of the target feature point is corrected to the minimum correction value.

[0017] If the eigenvalue of the target feature point is greater than or equal to the maximum correction value, or the eigenvalue of the target feature point is less than or equal to the minimum correction value, it means that the eigenvalue of the target feature point is abnormal, that is, it is not within the normal value range. Therefore, the eigenvalue of the target feature point needs to be corrected to the maximum correction value or the minimum correction value so that the eigenvalue of the target feature point is back within the normal value range. The normal value range refers to the value range consisting of the maximum correction value and the minimum correction value. In this way, the value range of the eigenvalue of each group of feature points after correction can be guaranteed to be consistent with the normal value range, thereby improving the stability of the super-prior features output by the super-coding network.

[0018] Optionally, the correction parameters corresponding to the target group feature points include a maximum correction value, a minimum correction value, a first correction coefficient and a second correction coefficient, the first correction coefficient is a coefficient included in the first correction function, the second correction coefficient is a coefficient included in the second correction function, the first correction function and the second correction function are two-segment functions in a piecewise function, and the target group feature points are any group of feature points in multiple groups of feature points; based on the correction parameters corresponding to each group of feature points in the first correction parameters, each group of feature points is corrected separately, including: when the characteristic value of the target feature point is greater than or equal to the maximum correction value, the characteristic value of the target feature point is corrected based on the first correction coefficient so that the difference between the characteristic value of the target feature point after correction and the maximum correction value is within the first fluctuation range, and the target feature point is any feature point in the target group feature points; when the characteristic value of the target feature point is less than or equal to the minimum correction value, the characteristic value of the target feature point is corrected based on the second correction coefficient so that the difference between the characteristic value of the target feature point after correction and the minimum correction value is within the second fluctuation range.

[0019] Since the normal value range can only characterize the value of the eigenvalues ​​of most feature points, the eigenvalues ​​of the feature points in the feature map corresponding to some normal sample images may exceed the normal value range, but the eigenvalues ​​that exceed the normal value range are not abnormal eigenvalues. If the eigenvalues ​​that exceed the normal value range are directly corrected to the maximum correction value or the minimum correction value, the compression performance of encoding the target image will be limited. Therefore, the eigenvalue of the target feature point is corrected based on the first correction coefficient or the second correction coefficient so that the difference between the eigenvalue of the corrected target feature point and the maximum correction value is within the first fluctuation range, or the difference between the eigenvalue of the corrected target feature point and the minimum correction value is within the second fluctuation range, that is, the eigenvalue of the corrected target feature point is close to the maximum correction value or the minimum correction value. In this way, the freedom to correct the eigenvalue of the feature point during the encoding process is higher, avoiding the problem of limiting the compression performance of the encoding due to direct truncation of the eigenvalue, so that the compression performance of the encoding can be better presented, while ensuring the stability of the encoding, and achieving a better compression rate.

[0020] Optionally, the output feature map includes multiple channels, the feature points of multiple channels are multiple groups of feature points, and the feature points of one channel are one group of feature points; or, the output feature map includes multiple different regions, the feature points of multiple regions are multiple groups of feature points, and the feature points of one region are one group of feature points; or, the output feature map includes multiple channels, the feature points of multiple channels are multiple groups of feature points, the odd-row feature points of one channel are one group of feature points, and the even-row feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of multiple channels are multiple groups of feature points, the odd-column feature points of one channel are one group of feature points, and the even-column feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of multiple channels are multiple groups of feature points, the odd-row and odd-column feature points of one channel are one group of feature points, and the even-row and even-column feature points of one channel are one group of feature points.

[0021] Since the feature points of multiple channels of the output feature map can be multiple groups of feature points, or the multiple regions of the output feature map can be multiple groups of feature points, that is, the feature points in the output feature map can be grouped according to different needs, and each group of feature points can be flexibly corrected.

[0022] Optionally, the first correction parameter corresponding to each first network layer is obtained by statistically analyzing the output of each first network layer in the supercoding network when the supercoding network is trained based on the training data set.

[0023] Since the first correction parameter is obtained by statistically analyzing the output feature map of each first network layer in the supercoding network when the supercoding network is trained based on the training data set, the first correction parameter corresponding to each first network layer finally determined can accurately correct the output feature map of the first network layer, thereby ensuring the stability of the super-prior features output by the final supercoding network.

[0024] Optionally, before inputting the target image into the encoding network, the method further includes: inputting a training data set into the encoding network to obtain image features of the training data set; inputting the image features of the training data set into the super encoding network for training, wherein the image features of the training data set are processed by the multiple first network layers of the super encoding network, and an output feature map is obtained after each first network layer is processed; based on the output feature map of each first network layer in the super encoding network, determining the maximum value and minimum value corresponding to each first network layer; based on the maximum value and minimum value corresponding to each first network layer, determining the first correction parameter corresponding to each first network layer.

[0025] Since the maximum and minimum values ​​corresponding to each first network layer are obtained by statistically analyzing the output feature map of each first network layer in the supercoding network after the image features of the training data set are input into the supercoding network, the maximum and minimum values ​​corresponding to each first network layer can represent the maximum and minimum values ​​of the feature values ​​of the feature points in the output feature map of each first network layer corresponding to the training data set. In this case, based on the maximum and minimum values ​​corresponding to each first network layer, the first correction parameters corresponding to each first network layer determined can achieve accurate correction of the output feature map of the first network layer, thereby ensuring the stability of the super-prior features output by the final supercoding network.

[0026] Optionally, the training data set includes multiple training sample images, and the output feature map obtained after the image features of each training sample image pass through each first network layer includes multiple groups of feature points. Multiple maximum values ​​and multiple minimum values ​​are statistically obtained for each first network layer in the supercoding network, wherein each group of feature points in the output feature map corresponding to each training sample image corresponds to a maximum value and a minimum value; based on the maximum value and minimum value corresponding to each first network layer, the first correction parameter corresponding to each first network layer is determined, including: based on the multiple maximum values ​​corresponding to each group of feature points, determining the maximum correction value in the correction parameter corresponding to each group of feature points; based on the multiple minimum values ​​corresponding to each group of feature points, determining the minimum correction value in the correction parameter corresponding to each group of feature points.

[0027] Since the training data set includes multiple training sample images, each group of feature points in the output feature map corresponding to each training sample image corresponds to a maximum value and a minimum value. Therefore, taking the multiple training sample images as a whole, each group of feature points can correspond to multiple maximum values ​​and multiple minimum values. In this case, the maximum correction value and the minimum correction value in the correction parameters corresponding to each group of feature points finally determined can more comprehensively characterize the value range of the feature values ​​in the feature map corresponding to the multiple training sample images. Therefore, the accuracy of correcting the output feature map of the first network layer based on the correction parameters corresponding to each group of feature points is higher, thereby effectively ensuring the stability of the super-prior features output by the super-coding network.

[0028] Optionally, the method further includes: training each first network layer in the supercoding network based on a training data set to obtain a value of a first coefficient variable and a value of a second coefficient variable corresponding to each first network layer; wherein the training data set includes multiple training sample images, and an output feature map obtained after each training sample image passes through each first network layer includes multiple groups of feature points, each first network layer corresponds to multiple values ​​of first coefficient variables and multiple values ​​of second coefficient variables, and the same group of feature points in the output feature maps corresponding to the multiple training sample images corresponds to a value of a first coefficient variable and a value of a second coefficient variable; based on the maximum correction value in the correction parameter corresponding to each group of feature points and the value of the first coefficient variable corresponding to each group of feature points, determining the first correction coefficient in the correction parameter corresponding to each group of feature points, and based on the minimum correction value in the correction parameter corresponding to each group of feature points and the value of the second coefficient variable corresponding to each group of feature points, determining the second correction coefficient in the correction parameter corresponding to each group of feature points.

[0029] The value of the first correction coefficient and the value of the second correction coefficient are determined by training each first network layer in the supercoding network, so that the final value of the first correction coefficient and the value of the second correction coefficient can be more consistent with the supercoding network and more reliable, thereby effectively ensuring the stability of the super-prior features output by the supercoding network.

[0030] Optionally, before inputting the target image into the encoding network, the method further includes: training each first network layer in the super encoding network based on the training data set to obtain a first correction parameter corresponding to each first network layer.

[0031] By training each first network layer in the supercoding network to determine the first correction parameter corresponding to each first network layer, the amount of computation required to determine the first correction parameter corresponding to each first network layer can be effectively reduced. That is, the process of determining the first correction parameter is integrated with the process of model training, making the steps of determining the first correction parameter simpler and making the final first correction parameter more consistent with the supercoding network, thereby effectively ensuring the stability of the super-prior features output by the supercoding network.

[0032] Optionally, the encoding network includes multiple second network layers, the target image is processed by the multiple second network layers of the encoding network, and an output feature map is obtained after each second network layer is processed; the method also includes: in the process of determining the image features of the target image based on the encoding network, based on the second correction parameters corresponding to each second network layer in the multiple second network layers, the output feature map of each second network layer is corrected, and the corrected output feature map of the last network layer in the multiple second network layers is used to determine the image features of the target image.

[0033] Correcting the output feature map of each second network layer can ensure that the value range of the characteristic value of each set of feature points after correction is consistent with the normal value range, effectively improving the stability of the image features output by the encoding network, and further ensuring the stability of the code stream of the encoded target image, so that there is no anomaly in the code stream of the target image after encoding.

[0034] Optionally, the super-decoding network includes multiple third network layers, the super-prior features are processed by the multiple third network layers of the super-decoding network, and an output feature map is obtained after each processing by a third network layer; the method also includes: in the process of determining the probability distribution, based on the third correction parameters corresponding to each third network layer in the multiple third network layers, the output feature map of each third network layer is corrected, and the corrected output feature map of the last network layer in the multiple third network layers is used to determine the probability distribution.

[0035] That is to say, in addition to correcting the output feature maps of the multiple first network layers included in the super-encoding network, the output feature maps of the multiple third network layers included in the super-decoding network can also be corrected. In this way, the probability distribution of the image features determined by the super-decoding network can be ensured to be relatively stable without anomalies, thereby ensuring that the bit rate obtained after encoding the target image does not have anomalies, thereby improving the stability of the bit stream of the encoded target image.

[0036] It should be noted that the above-mentioned super-decoding network is used to determine the probability distribution of image features, that is, after the super-prior features of the target image are input into the super-decoding network, the super-encoding network can output the probability distribution of image features.

[0037] According to a second aspect, a decoding method is provided, in which a super-prior feature of a target image is parsed from a code stream, and based on the super-prior feature, a probability distribution of image features of the target image is determined through a super-decoding network, wherein the super-decoding network includes multiple fourth network layers, and the super-prior feature is processed by the multiple fourth network layers of the super-decoding network, and an output feature map is obtained after each processing by a fourth network layer. In the process of determining the probability distribution, the output feature map of each fourth network layer is corrected based on the fourth correction parameter corresponding to each fourth network layer in the multiple fourth network layers, and the corrected output feature map of the last network layer in the multiple fourth network layers is used to determine the probability distribution. Based on the probability distribution of the image features, the image features of the target image are parsed from the code stream, and based on the image features of the target image, a reconstructed target image is obtained through a decoding network.

[0038] Since the value range of the characteristic values ​​of each group of feature points in the feature map corresponding to the normal sample image is smaller than the value range of the characteristic values ​​of the corresponding group of feature points in the feature map corresponding to the abnormal sample image, based on this, the present application proposes a decoding method that can correct the output feature map of each fourth network layer in the super-decoding network to improve the stability of the probability distribution of the image features output by the super-decoding network, thereby ensuring the stability of the reconstructed image after decoding, so that there is no abnormality in the reconstructed image of the target image after decoding the code stream.

[0039] It should be noted that the super-decoding network is used to determine the probability distribution of image features. That is, after the super-prior features of the target image are input into the super-decoding network, the super-coding network can output the probability distribution of image features. The decoding network is used to reconstruct the target image. That is, after the image features of the target image are input into the decoding network, the decoding network can output the reconstructed target image.

[0040] Optionally, the output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points; the correcting the output feature map of each fourth network layer based on the fourth correction parameter corresponding to each fourth network layer in the multiple fourth network layers includes: based on the correction parameters in the fourth correction parameters corresponding to each group of feature points, respectively correcting each group of feature points so that the characteristic value of each feature point in each corrected group of feature points is within the range corresponding to the respective correction parameters.

[0041] Since each fourth network layer has its own corresponding fourth correction parameter, and each group of feature points in the output feature map of each fourth network layer also has its own corresponding correction parameter, each group of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each group of feature points can be corrected separately in a targeted manner so that the characteristic value of each feature point after correction is within the range corresponding to the respective correction parameter, thereby effectively improving the stability of the reconstructed image after decoding.

[0042] Optionally, the output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, and the feature points of one channel are one group of feature points; or, the output feature map includes multiple different regions, the feature points of the multiple regions are the multiple groups of feature points, and the feature points of one region are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-row feature points of one channel are one group of feature points, and the even-row feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-column feature points of one channel are one group of feature points, and the even-column feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-row and odd-column feature points of one channel are one group of feature points, and the even-row and even-column feature points of one channel are one group of feature points.

[0043] Since the feature points of multiple channels of the output feature map can be multiple groups of feature points, or the multiple regions of the output feature map can be multiple groups of feature points, that is, the feature points in the output feature map can be grouped according to different needs, so that each group of feature points can be flexibly corrected.

[0044] Optionally, the decoding network includes multiple fifth network layers, and the image features of the target image are processed by the multiple fifth network layers of the decoding network, and an output feature map is obtained after each fifth network layer is processed; the method also includes: in the process of obtaining the reconstructed target image, based on the fifth correction parameters corresponding to each fifth network layer in the multiple fifth network layers, the output feature map of each fifth network layer is corrected, and the corrected output feature map of the last network layer in the multiple fifth network layers is used to determine the reconstructed target image.

[0045] That is to say, in addition to correcting the output feature map of each fourth network layer of the super-decoding network, the output feature map of each fifth network layer of the decoding network can also be corrected, which can ensure that the value range of the characteristic value of each group of feature points after correction is consistent with the normal value range, effectively improving the stability of the reconstructed target image output by the decoding network, so that there is no abnormality in the reconstructed image of the target image after the code stream is decoded.

[0046] In a third aspect, a coding device is provided, wherein the coding device has the function of implementing the coding method described in the first aspect. The coding device includes at least one module, wherein the at least one module is configured to implement the coding method described in the first aspect.

[0047] In a fourth aspect, a decoding device is provided, wherein the decoding device has the function of implementing the decoding method described in the second aspect. The decoding device includes at least one module, wherein the at least one module is used to implement the decoding method described in the second aspect.

[0048] In a fifth aspect, an encoding device is provided, comprising a processor and a memory, wherein the memory is configured to store a program for executing the encoding method provided in the first aspect. The processor is configured to execute the program stored in the memory to implement the encoding method provided in the first aspect.

[0049] Optionally, the encoding device may further include a communication bus, which is used to establish a connection between the processor and the memory.

[0050] In a sixth aspect, a decoding device is provided, comprising a processor and a memory, wherein the memory is configured to store a program for executing the decoding method provided in the second aspect. The processor is configured to execute the program stored in the memory to implement the decoding method provided in the second aspect.

[0051] Optionally, the decoding device may further include a communication bus, which is used to establish a connection between the processor and the memory.

[0052] In the seventh aspect, a computer-readable storage medium is provided, wherein the storage medium stores instructions. When the instructions are executed on a computer, the computer executes the steps of the encoding method described in the first aspect or the steps of the decoding method described in the second aspect.

[0053] In an eighth aspect, a computer program product comprising instructions is provided. When the instructions are executed on a computer, the computer is caused to execute the steps of the encoding method described in the first aspect, or the steps of the decoding method described in the second aspect. Alternatively, a computer program is provided. When the computer program is executed on a computer, the computer is caused to execute the steps of the encoding method described in the first aspect, or the steps of the decoding method described in the second aspect.

[0054] In the ninth aspect, a coding and decoding system is provided, which includes a coding device and a decoding device, the coding device is used to implement the steps of the coding method described in the first aspect above, and the decoding device is used to implement the steps of the decoding method described in the second aspect above.

[0055] The technical effects obtained in the above-mentioned third, fourth, fifth, sixth, seventh, eighth and ninth aspects are similar to the technical effects obtained by the corresponding technical means in the first or second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] FIG1 is a statistical diagram of a maximum eigenvalue provided in an embodiment of the present application;

[0057] FIG2 is a statistical diagram of a minimum eigenvalue provided in an embodiment of the present application;

[0058] FIG3 is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0059] FIG4 is a schematic diagram of another implementation environment provided by an embodiment of the present application;

[0060] FIG5 is a schematic diagram of another implementation environment provided by an embodiment of the present application;

[0061] FIG6 is a flowchart of an encoding method provided in an embodiment of the present application;

[0062] FIG7 is a schematic diagram of the structure of a coding network provided in an embodiment of the present application;

[0063] FIG8 is a schematic diagram of a function provided in an embodiment of the present application;

[0064] FIG9 is a schematic diagram of an RD-Curve provided in an embodiment of the present application;

[0065] FIG10 is a schematic diagram of the structure of an entropy estimation network provided in an embodiment of the present application;

[0066] FIG11 is a flowchart of a decoding method provided in an embodiment of the present application;

[0067] FIG12 is a schematic diagram of the structure of a decoding network provided in an embodiment of the present application;

[0068] FIG13 is a schematic diagram of the structure of an entropy estimation network provided in an embodiment of the present application;

[0069] FIG14 is a schematic structural diagram of a coding and decoding framework provided in an embodiment of the present application;

[0070] FIG15 is a schematic diagram of a reconstructed image provided by an embodiment of the present application;

[0071] FIG16 is a schematic diagram of another reconstructed image provided by an embodiment of the present application;

[0072] FIG17 is a schematic structural diagram of an encoding device provided in an embodiment of the present application;

[0073] FIG18 is a schematic structural diagram of a decoding device provided in an embodiment of the present application;

[0074] FIG19 is a schematic block diagram of a coding and decoding device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0075] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0076] For ease of understanding, before explaining in detail the encoding and decoding method provided in the embodiment of the present application, the nouns, application scenarios and implementation environment involved in the embodiment of the present application are first introduced.

[0077] First, the terms involved in the embodiments of the present application are explained.

[0078] Artificial intelligence (AI) is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.

[0079] Rectified linear unit (ReLU): is a commonly used activation function in artificial neural networks, usually referring to nonlinear functions represented by ramp functions and their variants.

[0080] A convolutional neural network (CNN) is a feedforward neural network with a deep structure that incorporates convolutional computations. It is one of the leading algorithms in deep learning. A CNN may also include activation layers (such as ReLU), pooling layers, batch normalization layers, and fully connected layers. Typical CNNs include LeNet, AlexNet, VGGNet, and ResNet. A basic CNN consists of a backbone and a head network, while a more complex CNN consists of a backbone, neck, and head network.

[0081] Feature map: refers to the three-dimensional data output by network layers such as convolutional layer, activation layer, pooling layer, and batch normalization layer in CNN. The three dimensions of this three-dimensional data are width, height, and channel.

[0082] In an embodiment of the present application, an image can output a feature map after passing through a network layer, and the method provided in the embodiment of the present application can correct the output feature map of each network layer separately.

[0083] For any network layer, if the network layer contains 3 convolution kernels, the 3 convolution kernels can respectively convolve the feature map of the network layer input to obtain the output feature map of the network layer. The number of channels of the output feature map of the network layer is 3, that is, the number of convolution kernels contained in the network layer corresponds one to one to the number of channels of the output feature map of the network layer.

[0084] It should be noted that each data in the output feature map can be called a feature point, which is obtained by performing a convolution operation on the input of the network layer, and the feature points in the output feature map can represent the characteristics of the target image.

[0085] Variational Autoencoder: An AI-based image codec used for data compression or noise removal.

[0086] Peak signal to noise ratio (PSNR): It is an objective standard for evaluating image quality. The higher the PSNR, the better the image quality.

[0087] Bit rate / bit stream: In image compression, it refers to the code length required to encode a unit pixel. The higher the bit rate, the better the image reconstruction quality.

[0088] Pixel depth (bits per pixel, BPP): also known as bits / pixel, BPP is the number of bits used to store each pixel. The smaller the BPP, the lower the compression bit rate, and the larger the BPP, the higher the compression bit rate.

[0089] Quantization: This refers to converting a continuous signal into a discrete signal. In image compression, this refers to converting continuous features into discrete features. In entropy coding, the probability distribution is typically converted from continuous values ​​to discrete values.

[0090] Rate-distortion curve (RD-Curve): The horizontal axis is the bit rate and the vertical axis is the PSNR. Generally, the higher the curve is, the better the codec performance.

[0091] AI compression algorithm (AI Codec): refers to a data compression method based on deep learning technology.

[0092] Image compression is a technique that exploits image data characteristics such as spatial redundancy, visual redundancy, and statistical redundancy to represent the original image pixel matrix with fewer bits, either losslessly or losslessly. This enables efficient transmission and storage of image information, playing a crucial role in the current media age, where the variety and volume of image information are increasing. Image compression technology involves encoding and decoding images, and encoding and decoding performance (reflecting image quality) and encoding and decoding efficiency (reflecting encoding and decoding time) are key considerations in image compression technology.

[0093] After long-term research and optimization by technical personnel, lossy image compression standards such as the Joint Photographic Experts Group (JPEG) have been formed. However, these more traditional image compression technologies have encountered bottlenecks in improving encoding and decoding performance, and can no longer meet the needs of the era of increasing multimedia application data. With the widespread application of deep learning technology in image recognition, target detection and other fields, deep learning technology has also been applied to image compression tasks. This image compression method based on deep learning technology, that is, the AI ​​compression algorithm, is superior to traditional image compression methods in terms of encoding and decoding efficiency and image compression effect. For example, using a variational autoencoder based on deep learning technology for image encoding and decoding can greatly improve encoding and decoding performance and image compression effect.

[0094] In practical applications, while the encoding and decoding efficiency and image compression effect of the AI ​​compression algorithm are improved, there are also high requirements for the stability of the AI ​​compression algorithm. Stability mainly includes two aspects. On the one hand, it is the stability of the bit rate after encoding the image without adding noise and the stability of the reconstructed image effect. On the other hand, it is the stability of the bit rate after encoding the image with specific noise and the stability of the reconstructed image effect, that is, the stability against attacks. The AI ​​compression algorithm has poor stability in both aspects. For example, some images without noise have abnormal bit rates and / or abnormal reconstructed images after passing through the encoding and decoding network of the AI ​​compression algorithm. For another example, the bit rate and / or abnormal reconstructed images of images with specific noise after passing through the encoding and decoding network, that is, the performance of the AI ​​compression algorithm is seriously reduced.

[0095] The above-mentioned bit rate abnormality means that the compression rate of the image after passing through the codec network does not match the actual compression capability of the codec network, that is, the difference between the compression rate of the image after passing through the codec network and the target compression rate is greater than the compression rate difference threshold, and the target compression rate indicates the actual compression capability of the codec network. The presence of an abnormality in the reconstructed image means that the image quality of the reconstructed image after the image passes through the codec network is significantly different from the image quality of the image actually reconstructed by the codec network, that is, the difference between the image quality of the reconstructed image after passing through the codec network and the target image quality is greater than the image quality difference threshold, and the target image quality indicates the image quality of the image actually reconstructed by the codec network. Among them, the compression rate difference threshold and the image quality difference threshold are set in advance, and in different situations, they can also be adjusted according to different needs. For the sake of convenience of description, in the following text, images in which there are no abnormalities in the bit rate and reconstructed image after passing through the codec network are referred to as normal sample images, and images in which there are abnormalities in the bit rate and / or reconstructed image after passing through the codec network are referred to as abnormal sample images.

[0096] In order to clarify the reasons why the bit rate and / or reconstructed image of the abnormal sample image is abnormal after passing through the codec network, the technicians have statistically analyzed the output feature maps of the normal sample image and the abnormal sample image at each layer in the codec network. The output feature map of the normal sample image at any layer in the codec network can be called a normal sample feature map, and the output feature map of the abnormal sample image at any layer in the codec network can be called an abnormal sample feature map. That is, the normal sample feature map and the abnormal sample feature map respectively include multiple groups of feature points, and the multiple groups of feature points included in the normal sample feature map correspond one-to-one to the multiple groups of feature points included in the abnormal sample feature map. The maximum eigenvalue and the minimum eigenvalue of the eigenvalues ​​of each group of feature points included in the normal sample feature map and the abnormal sample feature map are statistically analyzed. Based on the statistical data, the technicians found that the maximum eigenvalue and the minimum eigenvalue of the eigenvalues ​​of each group of feature points included in the normal sample feature map and the abnormal sample feature map output at the same network layer are very different. Please refer to Figure 1. Taking the hyper encoder (HyEnc) network included in the codec network as an example, it can be seen from the statistical graph of the maximum eigenvalue of the eigenvalues ​​of each group of feature points included in the normal sample feature map and the abnormal sample feature map output by the first network layer in the hyperencoder network that in the first network layer in the hyperencoder network, the maximum eigenvalue of the eigenvalue of each group of feature points included in the abnormal sample feature map is greater than the maximum eigenvalue of the eigenvalue of the corresponding group of feature points in the normal sample feature map. Please refer to Figure 2. It can be seen from the statistical graph of the minimum eigenvalue of the eigenvalue of each group of feature points included in the normal sample feature map and the abnormal sample feature map output by the first network layer in the codec network that in the first network layer in the hyperencoder network, the minimum eigenvalue of the eigenvalue of each group of feature points included in the abnormal sample feature map is less than the minimum eigenvalue of the eigenvalue of the corresponding group of feature points in the normal sample feature map. In other words, the value range of the eigenvalue of each group of feature points in the normal sample feature map is smaller than the value range of the eigenvalue of the corresponding group of feature points in the abnormal sample feature map. Based on this, an embodiment of the present application provides a coding and decoding method that can correct the output feature map of the network layer in the coding and decoding network, thereby ensuring that there are no abnormalities in the bit rate and / or reconstructed image after the image passes through the coding and decoding network, thereby improving the stability of the coding and decoding network.

[0097] Next, the implementation environment involved in the embodiments of this application is introduced.

[0098] Please refer to Figure 3, which is a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment includes a source device 10, a destination device 20, a link 30, and a storage device 40. The source device 10 can generate an encoded image. Therefore, the source device 10 can also be referred to as an image encoding device. The destination device 20 can decode the encoded image generated by the source device 10. Therefore, the destination device 20 can also be referred to as an image decoding device. The link 30 can receive the encoded image generated by the source device 10 and transmit the encoded image to the destination device 20. The storage device 40 can receive the encoded image generated by the source device 10 and store the encoded image. Under such conditions, the destination device 20 can directly obtain the encoded image from the storage device 40. Alternatively, the storage device 40 can correspond to a file server or another intermediate storage device that can store the encoded image generated by the source device 10. Under such conditions, the destination device 20 can stream or download the encoded image stored by the storage device 40.

[0099] The source device 10 and the destination device 20 may each include one or more processors and a memory coupled to the one or more processors, wherein the memory may include random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, any other medium that can be used to store desired program code in the form of instructions or data structures accessible by a computer, etc. For example, the source device 10 and the destination device 20 may each include a mobile phone, a smartphone, a personal digital assistant (PDA), a wearable device, a pocket PC (PPC), a tablet computer, a smart car computer, a smart TV, a smart speaker, a desktop computer, a mobile computing device, a notebook (e.g., laptop) computer, a tablet computer, a set-top box, a telephone handset such as a so-called "smart" phone, a television, a camera, a display device, a digital media player, a video game console, an in-vehicle computer, or the like.

[0100] Link 30 may include one or more media or devices capable of transmitting encoded images from source device 10 to destination device 20. In one possible implementation, link 30 may include one or more communication media that enable source device 10 to send encoded images directly to destination device 20 in real time. In an embodiment of the present application, source device 10 may modulate the encoded images based on a communication standard, such as a wireless communication protocol, and may transmit the modulated images to destination device 20. The one or more communication media may include wireless and / or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from source device 10 to destination device 20, although this embodiment of the present application does not specifically limit this.

[0101] In one possible implementation, the storage device 40 may store the received encoded image sent by the source device 10, and the destination device 20 may directly obtain the encoded image from the storage device 40. Under such conditions, the storage device 40 may include any of a variety of distributed or locally accessible data storage media, for example, any of the various distributed or locally accessible data storage media may be a hard disk drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded images.

[0102] In one possible implementation, storage device 40 may correspond to a file server or another intermediate storage device that can store the encoded images generated by source device 10, and destination device 20 may stream or download the images stored on storage device 40. The file server may be any type of server capable of storing and transmitting the encoded images to destination device 20. In one possible implementation, the file server may include a network server, a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive. Destination device 20 may obtain the encoded images via any standard data connection, including an internet connection. Any standard data connection may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of the two suitable for obtaining the encoded images stored on the file server. The transmission of the encoded images from storage device 40 may be streaming, downloading, or a combination of the two.

[0103] The implementation environment shown in FIG3 is only one possible implementation method, and the technology of the embodiment of the present application is applicable not only to the source device 10 that can encode images and the destination device 20 that can decode encoded images shown in FIG3 , but also to other devices that can encode images and decode encoded images, and the embodiment of the present application does not make specific limitations on this.

[0104] In the implementation shown in FIG3 , source device 10 includes a data source 120, an encoder 100, and an output interface 140. In some embodiments, output interface 140 may include a modem and / or a transmitter, where the transmitter may also be referred to as a transmitter. Data source 120 may include an image capture device (e.g., a camera), an archive containing previously captured images, a feed interface for receiving images from an image content provider, and / or a computer graphics system for generating images, or a combination of these sources of images.

[0105] The data source 120 may send an image to the encoder 100, and the encoder 100 may encode the image received from the data source 120 to generate an encoded image. The encoder may send the encoded image to an output interface. In some embodiments, the source device 10 directly sends the encoded image to the destination device 20 via the output interface 140. In other embodiments, the encoded image may also be stored on the storage device 40 for later retrieval by the destination device 20 for decoding and / or display.

[0106] In the implementation environment shown in FIG3 , the destination device 20 includes an input interface 240, a decoder 200, and a display device 220. In some embodiments, the input interface 240 includes a receiver and / or a modem. The input interface 240 may receive encoded images via the link 30 and / or from the storage device 40, and then transmit the encoded images to the decoder 200. The decoder 200 may decode the received encoded images to obtain decoded images. The decoder may transmit the decoded images to the display device 220. The display device 220 may be integrated with the destination device 20 or may be external to the destination device 20. Generally, the display device 220 displays the decoded images. The display device 220 may be any of a variety of types of display devices, for example, the display device 220 may be a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other types of display devices.

[0107] Although not shown in FIG3 , in some aspects, encoder 100 and decoder 200 can be integrated with an encoder and decoder, respectively, and can include appropriate multiplexer-demultiplexer (MUX-DEMUX) units or other hardware and software for encoding both audio and video in a common data stream or in separate data streams. In some embodiments, the MUX-DEMUX units can conform to the ITU H.223 multiplexer protocol, or other protocols such as the User Datagram Protocol (UDP), if applicable.

[0108] The encoder 100 and the decoder 200 can each be any of the following circuits: one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the technology of the embodiments of the present application is implemented in part by software, the device can store instructions for the software in a suitable non-volatile computer-readable storage medium, and can use one or more processors to execute the instructions in hardware to implement the technology of the embodiments of the present application. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) can be regarded as one or more processors. Each of the encoder 100 and the decoder 200 can be included in one or more encoders or decoders, and any of the encoders or decoders can be integrated as part of a combined encoder / decoder (encoder / decoder) in the corresponding device.

[0109] Embodiments of the present application may generally refer to encoder 100 as "signaling" or "sending" certain information to another device, such as decoder 200. The terms "signaling" or "sending" may generally refer to the transmission of syntax elements and / or other data used to decode a compressed image. This transmission may occur in real time or near real time. Alternatively, this communication may occur over time, such as when syntax elements are stored in the encoded bitstream to a computer-readable storage medium during encoding, and a decoding device may then retrieve the syntax elements at any time after they are stored to this medium.

[0110] The encoding and decoding methods provided in the embodiments of the present application can be applied to a variety of scenarios. In each scenario, the images encoded and decoded can be images included in image files or images included in video files. It should be noted that, in conjunction with the implementation environment shown in Figure 3, any of the encoding methods described below can be executed by the encoder 100 in the source device 10. Any of the decoding methods described below can be executed by the decoder 200 in the destination device 20.

[0111] Figure 4 is a schematic diagram of another implementation environment provided by an embodiment of the present application. The implementation environment includes an encoding end and a decoding end. The encoding end includes an AI encoding module, an entropy encoding module, and a file saving module, and the decoding end includes a file loading module, an entropy decoding module, and an AI decoding module.

[0112] During the compression process, the encoder acquires the image to be compressed, such as a video or photo captured by a camera. The AI ​​encoding module then obtains the features to be encoded and their corresponding probability distribution. Based on this probability distribution, the entropy encoding module performs entropy encoding on the features to generate a bitstream file. This bitstream file is then saved by the file saving module to create a compressed file of the image. The compressed file is then input to the decoder, which loads the compressed file via the file loading module and reconstructs the image using the entropy decoding module and the AI ​​decoding module.

[0113] It should be noted that the AI ​​encoding module in Figure 4 is equivalent to the encoding network, super encoding network, and super decoding network in the embodiment of the present application, and the AI ​​decoding module is equivalent to the decoding network and super decoding network in the embodiment of the present application. The entropy encoding module in Figure 4 is equivalent to the entropy encoder in the embodiment of the present application, and the entropy decoding module in Figure 4 is equivalent to the entropy decoder in the embodiment of the present application.

[0114] Optionally, the data processing process of the AI ​​encoding module and the AI ​​decoding module is implemented on an embedded neural network processing unit (NPU) to improve data processing efficiency, and the processes such as entropy coding, saving files, and loading files are implemented on a central processing unit (CPU).

[0115] Optionally, the encoding end and the decoding end are one device, or the encoding end and the decoding end are two independent devices. If the encoding end and the decoding end are one device, the device can compress the image by the encoding method provided in the embodiment of the present application, and can also decompress the image by the decoding method provided in the embodiment of the present application. If the encoding end and the decoding end are two independent devices, the encoding method provided in the embodiment of the present application can be applied to the encoding end of the two devices, and the decoding method provided in the embodiment of the present application can be applied to the decoding end of the two devices. That is, for one device, the device has both an image compression function and an image decompression function, or the device has an image compression function or an image decompression function.

[0116] Next, the implementation environment shown in FIG4 is explained in detail with reference to FIG5 . Please refer to FIG5 , which is a schematic diagram of another implementation environment provided by an embodiment of the present application. The implementation environment includes an encoding device 11 and a decoding device 12 . The encoding device 11 includes an encoding network 501, a super encoding network 502, a super decoding network 503, and an entropy encoder 504 . The decoding device 12 includes an entropy decoder 505, a super decoding network 503, and a decoding network 506 .

[0117] During the compression process, the image to be compressed passes through the encoding network 501 to obtain image features y. Image features y then pass through the super-encoding network 502 to obtain super-prior features z. Based on the probability distribution specified by the factor entropy model in the entropy estimation network, the super-prior features z are entropy encoded by the entropy encoder 504, thereby encoding the super-prior features z into the bitstream. The bit sequence obtained by entropy encoding the super-prior features z constitutes the partial bit sequence included in the bitstream, which can be referred to as the super-prior bitstream.

[0118] In addition, the super-prior feature z passes through the super-decoding network 503 in the entropy estimation network to obtain the probability distribution N(μ, σ) of the image feature y, and then the feature to be encoded is determined based on the probability distribution N(μ, σ) of the image feature y. The feature to be encoded is entropy encoded by the entropy encoder 504 using a Gaussian distribution with a mean of 0 and a variance of σ to encode the image feature y into the bit stream. The bit sequence obtained by entropy encoding the image feature y is the partial bit sequence included in the bit stream, and this partial bit sequence can be called an image bit stream.

[0119] During the decoding process, according to the probability distribution specified by the factor entropy model in the entropy estimation network, the entropy decoder 505 is used to entropy decode the super-prior bit stream included in the code stream to obtain the super-prior feature z. The super-prior feature z passes through the super-decoding network 503 to obtain the probability distribution N(μ, σ) of the image feature y. The entropy decoder 505 entropy decodes the feature to be encoded from the code stream using a Gaussian distribution with a mean of 0 and a variance of σ. Based on the mean μ, after determining the image feature y, the image feature y is input into the decoding network 506 to obtain the reconstructed image.

[0120] FIG6 is a flow chart of an encoding method provided in an embodiment of the present application. Referring to FIG6 , the method includes the following steps.

[0121] Step 601: Input a target image into an encoding network to obtain image features of the target image.

[0122] In some embodiments, the encoding network includes multiple second network layers, the target image is processed by the multiple second network layers of the encoding network, and an output feature map is obtained after each processing by the second network layer. In the process of determining the image features of the target image based on the encoding network, the output feature map of each second network layer is corrected based on the second correction parameters corresponding to each second network layer in the multiple second network layers. The corrected output feature map of the last network layer in the multiple second network layers is used to determine the image features of the target image.

[0123] Based on the second correction parameters corresponding to each second network layer in the multiple second network layers, the output feature map of each second network layer is corrected. This is similar to the implementation method of correcting the output feature map of each first network layer according to the first correction parameters corresponding to each first network layer in the multiple first network layers in the following text. The detailed process will be introduced in subsequent embodiments and will not be elaborated here.

[0124] Correcting the output feature map of each second network layer can ensure that the value range of the characteristic value of each set of feature points after correction is consistent with the normal value range, effectively improving the stability of the image features output by the encoding network, and further ensuring the stability of the code stream of the encoded target image, so that there is no anomaly in the code stream of the target image after encoding.

[0125] As an example, Figure 7 is a structural diagram of a coding network provided in an embodiment of the present application. The coding network is a convolutional neural network, which includes four convolutional layers (Conv) and three activation layers interspersed in cascade (such as activation layers built based on Relu or other activation functions). The convolution kernel size of each convolution layer is 5×5, the number of channels of the output feature map is M, and each convolution layer downsamples the width and height by 2 times. It should be noted that the structure of the coding network shown in Figure 7 is not used to limit the embodiments of the present application. For example, the convolution kernel size, the number of channels of the feature map, the downsampling multiple, the number of downsampling times, the number of convolution layers, etc. can all be adjusted.

[0126] Step 602: Input the image features of the target image into the super-coding network to obtain the super-prior features of the target image, wherein the super-coding network includes multiple first network layers, and the image features of the target image are processed by the multiple first network layers of the super-coding network, and an output feature map is obtained after each first network layer is processed. In the process of determining the super-prior features based on the super-coding network, the output feature map of each first network layer is corrected according to the first correction parameters corresponding to each first network layer in the multiple first network layers, and the corrected output feature map of the last network layer in the multiple first network layers is used to determine the super-prior features of the target image.

[0127] In some embodiments, before inputting the image features of the target image into the super-coding network, the image features of the target image can also be quantized to obtain quantized image features, and then the quantized image features are input into the super-coding network to obtain super-prior features of the target image.

[0128] In some embodiments, the output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points. In this case, the process of correcting the output feature map of each first network layer according to the first correction parameter corresponding to each first network layer includes: correcting each group of feature points based on the correction parameters corresponding to each group of feature points in the first correction parameters, so that the feature value of each feature point in each corrected group of feature points is within the range corresponding to the respective correction parameters.

[0129] Since each first network layer has its own corresponding first correction parameter, and each group of feature points in the output feature map of each first network layer also has its own corresponding correction parameter, each group of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each group of feature points can be corrected separately in a targeted manner so that the characteristic value of each feature point after correction is within the range corresponding to the respective correction parameter, thereby effectively improving the stability of the code stream of the encoded target image.

[0130] There are multiple ways to implement correction of each group of feature points based on the correction parameters in the first correction parameters that correspond to each group of feature points. Two of these ways are described below.

[0131] First implementation: The correction parameters corresponding to the target group feature points include a maximum correction value and a minimum correction value. The target group feature points are any feature point in the multiple feature point groups. If the feature value of the target feature point is greater than or equal to the maximum correction value, the feature value of the target feature point is corrected to the maximum correction value. The target feature point is any feature point in the target group feature points. If the feature value of the target feature point is less than or equal to the minimum correction value, the feature value of the target feature point is corrected to the minimum correction value.

[0132] In some embodiments, when the characteristic value of the target characteristic point is less than the maximum correction value and greater than the minimum correction value, the characteristic value of the target characteristic point is kept unchanged.

[0133] Since the correction parameters corresponding to the target group feature points include a maximum correction value and a minimum correction value, for the convenience of description, the value range formed by the maximum correction value and the minimum correction value is referred to as a normal value range. When the characteristic value of the target feature point is less than the maximum correction value and greater than the minimum correction value, it is explained that the characteristic value of the target feature point is within the normal value range. Therefore, the characteristic value of the target feature point can be kept unchanged. When the characteristic value of the target feature point is greater than or equal to the maximum correction value, it is explained that the characteristic value of the target feature point is abnormal and greater than or equal to the maximum value in the normal value range. Therefore, it is necessary to correct the characteristic value of the target feature point to the maximum correction value so that the characteristic value of the target feature point is back within the normal value range. When the characteristic value of the target feature point is less than or equal to the minimum correction value, it is explained that the characteristic value of the target feature point is abnormal and less than or equal to the minimum value in the normal value range. Therefore, it is necessary to correct the characteristic value of the target feature point to the minimum correction value so that the characteristic value of the target feature point is back within the normal value range.

[0134] That is to say, if the eigenvalue of the target feature point is not within the normal value range, the eigenvalue of the target feature point is truncated so that the eigenvalue of the corrected target feature point is within the normal value range, thereby ensuring that the value range of the eigenvalue of each group of feature points after correction is consistent with the normal value range, thereby improving the stability of the super-prior features output by the super-coding network.

[0135] As an example, the following expression (1) can be used to represent the process of correcting the target group feature points in the first implementation manner.

[0136] In the above expression (1), It refers to the corrected eigenvalue of the feature point with coordinates (i, j) in the cth group of feature points, f c,i,j It refers to the eigenvalue before correction of the feature point with coordinates (i, j) in the cth group of feature points, mi c Refers to the minimum correction value in the cth group of correction parameters, ma c Refers to the maximum correction value in the cth group of correction parameters, max(f c,i,j ,mi c ) means taking f c,i,j and mi c The minimum value in min(max(f c,i,j ,mi c ),ma c ) means taking max(f c,i,j ,mi c ) and ma c The maximum value in .

[0137] As another example, the following expression (2) can be used to represent the process of correcting the target group feature points in the first implementation manner.

[0138] In the above expression (2), It refers to the corrected eigenvalue of the feature point with coordinates (i, j) in the cth group of feature points, f c,i,j It refers to the eigenvalue before correction of the feature point with coordinates (i, j) in the cth group of feature points, mi c Refers to the minimum correction value in the cth group of correction parameters, ma c Refers to the maximum correction value in the cth group of correction parameters, It means when f c,i,j Greater than mi c and is smaller than ma c hour, Equal to f c,i,j When f c,i,j Greater than or equal to ma c , Equal to ma c When f c,i,j Less than or equal to mi c , Equal to mi c , that is, The value of mi is limited to c andma c between.

[0139] The second implementation method: the correction parameters corresponding to the target group feature points include a maximum correction value, a minimum correction value, a first correction coefficient and a second correction coefficient, the first correction coefficient is a coefficient included in the first correction function, the second correction coefficient is a coefficient included in the second correction function, the first correction function and the second correction function are two-segment functions in a piecewise function, and the target group feature points are any group of feature points in a plurality of groups of feature points. When the characteristic value of the target feature point is greater than or equal to the maximum correction value, the characteristic value of the target feature point is corrected based on the first correction coefficient so that the difference between the characteristic value of the target feature point after correction and the maximum correction value is within the first fluctuation range, and the target feature point is any one of the target group feature points. When the characteristic value of the target feature point is less than or equal to the minimum correction value, the characteristic value of the target feature point is corrected based on the second correction coefficient so that the difference between the characteristic value of the target feature point after correction and the minimum correction value is within the second fluctuation range.

[0140] In some embodiments, when the characteristic value of the target characteristic point is less than the maximum correction value and greater than the minimum correction value, the characteristic value of the target characteristic point is kept unchanged.

[0141] Optionally, the first correction coefficient includes a first slope and a first intercept. In this case, the first slope is multiplied by the eigenvalue of the target feature point and then added to the first intercept to obtain a corrected eigenvalue, and the eigenvalue of the target feature point is updated to the corrected eigenvalue.

[0142] Optionally, the second correction coefficient includes a second slope and a second intercept. In this case, the second slope is multiplied by the eigenvalue of the target feature point and then added to the second intercept to obtain a corrected eigenvalue, and the eigenvalue of the target feature point is updated to the corrected eigenvalue.

[0143] In the case where the first correction coefficient and the second correction coefficient include a slope and an intercept, it indicates that the first correction function and the second correction function are two linear functions. Of course, in practical applications, the first correction coefficient and the second correction coefficient can also indicate a nonlinear function. That is, the first correction coefficient and the second correction coefficient can also include other parameters, and the parameters included in the first correction coefficient and the second correction coefficient do not need to correspond one to one. For example, the first correction coefficient can include a quadratic term coefficient, a linear term coefficient, and a constant term coefficient, and the second correction coefficient includes a base. In this case, the first correction function can be a quadratic function, and the second correction function can be a logarithmic function. The embodiments of the present application do not limit this.

[0144] When the characteristic value of the target feature point is less than the maximum correction value and greater than the minimum correction value, it means that the characteristic value of the target feature point is within the normal value range. Therefore, the characteristic value of the target feature point can be kept unchanged. When the characteristic value of the target feature point is greater than or equal to the maximum characteristic value, it means that the characteristic value of the target feature point is abnormal and is greater than or equal to the minimum value in the normal value range. Therefore, it is necessary to correct the characteristic value of the target feature point based on the first correction coefficient. When the characteristic value of the target feature point is less than or equal to the minimum characteristic value, it means that the characteristic value of the target feature point is abnormal and is less than or equal to the minimum value in the normal value range. Therefore, it is necessary to correct the characteristic value of the target feature point based on the second correction coefficient.

[0145] As an example, the second implementation method mentioned above can be expressed according to the following expression (3), and the function corresponding to the expression (3) can be shown in FIG8 .

[0146] In the above expression (3), It refers to the corrected eigenvalue of the feature point with coordinates (i, j) in the cth group of feature points, f c,i,j It refers to the eigenvalue before correction of the feature point with coordinates (i, j) in the cth group of feature points, mi c Refers to the minimum correction value in the cth group of correction parameters, mac It refers to the maximum correction value in the cth group of correction parameters, a refers to the first slope, b refers to the first intercept, c refers to the second slope, and d refers to the second intercept.

[0147] In some embodiments, the activation function corresponding to the target group feature point can be set to a piecewise function as shown in Expression (3) to achieve the correction of the eigenvalues ​​of the target group feature point. Of course, a module can also be added after each first network layer to correct the eigenvalues ​​of the target group feature point, which is not limited in this embodiment of the present application.

[0148] The first fluctuation range and the second fluctuation range are set in advance and can be adjusted according to different needs in different situations.

[0149] It should be noted that the output feature map of the first network layer includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, and the feature points of one channel are one group of feature points; or, the output feature map includes multiple different regions, the feature points of the multiple regions are the multiple groups of feature points, and the feature points of one region are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-row feature points of one channel are one group of feature points, and the even-row feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-column feature points of one channel are one group of feature points, and the even-column feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-row and odd-column feature points of one channel are one group of feature points, and the even-row and even-column feature points of one channel are one group of feature points.

[0150] That is to say, the feature points in the output feature map can be divided into multiple groups according to the channels included in the output feature map, so that the feature points of the same channel are one group. The feature points in the output feature map can also be divided according to the region. For example, the feature points in the target feature map with the same height and width (i.e., the same rows and columns) but different channels can be divided into one group. For another example, every three rows of feature points in the output feature map can be divided into one group in the order of channel and height from small to large. The embodiments of the present application are not limited to this.

[0151] Since the feature points of multiple channels of the output feature map can be multiple groups of feature points, or the multiple regions of the output feature map can be multiple groups of feature points, that is, the feature points in the output feature map can be grouped according to different needs, and each group of feature points can be flexibly corrected.

[0152] In summary, in the first implementation, the eigenvalues ​​of the abnormal feature points can be directly truncated so that the eigenvalues ​​of the corrected feature points are within the normal value range. The second implementation is to correct the eigenvalues ​​of the feature points based on the first correction coefficient and the second correction coefficient, that is, to make the eigenvalues ​​of the corrected target feature points close to the maximum correction value or the minimum correction value. In this way, the degree of freedom for correcting the eigenvalues ​​of the feature points during the encoding process is higher, avoiding the problem of the compression performance of the encoding being limited due to direct truncation of the eigenvalues, so that the compression performance of the encoding can be better presented, while ensuring the stability of the encoding, and achieving a better compression rate.

[0153] Please refer to Figure 9, which shows the RD-Curve corresponding to the first implementation and the second implementation respectively. It is not difficult to see from Figure 9 that the encoding method using the second implementation has better encoding performance than the encoding method using the first implementation, can achieve a better compression rate and can obtain a better quality reconstructed image after decoding.

[0154] Optionally, the first correction parameter corresponding to each first network layer is obtained by statistically analyzing the output of each first network layer in the supercoding network when the supercoding network is trained based on the training dataset. That is, in practical applications, before the target image is input into the coding network, the training dataset can also be input into the coding network to obtain image features of the training dataset, and the image features of the training dataset are then input into the supercoding network for training, wherein the image features of the training dataset are processed by multiple first network layers of the supercoding network, and an output feature map is obtained after each processing by the first network layer; based on the output feature map of each first network layer in the supercoding network, the maximum and minimum values ​​corresponding to each first network layer are determined, and based on the maximum and minimum values ​​corresponding to each first network layer, the first correction parameter corresponding to each first network layer is determined.

[0155] Since the maximum and minimum values ​​corresponding to each first network layer are obtained by statistically analyzing the output feature map of each first network layer in the supercoding network after the image features of the training data set are input into the supercoding network, the maximum and minimum values ​​corresponding to each first network layer can represent the maximum and minimum values ​​of the feature values ​​of the feature points in the output feature map of each first network layer corresponding to the training data set. In this case, based on the maximum and minimum values ​​corresponding to each first network layer, the first correction parameters corresponding to each first network layer determined can achieve accurate correction of the output feature map of the first network layer, thereby ensuring the stability of the super-prior features output by the final supercoding network.

[0156] In some embodiments, the training data set includes multiple training sample images, and the output feature map obtained after the image features of each training sample image pass through each first network layer includes multiple groups of feature points. Multiple maximum values ​​and multiple minimum values ​​are statistically obtained for each first network layer in the supercoding network, wherein each group of feature points in the output feature map corresponding to each training sample image corresponds to a maximum value and a minimum value. In this case, based on the multiple maximum values ​​corresponding to each group of feature points, the maximum correction value of the correction parameter corresponding to each group of feature points is determined, and based on the multiple minimum values ​​corresponding to each group of feature points, the minimum correction value of the correction parameter corresponding to each group of feature points is determined.

[0157] Since the training data set includes multiple training sample images, each group of feature points in the output feature map corresponding to each training sample image corresponds to a maximum value and a minimum value. Therefore, taking the multiple training sample images as a whole, each group of feature points can correspond to multiple maximum values ​​and multiple minimum values. In this case, the maximum correction value and the minimum correction value in the correction parameters corresponding to each group of feature points finally determined can more comprehensively characterize the value range of the feature values ​​in the feature map corresponding to the multiple training sample images. Therefore, the accuracy of correcting the output feature map of the first network layer based on the correction parameters corresponding to each group of feature points is higher, thereby effectively ensuring the stability of the super-prior features output by the super-coding network.

[0158] In some embodiments, for any one of the multiple groups of feature points, the average value of the multiple maximum values ​​corresponding to the group of feature points can be determined as the maximum correction value in the correction parameter corresponding to the group of feature points. In other embodiments, the maximum correction value in the correction parameter corresponding to the group of feature points can be determined using a sliding average method based on the multiple maximum values ​​corresponding to the group of feature points. In other embodiments, the mean and standard deviation corresponding to the multiple maximum values ​​corresponding to the group of feature points can be determined based on the multiple maximum values ​​corresponding to the group of feature points, and then the sum of three times the standard deviation and the mean can be determined as the maximum correction value in the correction parameter corresponding to the group of feature points. In other embodiments, the maximum value among the multiple maximum values ​​corresponding to the group of feature points can be determined as the maximum correction value in the correction parameter corresponding to the group of feature points. Of course, the maximum correction value in the correction parameter corresponding to the group of feature points can also be determined in other ways, and the embodiments of the present application are not limited to this. The multiple maximum values ​​corresponding to each group of feature points are processed in the same way, and the maximum correction value in the correction parameter corresponding to each group of feature points can be determined eventually.

[0159] The method of determining the minimum correction value in the correction parameters corresponding to each set of feature points is similar to the method of determining the maximum correction value in the correction parameters corresponding to each set of feature points. For details, please refer to the relevant content above and will not be repeated here.

[0160] In the case where the target group correction parameters also include the first correction coefficient and the second correction coefficient, each first network layer in the supercoding network can also be trained based on the training data set to obtain the value of the first coefficient variable and the value of the second coefficient variable corresponding to each first network layer, wherein the training data set includes multiple training sample images, and the output feature map obtained after each training sample image passes through each first network layer includes multiple groups of feature points, each first network layer corresponds to multiple values ​​of the first coefficient variables and multiple values ​​of the second coefficient variables, and the same group of feature points in the output feature map corresponding to the multiple training sample images corresponds to a value of the first coefficient variable and a value of the second coefficient variable. Based on the maximum correction value in the correction parameter corresponding to each group of feature points and the value of the first coefficient variable corresponding to each group of feature points, the first correction coefficient in the correction parameter corresponding to each group of feature points is determined, and based on the minimum correction value in the correction parameter corresponding to each group of feature points and the value of the second coefficient variable corresponding to each group of feature points, the second correction coefficient in the correction parameter corresponding to each group of feature points is determined.

[0161] The training data set is used as the input of the codec network, and the compression rate and image quality are used as constraints to train the codec network to train each first network layer in the super coding network, thereby obtaining the value of the first coefficient variable and the value of the second coefficient variable.

[0162] In some embodiments, when training the codec network, the first coefficient variable, the second coefficient variable, and other parameters in the codec network are set as variables, and the codec network is trained to obtain the value of the first coefficient variable and the value of the second coefficient variable corresponding to each first network layer. In other embodiments, after the codec network training is completed, the parameters of the trained codec network other than the first coefficient variable and the second coefficient variable are fixed, and the codec network is trained again to obtain the value of the first coefficient variable and the value of the second coefficient variable corresponding to each first network layer. That is, when training the codec network, the first coefficient variable and the second coefficient variable corresponding to each first network layer are also trained as parameters in the codec network, or after the codec network training is completed, the first coefficient variable and the second coefficient variable corresponding to each first network layer are trained separately. Of course, the value of the first coefficient variable and the second coefficient variable corresponding to each first network layer can also be determined by other methods, and the embodiments of the present application are not limited to this.

[0163] Optionally, the first correction coefficient includes a first slope and a first intercept. In this case, based on the maximum correction value in the correction parameter corresponding to each group of feature points and the value of the first coefficient variable corresponding to each group of feature points, the implementation process of determining the first correction coefficient in the correction parameter corresponding to each group of feature points includes: using the value of the first coefficient variable corresponding to each group of feature points as the first slope corresponding to each group of feature points, establishing an initial first correction equation corresponding to each group of feature points, wherein the first intercept in the initial first correction equation corresponding to each group of feature points is an unknown number, setting the independent variable and the dependent variable in the initial first correction equation corresponding to each group of feature points to the maximum correction value, solving the first intercept corresponding to each group of feature points, and using the first slope corresponding to each group of feature points and the solved first intercept corresponding to each group of feature points as the first correction coefficient.

[0164] Optionally, the second correction coefficient includes a second slope and a second intercept. In this case, the implementation method for determining the second correction coefficient in the correction parameters corresponding to each set of feature points is similar to the implementation method for determining the first correction coefficient in the correction parameters corresponding to each set of feature points described above. For details, please refer to the relevant content above and will not be repeated here.

[0165] That is to say, when the correction parameters corresponding to the target group feature points also include a first correction coefficient and a second correction coefficient, the first correction coefficient and the second correction coefficient can be determined by training the codec network to further enhance the compression capability of encoding the image and achieve better compression effect.

[0166] Based on the above description, before the target image is input into the coding network, the maximum correction value and the minimum correction value in the correction parameters corresponding to the target group feature points can be determined by statistical means, and when the correction parameters corresponding to the target group feature points include a first correction coefficient and a second correction coefficient, the first correction coefficient and the second correction coefficient can also be determined by training the coding and decoding network. In practical applications, no matter what type of parameters the correction parameters corresponding to the target group feature points include, the correction parameters corresponding to the target group feature points can be determined directly by training. That is, based on the training data set, each first network layer in the super coding network is trained to obtain the first correction parameter corresponding to each first network layer.

[0167] By training each first network layer in the supercoding network to determine the first correction parameter corresponding to each first network layer, the computational complexity of determining the first correction parameter corresponding to each first network layer can be effectively reduced. That is, the process of determining the first correction parameter is integrated with the process of model training, making the steps of determining the first correction parameter simpler and making the final first correction parameter more consistent with the supercoding network, thereby effectively ensuring the stability of the super-prior features of the target image output by the supercoding network.

[0168] When the correction parameters corresponding to the target group feature points include a maximum correction value and a minimum correction value, the codec network is trained based on the training data set to train each first network layer in the supercoding network, thereby obtaining the value of the maximum correction variable and the value of the minimum correction variable, and determining the value of the maximum correction variable as the maximum correction parameter, and determining the value of the minimum correction variable as the minimum correction parameter.

[0169] In the case where the correction parameters corresponding to the target group feature points also include a first correction coefficient and a second correction coefficient, the codec network is trained based on the training data set to obtain the value of the maximum correction variable, the value of the minimum correction variable, the value of the first coefficient variable, and the value of the second coefficient variable. The value of the maximum correction variable is determined as the maximum correction parameter, and the value of the minimum correction variable is determined as the minimum correction parameter. The first correction coefficient is determined based on the maximum correction value and the value of the first coefficient variable, and the second correction coefficient is determined based on the minimum correction value and the value of the second coefficient variable.

[0170] The implementation method of determining the first correction parameter corresponding to each first network layer is similar to the implementation method of determining the value of the first coefficient variable and the value of the second coefficient variable corresponding to each first network layer above. Please refer to the corresponding content above for the detailed process, which will not be repeated here.

[0171] It should be noted that when the maximum and minimum correction values ​​are determined statistically based on the training data set, the bit rate and reconstructed image of each of the multiple training sample images after passing through the codec network are free of abnormalities, that is, the multiple training sample images include normal sample images. When each first network layer in the supercoding network is trained based on the training data set, the bit rate and reconstructed image of each of the multiple training sample images after passing through the codec network are free of abnormalities. Of course, the bit rate and reconstructed image of some of the multiple training sample images after passing through the codec network may be free of abnormalities, while the bit rate and / or reconstructed image of other training sample images after passing through the codec network may be abnormal. In other words, the multiple training sample images include normal sample images, or the multiple training sample images include normal sample images and abnormal sample images, and this is not limited in the embodiments of the present application. Since compression rate and image quality are usually used as constraints when training the codec network, even if the training data set includes abnormal sample images, effective first correction parameters can be obtained.

[0172] In some embodiments, each network layer in the super-coding network can be used as the first network layer, so as to correct the output feature map of each network layer. In this way, it can effectively ensure that there is no abnormality in the bit rate of the image without noise after encoding, thereby improving the stability of the bit stream of the encoded target image.

[0173] In other embodiments, H abnormal network layers may be identified. These abnormal network layers refer to network layers in the super-coding network that cause abnormal encoding and decoding results, and at least one of the H abnormal network layers is used as the first network layer. In other words, only the output feature maps of the network layers in the super-coding network that cause abnormal encoding and decoding results are corrected, thereby reducing the amount of computation while ensuring stability.

[0174] The implementation process of determining H abnormal network layers includes: for any network layer included in the supercoding network, determining K first sample feature maps output by the network layer, where the K first sample feature maps are feature maps corresponding to K normal sample images, where K is an integer greater than or equal to 1; determining T second sample feature maps output by the network layer, where the T second sample feature maps are feature maps corresponding to T abnormal sample images, where T is an integer greater than or equal to 1; if the K first sample feature maps and the T second sample feature maps meet a feature abnormality condition, determining that the network layer is an abnormal network layer. If the K first sample feature maps and the T second sample feature maps do not meet the feature abnormality condition, determining that the network layer is not an abnormal network layer.

[0175] Based on the K first sample feature maps, a first statistical parameter is determined; based on the T second sample feature maps, a second statistical parameter is determined; based on the first statistical parameter and the second statistical parameter, it is determined whether the K first sample feature maps and the T second sample feature maps meet the feature abnormality condition.

[0176] Optionally, the first sample feature graph includes W groups of feature points, the second sample feature graph includes W groups of feature points, the first statistical parameter includes W groups of first parameters, the second statistical parameter includes W groups of second parameters, the first parameter includes a first maximum value and a first minimum value, and the second parameter includes a second maximum value and a second minimum value. In this case, the implementation method for determining the first statistical parameter and the implementation method for determining the second statistical parameter are similar to the implementation method for determining the first correction parameter corresponding to each first network layer in the case where the correction parameter corresponding to the target group feature point includes a maximum correction value and a minimum correction value. For details, please refer to the relevant content above and will not be repeated here.

[0177] The implementation process of determining whether the K first sample feature graphs and the T second sample feature graphs meet the feature abnormality condition based on the first statistical parameter and the second statistical parameter includes: determining the number of abnormal groups based on W groups of first parameters and W groups of second parameters, and when the number of abnormal groups is greater than or equal to a threshold number of abnormal groups, determining that the K first sample feature graphs and the T second sample feature graphs meet the feature abnormality condition. When the number of abnormal groups is less than the threshold number of abnormal groups, determining that the K first sample feature graphs and the T second sample feature graphs do not meet the feature abnormality condition.

[0178] In some embodiments, for any one of the W groups, if the difference between the first maximum value and the second maximum value of the group is greater than the maximum difference threshold and the difference between the first minimum value and the second minimum value is greater than the minimum difference threshold, then the group is determined to be an abnormal group, and the number of abnormal groups is increased by 1. Otherwise, the group is determined not to be an abnormal group. In the same manner, each group in the W groups is processed in the above manner to obtain the number of abnormal groups. In other embodiments, for any one of the W groups, if the difference between the first maximum value and the second maximum value of the group divided by the value of the first maximum value is greater than the maximum ratio threshold, and the difference between the first minimum value and the second minimum value divided by the value of the first minimum value is greater than the minimum ratio threshold, then the group is determined to be an abnormal group, and the number of abnormal groups is increased by 1. Otherwise, the group is determined not to be an abnormal group. In the same manner, each group in the W groups is processed in the above manner to obtain the number of abnormal groups. Of course, the number of abnormal groups can also be determined in other ways, and the embodiments of the present application are not limited to this.

[0179] When the number of abnormal groups is greater than or equal to the abnormal group number threshold, it indicates that the number of abnormal groups is large, and therefore, it can be determined that the K first sample feature graphs and the T second sample feature graphs meet the feature abnormality condition. When the number of abnormal groups is less than the abnormal group number threshold, it indicates that the number of abnormal groups is small, and therefore, it can be determined that the K first sample feature graphs and the T second sample feature graphs do not meet the feature abnormality condition.

[0180] The anomaly group number threshold is pre-set and is related to the number of feature points grouped in the output feature map of the network layer. For example, the anomaly group number threshold can be set to 80% of the number of feature points grouped in the output feature map of the network layer. The minimum difference threshold, maximum difference threshold, maximum ratio threshold, and minimum ratio threshold are also pre-set and can be adjusted to meet different needs in different situations.

[0181] If the K first sample feature graphs and the T second sample feature graphs meet the feature anomaly condition, it indicates that the output feature graph of the network layer is abnormal, and therefore, the network layer can be determined to be an abnormal network layer. If the K first sample feature graphs and the T second sample feature graphs do not meet the feature anomaly condition, it indicates that the output feature graph of the network layer is not abnormal, and therefore, the network layer can be determined not to be an abnormal network layer.

[0182] In some embodiments, the network layer that first experiences an abnormality among the H abnormal network layers can be used as the first network layer, or the network layer with the most obvious abnormalities among the H abnormal network layers, that is, the network layer with the largest number of abnormal groups, can be used as the first network layer. Of course, each network layer among the H abnormal network layers can also be used as the first network layer. This application is not limited to this.

[0183] Step 603: Input the super-prior features of the target image into the super-decoding network to obtain the probability distribution of the image features.

[0184] In some embodiments, the super-decoding network includes multiple third network layers, and the super-prior features of the target image are processed by multiple third network layers of the super-decoding network, and an output feature map is obtained after each processing by a third network layer. In the process of determining the probability distribution, the output feature map of each third network layer is corrected based on the third correction parameters corresponding to each third network layer in the multiple third network layers. The corrected output feature map of the last network layer in the multiple third network layers is used to determine the probability distribution of the image features.

[0185] In some embodiments, before determining the probability distribution of image features based on the super-prior features of the target image, the super-prior features of the target image can also be quantized to obtain quantized super-prior features, and then the quantized super-prior features of the target image are input into the super-decoding network to obtain the probability distribution of image features.

[0186] The implementation method of correcting the output feature map of each third network layer based on the third correction parameters corresponding to each third network layer in the multiple third network layers is similar to the implementation method of correcting the output feature map of each first network layer according to the first correction parameters corresponding to each first network layer in the multiple first network layers. For details, please refer to the relevant content above and will not be repeated here.

[0187] That is to say, in addition to correcting the output feature maps of the multiple first network layers included in the super-encoding network, the output feature maps of the multiple third network layers included in the super-decoding network can also be corrected. In this way, the probability distribution of the image features determined by the super-decoding network can be ensured to be relatively stable without anomalies, thereby ensuring that the bit rate obtained after encoding the target image does not have anomalies, thereby improving the stability of the bit stream of the encoded target image.

[0188] Step 604: Encode the super-prior features of the target image into the bitstream. The image features are encoded into the bitstream based on the probability distribution of the image features.

[0189] In some embodiments, the super-prior features of the target image may be entropy encoded according to the probability distribution specified by the factor entropy model, so as to encode the super-prior features of the target image into the bitstream.

[0190] It should be noted that the factor entropy model in the embodiment of the present application can also be called a probability distribution estimation network. The probability distribution estimation network is part of the entropy estimation network, which also includes a super encoding network and a super decoding network.

[0191] If the probability distribution estimation network uses a Gaussian model (such as a single Gaussian model or a mixed Gaussian model) for modeling, the determined probability distribution parameters include the mean and variance. If the probability distribution estimation network uses a Laplace distribution model for modeling, the determined probability distribution parameters include the location parameter and the scale parameter. If the above probability distribution estimation network uses a logistic distribution model for modeling, the determined probability distribution parameters include the mean and the scale parameter.

[0192] Figure 10 is a structural diagram of an entropy estimation network provided in an embodiment of the present application. The entropy estimation network includes a super encoding network (HyEnc) 502, a super decoding network (HyDec) 503 and a factor entropy model 1001. The super encoding network 502 includes three convolutional layers (Conv) and two activation layers interspersed in cascade (such as activation layers built based on Relu or other activation functions). The convolution kernel size of each convolutional layer is 5×5, the number of channels of the output feature map is M, the first two convolutional layers downsample the width and height by 2 times, and the last convolutional layer does not downsample. The network structure of the factor entropy model 1001 is the same as the network structure of the probability distribution estimation network introduced above. The super decoding network 503 includes three convolutional layers (Conv) and two activation layers interspersed in cascade (such as activation layers built based on Relu or other activation functions). The convolution kernel size of each convolutional layer is 5×5, the number of channels of the output feature map is M, the first convolutional layer does not upsample, and the last two convolutional layers upsample the width and height by 2 times. It should be noted that the structure of the entropy estimation network shown in Figure 10 is not used to limit the embodiments of the present application. For example, the convolution kernel size, the number of channels of the feature map, the downsampling multiple, the number of downsampling times, the upsampling multiple, the number of upsampling times, the number of convolution layers, etc. can all be adjusted.

[0193] In some embodiments, before encoding the super-a priori features of the target image into the bitstream, the super-a priori features of the target image may be quantized to obtain quantized super-a priori features, and then the quantized super-a priori features of the target image may be encoded into the bitstream.

[0194] The implementation process of encoding the image feature into the bitstream based on the probability distribution of the image feature includes: determining the feature to be encoded based on the probability distribution of the image feature, and performing entropy encoding on the feature to be encoded based on the probability distribution of the image feature to achieve encoding the image feature into the bitstream.

[0195] Optionally, the probability distribution of the image feature includes a target mean and a target variance. In this case, the feature to be encoded can be determined according to the following expression (4). r = round (a - μ) (4)

[0196] In the above expression (4), r refers to the feature to be encoded, μ refers to the target mean, a refers to the image feature of the quantized target image corresponding to the feature to be encoded, and round() refers to rounding the value of a-μ.

[0197] Optionally, the feature to be encoded may be entropy encoded using a Gaussian distribution with a mean of 0 and a variance equal to the target variance. Of course, the feature to be encoded may also be entropy encoded in other ways, which are not limited in the present embodiment.

[0198] For ease of understanding, the encoding method provided in the embodiment of the present application is further explained exemplarily through the following steps 1 to 6.

[0199] Step 1: The target image passes through the encoding network to obtain the image features of the target image.

[0200] Step 2: The image features of the target image are processed by multiple first network layers of the super coding network, and the output feature map of each first network layer is corrected according to the first correction parameters corresponding to each first network layer in the multiple first network layers. The super coding network finally outputs the super prior features of the target image.

[0201] Step 3: quantize the super-prior features of the target image to obtain quantized super-prior features, and encode the quantized super-prior features into the bitstream according to the probability distribution specified by the factor entropy model.

[0202] Step 4: The quantized super-prior features are processed by multiple third network layers of the super-decoding network. The output feature map of each third network layer is corrected according to the third correction parameters corresponding to each third network layer in the multiple third network layers. The super-decoding network finally outputs the probability distribution N(μ, σ) of the image features.

[0203] Step 5: quantize the image features of the target image to obtain the quantized image feature a, and then obtain the feature to be encoded r=round(a-μ) based on the quantized image feature a.

[0204] Step 6: Entropy encode the feature r to be encoded using a Gaussian distribution with a mean of 0 and a variance of σ to obtain a bitstream.

[0205] Since the value range of the characteristic values ​​of each group of feature points in the normal sample feature map is smaller than the value range of the characteristic values ​​of each feature point in the corresponding group of feature points in the abnormal sample feature map, based on this, an embodiment of the present application proposes a coding method that can correct the output feature map of the first network layer in the super coding network to improve the stability of the super prior features output by the super coding network, thereby ensuring the stability of the code stream of the encoded target image, so that there is no abnormality in the code stream of the target image after encoding.

[0206] In addition, the embodiment of the present application can also correct the output feature map of each second network layer of the coding network. In this way, it can ensure that the value range of the characteristic value of each group of feature points after correction is consistent with the normal value range, effectively improving the stability of the image features output by the coding network, and then ensuring the stability of the code stream of the encoded target image, so that there are no abnormalities in the code stream of the target image after encoding. Moreover, since each first network layer has its own corresponding first correction parameter, each group of feature points in the output feature map of each first network layer also has its own corresponding correction parameter. In this way, each group of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each group of feature points can be corrected separately so that the characteristic value of each feature point after correction is within the range corresponding to its own correction parameter, thereby effectively improving the stability of the code stream of the encoded target image.

[0207] Finally, in addition to correcting the output feature maps of multiple first network layers included in the super-encoding network, the encoding method provided in the embodiment of the present application can also correct the output feature maps of multiple third network layers included in the super-decoding network. In this way, it can ensure that the probability distribution of image features determined by the super-decoding network is relatively stable and no anomalies will occur, thereby ensuring that the bit rate obtained after encoding the target image does not have anomalies, thereby improving the stability of the bit stream of the encoded target image.

[0208] Next, the decoding method provided in the embodiment of the present application is introduced.

[0209] Please refer to FIG11 , which is a flowchart of a decoding method provided in an embodiment of the present application. The decoding method is applied to a decoding device and includes the following steps.

[0210] Step 1101: parse the code stream to obtain the super-prior features of the target image.

[0211] In some embodiments, the super-prior features of the target image can be parsed from the bitstream according to the probability distribution specified by the factor entropy model. In the case of a quantization process during the encoding process, the parsed super-prior features of the target image are the super-prior features of the quantized target image.

[0212] Step 1102: Based on the super-prior features of the target image, determine the probability distribution of the image features of the target image through the super-decoding network, wherein the super-decoding network includes multiple fourth network layers, and the super-prior features of the target image are processed by the multiple fourth network layers of the super-decoding network, and an output feature map is obtained after each fourth network layer is processed. In the process of determining the probability distribution, based on the fourth correction parameters corresponding to each fourth network layer in the multiple fourth network layers, the output feature map of each fourth network layer is corrected, and the corrected output feature map of the last network layer in the multiple fourth network layers is used to determine the probability distribution of the image features.

[0213] Optionally, the output feature map of each fourth network layer includes multiple groups of feature points, and each group of feature points in the multiple groups of feature points includes multiple feature points; in this case, based on the fourth correction parameters corresponding to each of the multiple fourth network layers, the implementation process of correcting the output feature map of each fourth network layer includes: based on the correction parameters in the fourth correction parameters corresponding to each group of feature points, respectively correcting each group of feature points so that the characteristic value of each feature point in each corrected group of feature points is within the range corresponding to the respective correction parameters.

[0214] Since each fourth network layer has its own corresponding fourth correction parameter, and each group of feature points in the output feature map of each fourth network layer also has its own corresponding correction parameter, each group of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each group of feature points can be corrected separately in a targeted manner so that the characteristic value of each feature point after correction is within the range corresponding to the respective correction parameter, thereby effectively improving the stability of the reconstructed image after decoding.

[0215] The implementation method of correcting each group of feature points based on the correction parameters corresponding to each group of feature points in the fourth correction parameters is similar to the implementation method of correcting the output feature map of each first network layer according to the first correction parameters corresponding to each first network layer in multiple first network layers. For details, please refer to the relevant content above and will not be repeated here.

[0216] It should be noted that the output feature map of the fourth network layer includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, and the feature points of one channel are one group of feature points; or, the output feature map includes multiple different regions, the feature points of the multiple regions are the multiple groups of feature points, and the feature points of one region are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-row feature points of one channel are one group of feature points, and the even-row feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-column feature points of one channel are one group of feature points, and the even-column feature points of one channel are one group of feature points; or, the output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-row and odd-column feature points of one channel are one group of feature points, and the even-row and even-column feature points of one channel are one group of feature points.

[0217] That is to say, the feature points in the output feature map can be divided into multiple groups according to the channels included in the output feature map, so that the feature points of the same channel are one group. The feature points in the output feature map can also be divided according to the region. For example, the feature points in the target feature map with the same height and width (i.e., the same rows and columns) but different channels can be divided into one group. For another example, every three rows of feature points in the output feature map can be divided into one group in the order of channel and height from small to large. The embodiments of the present application are not limited to this.

[0218] In addition, the super decoding network in the decoding method and the super decoding network in the encoding method can be the same network, which is not limited in the embodiments of the present application. If the super decoding network in the decoding method and the super decoding network in the encoding method are the same network, then the fourth network layer is the same as the third network layer.

[0219] Step 1103: Based on the probability distribution of the image features, parse the image features of the target image from the code stream.

[0220] Based on the probability distribution of image features, the features to be encoded are parsed from the code stream, and based on the features to be encoded, the image features of the target image are determined.

[0221] Optionally, the probability distribution of the image features includes a target mean and a target variance. In this case, the features to be encoded are entropy decoded from the bitstream using a Gaussian distribution with a mean of 0 and a variance equal to the target variance. Of course, the features to be encoded can also be obtained by other means, which are not limited in this embodiment of the present application.

[0222] In some embodiments, the image feature of the target image may be determined according to the following expression (5): a=r+μ (5)

[0223] In the above expression (5), a refers to the image feature of the quantized target image, μ refers to the target mean, and r refers to the feature to be encoded corresponding to the image feature of the quantized target image.

[0224] Step 1104: Based on the image features of the target image, obtain a reconstructed target image through a decoding network.

[0225] Optionally, the decoding network includes multiple fifth network layers, and the image features of the target image are processed by multiple fifth network layers of the decoding network, and an output feature map is obtained after each processing by a fifth network layer. In the process of obtaining the reconstructed target image, the output feature map of each fifth network layer is corrected based on the fifth correction parameters corresponding to each fifth network layer in the multiple fifth network layers. The corrected output feature map of the last network layer in the multiple fifth network layers is used to determine the reconstructed target image.

[0226] Correcting the output feature map of each fifth network layer can ensure that the value range of the characteristic value of each set of feature points after correction is consistent with the normal value range, effectively improving the stability of the reconstructed image output by the decoding network, so that the reconstructed image does not have any anomalies.

[0227] The implementation method of correcting the output feature map of each fifth network layer based on the fifth correction parameter corresponding to each fifth network layer in the multiple fifth network layers is similar to the implementation method of correcting the output feature map of each first network layer according to the first correction parameter corresponding to each first network layer in the multiple first network layers in the above text. For details, please refer to the relevant content above and will not be repeated here.

[0228] Figure 12 is a structural diagram of a decoding network provided in an embodiment of the present application. The decoding network is a convolutional neural network, which includes four convolutional layers (Conv) and three activation layers interspersed in cascade (such as activation layers built based on Relu or other activation functions). The convolution kernel size of each convolution layer is 5×5, the number of channels of the output feature map is M or N, and each convolution layer performs a 2-fold upsampling of the width and height. It should be noted that the structure of the decoding network shown in Figure 12 is not used to limit the embodiments of the present application. For example, the convolution kernel size, the number of channels of the feature map, the downsampling multiple, the number of downsampling times, the number of convolution layers, etc. can all be adjusted.

[0229] For ease of understanding, the decoding method provided in the embodiment of the present application is further explained exemplarily through the following steps 1 to 5.

[0230] Step 1: Decode the quantized super-prior features from the bitstream according to the probability distribution specified by the factor entropy model.

[0231] Step 2: The quantized super-prior features are processed by multiple fourth network layers of the super-decoding network, and the output feature map of each fourth network layer is corrected according to the fourth correction parameters corresponding to each of the multiple fourth network layers. The super-decoding network finally outputs the probability distribution N(μ, σ) of the image features.

[0232] Step 3: Perform entropy decoding on the bitstream using a Gaussian distribution with a mean of 0 and a variance of σ to obtain the feature r to be encoded.

[0233] Step 4: Based on the mean μ and the feature to be encoded r, obtain the quantized image feature a=r+μ.

[0234] Step 5: Input the quantized image feature a into the decoding network to obtain the reconstructed target image.

[0235] As an example, please refer to FIG13. When the super decoding network in the decoding method and the super decoding network in the encoding method are the same network, the network layer 1, network layer 2, and network layer 3 in the super encoding network 502 in the entropy estimation network can be respectively used as the first network layer, and the network layer 4, network layer 5, and network layer 6 in the super decoding network 503 can be respectively used as the third network layer. In this case, please refer to FIG14. The process of encoding image 1 is as follows: image 1 passes through the encoding network 501 to obtain the image feature y of image 1, and the image feature y of image 1 is quantized by the quantization module 507 to obtain the quantized image feature y of image 1. Image features of quantized image 1 After passing through the network layer 1, network layer 2 and network layer 3 in the super coding network 502, the output feature map of each network layer is corrected, and finally the super prior feature z of the image 1 is obtained. The super prior feature z of the image 1 is quantized by the quantization module 508 to obtain the quantized super prior feature of the image 1. According to the probability distribution specified by the factor entropy model in the entropy estimation network, the super prior features of the quantized image 1 are obtained by the entropy encoder 504. Perform entropy coding to convert the super-prior features of the quantized image 1 into Encoded into the bitstream, the super prior features of the quantized image 1 are obtained by the entropy encoder 504 The bit sequence obtained by entropy coding is a partial bit sequence included in the code stream, and this partial bit sequence can be called a super-prior bit stream.

[0236] In addition, the super prior features of the quantized image 1 The entropy estimation network is used to pass through the super decoding network 503 to obtain the probability distribution N(μ, σ) of the image feature, and then the feature to be encoded is determined based on the probability distribution N(μ, σ) of the image feature. The feature to be encoded is entropy encoded by the entropy encoder 504 with a Gaussian distribution with a mean of 0 and a variance of σ, so as to realize the image feature of the quantized image 1. Encode into the code stream, and the image features of the quantized image 1 The bit sequence obtained by entropy coding is a partial bit sequence included in the code stream, and this partial bit sequence can be called an image bit stream.

[0237] The process of decoding the image 1 is as follows: according to the probability distribution specified by the factor entropy model in the entropy estimation network, the entropy decoder 505 obtains the quantized super-prior features of the image 1 from the super-prior bit stream included in the code stream. The hyper-prior features of the quantized image 1 After passing through the network layers 4, 5, and 6 in the super decoding network 503, the output feature map of each network layer is corrected, and finally the probability distribution N(μ, σ) of the image feature is obtained. The entropy decoder 505 uses a Gaussian distribution with a mean of 0 and a variance of σ to entropy decode the feature to be encoded from the bitstream. Based on the mean μ, the image feature of the quantized image 1 is determined. Afterwards, the image features of the quantized image 1 are The reconstructed image 1 is obtained by inputting the decoding network 506 .

[0238] In some embodiments, the output feature map of each network layer in the codec network can be corrected in the same way as the output feature map of the first network layer. In this way, not only can the bit rate and reconstructed image of the image without noise after passing through the codec network be guaranteed to be free of abnormalities, but also the stability against attacks can be guaranteed.

[0239] For example, please refer to Figure 15. It can be seen from Figure 15 that when the image without noise is compressed and reconstructed without the codec network optimized by this solution, the compression rate of the image and the reconstructed image a both have large anomalies and poor image quality. When the image without noise is compressed and reconstructed with the codec network optimized by this solution, the compression rate of the image is effectively reduced, the reconstructed image b does not have anomalies, and the image quality of the reconstructed image is better. Therefore, it can be seen that the codec method provided by the embodiment of the present application can ensure the stability of the bit rate after encoding the image without noise and the effect of the reconstructed image. For another example, please refer to Figure 16. It can be seen from Figure 16 that when the image with specific noise is reconstructed without the codec network optimized by this solution, the reconstructed image 1 has large anomalies and poor image quality. When the image with specific noise is reconstructed with the codec network optimized by this solution, the reconstructed image 2 does not have anomalies and has better image quality. Therefore, it can be seen that the codec method provided by the embodiment of the present application can ensure stability against attacks.

[0240] Since the value range of the characteristic values ​​of each group of feature points in the normal sample feature map is smaller than the value range of the characteristic value of each feature point in the corresponding group of feature points in the abnormal sample feature map, based on this, an embodiment of the present application proposes a decoding method that can correct the output feature map of the fourth network layer in the super-decoding network to improve the stability of the probability distribution of the image features output by the super-decoding network, thereby ensuring the stability of the reconstructed image after decoding, so that there is no abnormality in the reconstructed image of the target image after decoding the code stream.

[0241] In addition, since each fourth network layer has its own corresponding fourth correction parameter, and each set of feature points in the output feature map of each fourth network layer also has its own corresponding correction parameter, each set of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each set of feature points can be corrected separately in a targeted manner so that the characteristic value of each feature point after correction is within the range corresponding to its own correction parameter, thereby effectively improving the stability of the reconstructed image after decoding. Moreover, the embodiment of the present application can also correct the output feature map of each fifth network layer of the decoding network, and can ensure that the value range of the characteristic value of each set of feature points after correction is consistent with the normal value range, effectively improving the stability of the reconstructed target image output by the decoding network, so that the reconstructed image of the target image after decoding does not have any abnormalities.

[0242] Finally, the encoding and decoding method provided in the embodiment of the present application can also correct the output feature map of each network layer in the encoding and decoding network in the same way as the output feature map of the first network layer is corrected. In this way, not only can the code rate and reconstructed image of the image without noise added after passing through the encoding and decoding network be guaranteed to be free of abnormalities, but also the stability against attacks can be guaranteed. In other words, the encoding and decoding method provided in the embodiment of the present application can greatly enhance the stability of the encoding and decoding network for encoding and decoding various images without increasing the computational intensity of the encoding and decoding network and without losing the compression rate of the encoding and decoding network.

[0243] Figure 17 is a schematic diagram of the structure of an encoding device provided in an embodiment of the present application. The encoding device can be implemented as part or all of the encoding end by software, hardware, or a combination of both. Moreover, the encoding device can be encoder 100 in Figure 3 or the AI ​​encoding module and entropy encoding module in Figure 4. Referring to Figure 17, the device includes: an encoding network 1701, a super encoding network 1702, a super decoding network 1703, and an entropy encoder 1704.

[0244] The encoding network 1701 is used to process the input target image to obtain image features of the target image.

[0245] The super-coding network 1702 is used to process the input image features to obtain super-prior features of the target image; wherein the super-coding network includes multiple first network layers, the image features are processed by the multiple first network layers of the super-coding network, and an output feature map is obtained after each first network layer is processed. In the process of determining the super-prior features based on the super-coding network, the output feature map of each first network layer is corrected according to the first correction parameters corresponding to each first network layer in the multiple first network layers, and the corrected output feature map of the last network layer in the multiple first network layers is used to determine the super-prior features.

[0246] The super decoding network 1703 is used to process the input super prior features to obtain the probability distribution of image features.

[0247] The entropy encoder 1704 is used to encode the super-prior features into the bitstream, and encode the image features into the bitstream based on the probability distribution of the image features.

[0248] Optionally, the output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points;

[0249] The super coding network 1702 is specifically used for:

[0250] Based on the correction parameters in the first correction parameters corresponding to each group of feature points, each group of feature points is corrected so that the feature value of each feature point in each group of feature points after correction is within the range corresponding to the respective correction parameters.

[0251] Optionally, the correction parameters corresponding to the target group feature points include a maximum correction value and a minimum correction value, and the target group feature points are any one group of feature points among the multiple groups of feature points;

[0252] The super coding network 1702 is specifically used for:

[0253] When the characteristic value of the target characteristic point is greater than or equal to the maximum correction value, the characteristic value of the target characteristic point is corrected to the maximum correction value, and the target characteristic point is any characteristic point in the target group of characteristic points;

[0254] When the characteristic value of the target characteristic point is less than or equal to the minimum correction value, the characteristic value of the target characteristic point is corrected to the minimum correction value.

[0255] Optionally, the correction parameters corresponding to the target group feature points include a maximum correction value, a minimum correction value, a first correction coefficient, and a second correction coefficient, the first correction coefficient is a coefficient included in the first correction function, the second correction coefficient is a coefficient included in the second correction function, the first correction function and the second correction function are two-segment functions in a piecewise function, and the target group feature points are any group of feature points in the multiple groups of feature points;

[0256] The super coding network 1702 is specifically used for:

[0257] When the characteristic value of the target feature point is greater than or equal to the maximum correction value, the characteristic value of the target feature point is corrected based on the first correction coefficient so that the difference between the characteristic value of the corrected target feature point and the maximum correction value is within the first fluctuation range, and the target feature point is any one of the feature points in the target group;

[0258] When the characteristic value of the target characteristic point is less than or equal to the minimum correction value, the characteristic value of the target characteristic point is corrected based on the second correction coefficient so that the difference between the corrected characteristic value of the target characteristic point and the minimum correction value is within the second fluctuation range.

[0259] Optionally, the output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, and the feature points of one channel are one group of feature points; or,

[0260] The output feature map includes multiple different regions, the feature points of the multiple regions are multiple groups of feature points, and the feature points of one region are one group of feature points; or,

[0261] The output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-numbered rows of feature points of one channel are one group of feature points, and the even-numbered rows of feature points of one channel are one group of feature points; or,

[0262] The output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-numbered columns of feature points of one channel are one group of feature points, and the even-numbered columns of feature points of one channel are one group of feature points; or,

[0263] The output feature map includes multiple channels, and the feature points of the multiple channels are multiple groups of feature points. The feature points of odd rows and odd columns of a channel are a group of feature points, and the feature points of even rows and even columns of a channel are a group of feature points.

[0264] Optionally, the first correction parameter corresponding to each first network layer is obtained by statistically analyzing the output of each first network layer in the supercoding network when the supercoding network is trained based on the training data set.

[0265] Optionally, the device further includes a second determining module and a third determining module:

[0266] The encoding network 1701 is further used to input the training data set into the encoding network to obtain image features corresponding to the training data set;

[0267] The hypercoding network 1702 is further configured to input image features of a training data set into the hypercoding network for training, wherein the image features corresponding to the training data set are processed by multiple first network layers of the hypercoding network, and an output feature map is obtained after each processing by the first network layer;

[0268] The supercoding network 1702 is further used to determine the maximum and minimum values ​​corresponding to each first network layer based on the output feature map of each first network layer in the supercoding network; and determine the first correction parameter corresponding to each first network layer based on the maximum and minimum values ​​corresponding to each first network layer.

[0269] Optionally, the training data set includes a plurality of training sample images, and an output feature map obtained after the image features of each training sample image pass through each first network layer includes a plurality of groups of feature points. Multiple maximum values ​​and multiple minimum values ​​are statistically obtained for each first network layer in the supercoding network, wherein each group of feature points in the output feature map corresponding to each training sample image corresponds to one maximum value and one minimum value;

[0270] The super coding network 1702 is specifically used for:

[0271] Determine the maximum correction value of the correction parameters corresponding to each group of feature points based on multiple maximum values ​​corresponding to each group of feature points;

[0272] Based on the multiple minimum values ​​corresponding to each group of feature points, a minimum correction value among the correction parameters corresponding to each group of feature points is determined.

[0273] Optionally, the supercoding network 1702 is further configured to train each first network layer in the supercoding network based on the training data set to obtain a first correction parameter corresponding to each first network layer.

[0274] Optionally, the encoding network includes multiple second network layers, and the target image is processed by the multiple second network layers of the encoding network, and an output feature map is obtained after each second network layer is processed; the encoding network 1701 is further used to:

[0275] In the process of determining the image features of the target image based on the encoding network, the output feature map of each second network layer is corrected based on the second correction parameters corresponding to each second network layer in the multiple second network layers, and the corrected output feature map of the last network layer in the multiple second network layers is used to determine the image features.

[0276] Optionally, the super decoding network includes a plurality of third network layers, the super prior features are processed by the plurality of third network layers of the super decoding network, and an output feature map is obtained after each processing by the third network layer;

[0277] The super decoding network 1703 is also used to:

[0278] In the process of determining the probability distribution based on the super-decoding network, the output feature map of each third network layer is corrected based on the third correction parameters corresponding to each third network layer in the multiple third network layers, and the corrected output feature map of the last network layer in the multiple third network layers is used to determine the probability distribution.

[0279] Since the value range of the characteristic value of each feature point in each group of feature points in the first sample feature map is smaller than the value range of the characteristic value of each feature point in the corresponding group of feature points in the second sample feature map, the first sample feature map is the output feature map of the normal sample image at any layer in the codec network, and the second sample feature map is the output feature map of the abnormal sample image at any layer in the codec network. Based on this, the present application proposes a coding method that can correct the output feature map of the first network layer in the super-coding network to improve the stability of the super-prior features of the target image output by the super-coding network, thereby ensuring the stability of the code stream of the encoded target image, so that there is no abnormality in the code stream of the encoded target image.

[0280] In the embodiment of the present application, the output feature map of each second network layer can also be corrected. In this way, the value range of the characteristic value of each group of feature points after correction can be guaranteed to be consistent with the normal value range, effectively improving the stability of the image features of the target image output by the coding network, thereby ensuring the stability of the code stream of the encoded target image, so that the target image has no abnormalities in the code stream after encoding. In addition, since each first network layer has its own value range of the characteristic value of each group of feature points in the normal sample feature map is smaller than the value range of the characteristic value of each feature point in the corresponding group of feature points in the abnormal sample feature map, based on this, the embodiment of the present application proposes a coding method that can correct the output feature map of the first network layer in the super-coding network to improve the stability of the super-prior features output by the super-coding network, thereby ensuring the stability of the code stream of the encoded target image, so that the target image has no abnormalities in the code stream after encoding.

[0281] In addition, the embodiment of the present application can also correct the output feature map of each second network layer of the coding network. In this way, it can ensure that the value range of the characteristic value of each group of feature points after correction is consistent with the normal value range, effectively improving the stability of the image features output by the coding network, and then ensuring the stability of the code stream of the encoded target image, so that there are no abnormalities in the code stream of the target image after encoding. Moreover, since each first network layer has its own corresponding first correction parameter, each group of feature points in the output feature map of each first network layer also has its own corresponding correction parameter. In this way, each group of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each group of feature points can be corrected separately so that the characteristic value of each feature point after correction is within the range corresponding to its own correction parameter, thereby effectively improving the stability of the code stream of the encoded target image.

[0282] Finally, in addition to correcting the output feature maps of multiple first network layers included in the super-encoding network, the encoding method provided in the embodiment of the present application can also correct the output feature maps of multiple third network layers included in the super-decoding network. In this way, it can ensure that the probability distribution of image features determined by the super-decoding network is relatively stable and no anomalies will occur, thereby ensuring that the bit rate obtained after encoding the target image does not have anomalies, thereby improving the stability of the bit stream of the encoded target image.

[0283] It should be noted that the encoding device provided in the above embodiment is merely illustrated by the division of the above functional modules during encoding. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the encoding device provided in the above embodiment and the encoding method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0284] Figure 18 is a schematic diagram of the structure of a decoding device provided in an embodiment of the present application. The decoding device can be implemented as part or all of the decoding end by software, hardware, or a combination of both. Moreover, the decoding device can be decoder 200 in Figure 3, or the AI ​​decoding module and entropy decoding module in Figure 4. Referring to Figure 18, the device includes: an entropy decoder 1801, a super decoding network 1802, and a decoding network 1803.

[0285] The entropy decoder 1801 is used to parse the super-prior features of the target image from the bitstream.

[0286] The super-decoding network 1802 is used to process the input super-prior features to obtain the probability distribution of the image features of the target image; wherein the super-decoding network includes multiple fourth network layers, the super-prior features are processed by the multiple fourth network layers of the super-decoding network, and an output feature map is obtained after each fourth network layer is processed. In the process of determining the probability distribution, the output feature map of each fourth network layer is corrected based on the fourth correction parameters corresponding to each fourth network layer in the multiple fourth network layers, and the corrected output feature map of the last network layer in the multiple fourth network layers is used to determine the probability distribution.

[0287] The entropy decoder 1801 is further configured to parse the image features of the target image from the bitstream based on the probability distribution of the image features.

[0288] The decoding network 1803 is used to process the image features of the input target image to obtain a reconstructed target image.

[0289] Optionally, the output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points;

[0290] The super decoding network 1802 is specifically used for:

[0291] Based on the correction parameters in the fourth correction parameters corresponding to each group of feature points, each group of feature points is corrected so that the feature value of each feature point in each group of feature points after correction is within the range corresponding to the respective correction parameters.

[0292] Optionally, the output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, and the feature points of one channel are one group of feature points; or,

[0293] The output feature map includes multiple different regions, the feature points of the multiple regions are multiple groups of feature points, and the feature points of one region are one group of feature points; or,

[0294] The output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-numbered rows of feature points of one channel are one group of feature points, and the even-numbered rows of feature points of one channel are one group of feature points; or,

[0295] The output feature map includes multiple channels, the feature points of the multiple channels are multiple groups of feature points, the odd-numbered columns of feature points of one channel are one group of feature points, and the even-numbered columns of feature points of one channel are one group of feature points; or,

[0296] The output feature map includes multiple channels, and the feature points of the multiple channels are multiple groups of feature points. The feature points of odd rows and odd columns of a channel are a group of feature points, and the feature points of even rows and even columns of a channel are a group of feature points.

[0297] Optionally, the decoding network includes a plurality of fifth network layers, and the image features of the target image are processed by the plurality of fifth network layers of the decoding network, and an output feature map is obtained after each processing by the fifth network layer;

[0298] The decoding network 1803 is also used to:

[0299] In the process of obtaining the reconstructed target image, the output feature map of each fifth network layer is corrected based on the fifth correction parameter corresponding to each fifth network layer in the multiple fifth network layers, and the corrected output feature map of the last network layer in the multiple fifth network layers is used to determine the reconstructed target image.

[0300] Since the value range of the characteristic values ​​of each group of feature points in the normal sample feature map is smaller than the value range of the characteristic value of each feature point in the corresponding group of feature points in the abnormal sample feature map, based on this, an embodiment of the present application proposes a decoding method that can correct the output feature map of the fourth network layer in the super-decoding network to improve the stability of the probability distribution of the image features output by the super-decoding network, thereby ensuring the stability of the reconstructed image after decoding, so that there is no abnormality in the reconstructed image of the target image after decoding the code stream.

[0301] In addition, since each fourth network layer has its own corresponding fourth correction parameter, and each set of feature points in the output feature map of each fourth network layer also has its own corresponding correction parameter, each set of feature points in each output feature map can be corrected with its own corresponding correction parameter, that is, each set of feature points can be corrected separately in a targeted manner so that the characteristic value of each feature point after correction is within the range corresponding to its own correction parameter, thereby effectively improving the stability of the reconstructed image after decoding. Moreover, the embodiment of the present application can also correct the output feature map of each fifth network layer of the decoding network, and can ensure that the value range of the characteristic value of each set of feature points after correction is consistent with the normal value range, effectively improving the stability of the reconstructed target image output by the decoding network, so that the reconstructed image of the target image after decoding does not have any abnormalities.

[0302] Finally, the encoding and decoding method provided in the embodiment of the present application can also correct the output feature map of each network layer in the encoding and decoding network in the same way as the output feature map of the first network layer is corrected. In this way, not only can the code rate and reconstructed image of the image without noise added after passing through the encoding and decoding network be guaranteed to be free of abnormalities, but also the stability against attacks can be guaranteed. In other words, the encoding and decoding method provided in the embodiment of the present application can greatly enhance the stability of the encoding and decoding network for encoding and decoding various images without increasing the computational intensity of the encoding and decoding network and without losing the compression rate of the encoding and decoding network.

[0303] Figure 19 is a schematic block diagram of a coding and decoding device 1900 used in an embodiment of the present application. The coding and decoding device 1900 may include a processor 1901, a memory 1902, and a bus system 1903. The processor 1901 and the memory 1902 are connected via the bus system 1903. The memory 1902 is used to store instructions, and the processor 1901 is used to execute the instructions stored in the memory 1902 to perform the various coding or decoding methods described in the embodiments of the present application. To avoid repetition, a detailed description is not given here.

[0304] In the embodiment of the present application, the processor 1901 may be a central processing unit (CPU), or may be another general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. A general-purpose processor may be a microprocessor or any conventional processor.

[0305] The memory 1902 may include a ROM device or a RAM device. Any other suitable type of storage device may also be used as the memory 1902. The memory 1902 may include code and data 19021 accessed by the processor 1901 using the bus 1903. The memory 1902 may further include an operating system 19023 and an application 19022, which includes at least one program or instruction that allows the processor 1901 to execute the encoding or decoding method described in the embodiment of the present application. For example, the application 19022 may include applications 1 to N, which further include an encoding or decoding application (referred to as a codec application) that executes the encoding or decoding method described in the embodiment of the present application.

[0306] In addition to the data bus, the bus system 1903 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus system 1903 in the figure.

[0307] Optionally, the codec apparatus 1900 may further include one or more output devices, such as a display 1904. In one example, the display 1904 may be a touch-sensitive display that combines a display with a touch-sensitive unit operable to sense touch input. The display 1904 may be connected to the processor 1901 via a bus 1903.

[0308] It should be noted that the encoding and decoding device 1900 can execute the encoding method in the embodiment of the present application, and can also execute the decoding method in the embodiment of the present application.

[0309] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any media that facilitates the transfer of computer programs from one place to another (e.g., based on a communication protocol). In this manner, computer-readable media can generally correspond to (1) non-transitory tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product can include computer-readable media.

[0310] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but rather are directed to non-transitory tangible storage media. As used herein, disks and optical disks include compact discs (CDs), laser discs, optical discs, DVDs, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0311] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor," as used herein, may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Furthermore, the techniques may be fully implemented in one or more circuits or logic elements. In one example, the various illustrative logic blocks, units, and modules in encoder 100 and decoder 200 may be understood as corresponding circuit devices or logic elements.

[0312] The techniques of the embodiments of the present application can be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or a set of ICs (e.g., a chipset). The various components, modules, or units described in the embodiments of the present application are intended to emphasize the functional aspects of the apparatus for performing the disclosed techniques, but they do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units can be combined in a codec hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperable hardware units (including one or more processors as described above).

[0313] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.

[0314] It should be understood that the "plurality" mentioned herein refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0315] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the target feature maps involved in the embodiments of this application were all obtained with full authorization.

[0316] The above description is an embodiment provided for this application and is not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application should be included in the scope of protection of this application.

Claims

1. A coding method, It is characterized in that The method comprises: Inputting the target image into the encoding network to obtain image features of the target image; Inputting the image features into a super encoding network to obtain super prior features of the target image; The super coding network includes a plurality of first network layers, the image features are processed by the plurality of first network layers of the super coding network, and an output feature map is obtained after each processing by a first network layer, and in the process of determining the super prior feature based on the super coding network, the output feature map of each first network layer is corrected according to the first correction parameters corresponding to each of the plurality of first network layers, and the corrected output feature map of the last network layer in the plurality of first network layers is used to determine the super prior feature; Inputting the super prior feature into a super decoding network to obtain a probability distribution of the image feature; The super prior feature is encoded into a bitstream, and the image feature is encoded into the bitstream based on the probability distribution of the image feature.

2. The method according to claim 1, It is characterized in that The output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points; The step of correcting the output feature graph of each first network layer according to the first correction parameter corresponding to each first network layer in the plurality of first network layers comprises: Based on the correction parameters in the first correction parameters corresponding to each group of feature points, each group of feature points is corrected respectively, so that the feature value of each feature point in each group of feature points after correction is within the range corresponding to the respective correction parameters.

3. The method according to claim 2, It is characterized in that The correction parameters corresponding to the target group feature points include a maximum correction value and a minimum correction value, and the target group feature points are any group of feature points in the multiple groups of feature points; The correcting each group of feature points based on the correction parameters in the first correction parameters respectively corresponding to each group of feature points comprises: When the characteristic value of the target characteristic point is greater than or equal to the maximum correction value, the characteristic value of the target characteristic point is corrected to the maximum correction value, and the target characteristic point is any one characteristic point in the target group characteristic points; When the characteristic value of the target characteristic point is less than or equal to the minimum correction value, the characteristic value of the target characteristic point is corrected to the minimum correction value.

4. The method according to claim 2, It is characterized in that The correction parameters corresponding to the target group feature points include a maximum correction value, a minimum correction value, a first correction coefficient, and a second correction coefficient, wherein the first correction coefficient is a coefficient included in a first correction function, and the second correction coefficient is a coefficient included in a second correction function, wherein the first correction function and the second correction function are two-segment functions in a piecewise function, and the target group feature points are any group of feature points in the multiple groups of feature points; The correcting each group of feature points based on the correction parameters in the first correction parameters respectively corresponding to each group of feature points comprises: In the case where the characteristic value of the target characteristic point is greater than or equal to the maximum correction value, the characteristic value of the target characteristic point is corrected based on the first correction coefficient so that the difference between the characteristic value of the corrected target characteristic point and the maximum correction value is within a first fluctuation range, and the target characteristic point is any one of the characteristic points of the target group; When the characteristic value of the target feature point is less than or equal to the minimum correction value, the characteristic value of the target feature point is corrected based on the second correction coefficient so that the difference between the corrected characteristic value of the target feature point and the minimum correction value is within a second fluctuation range.

5. The method according to any one of claims 2 to 4, It is characterized in that The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, and the feature points of one channel are a group of feature points; or, The output feature map includes multiple different regions, the feature points of the multiple regions are the multiple groups of feature points, and the feature points of one region are is a set of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered rows of feature points of one channel are one group of feature points, and the even-numbered rows of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered columns of feature points of one channel are one group of feature points, and the even-numbered columns of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the feature points of odd rows and odd columns of a channel are a group of feature points, and the feature points of even rows and even columns of a channel are a group of feature points.

6. The method according to any one of claims 1 to 5, It is characterized in that The first correction parameter corresponding to each first network layer is obtained by statistically analyzing the output of each first network layer in the supercoding network when the supercoding network is trained based on the training data set.

7. The method according to any one of claims 1 to 6, It is characterized in that The encoding network includes a plurality of second network layers, the target image is processed by the plurality of second network layers of the encoding network, and an output feature map is obtained after each second network layer is processed; the method further includes: In the process of determining the image features of the target image based on the encoding network, the output feature map of each second network layer is corrected based on the second correction parameters corresponding to each second network layer in the multiple second network layers, and the corrected output feature map of the last network layer in the multiple second network layers is used to determine the image features.

8. The method according to any one of claims 1 to 7, It is characterized in that The super decoding network includes a plurality of third network layers, the super prior features are processed by the plurality of third network layers of the super decoding network, and an output feature map is obtained after each processing by the third network layer; the method further includes: In the process of determining the probability distribution, the output feature map of each third network layer is corrected based on the third correction parameters corresponding to each third network layer in the multiple third network layers, and the corrected output feature map of the last network layer in the multiple third network layers is used to determine the probability distribution.

9. A decoding method, It is characterized in that The method comprises: Analyze the super-prior features of the target image from the bitstream; Based on the super prior features, determining the probability distribution of the image features of the target image through a super decoding network; Wherein, the super decoding network includes multiple fourth network layers, the super prior features are processed by the multiple fourth network layers of the super decoding network, and an output feature map is obtained after each processing by the fourth network layer, and in the process of determining the probability distribution, based on the fourth correction parameters corresponding to each of the fourth network layers in the multiple fourth network layers, the output feature map of each fourth network layer is corrected, and the corrected output feature map of the last network layer in the multiple fourth network layers is used to determine the probability distribution; parsing the image features of the target image from the bitstream based on the probability distribution of the image features; Based on the image features of the target image, a reconstructed target image is obtained through a decoding network.

10. The method according to claim 9, It is characterized in that The output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points; The step of correcting the output feature map of each fourth network layer based on the fourth correction parameter corresponding to each fourth network layer in the plurality of fourth network layers comprises: Based on the correction parameters in the fourth correction parameters corresponding to each group of feature points, each group of feature points is corrected respectively, so that the feature value of each feature point in each group of feature points after correction is within the range corresponding to the respective correction parameters.

11. The method according to claim 10, It is characterized in that The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, and the feature points of one channel are a group of feature points; or, The output feature map includes multiple different regions, the feature points of the multiple regions are the multiple groups of feature points, and the feature points of one region are is a set of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered rows of feature points of one channel are one group of feature points, and the even-numbered rows of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered columns of feature points of one channel are one group of feature points, and the even-numbered columns of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the feature points of odd rows and odd columns of a channel are a group of feature points, and the feature points of even rows and even columns of a channel are a group of feature points.

12. The method according to any one of claims 9 to 11, It is characterized in that The decoding network includes a plurality of fifth network layers, the image features of the target image are processed by the plurality of fifth network layers of the decoding network, and an output feature map is obtained after each fifth network layer is processed; the method further includes: In the process of obtaining the reconstructed target image, the output feature map of each fifth network layer is corrected based on the fifth correction parameter corresponding to each fifth network layer in the multiple fifth network layers, and the corrected output feature map of the last network layer in the multiple fifth network layers is used to determine the reconstructed target image.

13. An encoding device, It is characterized in that The device comprises: The encoding network is used to process the input target image to obtain image features of the target image; A super encoding network, used for processing the input image features to obtain super prior features of the target image; The super coding network includes a plurality of first network layers, the image features are processed by the plurality of first network layers of the super coding network, and an output feature map is obtained after each processing by a first network layer, and in the process of determining the super prior feature based on the super coding network, the output feature map of each first network layer is corrected according to the first correction parameters corresponding to each of the plurality of first network layers, and the corrected output feature map of the last network layer in the plurality of first network layers is used to determine the super prior feature; A super decoding network, used for processing the input super prior features to obtain a probability distribution of the image features; An entropy encoder is used to encode the super-prior feature into a bitstream, and encode the image feature into the bitstream based on the probability distribution of the image feature.

14. The device according to claim 13, It is characterized in that The output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points; The super coding network is specifically used for: Based on the correction parameters in the first correction parameters corresponding to each group of feature points, each group of feature points is corrected respectively, so that the feature value of each feature point in each group of feature points after correction is within the range corresponding to the respective correction parameters.

15. The device according to claim 14, It is characterized in that The correction parameters corresponding to the target group feature points include a maximum correction value and a minimum correction value, and the target group feature points are any group of feature points in the multiple groups of feature points; The super coding network is specifically used for: When the characteristic value of the target characteristic point is greater than or equal to the maximum correction value, the characteristic value of the target characteristic point is corrected to the maximum correction value, and the target characteristic point is any one characteristic point in the target group characteristic points; When the characteristic value of the target characteristic point is less than or equal to the minimum correction value, the characteristic value of the target characteristic point is corrected to the minimum correction value.

16. The device according to claim 14, It is characterized in that The correction parameters corresponding to the target group feature points include a maximum correction value, a minimum correction value, a first correction coefficient, and a second correction coefficient, wherein the first correction coefficient is a coefficient included in a first correction function, and the second correction coefficient is a coefficient included in a second correction function, wherein the first correction function and the second correction function are two-segment functions in a piecewise function, and the target group feature points are any group of feature points in the multiple groups of feature points; The super coding network is specifically used for: When the characteristic value of the target characteristic point is greater than or equal to the maximum correction value, the target characteristic point is corrected based on the first correction coefficient. The characteristic value of the point is corrected so that the difference between the corrected characteristic value of the target characteristic point and the maximum correction value is within a first fluctuation range, and the target characteristic point is any one of the characteristic points of the target group; When the characteristic value of the target feature point is less than or equal to the minimum correction value, the characteristic value of the target feature point is corrected based on the second correction coefficient so that the difference between the corrected characteristic value of the target feature point and the minimum correction value is within a second fluctuation range.

17. The device according to any one of claims 14 to 16, It is characterized in that The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, and the feature points of one channel are a group of feature points; or, The output feature map includes a plurality of different regions, the feature points of the plurality of regions are the plurality of groups of feature points, and the feature points of one region are a group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered rows of feature points of one channel are one group of feature points, and the even-numbered rows of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered columns of feature points of one channel are one group of feature points, and the even-numbered columns of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the feature points of odd rows and odd columns of a channel are a group of feature points, and the feature points of even rows and even columns of a channel are a group of feature points.

18. The device according to any one of claims 13 to 17, It is characterized in that The first correction parameter corresponding to each first network layer is obtained by statistically analyzing the output of each first network layer in the supercoding network when the supercoding network is trained based on the training data set.

19. The device according to any one of claims 13 to 18, It is characterized in that The encoding network includes a plurality of second network layers, the target image is processed by the plurality of second network layers of the encoding network, and an output feature map is obtained after each second network layer is processed; the encoding network is also used for: In the process of determining the image features of the target image based on the encoding network, the output feature map of each second network layer is corrected based on the second correction parameters corresponding to each second network layer in the multiple second network layers, and the corrected output feature map of the last network layer in the multiple second network layers is used to determine the image features.

20. The device according to any one of claims 13 to 19, It is characterized in that The super decoding network includes a plurality of third network layers, the super prior features are processed by the plurality of third network layers of the super decoding network, and an output feature map is obtained after each processing by the third network layer; the super decoding network is also used for: In the process of determining the probability distribution based on the super decoding network, the output feature map of each third network layer is corrected based on the third correction parameters corresponding to each third network layer in the multiple third network layers, and the corrected output feature map of the last network layer in the multiple third network layers is used to determine the probability distribution.

21. A decoding device, It is characterized in that The device comprises: Entropy decoder, used to parse the super-prior features of the target image from the bitstream; A super decoding network, used for processing the input super prior features to obtain a probability distribution of image features of the target image; Wherein, the super decoding network includes multiple fourth network layers, the super prior features are processed by the multiple fourth network layers of the super decoding network, and an output feature map is obtained after each processing by the fourth network layer, and in the process of determining the probability distribution, based on the fourth correction parameters corresponding to each of the fourth network layers in the multiple fourth network layers, the output feature map of each fourth network layer is corrected, and the corrected output feature map of the last network layer in the multiple fourth network layers is used to determine the probability distribution; The entropy decoder is further used to parse the image features of the target image from the bitstream based on the probability distribution of the image features; The decoding network is used to process the image features of the input target image to obtain a reconstructed target image.

22. The device according to claim 21, It is characterized in that The output feature map includes multiple groups of feature points, each group of feature points in the multiple groups of feature points includes multiple feature points; The super decoding network is specifically used for: Based on the correction parameters in the fourth correction parameters corresponding to each group of feature points, each group of feature points is corrected respectively, so that the feature value of each feature point in each group of feature points after correction is within the range corresponding to the respective correction parameters.

23. The device according to claim 22, It is characterized in that The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, and the feature points of one channel are a group of feature points; or, The output feature map includes a plurality of different regions, the feature points of the plurality of regions are the plurality of groups of feature points, and the feature points of one region are a group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered rows of feature points of one channel are one group of feature points, and the even-numbered rows of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the odd-numbered columns of feature points of one channel are one group of feature points, and the even-numbered columns of feature points of one channel are one group of feature points; or, The output feature map includes multiple channels, the feature points of the multiple channels are the multiple groups of feature points, the feature points of odd rows and odd columns of a channel are a group of feature points, and the feature points of even rows and even columns of a channel are a group of feature points.

24. The device according to any one of claims 21 to 23, It is characterized in that The decoding network includes a plurality of fifth network layers, the image features of the target image are processed by the plurality of fifth network layers of the decoding network, and an output feature map is obtained after each fifth network layer is processed; the decoding network is also used for: In the process of obtaining the reconstructed target image, the output feature map of each fifth network layer is corrected based on the fifth correction parameter corresponding to each fifth network layer in the multiple fifth network layers, and the corrected output feature map of the last network layer in the multiple fifth network layers is used to determine the reconstructed target image.

25. A coding device, It is characterized in that The encoding device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program to implement the steps of any method described in claims 1-8.

26. A decoding device, It is characterized in that The decoding device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program to implement the steps of any one of the methods of claims 9-12.

27. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 12 are implemented.

28. A computer program product, It is characterized in that The computer program product stores computer instructions, and when the computer instructions are executed by a processor, the steps of any one of the methods of claims 1-12 are implemented.

Citation Information

Patent Citations

  • Image coding and decoding method and device

    CN114554205A

  • Quantization for neural networks

    CN115699020A

  • Ai encoding apparatus and operation method of the same, and ai decoding apparatus and operation method of the same

    US20200126263A1

  • Video image encoding method, video image decoding method and related devices

    WO2022194137A1

  • Encoding method and apparatus, decoding method and apparatus, device, storage medium, and computer program and product

    WO2022253088A1

Cited By

  • DAS signal adaptive demodulation method and system based on FPGA

    CN122120092A