Encoding and decoding method and electronic equipment

By extracting feature maps and judging entropy coding skip processing in image coding, the problem of artifacts introduced by entropy coding and decoding skipping in the existing technology is solved, and the image reconstruction quality and coding efficiency are improved.

CN118632006APending Publication Date: 2024-09-10HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310458544.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-10
Filing Date
2023-04-18
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing end-to-end image encoding process, entropy encoding and decoding skipping may introduce artifacts and affect the quality of image reconstruction.

Method used

By extracting the feature map of the image, the probability estimation result of the area to be encoded is determined, and based on the original feature value and the reconstructed feature value, it is judged whether to perform adaptive entropy coding skip processing, and the corresponding logo is set to be written into the code stream to ensure that the decoder can decide Whether to perform entropy decoding skip processing to avoid the introduction of artifacts.

Benefits of technology

It effectively avoids the introduction of artifacts in reconstructed images, improves coding efficiency and reconstruction quality, and reduces code rate overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118632006A
    Figure CN118632006A
Patent Text Reader

Abstract

The invention provides a coding and decoding method and electronic equipment. The coding method comprises the following steps: acquiring a to-be-coded image; extracting a feature map of the to-be-coded image, and determining a probability estimation result of a to-be-coded region in the feature map; based on the original feature value of the to-be-coded region and a reconstruction feature value of the to-be-coded region determined after the adaptive entropy coding skipping processing is performed on the to-be-coded region, judging whether the adaptive entropy coding skipping processing is performed on the to-be-coded region or not; if yes, on the basis of the probability estimation result of the to-be-coded area, entropy coding processing is carried out on at least one sub-block in the to-be-coded area or entropy coding processing on the at least one sub-block is skipped, and an identifier corresponding to the to-be-coded area is set to be a first value; if not, entropy coding processing is performed on the to-be-coded region based on the probability estimation result of the to-be-coded region, and the identifier corresponding to the to-be-coded region is set as a second value; and coding and identifying. In this way, artifacts can be prevented from being introduced into the reconstructed image.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 10, 2023, with application number 202310269663.2 and application name “Encoding and Decoding Method”, all contents of which are incorporated by reference in this application. Technical Field

[0002] The embodiments of the present application relate to the field of coding and decoding, and in particular to a coding and decoding method and an electronic device. Background Art

[0003] The artificial intelligence (AI) image compression algorithm is based on deep learning and has better compression effect than traditional image compression technologies (such as JPEG (Joint Photographic Experts Group) and BPG (Better Portable Graphics). Among them, the end-to-end image coding scheme based on deep learning is widely used.

[0004] Currently, in the existing end-to-end image encoding process, the codec performs entropy encoding and decoding skipping, which may introduce artifacts. Summary of the invention

[0005] In view of this, the present application provides a coding method and an electronic device. The coding method can effectively avoid introducing artifacts in the reconstructed image.

[0006] In a first aspect, an embodiment of the present application provides a coding method, the method comprising: first, obtaining an image to be coded; then, extracting a feature map of the image to be coded, and determining a probability estimation result of a region to be coded in the feature map; thereafter, judging whether to perform adaptive entropy coding skipping processing on the region to be coded based on an original feature value of the region to be coded and a reconstructed feature value of the region to be coded determined after the region to be coded is subjected to adaptive entropy coding skipping processing; if so, performing entropy coding processing on at least one sub-block in the region to be coded or skipping entropy coding processing on at least one sub-block based on the probability estimation result of the region to be coded, and setting an identifier corresponding to the region to be coded to a first value; if not, performing entropy coding processing on the region to be coded based on the probability estimation result of the region to be coded, and setting the identifier corresponding to the region to be coded to a second value; then, encoding the identifier.

[0007] Among them, if the difference between the original eigenvalue of the to-be-coded region and the reconstructed eigenvalue of the to-be-coded region determined after the adaptive entropy coding skipping process is performed on the to-be-coded region is small, it means that the adaptive entropy coding skipping process will not introduce artifacts into the reconstructed image of the to-be-coded region, and at this time, the adaptive entropy coding skipping process can be performed on the to-be-coded region. If the difference between the original eigenvalue of the to-be-coded region and the reconstructed eigenvalue of the to-be-coded region determined after the adaptive entropy coding skipping process is large, it means that the adaptive entropy coding skipping process will introduce artifacts into the reconstructed image of the to-be-coded region, and at this time, the adaptive entropy coding skipping process may not be performed on the to-be-coded region; in this way, the introduction of artifacts into the reconstructed image can be effectively avoided.

[0008] In addition, an identifier is introduced to indicate whether the area to be encoded is to be skipped for adaptive entropy coding, and the identifier is written into the bitstream; in this way, the identifier can be passed to the decoder, so that the decoder can know whether the corresponding area to be decoded is to be skipped for adaptive entropy decoding.

[0009] Exemplarily, a feature extraction module can be used to extract a feature map of the image to be encoded; wherein the feature extraction module can be implemented by a neural network; for example, the feature extraction module can be implemented based on a convolutional neural network (CNN). Among them, CNN can refer to a neural network containing a convolutional layer, which may also include an activation layer (such as ReLU, PReLU, etc.), a pooling layer, a batch normalization layer (BN layer), a fully connected layer, and other network layers. Typical convolutional neural networks include LeNet, AlexNet, VGGNet, ResNet, etc. Exemplarily, a basic CNN can be composed of a backbone network and a head network; a complex CNN is composed of a backbone network, a neck network, and a head network; this application does not limit the network that constitutes the CNN. For example, the feature extraction module can be implemented by stacking multiple layers of convolution and combining a nonlinear mapping activation function.

[0010] Exemplarily, a feature map is three-dimensional data output by the convolution layer, activation layer, pooling layer, batch normalization layer, etc. in a convolutional neural network, and the three dimensions are respectively called width, height, and channel. Exemplarily, a feature map may include W*H*C feature points, and each feature point has a corresponding eigenvalue. Exemplarily, the eigenvalue may be a floating point number, wherein W, H, and C are all positive integers.

[0011] Exemplarily, the feature map used for entropy coding processing and adaptive entropy coding skip processing may be a quantized feature map.

[0012] For example, the feature map can be divided into multiple cubes according to the basic unit of w1×h1×c1 (where w1 is an integer between 1 and W, h1 is an integer between 1 and H, and c1 is an integer between 1 and C); when c1=1, a cube is a block. A cube can be used as a region to be encoded.

[0013] In one possible manner, the probability estimation result of each feature point may be a probability P.

[0014] In a possible manner, when the probability estimation module performs Gaussian distribution estimation, the probability estimation result may include Gaussian distribution parameters: mean μ and variance σ.

[0015] Exemplarily, the region to be encoded may include multiple feature points, and at least one feature point may be divided into a sub-block; thus, the region to be encoded may include multiple sub-blocks, and each sub-block may include at least one feature point. Adaptive entropy coding skip processing may refer to: based on the probability estimation result of the region to be encoded, entropy coding is performed on at least one sub-block in the region to be encoded or entropy coding is skipped on at least one sub-block. Thus, adaptive entropy coding skip processing can be performed on the region to be encoded with sub-blocks as the minimum unit, which can improve coding efficiency and reduce bit rate overhead.

[0016] Exemplarily, when a sub-block includes a feature point, the adaptive entropy coding skipping process may refer to: based on the probability estimation result of the region to be coded, entropy coding is performed on at least one feature point in the region to be coded or entropy coding of at least one feature point is skipped. In this way, it is possible to encode the region to be coded with the feature point as the minimum unit, which can improve the reconstruction quality compared to encoding the region to be coded with the sub-block as the minimum unit.

[0017] In one possible method, you can first execute "setting the identifier corresponding to the area to be encoded to the first value", then execute "encoding the identifier", and then execute "based on the probability estimation result of the area to be encoded, perform entropy encoding on at least one sub-block in the area to be encoded or skip entropy encoding on at least one sub-block".

[0018] In one possible method, the method may first execute "performing entropy coding processing on at least one sub-block in the to-be-coded area or skipping entropy coding processing on at least one sub-block based on the probability estimation result of the to-be-coded area", and then execute "setting the identifier corresponding to the to-be-coded area to the first value", and then execute "encoding the identifier".

[0019] In one possible approach, "setting the identifier corresponding to the area to be encoded to the second value" may be performed first, then "encoding the identifier" may be performed, and then "entropy encoding the area to be encoded based on the probability estimation result of the area to be encoded" may be performed.

[0020] In one possible approach, "performing entropy coding on the region to be coded based on the probability estimation result of the region to be coded" may be performed first, then "setting the identifier corresponding to the region to be coded to the second value" may be performed, and then "coding the identifier" may be performed.

[0021] That is to say, the present application does not limit the coding identifier and the execution order of entropy coding processing or adaptive entropy coding skip processing on the coded area.

[0022] Exemplarily, after entropy coding processing or adaptive entropy coding skip processing, the code stream of the area to be encoded can be obtained; the code streams of all the areas to be encoded in the feature map can constitute the code stream of the image to be encoded; the identifier can be written into the code stream as a new syntax element.

[0023] Exemplarily, the identifier can be encoded to obtain a code stream of the identifier; the code streams of all the to-be-encoded areas in the feature map and the code streams of the corresponding identifiers can constitute the code stream of the to-be-encoded image.

[0024] It should be understood that there may be multiple ways of coding identification, and this application does not limit this.

[0025] Exemplarily, the identification can be represented by skip flag, flag or cube flag.

[0026] Exemplarily, the first value can be set as required, such as 1. The second value can be set as required, such as 0. The first value and the second value are different.

[0027] According to the first aspect, encoding a marker includes: determining a marker value probability based on a probability estimation result of a region to be encoded; wherein the marker value probability refers to a probability that the marker is a first value or a probability that the marker is a second value; encoding the marker based on the marker value probability.

[0028] Exemplarily, the identifier may be binarized and then written into the code stream. Compared with binarizing the identifier and then writing it into the code stream, encoding the identifier based on the value probability of the identifier can reduce the code rate overhead.

[0029] In this way, the identifier is encoded using the probability estimation result that can be obtained by both the encoder and the decoder, so that the decoder can decode the identifier from the bit stream.

[0030] According to the first aspect, or any implementation of the first aspect above, based on the original eigenvalue of the area to be encoded, and the reconstructed eigenvalue of the area to be encoded determined after the adaptive entropy coding skipping process is performed on the area to be encoded, it is determined whether to perform adaptive entropy coding skipping process on the area to be encoded, including: determining the error between the reconstructed eigenvalue and the original eigenvalue; when the error is greater than the error threshold, determining to perform adaptive entropy coding skipping process on the area to be encoded; when the error is less than or equal to the error threshold, determining not to perform adaptive entropy coding skipping process on the area to be encoded.

[0031] Exemplarily, the original feature value of the region to be encoded may include the original feature values ​​of multiple feature points included in the region to be encoded; and the reconstructed feature value of the region to be encoded may include the reconstructed feature values ​​of multiple feature points included in the region to be encoded.

[0032] Exemplarily, whether to perform adaptive entropy coding skipping processing on the to-be-coded area can be determined based on the error between the reconstructed eigenvalue and the original eigenvalue of the to-be-coded area. Exemplarily, the error can be compared with the error threshold Thr; wherein the error threshold Thr can be set according to the maximum error between the reconstructed eigenvalue and the original eigenvalue of the to-be-coded area when no artifact appears in the reconstructed image of the to-be-coded area, and the present application does not impose any restrictions on this. When the error between the reconstructed eigenvalue and the original eigenvalue of the to-be-coded area is greater than the error threshold Thr, it means that performing adaptive entropy coding skipping processing on the to-be-coded area will introduce artifacts into the reconstructed image of the to-be-coded area, and adaptive entropy coding skipping processing may not be performed on the to-be-coded area at this time. When the error between the reconstructed eigenvalue and the original eigenvalue of the to-be-coded area is less than or equal to the error threshold Thr, it can be determined that performing adaptive entropy coding skipping processing on the to-be-coded area will not introduce artifacts into the reconstructed image of the to-be-coded area, and adaptive entropy coding skipping processing may be performed on the to-be-coded area at this time.

[0033] According to the first aspect, or any implementation method of the first aspect above, the area to be encoded includes multiple sub-blocks, and the probability estimation result of the area to be encoded includes the probability estimation results of the multiple sub-blocks; based on the probability estimation result of the area to be encoded, the probability of the value of the identifier is determined, including: based on the sum of the probability estimation results of the multiple sub-blocks in the area to be encoded, the probability of the value of the identifier is determined.

[0034] Exemplarily, when the probability estimation result is a Gaussian distribution parameter, the Gaussian distribution parameters of all feature points included in all sub-blocks in the to-be-coded region may be accumulated to obtain the Gaussian distribution parameters of the marker. f =vμ, variance of the marker σ f =∑σ. Next, the mean is μ f And the variance is σ f The Gaussian distribution of , the probability in the interval [-0.5,0.5] is used as the probability of being identified as the first value.

[0035] According to the first aspect, or any implementation method of the first aspect above, the area to be encoded includes multiple sub-block points, the sub-block includes at least one feature point, and the probability estimation result of the area to be encoded includes the probability estimation results of multiple feature points; based on the probability estimation result of the area to be encoded, the probability of the value of the identifier is determined, including: based on the number of feature points in the area to be encoded that skip entropy coding processing and the total number of feature points in the area to be encoded, determining the probability of the value of the identifier; wherein the number of feature points in the area to be encoded that skip entropy coding processing is determined based on the probability estimation results of multiple feature points included in the area to be encoded.

[0036] In one possible approach, when the feature point When the probability P of taking the original eigenvalue k1 is greater than or equal to T0, the feature point Determined as a feature point for which entropy encoding processing is skipped.

[0037] In one possible approach, when the feature point When the Gaussian distribution parameters satisfy abs(μ-k1)+σ<T1, the feature points Determined as a feature point for which entropy encoding processing is skipped.

[0038] In one possible approach, when the probability estimation result of a sub-block meets a preset condition, the feature point in the sub-block is Determine the feature points to skip entropy coding

[0039] In one possible manner, the preset condition may be that the probability P of the sub-block is greater than or equal to T2. The probability P of the sub-block may be the average value of the probabilities P of all feature points in the sub-block, or the maximum or minimum value of the probabilities P of all feature points in the sub-block; this is not limited in the present application. T2 may be a preset threshold, and T2 may be any value between 0 and 1, for example, T2 is 0.99, 0.98, 0.97, 0.95, etc. This is not limited in the present application. In one possible manner, T2 may be equal to T0. In one possible manner, T2 may not be equal to T0.

[0040] In one possible manner, when the probability estimation result is a Gaussian distribution parameter, the preset condition may be that the Gaussian distribution parameter of the sub-block satisfies abs(μ-k1)+σ<T3. In one possible manner, the mean μ of the sub-block may be the average of the means μ of all feature points in the sub-block, and the variance σ of the sub-block may be the average of the variances σ of all feature points in the block. In one possible manner, the mean μ of the sub-block may be the maximum or minimum of the means μ of all feature points in the sub-block, and the variance σ of the sub-block may be the maximum or minimum of the variances σ of all feature points in the block. Among them, T3 may be a preset threshold, and T3 may be any value between 0 and 1, for example, T3 is 0.2, 0.3, 0.4, etc., and the present application does not limit this. In one possible manner, T3 may be equal to T1. In one possible manner, T3 may not be equal to T1.

[0041] According to the first aspect, or any implementation manner of the first aspect above, the area to be encoded includes multiple sub-blocks, the probability estimation result of the area to be encoded includes the probability estimation results of the multiple sub-blocks, the sub-block includes at least one feature point, and the probability estimation result of the sub-block includes the probability estimation result of the feature point included in the sub-block; based on the probability estimation result of the area to be encoded, entropy coding is performed on at least one sub-block in the area to be encoded or entropy coding is skipped on at least one sub-block, including: for a first sub-block among the multiple sub-blocks: when the probability estimation result of the first sub-block meets a preset condition, the entropy coding of all feature points in the first sub-block is skipped; when the probability estimation result of the first sub-block does not meet the preset condition, based on the probability estimation results of all feature points in the first sub-block, entropy coding is performed on all feature points in the first sub-block.

[0042] In the second aspect, the embodiment of the present application provides a decoding method, which includes: first, receiving a code stream; then, determining a probability estimation result of a region to be decoded in a feature map corresponding to the code stream, and decoding an identifier corresponding to the region to be decoded from the code stream; when the identifier is a first value, based on the probability estimation result of the region to be decoded, entropy decoding is performed on at least one sub-block in the region to be decoded or the characteristic value of a characteristic point in at least one sub-block is set to a specific value; when the identifier is a second value, entropy decoding is performed on the region to be decoded based on the probability estimation result of the region to be decoded to obtain the characteristic value of the characteristic point in the region to be decoded; then, reconstruction is performed based on the characteristic value of the characteristic point in the feature map to obtain a reconstructed image. Since the identifier is set by the encoder based on whether the adaptive entropy coding skipping process will introduce artifacts into the reconstructed image, and then the decoder determines whether the region to be decoded is to be skipped for adaptive entropy decoding or entropy decoding according to the identifier during the decoding process, it is possible to avoid introducing artifacts into the reconstructed image obtained by decoding.

[0043] According to the second aspect, decoding an identifier corresponding to a to-be-decoded area from a code stream includes: determining a value probability of the identifier based on a probability estimation result of the to-be-decoded area; wherein the value probability of the identifier refers to a probability that the identifier is a first value or a probability that the identifier is a second value; based on the value probability of the identifier, decoding an identifier corresponding to the to-be-decoded area from the code stream.

[0044] According to the second aspect, or any implementation method of the second aspect above, the area to be decoded includes multiple sub-blocks, and the probability estimation result of the area to be decoded includes the probability estimation results of the multiple sub-blocks; based on the probability estimation result of the area to be decoded, the probability of the value of the identifier is determined, including: based on the sum of the probability estimation results of the multiple sub-blocks in the area to be decoded, the probability of the value of the identifier is determined.

[0045] According to the second aspect, or any implementation method of the second aspect above, the area to be decoded includes multiple sub-blocks, the sub-block includes at least one feature point, and the probability estimation result of the area to be decoded includes the probability estimation results of multiple feature points; based on the probability estimation result of the area to be decoded, the probability of the value of the identifier is determined, including: based on the probability estimation results of the multiple feature points included in the area to be decoded, determining the number of feature points in the area to be decoded that skip entropy decoding processing; based on the number of feature points in the area to be decoded that skip entropy decoding processing and the total number of feature points in the area to be decoded, determining the probability of the value of the identifier.

[0046] According to the second aspect, or any implementation method of the second aspect above, the area to be decoded includes multiple sub-blocks, the probability estimation result of the area to be decoded includes the probability estimation results of the multiple sub-blocks, the sub-block includes at least one feature point, and the probability estimation result of the sub-block includes the probability estimation result of the feature point included in the sub-block; based on the probability estimation result of the area to be decoded, at least one sub-block in the area to be decoded is entropy decoded or the feature value of the feature point in at least one sub-block is set to a specific value to obtain the feature value of the feature point in the area to be decoded, including: for a first sub-block among the multiple sub-blocks: when the probability estimation result of the first sub-block meets a preset condition, the feature value of all the feature points in the first sub-block is set to a specific value; when the probability estimation result of the first sub-block does not meet the preset condition, based on the probability estimation result of all the feature points in the first sub-block, all the feature points in the first sub-block are entropy decoded to obtain the feature values ​​of all the feature points in the first sub-block.

[0047] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0048] In a third aspect, the present application also provides a coding method, which includes: first, obtaining an image to be encoded; then, extracting a feature map of the image to be encoded, and determining a probability estimation result of the area to be encoded in the feature map; thereafter, judging whether to skip the entropy coding process of the area to be encoded based on the original feature value of the area to be encoded and the reconstructed feature value of the area to be encoded determined after skipping the entropy coding process of the area to be encoded; if so, skipping the entropy coding process of the area to be encoded, and setting the identifier corresponding to the area to be encoded to a first value; if not, entropy coding the area to be encoded based on the probability estimation result of the area to be encoded, and setting the identifier corresponding to the area to be encoded to a second value; then, determining the value probability of the identifier based on the probability estimation result of the area to be encoded; wherein the value probability of the identifier refers to the probability of the identifier being the first value or the probability of the identifier being the second value; encoding the identifier based on the value probability of the identifier.

[0049] Among them, if the difference between the original eigenvalue of the area to be encoded and the reconstructed eigenvalue of the area to be encoded determined after skipping the entropy coding process on the area to be encoded is small, it means that skipping the entropy coding process on the area to be encoded will not introduce artifacts in the reconstructed image of the area to be encoded, and at this time, the entropy coding process on the area to be encoded can be skipped. If the difference between the original eigenvalue of the area to be encoded and the reconstructed eigenvalue of the area to be encoded determined after skipping the entropy coding process on the area to be encoded is large, it means that skipping the entropy coding process on the area to be encoded will introduce artifacts in the reconstructed image of the area to be encoded, and at this time, the entropy coding process on the area to be encoded may not be skipped; in this way, the introduction of artifacts in the reconstructed image can be effectively avoided.

[0050] Secondly, skipping the entropy coding process for the entire area to be coded can improve the efficiency of the entropy coding skipping process, thereby improving the coding efficiency.

[0051] In addition, compared with binarizing the identifier and then writing it into the bitstream, encoding the identifier based on the probability of the identifier's value can reduce the bitrate overhead. And encoding the identifier using the probability estimation result that can be obtained by both the encoder and the decoder makes it easier for the decoder to decode the identifier in the bitstream.

[0052] According to the third aspect, based on the original eigenvalue of the area to be encoded and the reconstructed eigenvalue of the area to be encoded determined after skipping the entropy encoding process of the area to be encoded, it is determined whether to skip the entropy encoding process of the area to be encoded, including: determining the error between the reconstructed eigenvalue and the original eigenvalue; when the error is greater than an error threshold, determining to skip the entropy encoding process of the area to be encoded; when the error is less than or equal to the error threshold, determining not to skip the entropy encoding process of the area to be encoded.

[0053] According to the third aspect, or any implementation method of the third aspect above, the area to be encoded includes multiple feature points, and the probability estimation result of the area to be encoded includes the probability estimation results of the multiple feature points in the area to be encoded; based on the probability estimation result of the area to be encoded, the probability of the value of the identifier is determined, including: based on the sum of the probability estimation results of the multiple feature points in the area to be encoded, the probability of the value of the identifier is determined.

[0054] According to the third aspect, or any implementation method of the third aspect above, the area to be encoded includes multiple feature points, and the probability estimation result of the area to be encoded includes the probability estimation results of the multiple feature points in the area to be encoded; based on the probability estimation result of the area to be encoded, the probability of the value of the identifier is determined, including: based on the probability estimation result of the area to be encoded, determining the number of feature points in the area to be encoded that skip entropy coding processing; based on the number of feature points in the area to be encoded that skip entropy coding processing and the total number of feature points in the area to be encoded, determining the probability of the value of the identifier.

[0055] According to the third aspect, or any implementation of the third aspect, determining the number of feature points in the to-be-encoded region for skipping entropy coding processing based on the probability estimation result of the to-be-encoded region includes:

[0056] The number of feature points in the to-be-encoded region whose probability estimation results meet a preset condition is used as the number of feature points in the to-be-encoded region for which entropy coding processing is skipped.

[0057] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0058] In a fourth aspect, the present application also provides a decoding method, which includes: first, receiving a code stream; then, determining a probability estimation result of a to-be-decoded area in a feature map corresponding to the code stream; thereafter, determining a value probability of an identifier corresponding to the to-be-decoded area based on the probability estimation result of the to-be-decoded area; wherein the value probability of the identifier refers to the probability that the identifier is a first value or the probability that the identifier is a second value; based on the value probability of the identifier, decoding the identifier from the code stream; when the identifier is a first value, setting a characteristic value of a feature point in the to-be-decoded area to a specific value; when the identifier is a second value, performing entropy decoding on the to-be-decoded area based on the probability estimation result of the to-be-decoded area to obtain the characteristic values ​​of the feature points in the to-be-decoded area; subsequently, reconstructing based on the characteristic values ​​of the feature points in the feature map to obtain a reconstructed image.

[0059] According to the fourth aspect, the area to be decoded includes multiple feature points, and the probability estimation result of the area to be decoded includes the probability estimation results of the multiple feature points in the area to be decoded; based on the probability estimation result of the area to be decoded, the value probability of the identifier corresponding to the area to be decoded is determined, including: based on the sum of the probability estimation results of the multiple feature points in the area to be decoded, the value probability of the identifier is determined.

[0060] According to the fourth aspect, or any implementation method of the fourth aspect above, the area to be decoded includes multiple feature points, and the probability estimation result of the area to be decoded includes the probability estimation results of the multiple feature points in the area to be decoded; based on the probability estimation result of the area to be decoded, the value probability of the identifier corresponding to the area to be decoded is determined, including: based on the probability estimation result of the area to be decoded, determining the number of feature points in the area to be decoded that skip entropy decoding processing; based on the number of feature points in the area to be decoded that skip entropy decoding processing and the total number of feature points in the area to be decoded, determining the value probability of the identifier.

[0061] According to the fourth aspect, or any implementation method of the fourth aspect above, based on the probability estimation result of the area to be decoded, the number of feature points in the area to be decoded for skipping entropy decoding processing is determined, including: taking the number of feature points in the area to be decoded whose probability estimation results meet preset conditions as the number of feature points in the area to be decoded for skipping entropy decoding processing.

[0062] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0063] In a fifth aspect, the present application further provides an encoder, comprising:

[0064] An acquisition module, used for acquiring an image to be encoded;

[0065] A feature extraction module, used to extract a feature map of the image to be encoded;

[0066] A probability estimation module, used to determine the probability estimation result of the area to be encoded in the feature map;

[0067] An entropy coding module is used to determine whether to perform adaptive entropy coding skip processing on the to-be-coded region based on the original eigenvalue of the to-be-coded region and the reconstructed eigenvalue of the to-be-coded region determined after the adaptive entropy coding skip processing is performed on the to-be-coded region; if so, perform entropy coding processing on at least one sub-block in the to-be-coded region or skip entropy coding processing on at least one sub-block based on the probability estimation result of the to-be-coded region, and set the identifier corresponding to the to-be-coded region to a first value; if not, perform entropy coding processing on the to-be-coded region based on the probability estimation result of the to-be-coded region, and set the identifier corresponding to the to-be-coded region to a second value; and encode the identifier.

[0068] It should be understood that the encoder can also execute the steps in the above-mentioned first aspect and any implementation method of the first aspect.

[0069] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0070] In a sixth aspect, the present application further provides a decoder, the decoder comprising:

[0071] A receiving module, used for receiving a code stream;

[0072] An entropy decoding module is used to determine a probability estimation result of a region to be decoded in a feature map corresponding to a bitstream, and to decode an identifier corresponding to the region to be decoded from the bitstream; when the identifier is a first value, based on the probability estimation result of the region to be decoded, entropy decoding is performed on at least one sub-block in the region to be decoded or a feature value of a feature point in at least one sub-block is set to a specific value to obtain a feature value of the feature point in the region to be decoded; when the identifier is a second value, entropy decoding is performed on the region to be decoded based on the probability estimation result of the region to be decoded to obtain a feature value of the feature point in the region to be decoded;

[0073] The feature decoding module is used to reconstruct based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

[0074] It should be understood that the decoder can also execute the steps in the above-mentioned second aspect and any implementation manner of the second aspect.

[0075] The sixth aspect and any implementation of the sixth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the sixth aspect and any implementation of the sixth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0076] In a seventh aspect, the present application further provides an encoder, comprising:

[0077] An acquisition module, used for acquiring an image to be encoded;

[0078] A feature extraction module, used to extract a feature map of the image to be encoded;

[0079] A probability estimation module, used to determine the probability estimation result of the area to be encoded in the feature map;

[0080] An entropy coding module is used to determine whether to skip the entropy coding process of the to-be-coded region based on the original characteristic value of the to-be-coded region and the reconstructed characteristic value of the to-be-coded region determined after skipping the entropy coding process of the to-be-coded region; if so, skip the entropy coding process of the to-be-coded region and set the identifier corresponding to the to-be-coded region to a first value; if not, perform entropy coding on the to-be-coded region based on the probability estimation result of the to-be-coded region and set the identifier corresponding to the to-be-coded region to a second value; determine the value probability of the identifier based on the probability estimation result of the to-be-coded region; wherein the value probability of the identifier refers to the probability of the identifier being the first value or the probability of the identifier being the second value; and encode the identifier based on the value probability of the identifier.

[0081] It should be understood that the encoder can also execute the steps in the third aspect and any implementation method of the third aspect.

[0082] The seventh aspect and any implementation of the seventh aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the seventh aspect and any implementation of the seventh aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0083] In an eighth aspect, the present application further provides a decoder, the decoder comprising: a receiving module, configured to receive a code stream;

[0084] An entropy decoding module is used to determine a probability estimation result of a to-be-decoded area in a feature map corresponding to a code stream; based on the probability estimation result of the to-be-decoded area, determine a value probability of an identifier corresponding to the to-be-decoded area; wherein the value probability of the identifier refers to the probability of the identifier being a first value or the probability of the identifier being a second value; based on the value probability of the identifier, decode the identifier from the code stream; when the identifier is the first value, set the characteristic value of the characteristic point in the to-be-decoded area to a specific value; when the identifier is the second value, perform entropy decoding processing on the to-be-decoded area based on the probability estimation result of the to-be-decoded area to obtain the characteristic value of the characteristic point in the to-be-decoded area; a feature decoding module is used to reconstruct based on the characteristic value of the characteristic point in the feature map to obtain a reconstructed image.

[0085] It should be understood that the decoder can also execute the steps in the fourth aspect and any implementation method of the fourth aspect mentioned above.

[0086] The eighth aspect and any implementation of the eighth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the eighth aspect and any implementation of the eighth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0087] In the ninth aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, which, when executed by the processor, enables the electronic device to execute the steps of the first aspect (or the third aspect) or any possible implementation method of the first aspect (or the third aspect).

[0088] The ninth aspect and any implementation of the ninth aspect correspond to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), respectively. The technical effects corresponding to the ninth aspect and any implementation of the ninth aspect can refer to the technical effects corresponding to the above-mentioned first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), which will not be repeated here.

[0089] In the tenth aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, which, when executed by the processor, enables the electronic device to execute the steps of the second aspect (or the fourth aspect) or any possible implementation method of the second aspect (or the fourth aspect).

[0090] The tenth aspect and any implementation of the tenth aspect correspond to the second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), respectively. The technical effects corresponding to the tenth aspect and any implementation of the tenth aspect can refer to the technical effects corresponding to the above-mentioned second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), which will not be repeated here.

[0091] In the eleventh aspect, an embodiment of the present application provides a chip comprising one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the electronic device executes the steps in the first aspect (or the third aspect) or any possible implementation method of the first aspect (or the third aspect).

[0092] The eleventh aspect and any implementation of the eleventh aspect correspond to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), respectively. The technical effects corresponding to the eleventh aspect and any implementation of the eleventh aspect can refer to the technical effects corresponding to the above-mentioned first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), which will not be repeated here.

[0093] In the twelfth aspect, an embodiment of the present application provides a chip comprising one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the electronic device executes the steps in the second aspect (or the fourth aspect) or any possible implementation method of the second aspect (or the fourth aspect).

[0094] The twelfth aspect and any implementation of the twelfth aspect correspond to the second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), respectively. The technical effects corresponding to the twelfth aspect and any implementation of the twelfth aspect can refer to the technical effects corresponding to the above-mentioned second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), which will not be repeated here.

[0095] In the thirteenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer or a processor, the computer or the processor executes the steps of the first aspect (or the third aspect) or any possible implementation method of the first aspect (or the third aspect).

[0096] The thirteenth aspect and any one of the implementations of the thirteenth aspect correspond to the first aspect (or the third aspect) and any one of the implementations of the first aspect (or the third aspect), respectively. The technical effects corresponding to the thirteenth aspect and any one of the implementations of the thirteenth aspect can refer to the technical effects corresponding to the above-mentioned first aspect (or the third aspect) and any one of the implementations of the first aspect (or the third aspect), which will not be repeated here.

[0097] In the fourteenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer or a processor, the computer or the processor executes the steps of the second aspect (or the fourth aspect) or any possible implementation method of the second aspect (or the fourth aspect).

[0098] The fourteenth aspect and any implementation of the fourteenth aspect correspond to the second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), respectively. The technical effects corresponding to the fourteenth aspect and any implementation of the fourteenth aspect can refer to the technical effects corresponding to the above-mentioned second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), which will not be repeated here.

[0099] In the fifteenth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer or the processor executes the steps in the first aspect (or the third aspect) or any possible implementation method of the first aspect (or the third aspect).

[0100] The fifteenth aspect and any implementation of the fifteenth aspect correspond to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), respectively. The technical effects corresponding to the fifteenth aspect and any implementation of the fifteenth aspect can refer to the technical effects corresponding to the above-mentioned first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), which will not be repeated here.

[0101] In the sixteenth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer or the processor executes the steps in the second aspect (or the fourth aspect) or any possible implementation method of the second aspect (or the fourth aspect).

[0102] The sixteenth aspect and any implementation of the sixteenth aspect correspond to the second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), respectively. The technical effects corresponding to the sixteenth aspect and any implementation of the sixteenth aspect can refer to the technical effects corresponding to the above-mentioned second aspect (or the fourth aspect) and any implementation of the second aspect (or the fourth aspect), which will not be repeated here.

[0103] In the seventeenth aspect, an embodiment of the present application provides a device for storing a code stream, the device comprising: a receiver and at least one storage medium, the receiver is used to receive the code stream; the at least one storage medium is used to store the code stream; the code stream is generated according to the first aspect (or the third aspect) and any one of the implementation methods of the first aspect (or the third aspect).

[0104] The seventeenth aspect and any implementation of the seventeenth aspect correspond to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), respectively. The technical effects corresponding to the seventeenth aspect and any implementation of the seventeenth aspect can refer to the technical effects corresponding to the above-mentioned first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), which will not be repeated here.

[0105] In the eighteenth aspect, an embodiment of the present application provides a device for transmitting a code stream, the device comprising: a transmitter and at least one storage medium, the at least one storage medium is used to store the code stream, the code stream is generated according to the first aspect (or the third aspect) and any one of the implementation methods of the first aspect (or the third aspect); the transmitter is used to obtain the code stream from the storage medium and send the code stream to the terminal side device through the transmission medium.

[0106] The eighteenth aspect and any implementation of the eighteenth aspect correspond to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), respectively. The technical effects corresponding to the eighteenth aspect and any implementation of the eighteenth aspect can refer to the technical effects corresponding to the above-mentioned first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), which will not be repeated here.

[0107] In the nineteenth aspect, an embodiment of the present application provides a system for distributing code streams, the system comprising: at least one storage medium for storing at least one code stream, the at least one code stream being generated according to the first aspect (or the third aspect) and any one of the implementation methods of the first aspect (or the third aspect), a streaming media device for obtaining a target code stream from the at least one storage medium and sending the target code stream to an end-side device, wherein the streaming media device comprises a content server or a content distribution server.

[0108] The nineteenth aspect and any implementation of the nineteenth aspect correspond to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), respectively. The technical effects corresponding to the nineteenth aspect and any implementation of the nineteenth aspect can refer to the technical effects corresponding to the above-mentioned first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0109] Figure 1a is a schematic diagram of an application scenario shown as an example;

[0110] Figure 1b is a schematic diagram of an application scenario shown as an example;

[0111] Figure 1c is a schematic diagram of an end-to-end image compression process shown as an example;

[0112] Figure 2 is a schematic diagram of an exemplary encoding process;

[0113] Figure 3 is a schematic diagram of an exemplary decoding process;

[0114] Figure 4 is a schematic diagram of an end-to-end image compression process shown as an example;

[0115] Figure 5a is a schematic diagram of an exemplary encoding process;

[0116] Figure 5b is a schematic diagram of the structure of an exemplary side information extraction module;

[0117] Figure 5c is a schematic diagram of the structure of a probability estimation module shown as an example;

[0118] Figure 6 is a schematic diagram of an exemplary decoding process;

[0119] Figure 7 is a schematic diagram of an end-to-end image compression process shown as an example;

[0120] Figure 8 is a schematic diagram of an exemplary encoding process;

[0121] Fig. 9 is a schematic diagram of an exemplary decoding process;

[0122] Fig.10 The figure is a schematic diagram of a machine vision task based on encoding and decoding shown as an example;

[0123] Fig.11 Schematic diagram of the structure of the device shown as an example. DETAILED DESCRIPTION

[0124] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0125] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0126] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0127] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0128] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0129] Figure 1a The figure is a schematic diagram of an exemplary application scenario. Figure 1aThe application scenarios are various video service scenarios based on video encoding and decoding, such as video conferencing scenarios, video phone scenarios, online education scenarios, remote tutoring scenarios, low-latency live broadcast scenarios, cloud gaming scenarios, wireless screen projection scenarios, and wireless extended screen scenarios, etc., which are not limited in the embodiments of the present application.

[0130] Reference Figure 1a , exemplarily, the first device may include: a video acquisition module (such as a camera), a pre-acquisition processing module, an encoding module (or encoder), and a sending module. Exemplarily, the encoding module may be a software module or a hardware module, which is not limited in the present application embodiment. It should be understood that, Figure 1a This is only an example of the first device. In other embodiments of the present application, the first device has a Figure 1a More modules are shown, and the embodiments of the present application are not limited to this.

[0131] Reference Figure 1a , exemplarily, the second device may include a display module, a decoding module (or decoder) and a receiving module. Exemplarily, the decoding module may be a software module or a hardware module, which is not limited in the present application embodiment. It should be understood that, Figure 1a This is only an example of the second device. In other embodiments of the present application, the second device has Figure 1a More modules are shown, and the embodiments of the present application are not limited to this.

[0132] Continue to refer to Figure 1a , exemplarily, after the camera of the first device captures the raw video data, the process of sending the captured raw video data to the second device for display is as follows: after the video capture module captures the raw video data, the raw video data is input into the capture pre-processing module; the capture pre-processing module performs a series of pre-processing on the raw video data and then outputs it to the encoding module. Then, the encoding module can encode the pre-processed raw video data to obtain a code stream (wherein the code stream can also be called a bit stream or a bit stream), and output the encoded code stream to the sending module; then, the sending module can send the code stream to the second device. Subsequently, the receiving module of the second device can receive the code stream; then, the code stream is output to the decoding module; then, the decoding module can decode the code stream to obtain reconstructed video data and output the reconstructed video data to the display module, and the display module renders and displays the reconstructed video data.

[0133] Exemplarily, the first device includes, but is not limited to: a server, a PC (Personal Computer), a laptop, a tablet computer, a mobile phone, and a watch.

[0134] Exemplarily, the second device includes but is not limited to: a PC, a laptop, a tablet computer, a mobile phone, and a watch.

[0135] For example, in a video conferencing scenario, the first device may be a PC or a laptop, and the second device may be a PC or a laptop.

[0136] For example, in an online education scenario, the first device may be a PC or a laptop, and the second device may be a tablet computer.

[0137] For example, in a cloud gaming scenario, the first device may be a server, and the second device may be a tablet computer, a PC, a laptop computer, or a mobile phone.

[0138] It should be understood that the present application can also be applied to scenarios for image encoding and decoding, and the present application does not limit this.

[0139] It should be understood that the sending module of the first device may also directly send the code stream to the receiving module of the second device without going through the network; this application does not impose any limitation on this.

[0140] It should be understood that the bitstream obtained by encoding can also be directly stored.

[0141] Figure 1b The figure is a schematic diagram of an exemplary application scenario. Figure 1b The application scenario is a computer vision task scenario based on video (or image) encoding and decoding. Among them, the machine vision task includes but is not limited to: object classification, recognition, segmentation, etc., and this application does not limit this.

[0142] in, Figure 1b The first device can refer to Figure 1a The description of the first device will not be repeated here.

[0143] Reference Figure 1b , exemplarily, the second device may include a receiving module, a decoding module (or decoder) and a machine vision task module; wherein the machine vision task module may be used to perform a machine vision task.

[0144] Continue to refer to Figure 1b, exemplarily, after the camera of the first device collects the raw video data, the process of sending the collected raw video data to the second device for the machine vision task is as follows: after the video acquisition module collects the raw video data, the raw video data is input into the acquisition pre-processing module; after the acquisition pre-processing module performs a series of pre-processing on the raw video data, it is output to the encoding module. Then, the encoding module can encode the pre-processed raw video data to obtain a code stream (wherein the code stream can also be called a bit stream or a bit stream), and output the encoded code stream to the sending module; then, the sending module can send the code stream to the second device. Subsequently, the receiving module of the second device can receive the code stream; then, the code stream is output to the decoding module; then, the decoding module can decode the code stream and output the features obtained in the decoding process to the machine vision task module; then, the machine vision task module can perform the machine vision task based on the features obtained in the decoding process to obtain the machine vision task result.

[0145] Exemplarily, the first device includes, but is not limited to: a server, a PC (Personal Computer), a laptop, a tablet computer, a mobile phone, and a watch.

[0146] Exemplarily, the second device includes but is not limited to: a PC, a laptop, a tablet computer, a mobile phone, and a watch.

[0147] It should be understood that the sending module of the first device may also directly send the code stream to the receiving module of the second device without going through the network; this application does not impose any limitation on this.

[0148] It should be understood that the present application can also be used in other business scenarios based on video (or image) encoding and decoding, and the present application is not limited to this.

[0149] Figure 1c The figure is a schematic diagram showing an exemplary end-to-end image compression process.

[0150] Reference Figure 1c , exemplarily, the encoder may include a feature extraction module, a feature quantization module, a probability estimation module and an entropy coding module. It should be understood that the encoder may also include a Figure 1c The present application is not limited to more or fewer modules shown.

[0151] Exemplarily, the feature extraction module can be used for feature extraction. Exemplarily, the feature quantization module can be used for quantization. Exemplarily, the entropy coding module can be used for entropy coding processing (such as Huffman Coding (HC), Arithmetic Coding (AC) and Asymmetric Numeral System (ANS)). Exemplarily, the probability estimation module can be used for probability estimation.

[0152] Reference Figure 1c , exemplarily, the decoder may include a feature decoding module, a feature dequantization module, a probability estimation module, and an entropy decoding module. It should be understood that the decoder may also include Figure 1c The present application does not limit the number of modules shown. The feature dequantization module is an optional module.

[0153] Exemplarily, the entropy decoding module can be used for entropy decoding processing. Exemplarily, the feature dequantization module can be used for dequantization. Exemplarily, the feature decoding module can be used to decode the feature into a reconstructed image. Exemplarily, the probability estimation module can be used for probability estimation.

[0154] Figure 2 FIG. 1 is a schematic diagram of an exemplary encoding process. Figure 2 For Figure 1a and Figure 1c The encoding process is shown on the basis of. Figure 2 In the embodiment, encoding an image is used as an example for explanation; wherein the image can be an independent image or a frame in a video, and the present application does not limit this. Among them, steps S201 to S209 are steps in the encoding process of the encoder.

[0155] S201, obtaining an image to be encoded.

[0156] S202, extracting a feature map of the image to be encoded.

[0157] Exemplarily, after the encoder obtains the image to be encoded, the feature extraction module may extract features of the image to be encoded to obtain a feature map of the image to be encoded.

[0158] Exemplarily, the feature extraction module can be implemented by a neural network; for example, the feature extraction module can be implemented based on a convolutional neural network (CNN). Among them, CNN can refer to a neural network containing a convolutional layer, which may also include an activation layer (such as ReLU, PReLU, etc.), a pooling layer, a batch normalization layer (BN layer), a fully connected layer, and other network layers. Typical convolutional neural networks include LeNet, AlexNet, VGGNet, ResNet, etc. Exemplarily, a basic CNN can be composed of a backbone network and a head network; a complex CNN is composed of a backbone network, a neck network, and a head network; this application does not limit the network that constitutes the CNN.

[0159] For example, the feature extraction module can be implemented by stacking multiple layers of convolution and combining nonlinear mapping activation functions.

[0160] Exemplarily, a feature map is three-dimensional data output by the convolution layer, activation layer, pooling layer, batch normalization layer, etc. in a convolutional neural network, and the three dimensions are respectively called width, height, and channel. Exemplarily, a feature map may include W*H*C feature points, and each feature point has a corresponding eigenvalue. Exemplarily, the eigenvalue may be a floating point number, wherein W, H, and C are all positive integers.

[0161] Next, the feature quantization module may quantize the feature map. It should be noted that the feature map in the following S203 to S209 may refer to a quantized feature map.

[0162] Exemplarily, the feature map can be divided into multiple regions; then, each region is determined as a region to be encoded in turn; then S203 to S209 are performed on the region to be encoded to encode the region to be encoded. The following is an example of an area to be encoded. The area to be encoded can be a two-dimensional area or a three-dimensional area; the area to be encoded can include one or more feature points, which is not limited in this application.

[0163] S203, determining a probability estimation result of the to-be-encoded region in the feature map.

[0164] Exemplarily, the probability estimation module can perform probability estimation on each feature point in the feature map to determine the probability estimation result of each feature point in the feature map; then, the probability estimation result of the area to be encoded in the feature map can be obtained. The probability estimation result of the area to be encoded can include the probability estimation results of all feature points in the area to be encoded; the probability estimation process will be described later.

[0165] S204, judging whether to perform the adaptive entropy coding skipping process on the to-be-coded region based on the original feature value of the to-be-coded region and the reconstructed feature value of the to-be-coded region determined after the adaptive entropy coding skipping process is performed on the to-be-coded region.

[0166] Exemplarily, the reconstructed feature value of the to-be-encoded region can be determined first if the to-be-encoded region is to be skipped for adaptive entropy coding; then the reconstructed feature value of the to-be-encoded region is compared with the original feature value to determine whether to skip the to-be-encoded region for adaptive entropy coding.

[0167] Exemplarily, by comparing the reconstructed eigenvalues ​​of the region to be encoded with the original eigenvalues, it can be determined whether an artifact will be introduced after the adaptive entropy coding skipping process is performed on the region to be encoded. When it is determined that an artifact will be introduced after the adaptive entropy coding skipping process is performed on the region to be encoded based on the comparison results of the reconstructed eigenvalues ​​of the region to be encoded with the original eigenvalues, the adaptive entropy coding skipping process may not be performed on the region to be encoded; at this time, S207, S208 and S209 can be executed. When it is determined that no artifact will be introduced after the adaptive entropy coding skipping process is performed on the region to be encoded based on the comparison results of the reconstructed eigenvalues ​​of the region to be encoded with the original eigenvalues, the adaptive entropy coding skipping process may be performed on the region to be encoded; at this time, S205, S206 and S209 can be executed. The specific judgment method will be described later. In this way, the introduction of artifacts in the reconstructed image can be avoided.

[0168] The original feature value of the region to be encoded may include the original feature value of the region to be encoded including multiple feature points; and the reconstructed feature value of the region to be encoded may include the reconstructed feature value of the region to be encoded including multiple feature points.

[0169] S205 , based on the probability estimation result of the region to be encoded, perform entropy encoding processing on at least one sub-block in the region to be encoded or skip entropy encoding processing on at least one sub-block.

[0170] Exemplarily, the area to be encoded may include multiple feature points, and at least one feature point may be divided into a sub-block; thus, the area to be encoded may be divided into multiple sub-blocks, and each sub-block may include at least one feature point. Among them, the probability estimation result of the area to be encoded may include the probability estimation results of multiple sub-blocks; the probability estimation result of each sub-block may include the probability estimation result of the feature points included in the sub-block. Exemplarily, the adaptive entropy coding skipping process may refer to: based on the probability estimation result of the area to be encoded, entropy coding is performed on at least one sub-block in the area to be encoded or entropy coding is skipped on at least one sub-block. In this way, the adaptive entropy coding skipping process may be performed on the area to be encoded with the sub-block as the minimum unit, which can improve the coding efficiency and reduce the bit rate overhead.

[0171] Specifically, for each sub-block, based on the probability estimation result of the sub-block, it is determined whether to skip the entropy coding process of the sub-block; when it is determined not to skip the entropy coding process of the sub-block, based on the probability estimation result of the feature points in the sub-block, the feature values ​​of the feature points in the sub-block are entropy coded; when it is determined to skip the entropy coding process of the sub-block, the entropy coding process of all the feature points in the sub-block is skipped; and after skipping the entropy coding process of all the feature points in the sub-block, the feature values ​​of all the feature points in the sub-block are set to specific values ​​(to facilitate determination of the reconstructed image of the area to be encoded).

[0172] It should be understood that when a sub-block includes only one feature point, the adaptive entropy coding skipping process is performed with the feature point as the minimum unit. At this time, the adaptive entropy coding skipping process may refer to: performing entropy coding processing on at least one feature point in the to-be-coded region or skipping the entropy coding processing on at least one feature point based on the probability estimation result of the to-be-coded region. In this way, it is possible to encode the to-be-coded region with the feature point as the minimum unit, which can improve the reconstruction quality compared to encoding the to-be-coded region with the sub-block as the minimum unit.

[0173] S206: Set the identifier corresponding to the to-be-encoded area to a first value.

[0174] Exemplarily, when it is determined that the area to be encoded in the feature map is to be skipped for adaptive entropy coding, the flag corresponding to the area to be encoded (for example, it can be represented by skip flag or flag or cube flag) can be set to a first value; then S209 is executed, i.e., encoding the flag. In this way, the flag can be passed to the decoder, so that the decoder can know whether to skip the adaptive entropy decoding for the corresponding area to be decoded. Among them, the first value can be set as required, such as 1.

[0175] Wherein, based on the probability estimation result of the to-be-coded region, after the to-be-coded region is subjected to the adaptive entropy coding skipping process, a code stream of the to-be-coded region (that is, a code stream obtained by the adaptive entropy coding skipping process) can be obtained.

[0176] It should be noted that in Figure 2 It is shown that after executing S206, S209 is executed, and after executing S209, S205 is executed. It should be understood that the present application may also execute S205 first, then execute S206, and then execute S209; that is, the present application does not limit the execution order of the coding flag and the adaptive entropy coding skipping process for the coding area. The present application takes the execution of S209 after executing S206 and the execution of S205 after executing S209 as an example for explanation.

[0177] S207, performing entropy coding processing on the region to be coded based on the probability estimation result of the region to be coded.

[0178] Exemplarily, when it is determined not to skip adaptive entropy coding for the area to be encoded in the feature map, entropy coding can be performed on each feature point in the area to be encoded based on the probability estimation result of each feature point in the area to be encoded to obtain the code stream of the area to be encoded (that is, the code stream obtained by entropy coding).

[0179] S208: Set the identifier corresponding to the to-be-encoded area to a second value.

[0180] Exemplarily, when it is determined that the adaptive entropy coding skipping process is not performed on the to-be-encoded area in the feature map, the flag can be set to a second value; then S209 is performed, i.e., the encoding flag; in this way, the flag can be transmitted to the decoder, so that the decoder can know the corresponding to-be-decoded area to determine whether to perform the adaptive entropy decoding skipping process. The second value can be set as required, such as 0.

[0181] It should be noted that the first value and the second value are different.

[0182] It should be noted that in Figure 2 It is shown that after executing S208, S209 is executed, and after executing S209, S207 is executed. It should be understood that the present application may also execute S207 first, then execute S208, and then execute S209; that is, the present application does not limit the execution order of the coding identifier and the entropy coding processing of the coding area. The present application takes the execution of S209 after executing S208 and the execution of S207 after executing S209 as an example for explanation.

[0183] S209, coding identification.

[0184] In a possible manner, the flag may be encapsulated as a syntax element into a bitstream generated by an entropy coding skip process, or a bitstream generated by an entropy coding process.

[0185] In one possible way, the identifier is encoded to obtain a code stream of the identifier; the code streams of all the to-be-encoded areas in the feature map and the code streams of the corresponding identifiers can constitute the code stream of the to-be-encoded image.

[0186] It should be understood that there may be multiple ways to encode the identifier, which is not limited in this application; details will be described later.

[0187] Exemplarily, S204 to S209 may be performed by an entropy coding module.

[0188] Exemplarily, after all the to-be-encoded regions in the feature map are encoded according to S203 to S209, a code stream of the to-be-encoded image can be obtained.

[0189] Exemplarily, the present application provides a device for storing a code stream, the device comprising: a receiver and at least one storage medium, the receiver is used to receive the code stream generated by the encoding method according to embodiment 2, and the at least one storage medium is used to store the code stream.

[0190] Exemplarily, the present application provides a device for transmitting a code stream, the device comprising: a transmitter and at least one storage medium, the at least one storage medium being used to store the code stream generated according to the encoding method of Example 2; the transmitter being used to obtain the code stream from the storage medium and send the code stream to an end-side device via a transmission medium.

[0191] Exemplarily, the present application provides a system for distributing code streams, the system comprising: at least one storage medium for storing at least one code stream generated according to the encoding method of Example 2; a streaming media device for obtaining a target code stream from at least one storage medium and sending the target code stream to an end-side device, wherein the streaming media device comprises a content server or a content distribution server.

[0192] Figure 3 FIG. 4 is a schematic diagram showing an exemplary decoding process. Figure 3 For Figure 1a and Figure 1c Based on the decoding process shown, Figure 3 The decoding process and Figure 2 The encoding process corresponds to .

[0193] S301, receiving a code stream.

[0194] Exemplarily, the feature map corresponding to the code stream can be divided into multiple regions; then, each region is determined as a region to be decoded in turn; then S302 to S306 are executed for the region to be decoded to decode the region to be decoded. The following is an example of an area to be decoded. Among them, the area to be decoded can be a two-dimensional area or a three-dimensional area; the area to be decoded can include one or more feature points. It should be understood that the decoding process and the encoding process divide the feature map into multiple regions in the same way.

[0195] S302, determining a probability estimation result of a to-be-decoded area in a feature map corresponding to the bitstream.

[0196] Exemplarily, the probability estimation module can perform probability estimation on each feature point in the feature map to determine the probability estimation result of each feature point in the feature map; and then the probability estimation result of the area to be decoded in the feature map can be obtained. The probability estimation result of the area to be decoded can include the probability estimation results of all feature points in the area to be decoded.

[0197] It should be understood that the process of S302 corresponds to that of S203, which will be described in detail later.

[0198] S303: Decode the identifier corresponding to the area to be decoded from the bit stream.

[0199] Exemplarily, the decoder may decode the identifier corresponding to the to-be-decoded area from the bitstream.

[0200] It should be noted that, in one possible manner, S302 may be performed first, and then S303; in this case, one implementation of S303 may be: based on the probability estimation result of the area to be decoded, an identifier corresponding to the area to be decoded is decoded from the bitstream. In one possible manner, S302 and S303 may be performed in parallel, and in this case, one implementation of S303 may be: reading an identifier corresponding to the area to be decoded from the bitstream; the specific method is determined according to the encoding method of the identifier, which will be described later.

[0201] S304, when the identifier is the first value, based on the probability estimation result of the area to be decoded, entropy decoding is performed on at least one sub-block in the area to be decoded or the characteristic value of the characteristic point in at least one sub-block is set to a specific value to obtain the characteristic value of the characteristic point in the area to be decoded.

[0202] Exemplarily, when the identifier corresponding to the area to be decoded is the first value, it can be determined that the encoder has performed adaptive entropy coding skip processing on the area to be decoded; therefore, the decoder can perform adaptive entropy decoding skip processing on the area to be decoded based on the probability estimation result of the area to be decoded to obtain the characteristic values ​​of the characteristic points in the area to be decoded.

[0203] Exemplarily, adaptive entropy decoding skipping processing may refer to: based on the probability estimation result of the area to be decoded, performing entropy decoding processing on at least one sub-block in the area to be decoded or setting the characteristic value of the feature point in at least one sub-block to a specific value to obtain the characteristic value of the feature point in the area to be decoded.

[0204] Specifically, the area to be decoded may include multiple feature points, and at least one feature point may be divided into a sub-block; in this way, the area to be decoded may be divided into multiple sub-blocks, and each sub-block may include at least one feature point. The probability estimation result of the area to be decoded includes the probability estimation results of multiple sub-blocks; the probability estimation result of each sub-block may include the probability estimation results of all feature points included in the sub-block. For each sub-block, based on the probability estimation result of the sub-block, it is determined whether to skip the entropy decoding process of the sub-block; when it is determined not to skip the entropy decoding process of the sub-block, all feature points in the sub-block may be entropy decoded based on the probability estimation result of the sub-block to obtain the feature values ​​of all feature points in the sub-block; when it is determined to skip the entropy decoding process of the sub-block, the entropy decoding process of the feature point may be skipped, and the feature values ​​of all feature points in the sub-block may be set to specific values. In this way, the area to be decoded may be adaptively entropy decoded and skipped with sub-blocks as the minimum unit, which can improve the decoding efficiency.

[0205] It should be understood that when a sub-block includes only one feature point, the adaptive entropy decoding skipping process is performed with the feature point as the minimum unit. At this time, the adaptive entropy decoding skipping process may refer to: performing entropy decoding on at least one feature point in the area to be decoded or skipping the entropy decoding on at least one feature point based on the probability estimation result of the area to be decoded. In this way, it is possible to decode the area to be decoded with the feature point as the minimum unit, which can improve the reconstruction quality compared to decoding the area to be decoded with the sub-block as the minimum unit.

[0206] S305: When the identifier is the second value, entropy decoding is performed on the region to be decoded based on the probability estimation result of the region to be decoded to obtain feature values ​​of feature points in the region to be decoded.

[0207] Exemplarily, when the identifier corresponding to the area to be decoded is the second value, it can be determined that the encoder has performed entropy encoding processing on the area to be decoded; therefore, the decoder can perform entropy decoding processing on each feature point in the area to be decoded based on the probability estimation result of each feature point in the area to be decoded to obtain the feature value of each feature point in the area to be decoded.

[0208] Exemplarily, S302 to S305 may be performed by an entropy decoding module.

[0209] S306, reconstructing based on the feature values ​​of the feature points in the feature map to generate a reconstructed image.

[0210] In this way, after executing S302 to S305 for all the areas to be decoded in the feature map, the feature values ​​of all the feature points in the feature map can be obtained. Then, the feature dequantization module can dequantize the feature values ​​of all the feature points in the feature map; after that, the feature decoding module can reconstruct based on the dequantized feature values ​​of all the feature points in the feature map to obtain a reconstructed image.

[0211] Exemplarily, the feature decoding module can be implemented by a neural network; for example, the feature decoding module can be implemented based on a convolutional neural network.

[0212] The encoding and decoding process is described in detail below.

[0213] Figure 4 The figure is a schematic diagram showing an exemplary end-to-end image compression process.

[0214] Reference Figure 4 , exemplarily, the encoding process may include feature extraction, quantization, side information extraction, probability estimation and arithmetic coding. Figure 4 The feature extraction can be done by Figure 1c The feature extraction module is executed; Figure 4 The quantization in can be obtained by the above Figure 1c The feature quantization module in is executed; Figure 4 The probability estimate in can be obtained from the above Figure 1c The probability estimation module of the encoder is executed; Figure 4 The arithmetic coding in can be obtained by Figure 1c The entropy coding module in is executed.

[0215] Exemplarily, the encoder may further include a side information extraction module, configured to perform side information extraction.

[0216] Reference Figure 4 , exemplarily, after the image to be encoded is subjected to feature extraction by the feature extraction module, a feature map y is obtained. On the one hand, after the feature map y is quantized by the feature quantization module, a feature map On the other hand, after the feature graph y is extracted by the side information extraction module, the side information is obtained. And output to the probability estimation module, which uses the side information Perform probability estimation to obtain the probability estimation result of feature map y (i.e. feature map Then, the entropy coding module can be used to calculate the probability of The probability estimation result of the feature map Perform arithmetic coding (for details, refer to the description in FIG5 ) to obtain a code stream.

[0217] Exemplarily, the side information extraction module can also extract the feature map Perform side information extraction to obtain side information This application does not impose any limitation on this.

[0218] For example, after obtaining the side information Afterwards, the side information Written into the bitstream to facilitate probability estimation by the probability estimation module of the decoder.

[0219] Reference Figure 4 , exemplarily, the decoding process may include arithmetic decoding, probability estimation and image reconstruction. Figure 4 The arithmetic decoding in can be done by Figure 1c The entropy decoding module in is executed; Figure 4 The image reconstruction in can be done by Figure 1c The feature decoding module in is executed; Figure 4 The probability estimate in can be obtained from the above Figure 1c The probability estimation module of the decoder is executed.

[0220] Reference Figure 4 , for example, the decoder can parse the side information from the bitstream Based on side information Perform probability estimation and determine feature maps Then, we can use the feature map The probability estimation result is arithmetically decoded to obtain the feature map Then, based on the feature map Perform image reconstruction to obtain a reconstructed image.

[0221] The following Figure 4 The encoding and decoding process is described in detail based on the

[0222] Figure 5a FIG. 1 is a schematic diagram of an exemplary encoding process. Figure 5a For Figure 4 The encoding process is shown on the basis of.

[0223] S501, obtaining an image to be encoded.

[0224] S502: extract a feature map of the image to be encoded.

[0225] Exemplarily, the feature map extracted by the feature extraction module for the image to be encoded can be called feature map y.

[0226] S503: extracting side information of the feature graph.

[0227] In one possible approach, the feature graph y can be input into a side information extraction module, which extracts the side information of each feature point y[w][h][c] in the feature graph y to obtain the side information Wherein, w is an integer between 1 and W, h is an integer between 1 and H, and c is an integer between 1 and C.

[0228] In one possible approach, the feature map y can be quantized first to obtain the feature map Then the feature map Input to the side information extraction module, which extracts the feature map Each feature point in To obtain the side information

[0229] Figure 5b FIG. 1 is a schematic diagram of the structure of an exemplary side information extraction module. Figure 5b , Exemplarily, the side information extraction module can be a neural network, which can include an abs (absolute value function), a Conv (convolution) layer, and a ReLU (activation) layer. Among them, ConvN×3×3 / 1, indicates that the size of the convolution kernel of the convolution layer is N×3×3, and the convolution step is 1. ConvN×5×5 / 2, indicates that the size of the convolution kernel of the convolution layer is N×5×5, and the convolution step is 2.

[0230] It should be understood that Figure 5b This is only an example of a side information extraction module. The side information extraction module of the present application may include Figure 5b The present application does not limit the number of network layers / activation layers shown, and the present application does not limit the convolution kernel size and convolution step size of the convolution layer. In addition, the side information extraction module of the present application may also include other network layers, which is not limited by the present application.

[0231] S504, performing probability estimation based on the side information to determine a probability estimation result of the to-be-encoded region in the feature map.

[0232] Exemplarily, the probability estimation module can perform probability estimation on each feature point y[w][h][c] in the feature graph y based on the side information of each feature point y[w][h][c] in the feature graph y to obtain the probability estimation result of each feature point y[w][h][c] in the feature graph y; and then the probability estimation result of the area to be encoded can be obtained.

[0233] In one possible manner, the probability estimation result of each feature point may be a probability P.

[0234] In a possible manner, when the probability estimation module performs Gaussian distribution estimation, the probability estimation result may include Gaussian distribution parameters: mean μ and variance σ.

[0235] Figure 5c FIG. 1 is a schematic diagram of the structure of a probability estimation module shown as an example. Figure 5c , Exemplarily, the probability estimation module can be a neural network, which can include a Conv (convolution) layer and a ReLU (activation) layer. Among them, Conv2M×3×3 / 1, means that the size of the convolution kernel of the convolution layer is 2M×3×3, and the convolution step is 1. ConvN×5×5 / 2, means that the size of the convolution kernel of the convolution layer is N×5×5, and the convolution step is 2.

[0236] For example, the feature map The block is divided into multiple cubes using w1×h1×c1 as the basic unit (where w1 is an integer between 1 and W, h1 is an integer between 1 and H, and c1 is an integer between 1 and C); when c1=1, a cube is a block.

[0237] The following is an example of a cube being an area to be encoded. For each cube, based on the probability estimation result of the cube, it is determined whether to perform adaptive entropy coding skipping processing on the cube, which can refer to the following description of S505 to S506:

[0238] S505 , determining reconstructed feature values ​​of feature points in the to-be-encoded region after the to-be-encoded region is subjected to the adaptive entropy coding skipping process.

[0239] In one possible way, for a feature point in the cube Determine feature points Is the probability P of taking the original eigenvalue (which can be represented by k1) greater than or equal to T0? When the probability P of taking value k1 is greater than or equal to T0, the specific value (which can be represented by k2) is used as the feature point The reconstructed eigenvalues ​​of When the probability P of taking value k1 is less than T0, the feature point Original eigenvalues ​​as feature points The reconstructed eigenvalues ​​of .

[0240] In one possible way, when the probability estimate is a Gaussian distribution estimate, the probability estimate result is the Gaussian distribution parameters: mean μ and variance σ, for a feature point in the cube Feature points can be determined The Gaussian distribution parameters of satisfy the following conditions: abs(μ-k1)+σ<T1. When the Gaussian distribution parameters satisfy abs(μ-k1)+σ<T1, k2 can be used as a feature point The reconstructed eigenvalues ​​of When the Gaussian distribution parameters do not satisfy abs(μ-k1)+σ<T1, The original eigenvalues ​​of The reconstructed eigenvalues ​​of .

[0241] Exemplarily, T0 and T1 are preset thresholds, and both T0 and T1 can be any value between 1 and 0, and the present application does not limit this. For example, T0 is 0.99, 0.98, 0.97, 0.95, etc.; for example, T1 is 0.2, 0.3, 0.4, etc. k2 can be any value, which is set according to the requirements, such as 0, 1, 2, 3, etc., and the present application does not limit this.

[0242] In this way, the reconstructed feature value of each feature point in the cube can be obtained.

[0243] S506: Based on the reconstructed eigenvalues ​​and the original eigenvalues ​​of the region to be encoded, determine whether to perform adaptive entropy encoding skipping processing on the region to be encoded.

[0244] Next, the error between the reconstructed eigenvalue and the original eigenvalue of the cube can be calculated; then, based on the error, it is determined whether to skip the adaptive entropy coding process for the cube. For example, the minimum mean squared error (MES) between the reconstructed eigenvalue and the original eigenvalue of the feature point in the cube can be calculated as the error.

[0245] Exemplarily, when the error between the reconstructed eigenvalue of the cube and the original eigenvalue is greater than Thr (preset error threshold), it can be determined that the adaptive entropy coding skipping process for the coding area will introduce artifacts. At this time, the adaptive entropy coding skipping process is not performed on the cube, and S510, S511 and S509 can be executed. When the error between the reconstructed eigenvalue of the cube and the original eigenvalue is less than or equal to Thr, it is determined that the adaptive entropy coding skipping process for the coding will not introduce artifacts. At this time, the adaptive entropy coding skipping process can be performed on the cube, and S508, S511 and S507 (including S507a and S507b) can be executed.

[0246] The original feature values ​​of the cube may include the original feature values ​​of the feature points included in the cube; and the reconstructed feature values ​​of the cube may include the reconstructed feature values ​​of the feature points included in the cube.

[0247] S507 , based on the probability estimation result of the area to be encoded, perform entropy encoding processing on at least one sub-block in the area to be encoded or skip entropy encoding processing on at least one sub-block.

[0248] Among them, S507 may include S507a and S507b.

[0249] Exemplarily, the region to be encoded may be divided into a plurality of sub-blocks; then, for a first sub-block among the plurality of sub-blocks included in the region to be encoded (each sub-block of the region to be encoded may be sequentially determined as the first sub-block), the following step S507a or S507b is performed:

[0250] S507a: When the probability estimation result of the first sub-block meets a preset condition, the entropy coding process of all feature points in the first sub-block is skipped.

[0251] S507b: When the probability estimation result of the first sub-block does not meet the preset condition, entropy coding is performed on all feature points in the first sub-block based on the probability estimation results of all feature points in the first sub-block.

[0252] Exemplarily, when the probability estimation result of the first sub-block meets the preset conditions, while skipping the entropy encoding processing of all feature points in the first sub-block, the feature values ​​of all feature points in the first sub-block can also be set to a specific value k2 to facilitate subsequent image reconstruction by the encoder.

[0253] In a possible manner, the preset condition may be that the probability P of the sub-block is greater than or equal to T2.

[0254] Among them, when a sub-block includes multiple feature points, the probability P of the sub-block can be the average value of the probabilities P of all feature points in the sub-block, or the maximum value or minimum value of the probabilities P of all feature points in the sub-block; this application does not limit this. When a sub-block includes only one feature point, the probability P of the sub-block is the probability P of the feature point included in the sub-block.

[0255] Wherein, T2 may be a preset threshold value, and T2 may be any value between 0 and 1, for example, T2 is 0.99, 0.98, 0.97, 0.95, etc., and this application does not limit this. In one possible manner, T2 may be equal to T0. In one possible manner, T2 may not be equal to T0.

[0256] In a possible manner, when the probability estimation result is a Gaussian distribution parameter, the preset condition may be that the Gaussian distribution parameter of the sub-block satisfies abs(μ-k1)+σ<T3.

[0257] Exemplarily, when a sub-block includes multiple feature points, the mean μ of the sub-block may be the average of the means μ of all feature points in the sub-block, and the variance σ of the sub-block may be the average of the variances σ of all feature points in the block. In one possible manner, the mean μ of the sub-block may be the maximum or minimum of the means μ of all feature points in the sub-block, and the variance σ of the sub-block may be the maximum or minimum of the variances σ of all feature points in the sub-block. Exemplarily, when a sub-block includes only one feature point, the mean μ of the sub-block may be the mean μ of one feature point included in the sub-block, and the variance σ of the sub-block may be the variance σ of one feature point included in the sub-block.

[0258] Wherein, T3 may be a preset threshold value, and T3 may be any value between 0 and 1, for example, T3 is 0.2, 0.3, 0.4, etc., and this application does not limit this. In one possible manner, T3 may be equal to T1. In one possible manner, T3 may not be equal to T1.

[0259] In one possible manner, the encoder and the decoder may pre-agree on the preset condition to be used and the threshold value (T2 or T3) used by the preset condition; in this way, the encoder does not need to write T2 or T3 into the bitstream.

[0260] In one possible way, the encoder can pre-construct a threshold candidate list (which may include T2 and T3) and synchronize it to the decoder; wherein each threshold in the threshold candidate list corresponds to an index number, and the length of the threshold candidate list can be set to N, where N is an integer greater than or equal to 1; the present application does not limit the method of constructing the threshold candidate list. The encoder can write the index number of the threshold in the candidate list into the bitstream for transmission to the decoder. Specifically, it can be saved in a sequence header, a picture header, a slice header, or supplemental enhancement information (SEI) and transmitted to the decoder; it should be understood that the encoder can also use other methods to write the index number into the bitstream, which is not limited here.

[0261] In one possible way, the encoder can set a threshold value (which may include T2 or T3) based on the complexity of the image; thus, the encoder can write the threshold value (T2 or T3) used by the preset condition into the bitstream. Specifically, the threshold value is written into the bitstream, for example, it can be saved in a sequence header, an image header, a slice / strip or SEI and transmitted to the decoder. It should be understood that the encoder can also use other methods to write the index number into the bitstream, which is not limited here.

[0262] S508: Set the identifier corresponding to the to-be-encoded area to a first value.

[0263] S509: Perform entropy coding on the region to be coded based on the probability estimation result of the region to be coded.

[0264] S510: Set the identifier corresponding to the to-be-encoded area to a second value.

[0265] S511, coding identification.

[0266] Exemplarily, one possible way to implement the coding identifier may be to binarize the identifier and then write it into the code stream. It should be understood that when the first value and the second value are binarized values, the identifier may be directly written into the code stream.

[0267] Exemplarily, one possible way to implement the coded identification may be to determine the identification value probability based on the probability estimation result of the area to be coded; then, based on the identification value probability, encode the identification. The identification value probability refers to the probability that the identification is the first value or the probability that the identification is the second value.

[0268] Exemplarily, a possible way to determine the probability of the value of the identifier based on the probability estimation result of the region to be encoded may be to determine the probability of the value of the identifier based on the sum of the probability estimation results of multiple sub-blocks in the region to be encoded.

[0269] In one possible approach, when the probability estimation result is a Gaussian distribution parameter, the Gaussian distribution parameters of all feature points in all sub-blocks in the area to be encoded can be accumulated to obtain the Gaussian distribution parameters of the marker. f =∑μ, variance of the marker σ f =∑σ. Next, the mean is μ f And the variance is σ f The Gaussian distribution of , the probability in the interval [-0.5,0.5] is used as the probability of being identified as the first value.

[0270] In a possible manner, the sum of the probabilities P of all feature points of all sub-blocks in the to-be-encoded region is calculated; and then based on the sum, an average probability is calculated as the probability identified as the first value.

[0271] Exemplarily, based on the probability estimation result of the region to be encoded, a possible way to determine the probability of the value of the identifier may be to determine the probability of the value of the identifier based on the number of feature points in the region to be encoded that skip entropy coding processing and the total number of feature points in the region to be encoded; wherein the number of feature points in the region to be encoded that skip entropy coding processing is determined based on the probability estimation results of multiple feature points included in the region to be encoded.

[0272] In one possible manner, the number of feature points in the to-be-encoded region that skip entropy encoding processing can be determined during the execution of S505, that is, when the feature points When the probability P of taking value k1 is greater than or equal to T0, the feature point Determined as a feature point for which entropy encoding processing is skipped.

[0273] In one possible manner, the number of feature points in the to-be-encoded region that skip entropy encoding processing can be determined during the execution of S505, that is, when the feature points When the Gaussian distribution parameters satisfy abs(μ-k1)+σ<T1, the feature points Determined as a feature point for which entropy encoding processing is skipped.

[0274] In one possible manner, the number of feature points in the to-be-encoded region that skip entropy coding processing can be determined in the above-mentioned process of S507, that is, when the probability estimation result of the sub-block meets the preset condition, the feature points in the sub-block are skipped. Determined as a feature point for which entropy encoding processing is skipped.

[0275] Exemplarily, the ratio of the number of feature points in the to-be-encoded region for which entropy coding is skipped to the total number of feature points in the to-be-encoded region may be calculated, and the ratio may be used as the probability of being identified as the first value.

[0276] For example, after completing S505 to S511 for each region to be encoded, it can be determined whether the region to be encoded is the last region in the feature map; if so, the process ends and the code stream of the image to be encoded is obtained. If not, the process returns to execute S505.

[0277] Exemplarily, after completing S505, S506, S507a, S508, and S510 for each area to be encoded, it can be determined whether the area to be encoded is the last area in the feature map; if so, S507b, S509, and S511 are executed for all areas to be encoded to obtain the code stream of the image to be encoded. If not, return to execute S505. That is, for all areas to be encoded, the encoding identification and entropy encoding processing are finally performed; in this case, the encoding identification method can be as follows:

[0278] Exemplarily, a possible implementation method of performing S511 coding identification on all areas to be encoded may be to binarize the identification, group-code the identifications corresponding to all areas to be encoded, group the identifications of k areas to be encoded (i.e., k cubes) into one group for encoding, and write them into the bitstream.

[0279] Taking k as 8 as an example, when all 8 identifiers in the group are the first value, the group identifier is set to the third value (for example, the third value is 0), and the third value is written into the code stream; otherwise, the group identifier is set to the fourth value (the fourth value is different from the third value, for example, the fourth value is 1), the fourth value is written into the code stream, and the binary values ​​of the 8 identifiers in the group are written into the code stream. The corresponding syntax table after encoding the identifiers corresponding to all the regions to be encoded is shown in Table 1; wherein Table 1 is the syntax table of the identifiers corresponding to all the regions to be encoded.

[0280] Referring to Table 1, number_of_cube_flag_group indicates the number of groups after all regions are grouped; group_flag indicates the group identifier; cube_flag indicates the identifier corresponding to the region to be encoded (that is, S206, S208 and S209, as well as S303, S304 and S305, and the identifiers involved in S508, S510 and S511), number_of_elements_in_group indicates the number of identifiers in the last group, and uf(1) indicates that the corresponding symbol is written into the bitstream.

[0281] Table 1

[0282]

[0283]

[0284] Exemplarily, a possible implementation of performing S511 encoding identification on all to-be-encoded regions may be to binarize the identification and then write it into the bitstream. It should be understood that when the first value and the second value are binarized values, the identification may be directly written into the bitstream.

[0285] Exemplarily, a possible implementation of performing S511 encoding identification for all to-be-encoded regions may be to determine the value probability of the identification based on the probability estimation result of the to-be-encoded region; and then, encode the identification based on the value probability of the identification. The value probability of the identification refers to the probability of the identification being the first value or the probability of the identification being the second value.

[0286] Figure 6 FIG. 4 is a schematic diagram showing an exemplary decoding process. Figure 6 For Figure 4 Based on the decoding process shown, Figure 6 The decoding process and Figure 5a The encoding process corresponds to .

[0287] S601, receiving a code stream.

[0288] S602, decoding the side information of the feature map from the bitstream, and determining the probability estimation result of the to-be-decoded area in the feature map based on the side information of the feature map.

[0289] For example, the encoder converts the feature map Side information The bitstream is written; then the decoder can perform entropy decoding on the bitstream and decode the feature map from the bitstream Side information Next, based on the feature map Side information Probability estimation is performed to determine the probability estimation result of the feature map; and then the probability estimation result of the area to be decoded in the feature map can be obtained. This process is similar to the above encoder S504 and will not be repeated here.

[0290] S603: Decode the identifier corresponding to the area to be decoded from the bit stream.

[0291] For example, if the encoder binarizes the identifier and then writes it into the bitstream, the decoder can directly read the identifier corresponding to the area to be decoded from the bitstream.

[0292] Exemplarily, if the encoder binarizes the identifiers and then groups and encodes the identifiers corresponding to all the areas to be encoded and writes them into the code stream, the decoder can decode and read the identifiers corresponding to the areas to be decoded according to the syntax table of the identifiers corresponding to all the areas to be encoded shown in Table 1. First, read the group identifier value. When the group identifier value is the third value, it can be determined that the k identifiers in the group are all the first value, that is, the identifiers of the k areas to be decoded (i.e., k cubes) are the first value; when the group identifier value is the fourth value, decode and read the k identifiers in the group from the code stream. k is consistent with the encoding end. For example, if the encoder k is 8, the decoder k is also 8.

[0293] Exemplarily, if the encoder encodes the identifier based on the identifier's value probability, the decoder can first determine the identifier's value probability based on the probability estimation result of the area to be decoded determined in S602; and then decode the identifier corresponding to the area to be decoded from the code stream based on the identifier's value probability.

[0294] Exemplarily, the encoder and the decoder may pre-agree on a method for determining the probability of the value of the identifier.

[0295] If the encoder determines the probability of the value of the identifier based on the sum of the probability estimation results of multiple feature points in the area to be encoded, the decoder can determine the probability of the value of the identifier based on the sum of the probability estimation results of multiple feature points in the area to be decoded. For details, please refer to the description in S511 above, which will not be repeated here.

[0296] If the encoder determines the probability of the value of the identifier based on the number of feature points in the to-be-encoded area that skipped entropy coding processing and the total number of feature points in the to-be-encoded area, the decoder can determine the number of feature points in the to-be-decoded area that skipped entropy decoding processing based on the probability estimation result of the area to be decoded; and determine the probability of the value of the identifier based on the number of feature points in the to-be-decoded area that skipped entropy decoding processing and the total number of feature points in the area to be decoded.

[0297] For example, the encoder and the decoder may pre-agree on a method for determining a feature point for skipping entropy decoding (or skipping entropy encoding) in a to-be-decoded region (or to-be-encoded region). When it is determined that the feature point to be skipped for entropy coding processing is a feature point, the decoder may set the feature point with a probability P greater than or equal to T0 as k1. Determined as a feature point to skip entropy decoding processing. When the encoder sets the Gaussian distribution parameters to satisfy abs(μ-k1)+σ<T1 When it is determined that the feature point to skip entropy coding processing, the decoder can calculate the feature point where the Gaussian distribution parameter satisfies abs(μ-k1)+σ<T1 Determine the feature point to skip entropy decoding processing. When the encoder estimates the probability of the feature point contained in the sub-block that meets the preset condition When it is determined that the feature point to be skipped for entropy coding processing is to be processed, the decoder may calculate the feature point contained in the sub-block where the probability estimation result meets the preset condition. Determined as a feature point for which entropy decoding processing is skipped.

[0298] S604, when the identifier is the first value, based on the probability estimation result of the area to be decoded, entropy decoding is performed on at least one sub-block in the area to be decoded or the characteristic value of the characteristic point in at least one sub-block is set to a specific value to obtain the characteristic value of the characteristic point in the area to be decoded.

[0299] Among them, S604 may include S604a and S604b.

[0300] Exemplarily, if the identifier is the first value, the decoder may perform the following step S604a or S604b for the first sub-block among the multiple sub-blocks included in the area to be decoded:

[0301] S604a, when the probability estimation result of the first sub-block meets the preset condition, skip the entropy decoding process of all feature points in the first sub-block, and set the feature values ​​of all feature points in the first sub-block to a specific value k2.

[0302] S604b: When the probability estimation result of the first sub-block does not meet the preset condition, entropy decoding is performed on all feature points in the first sub-block based on the probability estimation results of all feature points in the first sub-block.

[0303] The decoder can determine whether the probability estimation result of the first sub-block meets the preset condition according to T2 or T3 read from the bitstream; or the decoder can search T2 or T3 from the threshold candidate list according to the index number read from the bitstream; then, determine whether the probability estimation result of the first sub-block meets the preset condition. Of course, the decoder can also determine whether the probability estimation result of the first sub-block meets the preset condition according to the pre-agreed T2 or T3.

[0304] S605: When the identifier is the second value, entropy decoding is performed on the region to be decoded based on the probability estimation result of the region to be decoded to obtain feature values ​​of feature points in the region to be decoded.

[0305] S606: Reconstruct based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

[0306] Exemplarily, S605 to S606 may refer to the description of S305 to S306 above, which will not be repeated here.

[0307] Exemplarily, the feature decoding module can be implemented using a neural network of any structure, such as a fully connected network, a convolutional neural network, a recurrent neural network, etc. Optionally, the neural network can use a multi-layer deep neural network structure to achieve better estimation results.

[0308] In this way, the encoding and transmission flag at the cube level indicates whether the entropy encoding and decoding skipping process based on the probability estimation result is used for the current cube, thereby avoiding the occurrence of artifacts generated by executing the skip algorithm based on the probability estimation result.

[0309] In one possible way, during the encoding process, if the probability estimation result is a Gaussian distribution parameter, then after obtaining the feature map y and the probability estimation result of the feature map y, the predicted value of each feature point y[w][h][c] in the feature map y is set to the corresponding mean μ, so that the feature map v can be obtained. Then, the residual between the feature values ​​of the corresponding feature points in the feature map y and the feature map v can be calculated to obtain the feature map r. After that, the feature map r is quantized to obtain the feature map Then, referring to the above S505 to S511, the characteristic graph Correspondingly, in the decoding process, after executing the above S604 to S605, the feature map is obtained. Next, the feature map Each feature point The predicted value of is set to the corresponding mean μ, so that the feature map v can be obtained. After that, the feature map Add the eigenvalues ​​of the corresponding feature points of the feature map v to get the feature map Then execute S606.

[0310] It should be noted that the present application does not limit the feature map used for entropy coding to be a feature map. Or feature map

[0311] Figure 7 The figure is a schematic diagram showing an exemplary end-to-end image compression process. Figure 7 For Figure 4 The end-to-end image compression process is shown in FIG. Figure 7 The medium probability estimate is a Gaussian distribution estimate; Figure 7 In , the context information can be used to optimize the Gaussian distribution parameter μ.

[0312] Reference Figure 7 , exemplarily, the encoding process may include feature extraction, quantization, side information extraction, probability estimation, first prediction value estimation, second prediction value estimation, context information extraction and arithmetic coding.

[0313] Exemplarily, the encoder may further include a context module (for executing Figure 7 context information extraction in the encoding process), prediction value estimation module (for execution Figure 7 The first prediction value estimation in the encoding process) and the prediction module (for performing Figure 7 The probability estimation module and the prediction value estimation module may be integrated into a whole, and this application does not impose any limitation on this.

[0314] Reference Figure 7 , exemplarily, after the image to be encoded is subjected to feature extraction by the feature extraction module, a feature graph y is obtained. Then, after the feature graph y is subjected to side information extraction by the side information extraction module, side information is obtained. (Wherein, the feature graph y can be extracted by the side information extraction module to obtain the side information z, and the side information z can be quantified to obtain the side information ) and outputs it to the probability estimation module, which uses the side information Gaussian distribution estimation is performed to obtain the Gaussian distribution parameters σ[w][h][c] of each feature point y[w][h][c] in the feature map y. The edge information can be estimated by the prediction value estimation module Perform a first prediction value estimation and output the feature map F to the prediction module; then, the prediction module can perform a second prediction value estimation based on the feature map F and the feature G obtained by the context module to extract context information, and output the Gaussian distribution parameter μ[w][h][c] of each feature point y[w][h][c]. For a feature point, the context module extracts context information based on the reconstructed feature values ​​of the encoded feature points spatially adjacent to the feature point.

[0315] For example, the predicted value of each feature point y[w][h][c] in the feature map y can be set to the corresponding mean μ[w][h][c], so that the feature map v can be obtained. Then, the residual between the feature values ​​of the corresponding feature points in the feature map y and the feature map v can be calculated to obtain the feature map r. After that, the feature map r is quantized to obtain the feature map And during the reconstruction process, the feature map Add the eigenvalues ​​of the corresponding feature points of the feature map v to get the feature map Among them, the feature map The encoded feature points The eigenvalue of is the reconstructed eigenvalue of the encoded feature point. Obviously, the Gaussian distribution parameters of the feature map y are (μ, σ), and the feature map r satisfies the Gaussian distribution with zero mean and variance σ, that is, the Gaussian distribution parameters of the feature map r are (0, σ).

[0316] Afterwards, the entropy coding module can be used based on the feature map The probability estimation result of the feature map Perform arithmetic coding (refer to the description of FIG. 5 for details) to obtain code stream 1. And the side information Perform arithmetic coding to obtain code stream 2. Code stream 1 and code stream 2 are both part of the code stream of the image to be encoded.

[0317] Reference Figure 7 Exemplarily, the decoding process may include arithmetic decoding, probability estimation, first prediction value estimation, second prediction value estimation, context information extraction, and image reconstruction.

[0318] Exemplarily, the decoder may further include a context module (for executing Figure 7 context information extraction in the decoding process), prediction value estimation module (for execution Figure 7 The first prediction value estimation in the decoding process) and the prediction module (for performing Figure 7 The second prediction value estimation in the decoding process). Among them, the probability estimation module and the prediction value estimation module can be integrated into a whole, and this application does not limit this.

[0319] Reference Figure 7For example, the decoder can perform arithmetic decoding on the bitstream 2 and parse the side information from the bitstream 2. Based on side information Perform Gaussian distribution estimation to obtain the feature map Each feature point The Gaussian distribution parameters σ[w][h][c]. and the edge information can be estimated by the prediction value estimation module The first prediction value is estimated and the feature map F is output to the prediction module. Then, the prediction module can estimate the second prediction value based on the feature map F and the feature G obtained by extracting context information from the context module, and output each feature point Gaussian distribution parameter μ[w][h][c] is the Gaussian distribution parameter μ[w][h][c] of a feature point. For a feature point, the context module extracts context information based on the reconstructed feature values ​​of the decoded feature points adjacent to the feature point space.

[0320] For example, based on the feature map Each feature point The Gaussian distribution parameters σ[w][h][c] are used to perform arithmetic decoding on bitstream 1 and parse the feature map from bitstream 1 Next, the feature map can be Each feature point The predicted value of is set to the corresponding mean μ[w][h][c], so that the feature map v can be obtained. Next, the feature map Add the eigenvalues ​​of the corresponding feature points of the feature map v to get the feature map Among them, the feature map Decoded feature points The feature value of is the reconstructed feature value of the decoded feature point.

[0321] Among them, for the feature map The entropy encoding process and entropy decoding process can refer to the above Figure 5a and Figure 6 The description of the embodiments will not be repeated here.

[0322] It should be understood that the context module is an optional module; when the encoder (decoder) does not include the context module, the encoder (decoder) uses the prediction value estimation module to estimate the side information. Perform the first prediction value estimation and output each feature point Gaussian distribution parameters μ[w][h][c].

[0323] It should be understood that the side information extraction module is an optional module; when the encoder (decoder) does not include the side information extraction module, the encoder (decoder) can call the context module to extract context information, and then the probability estimation module performs probability estimation based on the context information to determine the probability estimation result.

[0324] Figure 8 FIG. 1 is a schematic diagram of an exemplary encoding process. Figure 8 For Figure 1a and Figure 1c The encoding process is shown on the basis of. Figure 2 In the embodiment, encoding an image is taken as an example for description; wherein the image can be an independent image or a frame in a video, and this application does not impose any limitation on this.

[0325] S801, obtaining an image to be encoded.

[0326] S802: extract a feature map of the image to be encoded.

[0327] S803, determining a probability estimation result of the to-be-encoded region in the feature map.

[0328] Illustratively, S801 to S803 may refer to the description of S201 to S203 above.

[0329] Exemplarily, the probability estimation result of the to-be-encoded area in the feature map may be determined based on the context information and / or the side information.

[0330] For example, the feature map or feature map The block is divided into multiple cubes using w1×h1×c1 as the basic unit (where w1 is an integer between 1 and W, h1 is an integer between 1 and H, and c1 is an integer between 1 and C); when c1=1, a cube is a block.

[0331] The following is an example in which a region to be encoded is a cube.

[0332] S804, judging whether to skip the entropy coding process for the region to be coded based on the original eigenvalue of the region to be coded and the reconstructed eigenvalue of the region to be coded determined after skipping the entropy coding process for the region to be coded.

[0333] Exemplarily, the reconstructed feature value of the to-be-encoded region can be determined first if the entropy encoding process of the to-be-encoded region is skipped; and then the reconstructed feature value of the to-be-encoded region is compared with the original feature value to determine whether to skip the entropy encoding process of the to-be-encoded region.

[0334] Exemplarily, by comparing the reconstructed feature value of the region to be coded with the original feature value, it can be determined whether an artifact will be introduced after skipping the entropy coding process of the region to be coded; when it is determined that an artifact will be introduced after skipping the entropy coding process of the region to be coded based on the comparison result of the reconstructed feature value of the region to be coded with the original feature value, the entropy coding process of the region to be coded may not be skipped; at this time, S808, S809, S810 and S807 may be executed; when it is determined that no artifact will be introduced after skipping the entropy coding process of the region to be coded based on the comparison result of the reconstructed feature value of the region to be coded with the original feature value, the entropy coding process of the region to be coded may be skipped; at this time, S806, S809, S810 and S805 may be executed. In this way, it is possible to avoid the introduction of artifacts due to the codec adaptively determining the entropy decoding skip process (skip).

[0335] The original feature value of the region to be encoded may include the original feature value of the region to be encoded including multiple feature points; and the reconstructed feature value of the region to be encoded may include the reconstructed feature value of the region to be encoded including multiple feature points.

[0336] Specifically, all feature points in the cube can be The reconstructed eigenvalue of the cube is set to a specific value k2. Next, the error between the reconstructed eigenvalue of the cube and the original eigenvalue is calculated; then, based on the error, it is determined whether to skip the entropy coding process of the cube. For example, the minimum mean squared error (MES) between the reconstructed eigenvalue of the feature point in the cube and the original eigenvalue can be calculated as the error.

[0337] Exemplarily, when the error between the reconstructed eigenvalue of the cube and the original eigenvalue is greater than Thr (a pre-set error threshold), it can be determined that there is no need to skip the entropy coding processing of the cube, and S807 can be executed; when the error between the reconstructed eigenvalue of the cube and the original eigenvalue is less than or equal to Thr, it is determined that the entropy coding processing of the cube can be skipped, and S805 can be executed.

[0338] S805: Skip entropy coding processing on the area to be coded.

[0339] Exemplarily, while skipping the entropy coding process for all feature points in the to-be-coded region, the feature values ​​of all feature points in the to-be-coded region may be set to a specific value k2 to facilitate subsequent image reconstruction by the encoder.

[0340] S806: Set the identifier corresponding to the to-be-encoded area to a first value.

[0341] It should be noted that in Figure 8It is shown that after executing S806, S809-S810 are executed, and after executing S809-S810, S805 is executed. It should be understood that the present application may also execute S805 first, then execute S806, and then execute S809-S810; that is, the present application does not limit the execution order of the coding flag and the skipping of the entropy coding processing of the to-be-coded region.

[0342] S807, performing entropy coding processing on the region to be coded based on the probability estimation result of the region to be coded.

[0343] S808: Set the identifier corresponding to the to-be-encoded area to a second value.

[0344] Illustratively, S805 to S808 may refer to the description of the above embodiment, which will not be repeated here.

[0345] It should be noted that in Figure 8 It is shown that after executing S808, S809-S810 are executed, and after executing S809-S810, S807 is executed. It should be understood that the present application may also execute S807 first, then execute S808, and then execute S809-S810; that is, the present application does not limit the execution order of the coding identifier and the entropy coding processing of the coding area.

[0346] S809, based on the probability estimation result of the region to be encoded, determine the probability of the value of the identifier corresponding to the region to be encoded, wherein the probability of the value of the identifier refers to the probability of the identifier being the first value or the probability of the identifier being the second value.

[0347] Exemplarily, in a possible method of S809, the probability of the value of the identifier can be determined based on the sum of the probability estimation results of multiple feature points in the area to be encoded; the details can be referred to the description of the above embodiment, which will not be repeated here.

[0348] Exemplarily, in a possible manner of S809, the number of feature points in the to-be-encoded region that are skipped for entropy coding may be determined based on the probability estimation result of the to-be-encoded region; and the value probability of the identifier may be determined based on the number of feature points in the to-be-encoded region that are skipped for entropy coding and the total number of feature points in the to-be-encoded region. For details, please refer to the description of the above embodiment, which will not be repeated here.

[0349] S810, encoding the identifier based on the probability of the identifier taking a value.

[0350] Exemplarily, S810 may refer to the above description and will not be described in detail here.

[0351] Fig. 9 FIG. 4 is a schematic diagram showing an exemplary decoding process. Fig. 9 For Figure 1a and Figure 1c Based on the decoding process shown, Fig. 9 The decoding process and Figure 8 The encoding process corresponds to .

[0352] S901, obtain code stream.

[0353] S902, determining a probability estimation result of a to-be-decoded area in a feature map corresponding to the bitstream.

[0354] S903, based on the probability estimation result of the area to be decoded, determine the value probability of the identifier corresponding to the area to be decoded, wherein the value probability of the identifier refers to the probability of the identifier being the first value or the probability of the identifier being the second value.

[0355] Exemplarily, in an implementation of S903, the number of feature points in the to-be-decoded region that skip entropy decoding processing may be determined based on the probability estimation result of the to-be-decoded region; the probability of the value of the identifier may be determined based on the number of feature points in the to-be-decoded region that skip entropy decoding processing and the total number of feature points in the to-be-decoded region. For details, please refer to the above description, which will not be repeated here.

[0356] For example, in an implementation of S903, the probability of the value of the identifier may be determined based on the sum of the probability estimation results of multiple feature points in the area to be decoded. For details, please refer to the above description, which will not be repeated here.

[0357] S904: Decode the identifier corresponding to the area to be decoded from the bitstream based on the value probability of the identifier.

[0358] S905: When the identifier is the first value, set the feature value of the feature point in the area to be decoded to a specific value.

[0359] S906: When the identifier is the second value, entropy decoding is performed on the region to be decoded based on the probability estimation result of the region to be decoded to obtain feature values ​​of feature points in the region to be decoded.

[0360] Among them, after executing S905 and S906 for all the areas to be decoded in the feature map, if the feature map is obtained If the feature values ​​of all feature points in the feature map are obtained, S907 can be directly executed; The feature values ​​of all feature points in the feature map can be The predicted values ​​of all feature points in are set to the mean μ, and the feature map v is obtained; then, the feature map The eigenvalues ​​of all feature points in the feature map v are added together to obtain the feature map Then execute S907.

[0361] S907, reconstructing based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

[0362] Fig.10 The figure is a schematic diagram of an exemplary machine vision task based on encoding and decoding. Fig.10 For Figure 1b Based on what is shown.

[0363] in, Fig.10 The encoding process and entropy decoding process can refer to the description of the above embodiment; after the feature map is obtained by entropy decoding Afterwards, based on the feature map Perform machine vision tasks for classification, object recognition, semantic segmentation, and more.

[0364] Exemplarily, the present application proposes an encoder, which may include:

[0365] An acquisition module, used for acquiring an image to be encoded;

[0366] A feature extraction module, used to extract a feature map of the image to be encoded;

[0367] A probability estimation module, used to determine the probability estimation result of the area to be encoded in the feature map;

[0368] An entropy coding module is used to determine whether to perform adaptive entropy coding skip processing on the to-be-coded region based on the original eigenvalue of the to-be-coded region and the reconstructed eigenvalue determined after the adaptive entropy coding skip processing is performed on the to-be-coded region; if so, perform entropy coding processing on at least one sub-block in the to-be-coded region or skip entropy coding processing on at least one sub-block based on the probability estimation result of the to-be-coded region, and set the identifier corresponding to the to-be-coded region to a first value; if not, perform entropy coding processing on the to-be-coded region based on the probability estimation result of the to-be-coded region, and set the identifier corresponding to the to-be-coded region to a second value; and encode the identifier.

[0369] It should be understood that the encoder of the present application can also perform the above Figure 2 and Figure 5a The steps in the encoding process.

[0370] Exemplarily, the present application proposes a decoder, which may include: a receiving module, configured to receive a code stream;

[0371] An entropy decoding module is used to determine a probability estimation result of a region to be decoded in a feature map corresponding to a bitstream, and to decode an identifier corresponding to the region to be decoded from the bitstream; when the identifier is a first value, based on the probability estimation result of the region to be decoded, entropy decoding is performed on at least one sub-block in the region to be decoded or a feature value of a feature point in at least one sub-block is set to a specific value to obtain a feature value of the feature point in the region to be decoded; when the identifier is a second value, entropy decoding is performed on the region to be decoded based on the probability estimation result of the region to be decoded to obtain a feature value of the feature point in the region to be decoded;

[0372] The feature decoding module is used to reconstruct based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

[0373] It should be understood that the decoder of the present application can also perform the above Figure 3 and Figure 6 The steps in the decoding process.

[0374] Exemplarily, the present application proposes an encoder, which may include:

[0375] An acquisition module, used for acquiring an image to be encoded;

[0376] A feature extraction module, used to extract a feature map of the image to be encoded;

[0377] A probability estimation module, used to determine the probability estimation result of the area to be encoded in the feature map;

[0378] An entropy coding module is used to determine whether to skip the entropy coding process of the to-be-coded region based on the original eigenvalue of the to-be-coded region and the reconstructed eigenvalue determined after skipping the entropy coding process of the to-be-coded region; if yes, skip the entropy coding process of the to-be-coded region and set the identifier corresponding to the to-be-coded region to a first value; if no, perform entropy coding process on the to-be-coded region based on the probability estimation result of the to-be-coded region and set the identifier corresponding to the to-be-coded region to a second value; determine the value probability of the identifier based on the probability estimation result of the to-be-coded region; wherein the value probability of the identifier refers to the probability of the identifier being the first value or the probability of the identifier being the second value; and encode the identifier based on the value probability of the identifier.

[0379] It should be understood that the encoder of the present application can also perform the above Figure 8 The steps in the encoding process.

[0380] Exemplarily, the present application proposes a decoder, which may include:

[0381] A receiving module, used for receiving a code stream;

[0382] An entropy decoding module is used to determine a probability estimation result of a region to be decoded in a feature map corresponding to a bitstream; based on the probability estimation result of the region to be decoded, determine a value probability of an identifier corresponding to the region to be decoded; wherein the value probability of the identifier refers to a probability of the identifier being a first value or a probability of the identifier being a second value; based on the value probability of the identifier, decode the identifier from the bitstream; when the identifier is the first value, set a characteristic value of a characteristic point in the region to be decoded to a specific value; when the identifier is the second value, perform entropy decoding on the region to be decoded based on the probability estimation result of the region to be decoded to obtain a characteristic value of the characteristic point in the region to be decoded;

[0383] The feature decoding module is used to reconstruct based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

[0384] It should be understood that the decoder of the present application can also perform the above Fig. 9 The steps in the decoding process.

[0385] In one example, Fig.11 A schematic block diagram of a device 1100 according to an embodiment of the present application is shown. The device 1100 may include: a processor 1101 and a transceiver / transceiver pin 1102 , and optionally, a memory 1103 .

[0386] The various components of the device 1100 are coupled together via a bus 1104, wherein the bus 1104 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus 1104 in the figure.

[0387] Optionally, the memory 1103 may be used to store instructions in the aforementioned method embodiment. The processor 1101 may be used to execute the instructions in the memory 1103, and control the receiving pin to receive a signal, and control the sending pin to send a signal.

[0388] The apparatus 1100 may be the electronic device or a chip of the electronic device in the above method embodiment.

[0389] Illustratively, the electronic device may be a terminal device or a server.

[0390] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0391] The embodiment of the present application also provides a chip, including one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the electronic device implements the encoding and decoding method in the above embodiment in the above related method steps. The interface circuit is a transceiver / transceiver pin 1102.

[0392] This embodiment further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the encoding and decoding method in the above-mentioned embodiment.

[0393] This embodiment further provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer executes the above-mentioned related steps to implement the encoding and decoding method in the above-mentioned embodiment.

[0394] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the encoding and decoding methods in the above-mentioned method embodiments.

[0395] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.

[0396] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned 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.

[0397] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0398] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0399] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0400] Any content of each embodiment of the present application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.

[0401] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0402] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0403] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0404] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0405] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A coding method, characterized in that: The method comprises: Obtaining an image to be encoded; Extracting a feature map of the image to be encoded, and determining a probability estimation result of a region to be encoded in the feature map; Based on the original characteristic value of the to-be-encoded region and the reconstructed characteristic value of the to-be-encoded region determined after the to-be-encoded region is subjected to the adaptive entropy coding skipping process, determining whether to perform the adaptive entropy coding skipping process on the to-be-encoded region; If yes, based on the probability estimation result of the to-be-encoded region, entropy coding is performed on at least one sub-block in the to-be-encoded region or entropy coding of the at least one sub-block is skipped, and an identifier corresponding to the to-be-encoded region is set to a first value; If not, performing entropy coding processing on the to-be-coded region based on the probability estimation result of the to-be-coded region, and setting the identifier corresponding to the to-be-coded region to a second value; The identifier is encoded.

2. The method according to claim 1, characterized in that: The encoding of the identification includes: Determine the probability of the identifier taking a value based on the probability estimation result of the to-be-encoded region; wherein the probability of the identifier taking a value refers to the probability that the identifier is a first value or the probability that the identifier is a second value; The identifier is encoded based on the probability of the identifier taking a value.

3. The method according to claim 1 or 2, characterized in that: The determining whether to perform the adaptive entropy coding skipping process on the region to be encoded based on the original feature value of the region to be encoded and the reconstructed feature value of the region to be encoded determined after the adaptive entropy coding skipping process is performed on the region to be encoded comprises: determining an error between the reconstructed eigenvalue and the original eigenvalue; When the error is greater than the error threshold, determining to perform adaptive entropy coding skipping processing on the to-be-coded area; When the error is less than or equal to the error threshold, it is determined not to perform adaptive entropy coding skipping processing on the to-be-coded area.

4. The method according to claim 2, characterized in that: The to-be-encoded region includes a plurality of sub-blocks, and the probability estimation result of the to-be-encoded region includes the probability estimation results of the plurality of sub-blocks; The determining the value probability of the identifier based on the probability estimation result of the to-be-encoded region includes: The probability of the value of the identifier is determined based on the sum of the probability estimation results of multiple sub-blocks in the to-be-encoded area.

5. The method according to claim 2, characterized in that: The area to be encoded includes a plurality of sub-blocks, each of the sub-blocks includes at least one feature point, and the probability estimation result of the area to be encoded includes probability estimation results of the plurality of feature points; The determining the value probability of the identifier based on the probability estimation result of the to-be-encoded region includes: Determining the value probability of the identifier based on the number of feature points in the to-be-encoded area that skip entropy coding processing and the total number of feature points in the to-be-encoded area; The number of feature points in the to-be-encoded region for which entropy coding processing is skipped is determined based on a probability estimation result of a plurality of feature points included in the to-be-encoded region.

6. The method according to any one of claims 1 to 5, characterized in that: The to-be-encoded region includes a plurality of sub-blocks, the probability estimation result of the to-be-encoded region includes probability estimation results of the plurality of sub-blocks, the sub-block includes at least one feature point, and the probability estimation result of the sub-block includes probability estimation results of the feature points included in the sub-block; The performing entropy coding processing on at least one sub-block in the to-be-coded region or skipping the entropy coding processing on the at least one sub-block based on the probability estimation result of the to-be-coded region comprises: For a first sub-block among the multiple sub-blocks: When the probability estimation result of the first sub-block meets a preset condition, skipping the entropy coding process of all feature points in the first sub-block; When the probability estimation result of the first sub-block does not meet the preset condition, entropy coding is performed on all feature points in the first sub-block based on the probability estimation results of all feature points in the first sub-block.

7. A decoding method, characterized in that: The method comprises: Receive code stream; Determine a probability estimation result of a region to be decoded in a feature map corresponding to the bitstream, and decode an identifier corresponding to the region to be decoded from the bitstream; When the identifier is the first value, based on the probability estimation result of the area to be decoded, entropy decoding is performed on at least one sub-block in the area to be decoded or a characteristic value of a characteristic point in the at least one sub-block is set to a specific value to obtain a characteristic value of the characteristic point in the area to be decoded; When the identifier is a second value, performing entropy decoding processing on the area to be decoded based on the probability estimation result of the area to be decoded, so as to obtain a feature value of a feature point in the area to be decoded; Reconstruction is performed based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

8. The method according to claim 7, characterized in that The decoding of the identifier corresponding to the to-be-decoded area from the bit stream includes: Determine the probability of the identifier taking a value based on the probability estimation result of the area to be decoded; wherein the probability of the identifier taking a value refers to the probability that the identifier is a first value or the probability that the identifier is a second value; Based on the value probability of the identifier, the identifier corresponding to the to-be-decoded area is decoded from the code stream.

9. The method according to claim 7, characterized in that: The area to be decoded includes a plurality of sub-blocks, and the probability estimation result of the area to be decoded includes the probability estimation results of the plurality of sub-blocks; and determining the value probability of the identifier based on the probability estimation result of the area to be decoded includes: The probability of the value of the identifier is determined based on the sum of the probability estimation results of multiple sub-blocks in the area to be decoded.

10. The method according to claim 7, characterized in that The area to be decoded includes a plurality of sub-blocks, each of which includes at least one feature point, and the probability estimation result of the area to be decoded includes probability estimation results of the plurality of feature points; The determining the value probability of the identifier based on the probability estimation result of the area to be decoded includes: Determining the number of feature points in the to-be-decoded area for which entropy decoding processing is skipped based on probability estimation results of a plurality of feature points included in the to-be-decoded area; The value probability of the identifier is determined based on the number of feature points in the to-be-decoded area that skip entropy decoding processing and the total number of feature points in the to-be-decoded area.

11. The method according to any one of claims 7 to 10, characterized in that: The to-be-decoded area includes a plurality of sub-blocks, the probability estimation result of the to-be-decoded area includes probability estimation results of the plurality of sub-blocks, the sub-block includes at least one feature point, and the probability estimation result of the sub-block includes probability estimation results of the feature points included in the sub-block; The step of performing entropy decoding on at least one sub-block in the to-be-decoded area or setting a characteristic value of a characteristic point in the at least one sub-block to a specific value based on the probability estimation result of the to-be-decoded area to obtain the characteristic value of the characteristic point in the to-be-decoded area includes: For a first sub-block among the multiple sub-blocks: When the probability estimation result of the first sub-block meets a preset condition, setting the feature values ​​of all feature points in the first sub-block to specific values; When the probability estimation result of the first sub-block does not meet the preset condition, based on the probability estimation results of all feature points in the first sub-block, entropy decoding is performed on all feature points in the first sub-block to obtain feature values ​​of all feature points in the first sub-block.

12. A coding method, characterized in that: The method comprises: Obtaining an image to be encoded; Extracting a feature map of the image to be encoded, and determining a probability estimation result of a region to be encoded in the feature map; Based on the original characteristic value of the to-be-encoded region and the reconstructed characteristic value of the to-be-encoded region determined after the entropy encoding process of the to-be-encoded region is skipped, determining whether to skip the entropy encoding process of the to-be-encoded region; If yes, skip entropy coding of the to-be-coded region, and set the flag corresponding to the to-be-coded region to the first value; If not, performing entropy coding processing on the to-be-coded region based on the probability estimation result of the to-be-coded region, and setting the identifier corresponding to the to-be-coded region to a second value; Determine the probability of the identifier taking a value based on the probability estimation result of the to-be-encoded region; wherein the probability of the identifier taking a value refers to the probability that the identifier is a first value or the probability that the identifier is a second value; The identifier is encoded based on the probability of the identifier taking a value.

13. The method according to claim 12, characterized in that The determining whether to skip the entropy coding process for the region to be coded based on the original feature value of the region to be coded and the reconstructed feature value of the region to be coded determined after skipping the entropy coding process for the region to be coded comprises: determining an error between the reconstructed eigenvalue and the original eigenvalue; When the error is greater than an error threshold, determining to skip entropy coding processing on the to-be-coded area; When the error is less than or equal to the error threshold, it is determined not to skip the entropy encoding process on the to-be-encoded area.

14. The method according to claim 12 or 13, characterized in that The area to be encoded includes a plurality of feature points, and the probability estimation result of the area to be encoded includes probability estimation results of the plurality of feature points in the area to be encoded; The determining the value probability of the identifier based on the probability estimation result of the to-be-encoded region includes: The probability of the value of the identifier is determined based on the sum of the probability estimation results of multiple feature points in the area to be encoded.

15. The method according to claim 12 or 13, characterized in that The area to be encoded includes a plurality of feature points, and the probability estimation result of the area to be encoded includes probability estimation results of the plurality of feature points in the area to be encoded; The determining the value probability of the identifier based on the probability estimation result of the to-be-encoded region includes: Determining the number of feature points in the to-be-encoded region for which entropy coding is skipped based on the probability estimation result of the to-be-encoded region; The value probability of the identifier is determined based on the number of feature points in the to-be-encoded area that skip entropy coding processing and the total number of feature points in the to-be-encoded area.

16. The method according to claim 15, characterized in that The determining, based on the probability estimation result of the to-be-encoded region, the number of feature points in the to-be-encoded region for skipping entropy coding processing comprises: The number of feature points in the to-be-encoded region whose probability estimation results meet a preset condition is used as the number of feature points in the to-be-encoded region for which entropy coding processing is skipped.

17. A decoding method, characterized in that: The method comprises: Receive code stream; Determine a probability estimation result of a to-be-decoded area in a feature map corresponding to the bitstream; Based on the probability estimation result of the area to be decoded, determine the value probability of the identifier corresponding to the area to be decoded; wherein the value probability of the identifier refers to the probability that the identifier is a first value or the probability that the identifier is a second value; Decoding the identifier from the bitstream based on the probability of the identifier taking a value; When the identifier is a first value, setting a characteristic value of the characteristic point in the to-be-decoded area to a specific value; When the identifier is a second value, performing entropy decoding processing on the area to be decoded based on the probability estimation result of the area to be decoded, so as to obtain a feature value of a feature point in the area to be decoded; Reconstruction is performed based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

18. The method according to claim 17, characterized in that The area to be decoded includes a plurality of feature points, and the probability estimation result of the area to be decoded includes probability estimation results of the plurality of feature points in the area to be decoded; The determining, based on the probability estimation result of the area to be decoded, the value probability of the identifier corresponding to the area to be decoded includes: The probability of the value of the identifier is determined based on the sum of the probability estimation results of multiple feature points in the area to be decoded.

19. The method according to claim 17 or 18, characterized in that The area to be decoded includes a plurality of feature points, and the probability estimation result of the area to be decoded includes probability estimation results of the plurality of feature points in the area to be decoded; The determining, based on the probability estimation result of the area to be decoded, the value probability of the identifier corresponding to the area to be decoded includes: Based on the probability estimation result of the to-be-decoded area, determining the number of feature points in the to-be-decoded area for skipping entropy decoding processing; The value probability of the identifier is determined based on the number of feature points in the to-be-decoded area that skip entropy decoding processing and the total number of feature points in the to-be-decoded area.

20. The method according to claim 19, characterized in that The determining, based on the probability estimation result of the to-be-decoded area, the number of feature points in the to-be-decoded area for skipping entropy decoding processing comprises: The number of feature points in the to-be-decoded region whose probability estimation results meet a preset condition is used as the number of feature points in the to-be-decoded region for which entropy decoding processing is skipped.

21. An encoder, characterized in that: The encoder comprises: An acquisition module, used for acquiring an image to be encoded; A feature extraction module, used to extract a feature map of the image to be encoded; A probability estimation module, used to determine a probability estimation result of the area to be encoded in the feature map; An entropy coding module is used to determine whether to perform adaptive entropy coding skip processing on the area to be encoded based on the original characteristic value of the area to be encoded and the reconstructed characteristic value of the area to be encoded determined after the area to be encoded is subjected to adaptive entropy coding skip processing; if so, based on the probability estimation result of the area to be encoded, perform entropy coding processing on at least one sub-block in the area to be encoded or skip the entropy coding processing of the at least one sub-block, and set the identifier corresponding to the area to be encoded to a first value; if not, perform entropy coding processing on the area to be encoded based on the probability estimation result of the area to be encoded, and set the identifier corresponding to the area to be encoded to a second value; and encode the identifier.

22. A decoder, characterized in that: The decoder comprises: A receiving module, used for receiving a code stream; an entropy decoding module, configured to determine a probability estimation result of a region to be decoded in a feature map corresponding to the code stream, and to decode an identifier corresponding to the region to be decoded from the code stream; when the identifier is a first value, based on the probability estimation result of the region to be decoded, entropy decoding is performed on at least one sub-block in the region to be decoded or a feature value of a feature point in the at least one sub-block is set to a specific value to obtain a feature value of the feature point in the region to be decoded; when the identifier is a second value, entropy decoding is performed on the region to be decoded based on the probability estimation result of the region to be decoded to obtain a feature value of the feature point in the region to be decoded; The feature decoding module is used to reconstruct based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

23. An encoder, characterized in that: The encoder comprises: An acquisition module, used for acquiring an image to be encoded; A feature extraction module, used to extract a feature map of the image to be encoded; A probability estimation module, used to determine a probability estimation result of the area to be encoded in the feature map; An entropy coding module is used to determine whether to skip the entropy coding process of the area to be encoded based on the original characteristic value of the area to be encoded and the reconstructed characteristic value of the area to be encoded determined after skipping the entropy coding process of the area to be encoded; if so, skip the entropy coding process of the area to be encoded, and set the identifier corresponding to the area to be encoded to a first value; if not, perform entropy coding on the area to be encoded based on the probability estimation result of the area to be encoded, and set the identifier corresponding to the area to be encoded to a second value; determine the value probability of the identifier based on the probability estimation result of the area to be encoded; wherein the value probability of the identifier refers to the probability that the identifier is the first value or the probability that the identifier is the second value; and encode the identifier based on the value probability of the identifier.

24. A decoder, characterized in that The decoder comprises: A receiving module, used for receiving a code stream; An entropy decoding module, used to determine a probability estimation result of a region to be decoded in a feature map corresponding to the code stream; based on the probability estimation result of the region to be decoded, determine a value probability of an identifier corresponding to the region to be decoded; wherein the value probability of the identifier refers to a probability that the identifier is a first value or a probability that the identifier is a second value; based on the value probability of the identifier, decode the identifier from the code stream; when the identifier is a first value, set a characteristic value of a feature point in the region to be decoded to a specific value; when the identifier is a second value, perform entropy decoding processing on the region to be decoded based on the probability estimation result of the region to be decoded, so as to obtain a characteristic value of a feature point in the region to be decoded; The feature decoding module is used to reconstruct based on the feature values ​​of the feature points in the feature map to obtain a reconstructed image.

25. An electronic device, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the encoding method according to any one of claims 1 to 6, or executes the encoding method according to any one of claims 12 to 16.

26. An electronic device, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the decoding method according to any one of claims 7 to 11, or executes the decoding method according to any one of claims 17 to 20.

27. A chip, characterized in that: The electronic device comprises one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the electronic device executes the encoding method as described in any one of claims 1 to 6, or executes the encoding method as described in any one of claims 12 to 16.

28. A chip, characterized in that: The electronic device comprises one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the electronic device executes the decoding method as described in any one of claims 7 to 11, or executes the decoding method as described in any one of claims 17 to 20.

29. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program runs on a computer or a processor, the computer or the processor executes the method according to any one of claims 1 to 20.

30. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed by a computer or a processor, the steps of the method according to any one of claims 1 to 20 are performed.

31. A device for storing a code stream, characterized in that: The device comprises: a receiver and at least one storage medium, The receiver is used to receive a code stream; The at least one storage medium is used to store the code stream; The code stream is generated according to the encoding method according to any one of claims 1 to 6, or generated according to the encoding method according to any one of claims 12 to 16.

32. A device for transmitting a code stream, characterized in that: The device comprises: a transmitter and at least one storage medium, The at least one storage medium is used to store a code stream, wherein the code stream is generated according to the encoding method according to any one of claims 1 to 6, or generated according to the encoding method according to any one of claims 12 to 16; The transmitter is used to obtain the code stream from the storage medium and send the code stream to the terminal side device through the transmission medium.

33. A system for distributing code streams, characterized in that: The system comprises: At least one storage medium, for storing at least one code stream, wherein the at least one code stream is generated according to the encoding method according to any one of claims 1 to 6, or generated according to the encoding method according to any one of claims 12 to 16, The streaming media device is used to obtain a target code stream from the at least one storage medium and send the target code stream to the terminal side device, wherein the streaming media device includes a content server or a content distribution server.

Citation Information

Cited By

  • Encoding method, decoding method and electronic device

    EP4668751A1

  • Encoding method, decoding method and electronic device

    WO2024188073A1