Encoding method, decoding method and electronic device
By extracting feature maps and judging entropy coding skipping during the image coding process, the problem of artifacts introduced by entropy coding and decoding skipping in the existing technology is solved, more efficient image coding and decoding is achieved, and the occurrence of artifacts is avoided.
Patent Information
- Application Number
- PCT/CN2024/079572
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-18
- Filing Date
- 2024-03-01
- Publication Date
- 2024-09-19
AI Technical Summary
In the existing end-to-end image encoding process, entropy encoding and decoding skipping may introduce artifacts and affect the quality of image reconstruction.
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 a flag is set to guide the encoder and decoder to avoid the introduction of artifacts.
It effectively avoids the introduction of artifacts in reconstructed images, improves coding efficiency and reconstruction quality, and reduces code rate overhead.
Smart Images

Figure CN2024079572_19092024_PF_FP_ABST
Abstract
Description
Coding and decoding method and electronic device
[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”, the entire contents of which are incorporated by reference into this application.
[0002] This application also claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on April 18, 2023, with application number 202310458544.1 and application name “Encoding and Decoding Method and Electronic Device”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present application relate to the field of coding and decoding, and in particular to a coding and decoding method and electronic device. Background Art
[0004] Artificial intelligence (AI) image compression algorithms are based on deep learning and offer better compression results than traditional image compression technologies, such as JPEG (Joint Photographic Experts Group) and BPG (Better Portable Graphics). Deep learning-based end-to-end image coding schemes are widely used.
[0005] Currently, in the existing end-to-end image encoding process, the codec skips entropy encoding and decoding, which may introduce artifacts.
[0006] Summary of the Invention
[0007] In view of this, the present application provides a coding method and an electronic device. The coding method can effectively avoid introducing artifacts into the reconstructed image.
[0008] In a first aspect, an embodiment of the present application provides a coding method, which includes: 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 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; if so, performing entropy coding on at least one sub-block in the region to be coded or skipping entropy coding 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 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.
[0009] 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 skip processing is performed on the to-be-coded region is small, it means that the adaptive entropy coding skip processing on the to-be-coded region will not introduce artifacts into the reconstructed image of the to-be-coded region, and in this case, the adaptive entropy coding skip processing 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 skip processing is performed on the to-be-coded region is large, it means that the adaptive entropy coding skip processing on the to-be-coded region will introduce artifacts into the reconstructed image of the to-be-coded region, and in this case, the adaptive entropy coding skip processing can be omitted; in this way, the introduction of artifacts into the reconstructed image can be effectively avoided.
[0010] 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.
[0011] Exemplarily, a feature extraction module can be used to extract feature maps 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). CNN can refer to a neural network containing a convolutional layer, which may also contain activation layers (such as ReLU, PReLU, etc.), pooling layers, batch normalization layers (BN layers), fully connected layers, 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.
[0012] Exemplarily, a feature map is three-dimensional data output by the convolutional layer, activation layer, pooling layer, batch normalization layer, etc. in a convolutional neural network. The three dimensions are called width, height, and channel, respectively. Exemplarily, a feature map can include W*H*C feature points, each of which has a corresponding eigenvalue. Exemplarily, the eigenvalue can be a floating point number; where W, H, and C are all positive integers.
[0013] Exemplarily, the feature map used for entropy coding processing and adaptive entropy coding skip processing may be a quantized feature map.
[0014] For example, the feature map can be divided into multiple cubes using 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.
[0015] In one possible approach, the probability estimation result of each feature point may be a probability P.
[0016] In one possible manner, when the probability estimation module performs Gaussian distribution estimation, the probability estimation result may include Gaussian distribution parameters: mean μ and variance σ.
[0017] Exemplarily, the region to be coded may include multiple feature points, and at least one feature point may be divided into a sub-block; thus, the region to be coded may include multiple sub-blocks, each of which may include at least one feature point. Adaptive entropy coding skipping may refer to: performing entropy coding on at least one sub-block in the region to be coded, or skipping entropy coding on at least one sub-block, based on a probability estimation result of the region to be coded. In this way, adaptive entropy coding skipping may be performed on the region to be coded using sub-blocks as the minimum unit, thereby improving coding efficiency and reducing bitrate overhead.
[0018] For example, when a sub-block includes a feature point, adaptive entropy coding skipping may refer to: performing entropy coding on at least one feature point in the to-be-coded region, or skipping entropy coding on at least one feature point, based on the probability estimation result of the to-be-coded region. In this way, the to-be-coded region can be encoded using feature points as the minimum unit, which can improve reconstruction quality compared to encoding the to-be-coded region using sub-blocks as the minimum unit.
[0019] 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, performing entropy encoding processing on at least one sub-block in the area to be encoded or skipping entropy encoding processing on at least one sub-block".
[0020] In one possible approach, you can first execute "based on the probability estimation result of the area to be encoded, entropy encoding at least one sub-block in the area to be encoded or skip entropy encoding of at least one sub-block", then execute "setting the identifier corresponding to the area to be encoded to the first value", and then execute "encoding the identifier".
[0021] In one possible approach, "setting the identifier corresponding to the to-be-encoded region to the second value" may be performed first, then "encoding the identifier", and then "performing entropy encoding on the to-be-encoded region based on the probability estimation result of the to-be-encoded region" may be performed.
[0022] In one possible approach, the process of “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, followed by “setting the identifier corresponding to the region to be coded to the second value”, and then “encoding the identifier”.
[0023] 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 coding area.
[0024] Exemplarily, after entropy coding or adaptive entropy coding skipping, a code stream of the area to be coded can be obtained; the code streams of all the areas to be coded in the feature map can constitute the code stream of the image to be coded; the identifier can be written into the code stream as a new syntax element.
[0025] Exemplarily, the identifier is encoded to obtain a code stream of the identifier; the code streams of all to-be-encoded regions in the feature map and the code streams of the corresponding identifiers can constitute the code stream of the to-be-encoded image.
[0026] It should be understood that there may be multiple ways of coding identification, and this application does not limit this.
[0027] For example, the identifier can be represented by a skip flag, a flag, or a cube flag.
[0028] For example, 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.
[0029] According to the first aspect, encoding the identifier includes: 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.
[0030] For example, 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 probability of the identifier's value can reduce the code rate overhead.
[0031] In this way, the identifier is encoded using the probability estimation result that can be obtained by both the encoder and the decoder, making it easier for the decoder to decode the identifier from the bitstream.
[0032] According to the first aspect, or any implementation manner of the first aspect above, 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 skipping process is performed on the to-be-coded region, it is determined whether to perform the adaptive entropy coding skipping process on the to-be-coded region, including: determining the error between the reconstructed eigenvalue and the original eigenvalue; when the error is greater than the error threshold, determining to perform the adaptive entropy coding skipping process on the to-be-coded region; when the error is less than or equal to the error threshold, determining not to perform the adaptive entropy coding skipping process on the to-be-coded region.
[0033] 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.
[0034] Exemplarily, whether to perform adaptive entropy coding skipping on the area to be coded can be determined based on the error between the reconstructed eigenvalue and the original eigenvalue of the area to be coded. 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 area to be coded when no artifact appears in the reconstructed image of the area to be coded, and this application does not impose any restrictions on this. When the error between the reconstructed eigenvalue and the original eigenvalue of the area to be coded is greater than the error threshold Thr, it means that performing adaptive entropy coding skipping on the area to be coded will introduce artifacts into the reconstructed image of the area to be coded, and at this time, adaptive entropy coding skipping on the area to be coded may not be performed. When the error between the reconstructed eigenvalue and the original eigenvalue of the area to be coded is less than or equal to the error threshold Thr, it can be determined that performing adaptive entropy coding skipping on the area to be coded will not introduce artifacts into the reconstructed image of the area to be coded, and at this time, adaptive entropy coding skipping on the area to be coded may be performed.
[0035] 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.
[0036] For example, 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 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 [-0.5, 0.5] is used as the probability of the first value.
[0037] 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 value probability 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 value probability 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.
[0038] In one possible approach, when the feature points 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 coding processing is skipped.
[0039] In one possible approach, when the feature points When the Gaussian distribution parameters satisfy abs(μ-k1)+σ<T1, the feature points Determined as a feature point for which entropy coding processing is skipped.
[0040] 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 Determined as a feature point for which entropy coding processing is skipped.
[0041] 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.
[0042] 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 mean μ of all feature points in the sub-block, and the variance σ of the sub-block may be the average of the variance σ 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 mean μ of all feature points in the sub-block, and the variance σ of the sub-block may be the maximum or minimum of the variance σ 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 this application does not impose any limitation on this. In one possible manner, T3 may be equal to T1. In one possible manner, T3 may not be equal to T1.
[0043] 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 of at least one sub-block is skipped, 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, 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.
[0044] In a second aspect, an embodiment of the present application provides a decoding method, comprising: first, receiving a bitstream; then, determining a probability estimation result of a region to be decoded in a feature map corresponding to the bitstream, and decoding an identifier corresponding to the region to be decoded from the bitstream; when the identifier is a first value, performing entropy decoding on at least one sub-block in the region to be decoded or setting the characteristic value of a feature point in at least one sub-block to a specific value based on the probability estimation result of the region to be decoded; when the identifier is a second value, performing entropy decoding 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 feature point in the region to be decoded; and then, reconstructing based on the characteristic value of the feature point in the feature map to obtain a reconstructed image. Because the identifier is set by the encoder based on whether skipping adaptive entropy coding will introduce artifacts into the reconstructed image, the decoder determines whether to skip adaptive entropy decoding or perform entropy decoding on the region to be decoded based on the identifier during the decoding process, thereby avoiding the introduction of artifacts into the reconstructed image obtained by decoding.
[0045] According to a second aspect, decoding an identifier corresponding to a to-be-decoded area from a bitstream 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 of the identifier being a first value or a probability of the identifier being a second value; and decoding the identifier corresponding to the to-be-decoded area from the bitstream based on the value probability of the identifier.
[0046] According to the second aspect, or any implementation method of the above second aspect, 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.
[0047] According to the second aspect, or any implementation manner of the above second aspect, 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.
[0048] According to the second aspect, or any implementation method of the above second aspect, 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, entropy decoding is performed on at least one sub-block in the area to be decoded or the characteristic value of the feature point in at least one sub-block is set to a specific value to obtain the characteristic value of the feature point in the area to be decoded, including: for the first sub-block among the multiple sub-blocks: when the probability estimation result of the first sub-block meets the preset condition, the characteristic values of all the feature points in the first sub-block are 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 results of all the feature points in the first sub-block, entropy decoding is performed on all the feature points in the first sub-block to obtain the characteristic values of all the feature points in the first sub-block.
[0049] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0050] In a third aspect, the present application also provides a coding method, which includes: 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 the area to be coded in the feature map; thereafter, based on the original eigenvalue of the area to be coded and the reconstructed eigenvalue of the area to be coded determined after skipping the entropy coding process of the area to be coded, determining whether to skip the entropy coding process of the area to be coded; if so, skipping the entropy coding process of the area to be coded, and setting the identifier corresponding to the area to be coded to a first value; if not, performing entropy coding on the area to be coded based on the probability estimation result of the area to be coded, and setting the identifier corresponding to the area to be coded to a second value; subsequently, determining the value probability of the identifier based on the probability estimation result of the area to be coded; 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.
[0051] 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 skipping the entropy coding process on the to-be-coded region is small, it means that skipping the entropy coding process on the to-be-coded region will not introduce artifacts in the reconstructed image of the to-be-coded region, and in this case, the entropy coding process on the to-be-coded region can be skipped. 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 skipping the entropy coding process on the to-be-coded region is large, it means that skipping the entropy coding process on the to-be-coded region will introduce artifacts in the reconstructed image of the to-be-coded region, and in this case, the entropy coding process on the to-be-coded region may not be skipped; in this way, the introduction of artifacts in the reconstructed image can be effectively avoided.
[0052] Secondly, skipping the entropy coding process for the entire to-be-coded region can improve the efficiency of the entropy coding skipping process, thereby improving the coding efficiency.
[0053] Furthermore, compared to binarizing the identifier and writing it into the bitstream, encoding the identifier based on its value probability can reduce bitrate overhead. Furthermore, encoding the identifier using probability estimates available to both the encoder and decoder facilitates decoding the identifier from the bitstream.
[0054] According to the third aspect, based on the original eigenvalue of the to-be-encoded region and the reconstructed eigenvalue of the to-be-encoded region determined after skipping the entropy coding processing of the to-be-encoded region, it is determined whether to skip the entropy coding processing of the to-be-encoded region, including: determining the error between the reconstructed eigenvalue and the original eigenvalue; when the error is greater than the error threshold, determining to skip the entropy coding processing of the to-be-encoded region; when the error is less than or equal to the error threshold, determining not to skip the entropy coding processing of the to-be-encoded region.
[0055] According to the third aspect, or any implementation method of the above third aspect, 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.
[0056] According to the third aspect, or any implementation method of the above third aspect, 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.
[0057] 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 which entropy coding is skipped based on the probability estimation result of the to-be-encoded region includes:
[0058] The number of feature points in the to-be-encoded region whose probability estimation results satisfy a preset condition is used as the number of feature points in the to-be-encoded region for which entropy coding processing is skipped.
[0059] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0060] 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 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, decoding the identifier from the code stream; when the identifier is the first value, setting the characteristic value of the feature point in the to-be-decoded area to a specific value; when the identifier is the 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 value of the feature point in the to-be-decoded area; and then, reconstructing based on the characteristic value of the feature point in the feature map to obtain a reconstructed image.
[0061] 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: determining the value probability of the identifier based on the sum of the probability estimation results of the multiple feature points in the area to be decoded.
[0062] According to the fourth aspect, or any implementation method of the above 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 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.
[0063] According to the fourth aspect, or any implementation method of the above fourth aspect, based on the probability estimation result of the area to be decoded, the number of feature points in the area to be decoded for which entropy decoding processing is skipped is determined, including: the number of feature points in the area to be decoded for which the probability estimation result meets the preset conditions is used as the number of feature points in the area to be decoded for which entropy decoding processing is skipped.
[0064] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0065] In a fifth aspect, the present application further provides an encoder, comprising:
[0066] An acquisition module, used for acquiring an image to be encoded;
[0067] A feature extraction module, used to extract a feature map of the image to be encoded;
[0068] A probability estimation module is used to determine the probability estimation result of the area to be encoded in the feature map;
[0069] 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.
[0070] It should be understood that the encoder can also execute the steps in the above-mentioned first aspect and any implementation manner of the first aspect.
[0071] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0072] In a sixth aspect, the present application further provides a decoder, comprising:
[0073] A receiving module, used for receiving code stream;
[0074] an entropy decoding module, configured 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, perform entropy decoding on at least one sub-block in the region to be decoded or set the characteristic value of a characteristic point in at least one sub-block to a specific value to obtain a characteristic value of the characteristic point in the region to be decoded; when the identifier is a 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;
[0075] 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.
[0076] 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.
[0077] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0078] In a seventh aspect, the present application further provides an encoder, comprising:
[0079] An acquisition module, used for acquiring an image to be encoded;
[0080] A feature extraction module, used to extract a feature map of the image to be encoded;
[0081] A probability estimation module is used to determine the probability estimation result of the area to be encoded in the feature map;
[0082] An entropy coding module is used to determine whether to skip entropy coding processing of a to-be-coded region based on an original eigenvalue of the to-be-coded region and a reconstructed eigenvalue of the to-be-coded region determined after skipping entropy coding processing of the to-be-coded region; if so, skip entropy coding processing of the to-be-coded region and set an 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 a 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 a 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 a probability of the identifier being the first value or a probability of the identifier being the second value; and encode the identifier based on the value probability of the identifier.
[0083] It should be understood that the encoder can also execute the steps in the above-mentioned third aspect and any implementation manner of the third aspect.
[0084] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0085] In an eighth aspect, the present application further provides a decoder, the decoder comprising: a receiving module for receiving a code stream;
[0086] An entropy decoding module is configured to determine a probability estimation result of a to-be-decoded area in a feature map corresponding to a code stream; determine 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 of the identifier being a first value or the probability of the identifier being a second value; decode the identifier from the code stream based on the value probability of the identifier; when the identifier is the first value, set the characteristic value of the feature point in the to-be-decoded area to a specific value; when the identifier is the second value, perform entropy decoding 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 feature point in the to-be-decoded area; and a feature decoding module is configured to reconstruct based on the characteristic value of the feature point in the feature map to obtain a reconstructed image.
[0087] It should be understood that the decoder can also execute the steps in the fourth aspect and any implementation of the fourth aspect.
[0088] 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 be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0089] 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 of the first aspect (or the third aspect).
[0090] 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 be referred to the technical effects corresponding to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), and will not be repeated here.
[0091] 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 of the second aspect (or the fourth aspect).
[0092] 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 be referred 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), and will not be repeated here.
[0093] 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 of the first aspect (or the third aspect) or any possible implementation of the first aspect (or the third aspect).
[0094] 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 be referred 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), and will not be repeated here.
[0095] 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 of the second aspect (or the fourth aspect) or any possible implementation of the second aspect (or the fourth aspect).
[0096] 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 be referred 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), and will not be repeated here.
[0097] 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, it enables the computer or the processor to execute the steps of the first aspect (or the third aspect) or any possible implementation of the first aspect (or the third aspect).
[0098] The thirteenth aspect and any implementation of the thirteenth 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 thirteenth aspect and any implementation of the thirteenth aspect can be referred 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), and will not be repeated here.
[0099] 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, it enables the computer or the processor to execute the steps of the second aspect (or the fourth aspect) or any possible implementation of the second aspect (or the fourth aspect).
[0100] 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 be referred 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), and will not be repeated here.
[0101] 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 of the first aspect (or the third aspect).
[0102] 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 be referred to the technical effects corresponding to the first aspect (or the third aspect) and any implementation of the first aspect (or the third aspect), and will not be repeated here.
[0103] 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 of the second aspect (or the fourth aspect).
[0104] 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 be referred 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), and will not be repeated here.
[0105] In a 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 being used to receive the code stream; the at least one storage medium being used to store the code stream; the code stream being generated according to the first aspect (or the third aspect) and any one of the implementations of the first aspect (or the third aspect).
[0106] 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 be referred 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), and will not be repeated here.
[0107] In aspect 18, 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 being used to store the code stream, the 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); the transmitter being used to obtain the code stream from the storage medium and send the code stream to the end-side device through the transmission medium.
[0108] 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 be referred 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), and will not be repeated here.
[0109] In a 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.
[0110] 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 be referred 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), and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] FIG1a is a schematic diagram of an exemplary application scenario;
[0112] FIG1b is a schematic diagram of an exemplary application scenario;
[0113] FIG1c is a schematic diagram illustrating an exemplary end-to-end image compression process;
[0114] FIG2 is a schematic diagram illustrating an exemplary encoding process;
[0115] FIG3 is a schematic diagram illustrating an exemplary decoding process;
[0116] FIG4 is a schematic diagram illustrating an exemplary end-to-end image compression process;
[0117] FIG5a is a schematic diagram illustrating an exemplary encoding process;
[0118] FIG5 b is a schematic structural diagram of an exemplary side information extraction module;
[0119] FIG5c is a schematic diagram showing the structure of a probability estimation module;
[0120] FIG6 is a schematic diagram illustrating an exemplary decoding process;
[0121] FIG7 is a schematic diagram illustrating an exemplary end-to-end image compression process;
[0122] FIG8 is a schematic diagram illustrating an exemplary encoding process;
[0123] FIG9 is a schematic diagram illustrating an exemplary decoding process;
[0124] FIG10 is a schematic diagram of an exemplary machine vision task based on encoding and decoding;
[0125] FIG11 is a schematic structural diagram of an exemplary device. DETAILED DESCRIPTION
[0126] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0127] The term "and / or" in this article is merely a description of the association relationship between 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.
[0128] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.
[0129] In the embodiments of this 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 this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0130] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.
[0131] Figure 1a is a schematic diagram of an exemplary application scenario. The application scenario of Figure 1a is various video service scenarios based on video codecs, 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 this application.
[0132] Referring to Figure 1a, illustratively, 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 this embodiment of the present application. It should be understood that Figure 1a is only an example of the first device, and the first device in other embodiments of the present application may have more modules than shown in Figure 1a, which is not limited in this embodiment of the present application.
[0133] Referring to Figure 1a, illustratively, 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 this embodiment of the present application. It should be understood that Figure 1a is only an example of a second device, and the second device in other embodiments of the present application may have more modules than shown in Figure 1a, which is not limited in this embodiment of the present application.
[0134] Continuing with reference to FIG. 1a , illustratively, after the camera of the first device captures 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. The encoding module can then encode the pre-processed raw video data to obtain a code stream (wherein the code stream can also be referred to as a bit stream or bit stream), and output the encoded code stream to the sending module; thereafter, 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, which then renders and displays the reconstructed video data.
[0135] 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.
[0136] Exemplarily, the second device includes but is not limited to: a PC, a laptop, a tablet computer, a mobile phone, and a watch.
[0137] 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.
[0138] 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.
[0139] For example, in a cloud gaming scenario, the first device may be a server, and the second device may be a tablet, a PC, a laptop, or a mobile phone.
[0140] 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.
[0141] 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.
[0142] It should be understood that the code stream obtained by encoding can also be directly stored.
[0143] Figure 1b is a schematic diagram illustrating an exemplary application scenario. The application scenario in Figure 1b is a computer vision task scenario based on video (or image) encoding and decoding. Machine vision tasks include, but are not limited to, object classification, recognition, and segmentation, and are not limited in this application.
[0144] The first device in FIG1b may refer to the description of the first device in FIG1a, which will not be repeated here.
[0145] 1 b , illustratively, 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.
[0146] Continuing with reference to FIG1b , illustratively, after the camera of the first device captures raw video data, the process of sending the captured raw video data to the second device for performing a machine vision task is as follows: After the video capture module captures the raw video data, the raw video data is input into the acquisition pre-processing module; the acquisition pre-processing module performs a series of pre-processing on the raw video data and then outputs it to the encoding module. The encoding module can then encode the pre-processed raw video data to obtain a code stream (wherein the code stream can also be referred to as a bit stream or bit stream), and output the encoded code stream to the sending module; thereafter, 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 during 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 during the decoding process to obtain a machine vision task result.
[0147] 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.
[0148] Exemplarily, the second device includes but is not limited to: a PC, a laptop, a tablet computer, a mobile phone, and a watch.
[0149] 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.
[0150] 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 does not limit this.
[0151] FIG1c is a schematic diagram showing an exemplary end-to-end image compression process.
[0152] 1c, the encoder may include, for example, 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 more or fewer modules than those shown in FIG1c, and this application does not limit this.
[0153] 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.
[0154] Referring to FIG1c , the decoder may include, by way of example, 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 include more or fewer modules than those shown in FIG1c , and this application is not limited thereto. The feature dequantization module is optional.
[0155] 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 for decoding features into a reconstructed image. Exemplarily, the probability estimation module can be used for probability estimation.
[0156] Figure 2 is a schematic diagram illustrating an exemplary encoding process. Figure 2 illustrates the encoding process based on Figures 1a and 1c. In the embodiment of Figure 2, encoding of an image is used as an example; the image can be an independent image or a frame in a video, and this application does not limit this. Steps S201 to S209 are all steps in the encoder encoding process.
[0157] S201: Obtain an image to be encoded.
[0158] S202: Extract a feature map of the image to be encoded.
[0159] 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.
[0160] 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 (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.
[0161] For example, the feature extraction module can be implemented by stacking multiple layers of convolution and combining them with nonlinear mapping activation functions.
[0162] Exemplarily, a feature map is three-dimensional data output by the convolutional layer, activation layer, pooling layer, batch normalization layer, etc. in a convolutional neural network. The three dimensions are called width, height, and channel, respectively. Exemplarily, a feature map can include W*H*C feature points, each of which has a corresponding eigenvalue. Exemplarily, the eigenvalue can be a floating point number; where W, H, and C are all positive integers.
[0163] 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.
[0164] For example, the feature map can be divided into multiple regions; each region is then determined as a region to be encoded; and steps S203 to S209 are then executed for the region to be encoded to encode the region to be encoded. The following description uses a region to be encoded as an example. The region to be encoded can be a two-dimensional region or a three-dimensional region; the region to be encoded can include one or more feature points, which is not limited in this application.
[0165] S203, determining a probability estimation result of the area to be encoded in the feature map.
[0166] For example, the probability estimation module can perform probability estimation on each feature point in the feature map to determine a probability estimation result for each feature point in the feature map; thereby, a probability estimation result for the region to be encoded in the feature map can be obtained. The probability estimation result for the region to be encoded can include probability estimation results for all feature points in the region to be encoded; the probability estimation process is described later.
[0167] S204 , judging whether to perform the adaptive entropy coding skipping process 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 skipping process is performed on the to-be-coded region.
[0168] For example, the reconstructed eigenvalue of the to-be-coded region can be determined first if the to-be-coded region is subjected to adaptive entropy coding skipping processing; then the reconstructed eigenvalue of the to-be-coded region is compared with the original eigenvalue to determine whether the to-be-coded region is subjected to adaptive entropy coding skipping processing.
[0169] Exemplarily, by comparing the reconstructed eigenvalues of the to-be-coded region 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 to-be-coded region. When, based on the comparison results of the reconstructed eigenvalues of the to-be-coded region with the original eigenvalues, it is determined that an artifact will be introduced after the adaptive entropy coding skipping process is performed on the to-be-coded region, the adaptive entropy coding skipping process may not be performed on the to-be-coded region; at this time, S207, S208, and S209 can be executed. When, based on the comparison results of the reconstructed eigenvalues of the to-be-coded region with the original eigenvalues, it is determined that no artifact will be introduced after the adaptive entropy coding skipping process is performed on the to-be-coded region, the adaptive entropy coding skipping process may be performed on the to-be-coded region; 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.
[0170] 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.
[0171] S205 , based on the probability estimation result of the area to be coded, perform entropy coding on at least one sub-block in the area to be coded or skip entropy coding on at least one sub-block.
[0172] 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 be divided into multiple sub-blocks, and each sub-block may include at least one feature point. The probability estimation result of the region to be encoded may include the probability estimation results of multiple sub-blocks; and the probability estimation result of each sub-block may include the probability estimation result of the feature points included in the sub-block. Exemplarily, adaptive entropy coding skipping may refer to: performing entropy coding on at least one sub-block in the region to be encoded or skipping entropy coding on at least one sub-block based on the probability estimation result of the region to be encoded. In this way, adaptive entropy coding skipping may 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.
[0173] Specifically, for each sub-block, based on the probability estimation result of the sub-block, it is determined whether to skip the entropy coding processing of the sub-block; when it is determined not to skip the entropy coding processing 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 processing of the sub-block, the entropy coding processing of all feature points in the sub-block is skipped; and after skipping the entropy coding processing of all feature points in the sub-block, the feature values of all feature points in the sub-block are set to specific values (to facilitate determination of the reconstructed image of the area to be coded).
[0174] It should be understood that when a sub-block includes only one feature point, adaptive entropy coding skipping is performed using the feature point as the minimum unit. In this case, adaptive entropy coding skipping can mean performing entropy coding on at least one feature point in the region to be coded, or skipping entropy coding on at least one feature point, based on the probability estimation result of the region to be coded. This allows encoding of the region to be coded using feature points as the minimum unit, which can improve reconstruction quality compared to encoding the region to be coded using sub-blocks as the minimum unit.
[0175] S206: Set the identifier corresponding to the to-be-encoded area to a first value.
[0176] For example, when it is determined that the adaptive entropy coding skipping process is to be performed on the region to be coded in the feature map, the flag corresponding to the region to be coded (for example, a skip flag, a flag, or a 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 the corresponding region to be decoded and determine whether to skip the adaptive entropy decoding process. The first value can be set as required, such as 1.
[0177] 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 (ie, a code stream obtained by the adaptive entropy coding skipping process) can be obtained.
[0178] It should be noted that FIG2 shows that S209 is executed after S206, and S205 is executed after S209. It should be understood that the present application may also execute S205 first, then S206, and then 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 uncoded region. The present application uses the example of executing S209 after S206 and then executing S205 after S209 as an example.
[0179] S207 , performing entropy coding on the region to be coded based on the probability estimation result of the region to be coded.
[0180] 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).
[0181] S208: Set the identifier corresponding to the to-be-encoded area to a second value.
[0182] For example, when it is determined that the adaptive entropy coding skipping process is not to be performed on the to-be-encoded region in the feature map, the flag can be set to a second value; then S209 is executed, i.e., encoding the flag. In this way, the flag can be transmitted to the decoder, so that the decoder can know whether to skip the adaptive entropy coding process for the corresponding to-be-encoded region. The second value can be set as required, such as 0.
[0183] It should be noted that the first value and the second value are different.
[0184] It should be noted that FIG2 shows that S209 is executed after S208, and S207 is executed after S209. It should be understood that the present application may also execute S207 first, then S208, and then S209; that is, the present application does not limit the execution order of the coding identifier and the entropy coding processing of the uncoded region. The present application uses the example of executing S209 after S208 and then executing S207 after S209 as an example.
[0185] S209, coding identification.
[0186] In one possible manner, the flag may be encapsulated as a syntax element into a code stream generated by an entropy coding skip process, or a code stream generated by an entropy coding process.
[0187] In one possible approach, the identifier is encoded to obtain a code stream of the identifier; the code streams of all to-be-encoded regions in the feature map and the code streams of the corresponding identifiers can constitute a code stream of the to-be-encoded image.
[0188] It should be understood that there may be multiple ways to encode the identifier, which is not limited in this application; details will be explained later.
[0189] Exemplarily, S204 to S209 may be performed by an entropy coding module.
[0190] 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.
[0191] Illustratively, the present application provides a device for storing a code stream, the device comprising: a receiver and at least one storage medium, the receiver being configured to receive a code stream generated by the encoding method according to embodiment 2, and the at least one storage medium being configured to store the code stream.
[0192] Exemplarily, the present application provides a device for transmitting a code stream, which includes: a transmitter and at least one storage medium, wherein the at least one storage medium is used to store the code stream generated according to the encoding method of Example 2; the transmitter is used to obtain the code stream from the storage medium and send the code stream to the end-side device through the transmission medium.
[0193] 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 the at least one storage medium and sending the target code stream to an end-side device, wherein the streaming media device includes a content server or a content distribution server.
[0194] Figure 3 is a schematic diagram of an exemplary decoding process. Figure 3 is a decoding process shown on the basis of Figures 1a and 1c, and the decoding process of Figure 3 corresponds to the encoding process of Figure 2.
[0195] S301, receiving a code stream.
[0196] For example, 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; then, S302 to S306 are executed for the region to be decoded to decode the region to be decoded. The following description uses a region to be decoded as an example. The region to be decoded can be a two-dimensional region or a three-dimensional region; the region 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.
[0197] S302, determining a probability estimation result of a region to be decoded in a feature map corresponding to the bitstream.
[0198] For example, the probability estimation module can perform probability estimation on each feature point in the feature map to determine a probability estimation result for each feature point in the feature map; and then obtain a probability estimation result for the to-be-decoded region in the feature map. The probability estimation result for the to-be-decoded region can include probability estimation results for all feature points in the to-be-decoded region.
[0199] It should be understood that the process of S302 corresponds to that of S203, which will be described in detail later.
[0200] S303: Decode the identifier corresponding to the area to be decoded from the code stream.
[0201] Exemplarily, the decoder may decode the identifier corresponding to the to-be-decoded area from the bitstream.
[0202] It should be noted that, in one possible approach, S302 can be performed first, followed by S303. In this case, one implementation of S303 can be: based on the probability estimation result of the area to be decoded, the identifier corresponding to the area to be decoded can be decoded from the bitstream. In another possible approach, S302 and S303 can be performed in parallel. In this case, one implementation of S303 can be: reading the identifier corresponding to the area to be decoded from the bitstream. The specific implementation depends on the encoding method of the identifier, which will be explained later.
[0203] 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.
[0204] 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.
[0205] 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.
[0206] Specifically, the area to be decoded may include multiple feature points, and at least one feature point may be divided into a sub-block. Thus, the area to be decoded may be divided into multiple sub-blocks, each of which may include at least one feature point. The probability estimation result for the area to be decoded includes the probability estimation results for multiple sub-blocks, and the probability estimation result for each sub-block may include the probability estimation results for all feature points included in the sub-block. For each sub-block, a determination is made based on the probability estimation result for the sub-block whether to skip entropy decoding for the sub-block. When it is determined not to skip entropy decoding for the sub-block, entropy decoding may be performed on all feature points in the sub-block based on the probability estimation result for the sub-block to obtain feature values for all feature points in the sub-block. When it is determined to skip entropy decoding for the sub-block, entropy decoding for the feature point may be skipped, and the feature values for all feature points in the sub-block may be set to specific values. In this way, adaptive entropy decoding skipping can be performed on the area to be decoded using sub-blocks as the minimum unit, thereby improving decoding efficiency.
[0207] It should be understood that when a sub-block includes only one feature point, adaptive entropy decoding skipping is performed using the feature point as the minimum unit. In this case, adaptive entropy decoding skipping can mean performing entropy decoding on at least one feature point in the to-be-decoded area, or skipping entropy decoding on at least one feature point, based on the probability estimation result of the to-be-decoded area. This allows decoding of the to-be-decoded area using feature points as the minimum unit, which can improve reconstruction quality compared to decoding the to-be-decoded area using sub-blocks as the minimum unit.
[0208] 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.
[0209] 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 coding on the area to be decoded; therefore, the decoder can perform entropy decoding 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.
[0210] Exemplarily, S302 to S305 may be performed by an entropy decoding module.
[0211] S306 , reconstructing based on the feature values of the feature points in the feature map to generate a reconstructed image.
[0212] In this way, after executing S302 to S305 for all areas to be decoded in the feature map, the feature values of all feature points in the feature map can be obtained. Then, the feature dequantization module can dequantize the feature values of all feature points in the feature map; then, the feature decoding module can reconstruct the image based on the dequantized feature values of all feature points in the feature map to obtain a reconstructed image.
[0213] 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.
[0214] The encoding and decoding process is described in detail below.
[0215] FIG4 is a schematic diagram illustrating an exemplary end-to-end image compression process.
[0216] Referring to Figure 4 , the encoding process may exemplarily include feature extraction, quantization, side information extraction, probability estimation, and arithmetic coding. The feature extraction in Figure 4 may be performed by the feature extraction module in Figure 1c ; the quantization in Figure 4 may be performed by the feature quantization module in Figure 1c ; the probability estimation in Figure 4 may be performed by the probability estimation module of the encoder in Figure 1c ; and the arithmetic coding in Figure 4 may be performed by the entropy coding module in Figure 1c .
[0217] Exemplarily, the encoder may further include a side information extraction module for performing side information extraction.
[0218] 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 y is obtained. 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 is based on the side information Perform probability estimation to obtain the probability estimation result of feature map y (i.e. feature map The probability estimation result of ). After that, 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 FIG5 for details) to obtain a code stream.
[0219] For example, 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.
[0220] For example, after obtaining the side information Afterwards, the side information Written into the bitstream to facilitate probability estimation by the decoder's probability estimation module.
[0221] Referring to Figure 4 , the decoding process may include, for example, arithmetic decoding, probability estimation, and image reconstruction. The arithmetic decoding in Figure 4 may be performed by the entropy decoding module in Figure 1c ; the image reconstruction in Figure 4 may be performed by the feature decoding module in Figure 1c ; and the probability estimation in Figure 4 may be performed by the probability estimation module of the decoder in Figure 1c .
[0222] 4, for example, the decoder can parse the side information from the code stream Based on side information Perform probability estimation and determine feature map Then, we can use the feature map The probability estimation result is arithmetic decoded to obtain the feature map Then, based on the feature map Perform image reconstruction to obtain a reconstructed image.
[0223] The encoding and decoding process is described in detail below based on FIG4 .
[0224] Figure 5a is a schematic diagram of an exemplary encoding process. Figure 5a is an encoding process shown on the basis of Figure 4.
[0225] S501: Obtain an image to be encoded.
[0226] S502: Extract a feature map of the image to be encoded.
[0227] Exemplarily, the feature map extracted by the feature extraction module for the image to be encoded can be called feature map y.
[0228] S503: Extract side information of the feature graph.
[0229] In one possible approach, the feature map y can be input into the side information extraction module, which extracts the side information of each feature point y[w][h][c] in the feature map 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.
[0230] 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 get the side information
[0231] Figure 5b is a schematic diagram of the structure of an exemplary side information extraction module. Referring to Figure 5b , 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. Conv N×3×3 / 1 indicates that the convolution kernel size of the convolution layer is N×3×3, and the convolution stride is 1. Conv N×5×5 / 2 indicates that the convolution kernel size of the convolution layer is N×5×5, and the convolution stride is 2.
[0232] It should be understood that Figure 5b is merely an example of a side information extraction module. The side information extraction module of this application may include more or fewer network layers / activation layers than those shown in Figure 5b, and this application does not impose any restrictions on this. Furthermore, this application does not impose any restrictions on the convolution kernel size or convolution step size of the convolution layer. Furthermore, the side information extraction module of this application may also include other network layers, and this application does not impose any restrictions on this either.
[0233] S504: Perform probability estimation based on the side information to determine a probability estimation result of the area to be encoded in the feature map.
[0234] 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.
[0235] In one possible approach, the probability estimation result of each feature point may be a probability P.
[0236] In one possible manner, when the probability estimation module performs Gaussian distribution estimation, the probability estimation result may include Gaussian distribution parameters: mean μ and variance σ.
[0237] Figure 5c is a schematic diagram of the structure of an exemplary probability estimation module. Referring to Figure 5c, the probability estimation module can be a neural network, which can include a Conv (convolution) layer and a ReLU (activation) layer. Conv 2M×3×3 / 1 indicates that the convolution kernel size of the convolution layer is 2M×3×3, and the convolution stride is 1. Conv N×5×5 / 2 indicates that the convolution kernel size of the convolution layer is N×5×5, and the convolution stride is 2.
[0238] 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.
[0239] The following is an example of a cube with a region to be coded. For each cube, based on the probability estimation result of the cube, it is determined whether to perform adaptive entropy coding skipping on the cube. Please refer to the following description of S505 to S506:
[0240] S505 , determining reconstructed feature values of feature points in the to-be-encoded region after the adaptive entropy coding skipping process is performed on the to-be-encoded region.
[0241] 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 expressed 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 k1 is less than T0, the feature point Original eigenvalues as feature points The reconstructed eigenvalues of .
[0242] In one possible way, when the probability estimation is a Gaussian distribution estimation, the probability estimation 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 .
[0243] For example, T0 and T1 are pre-set thresholds. Both T0 and T1 can be any value between 1 and 0, and this application does not limit this. For example, T0 can be 0.99, 0.98, 0.97, 0.95, etc.; for example, T1 can be 0.2, 0.3, 0.4, etc. k2 can be any value, set as required, such as 0, 1, 2, 3, etc., and this application does not limit this.
[0244] In this way, the reconstructed feature value of each feature point in the cube can be obtained.
[0245] S506 , judging whether to perform adaptive entropy coding skipping processing on the region to be coded based on the reconstructed eigenvalue and the original eigenvalue of the region to be coded.
[0246] Next, the error between the reconstructed eigenvalues and the original eigenvalues of the cube can be calculated. Based on the error, it is then determined whether to skip the adaptive entropy coding process for the cube. For example, the minimum mean squared error (MES) between the reconstructed eigenvalues and the original eigenvalues of the feature points in the cube can be calculated as the error.
[0247] Exemplarily, when the error between the reconstructed eigenvalue of the cube and the original eigenvalue is greater than Thr (a preset error threshold), it can be determined that skipping the adaptive entropy coding of the to-be-encoded region will introduce artifacts. In this case, 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 skipping the adaptive entropy coding of the to-be-encoded region will not introduce artifacts. In this case, the adaptive entropy coding skipping process can be performed on the cube, and S508, S511, and S507 (including S507a and S507b) can be executed.
[0248] 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.
[0249] S507 : Based on the probability estimation result of the region to be coded, perform entropy coding on at least one sub-block in the region to be coded or skip entropy coding on at least one sub-block.
[0250] Among them, S507 may include S507a and S507b.
[0251] Exemplarily, the region to be encoded may be divided into multiple sub-blocks. Then, for the first sub-block among the multiple 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:
[0252] S507a: When the probability estimation result of the first sub-block meets a preset condition, skip entropy coding processing of all feature points in the first sub-block.
[0253] S507b: When the probability estimation result of the first sub-block does not meet the preset condition, perform entropy coding processing on all feature points in the first sub-block based on the probability estimation results of all feature points in the first sub-block.
[0254] Exemplarily, when the probability estimation result of the first sub-block meets the preset conditions, while skipping the entropy coding 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.
[0255] In one possible manner, the preset condition may be that the probability P of the sub-block is greater than or equal to T2.
[0256] When a sub-block includes multiple feature points, the probability P of the sub-block can be the average of the probabilities P of all feature points in the sub-block, or the maximum or minimum of the probabilities P of all feature points in the sub-block; this application does not impose any restrictions on 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.
[0257] Wherein, T2 may be a pre-set 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., which is not limited in this application. In one possible embodiment, T2 may be equal to T0. In another possible embodiment, T2 may not be equal to T0.
[0258] 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.
[0259] Exemplarily, when a sub-block includes multiple feature points, the mean μ of the sub-block may be the average of the mean μ of all feature points in the sub-block, and the variance σ of the sub-block may be the average of the variance σ of all feature points in the block. In one possible approach, the mean μ of the sub-block may be the maximum or minimum of the mean μ of all feature points in the sub-block, and the variance σ of the sub-block may be the maximum or minimum of the variance σ 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 the one feature point included in the sub-block, and the variance σ of the sub-block may be the variance σ of the one feature point included in the sub-block.
[0260] Wherein, T3 may be a pre-set threshold value, and T3 may be any value between 0 and 1, for example, T3 is 0.2, 0.3, 0.4, etc., which is not limited in this application. In one possible embodiment, T3 may be equal to T1. In another possible embodiment, T3 may not be equal to T1.
[0261] In one possible approach, the encoder and decoder may pre-agreed 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.
[0262] 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; This 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.
[0263] In one possible approach, the encoder can set a threshold (possibly including T2 or T3) based on image complexity. Thus, the encoder can write the threshold (T2 or T3) used for the preset condition into the bitstream. Specifically, the threshold can be written into the bitstream, for example, by storing it in a sequence header, picture header, slice, or SEI for transmission 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.
[0264] S508: Set the identifier corresponding to the to-be-encoded area to a first value.
[0265] S509 , performing entropy coding on the region to be coded based on the probability estimation result of the region to be coded.
[0266] S510: Set the identifier corresponding to the to-be-encoded region to a second value.
[0267] S511, coding identification.
[0268] For example, one possible way to implement the coding identifier is 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 can be directly written into the code stream.
[0269] For example, one possible method for implementing a coded identifier may be to determine a value probability of the identifier based on a probability estimation result of the region to be coded; and then, encode the identifier based on the value probability of the identifier. 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.
[0270] Exemplarily, a possible way to determine the probability of the value of the identifier based on the probability estimation result of the area 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 area to be encoded.
[0271] 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 coded 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 [-0.5, 0.5] is used as the probability of the first value.
[0272] In one possible approach, the sum of the probabilities P of all feature points of all sub-blocks in the region to be encoded is calculated; and based on the sum, an average probability is calculated as the probability identified as the first value.
[0273] Exemplarily, based on the probability estimation result of the area 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 area to be encoded that skip entropy coding processing and the total number of feature points in the area to be encoded; 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.
[0274] In one possible approach, the number of feature points in the to-be-encoded region that are skipped for entropy coding can be determined during the execution of S505, that is, when the feature points When the probability P of k1 is greater than or equal to T0, the feature point Determined as a feature point for which entropy coding processing is skipped.
[0275] In one possible approach, the number of feature points in the to-be-encoded region that are skipped for entropy coding 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 coding processing is skipped.
[0276] In one possible approach, 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 coding processing is skipped.
[0277] Exemplarily, the ratio of the number of feature points in the to-be-encoded region that skip entropy coding 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.
[0278] 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 S505.
[0279] For example, after completing S505, S506, S507a, S508, and S510 for each region to be coded, it can be determined whether the region to be coded is the last region in the feature map. If so, S507b, S509, and S511 are executed for all regions to be coded to obtain the code stream of the image to be coded. If not, the process returns to S505. In other words, the coding identification and entropy coding process are finally performed for all regions to be coded. In this case, the coding identification method can be as follows:
[0280] For example, a possible implementation method of performing S511 encoding identification for all areas to be encoded may be to binarize the identification, group-encode 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.
[0281] Taking k as 8 as an example, when all eight identifiers in a group are the first value, the group identifier is set to a third value (e.g., 0) and written into the bitstream. Otherwise, the group identifier is set to a fourth value (different from the third value, e.g., 1), written into the bitstream, and the binary values of the eight identifiers in the group are written into the bitstream. The corresponding syntax table after encoding the identifiers corresponding to all regions to be encoded is shown in Table 1; Table 1 is a syntax table for the identifiers corresponding to all regions to be encoded.
[0282] 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 code stream.
[0283] Table 1
[0284] For example, one 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] For example, one possible implementation of performing S511 encoding identification for all to-be-encoded regions may be to determine a value probability of the identification based on a 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 a probability of the identification being the first value or a probability of the identification being the second value.
[0286] Figure 6 is a schematic diagram of an exemplary decoding process. Figure 6 is a decoding process shown on the basis of Figure 4, and the decoding process of Figure 6 corresponds to the encoding process of Figure 5a.
[0287] S601, receiving a code stream.
[0288] S602: Decode side information of the feature map from the bitstream, and determine a probability estimation result of a to-be-decoded region in the feature map based on the side information of the feature map.
[0289] For example, the encoder transforms the feature map Side information The code stream is written; then the decoder can perform entropy decoding on the code stream and decode the feature map from the code stream 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 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 code 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 to-be-decoded area from the bitstream.
[0292] For example, if the encoder binarizes the identifier 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 (that is, 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] For example, if the encoder encodes the identifier based on the probability of the identifier's value, the decoder can first determine the probability of the identifier's value 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 probability of the identifier's value.
[0294] For example, 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 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 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 and 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 area to be encoded that skipped entropy coding processing and the total number of feature points in the area to be encoded, the decoder can determine the number of feature points in the area to be decoded 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 area to be decoded that skipped entropy decoding processing and the total number of feature points in the area to be decoded.
[0297] For example, the encoder and decoder may pre-agree on a method for determining a feature point for skipping entropy decoding (or skipping entropy encoding) in a region to be decoded (or a region to be encoded). When it is determined that the feature point to skip entropy coding processing, the decoder can take the feature point with a probability P greater than or equal to T0 as k1 Determine the feature point to skip entropy decoding processing. When the encoder sets the Gaussian distribution parameter 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 points that skip entropy decoding processing. When the encoder estimates the probability of the feature points contained in the sub-block that meets the preset conditions When it is determined that the feature point to be skipped is entropy coding, the decoder can 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] S604 may include S604a and S604b.
[0300] Exemplarily, if the identifier is the first value, the decoder may perform the following steps 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, the entropy decoding process of all feature points in the first sub-block is skipped, and the feature values of all feature points in the first sub-block are set to a specific value k2.
[0302] S604b: When the probability estimation result of the first sub-block does not meet the preset condition, perform entropy decoding processing 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 conditions based on T2 or T3 read from the bitstream. Alternatively, the decoder can search for T2 or T3 from a threshold candidate list based on an index number read from the bitstream and then determine whether the probability estimation result of the first sub-block meets the preset conditions. Of course, the decoder can also determine whether the probability estimation result of the first sub-block meets the preset conditions based on a 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] For example, 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 adopt 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 approach, during the encoding process, if the probability estimation result is a Gaussian distribution parameter, then after obtaining the probability estimation results of the feature map y and 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, refer to S505 to S511 above to analyze the feature map. 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 can be Add the eigenvalues of the feature points corresponding to the feature map v to obtain the feature map Then execute S606.
[0310] It should be noted that this application does not limit the feature map used for entropy coding to be the feature map Or feature map
[0311] Figure 7 is a schematic diagram illustrating an exemplary end-to-end image compression process. Figure 7 illustrates the end-to-end image compression process based on Figure 4. The probability estimate in Figure 7 is a Gaussian distribution estimate; in Figure 7, contextual information can be used to optimize the Gaussian distribution parameter μ.
[0312] 7 , illustratively, 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 performing context information extraction in the encoding process of FIG. 7 ), a prediction value estimation module (for performing a first prediction value estimation in the encoding process of FIG. 7 ), and a prediction module (for performing a second prediction value estimation in the encoding process of FIG. 7 ). The probability estimation module and the prediction value estimation module may be integrated into a single entity, which is not limited in this application.
[0314] 7, exemplarily, after the image to be encoded is subjected to feature extraction by the feature extraction module, a feature map y is obtained. Then, after the feature map y is subjected to side information extraction by the side information extraction module, side information is obtained. (The feature map 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 is based on the side information Perform Gaussian distribution estimation to obtain the Gaussian distribution parameters σ[w][h][c] of each feature point y[w][h][c] in the feature map y. And the edge information can be estimated by the prediction value estimation module Perform a first prediction value estimate and output the feature map F to the prediction module. The prediction module then performs a second prediction value estimate based on the feature map F and the feature G obtained by context information extraction by the context module, outputting the Gaussian distribution parameters μ[w][h][c] for each feature point y[w][h][c]. For each 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 feature points corresponding to the feature map v to obtain the feature map Among them, the feature map 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 FIG5 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] 7 , illustratively, 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 performing context information extraction in the decoding process of FIG. 7 ), a prediction value estimation module (for performing the first prediction value estimation in the decoding process of FIG. 7 ), and a prediction module (for performing the second prediction value estimation in the decoding process of FIG. 7 ). The probability estimation module and the prediction value estimation module may be integrated into a single entity, which is not limited in this application.
[0319] 7 , for example, the decoder may perform arithmetic decoding on the code stream 2 and parse the side information from the code stream 2. Based on side information Perform Gaussian distribution estimation to obtain feature maps Each feature point The Gaussian distribution parameters σ[w][h][c] and the side information can be estimated by the prediction value estimation module Perform the first prediction value estimation and output the feature map F to the prediction module; then, the prediction module can perform the second prediction value estimation based on the feature map F and the feature G obtained by the context information extraction of the context module, and output each feature point The Gaussian distribution parameters μ[w][h][c] are given by . 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, it can be based on the feature map Each feature point The Gaussian distribution parameters σ[w][h][c] are used to perform arithmetic decoding on the bitstream 1 and parse the feature map from the bitstream 1. Then, 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. Add the eigenvalues of the feature points corresponding to the feature map v to obtain the feature map Among them, the feature map Decoded feature points The eigenvalue of is the reconstructed eigenvalue of the decoded feature point.
[0321] Among them, for the feature map The entropy encoding process and the entropy decoding process can refer to the description of the embodiments of Figures 5a and 6 above, and 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 is a schematic diagram illustrating an exemplary encoding process. Figure 8 illustrates the encoding process based on Figures 1a and 1c. In the embodiment of Figure 2, encoding of an image is used as an example; the image can be an independent image or a frame in a video, and this application does not impose any restrictions on this.
[0325] S801: Obtain an image to be encoded.
[0326] S802: Extract a feature map of the image to be encoded.
[0327] S803: Determine a probability estimation result of the area to be encoded 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 region 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 description takes a region to be encoded as a cube as an example.
[0332] S804 , judging whether to skip entropy coding of 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 entropy coding of the region to be coded.
[0333] For example, the reconstructed eigenvalue of the to-be-encoded region can be determined if the entropy encoding process of the to-be-encoded region is skipped; and then the reconstructed eigenvalue of the to-be-encoded region is compared with the original eigenvalue to determine whether to skip the entropy encoding process of the to-be-encoded region.
[0334] For example, by comparing the reconstructed feature values of the to-be-coded region with the original feature values, it can be determined whether skipping the entropy coding process for the to-be-coded region will introduce artifacts; when, based on the comparison result of the reconstructed feature values of the to-be-coded region with the original feature values, it is determined that skipping the entropy coding process for the to-be-coded region will introduce artifacts, then the entropy coding process for the to-be-coded region may not be skipped; in this case, S808, S809, S810, and S807 may be executed; when, based on the comparison result of the reconstructed feature values of the to-be-coded region with the original feature values, it is determined that skipping the entropy coding process for the to-be-coded region will not introduce artifacts, then the entropy coding process for the to-be-coded region may be skipped; in this case, 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 to skip entropy decoding.
[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 eigenvalues of the cube are set to a specific value k2. Next, the error between the reconstructed eigenvalues and the original eigenvalues of the cube is calculated. After that, based on the error, it is determined whether to skip the entropy coding process for the cube. For example, the minimum mean squared error (MES) between the reconstructed eigenvalues and the original eigenvalues of the feature points in the cube 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 of 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 FIG8 shows that S809-S810 are executed after S806, and S805 is executed after S809-S810. It should be understood that the present application may also execute S805 first, then S806, and then 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 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] For example, S805 to S808 may refer to the description of the above embodiment and will not be repeated here.
[0345] It should be noted that FIG8 shows that S809-S810 are executed after S808, and S807 is executed after S809-S810. It should be understood that the present application may also execute S807 first, then S808, and then 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 region.
[0346] S809: Determine the probability of the identifier corresponding to the to-be-encoded region based on the probability estimation result of the to-be-encoded region, wherein the probability of the identifier being a first value or a second value.
[0347] For example, in one possible manner of S809, 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 encoded; for details, please refer to the description of the above embodiment, which will not be repeated here.
[0348] For example, in one possible approach to S809, the number of feature points in the to-be-encoded region for which entropy coding is skipped may be determined based on the probability estimation result of the to-be-encoded region; and the probability of the value of the identifier may be determined based on the number of feature points in the to-be-encoded region for which entropy coding is skipped and the total number of feature points in the to-be-encoded region. For details, please refer to the description of the above embodiment and will not be repeated here.
[0349] S810, encoding the identifier based on the value probability of the identifier.
[0350] For example, S810 may refer to the above description and will not be described in detail here.
[0351] Figure 9 is a schematic diagram illustrating an exemplary decoding process. Figure 9 is a decoding process illustrated on the basis of Figures 1a and 1c, and the decoding process of Figure 9 corresponds to the encoding process of Figure 8.
[0352] S901, obtain the 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: Determine the probability of the identifier corresponding to the area to be decoded based on the probability estimation result of the area to be decoded, wherein the probability of the identifier being a first value or a second value.
[0355] In one exemplary implementation of S903, the number of feature points in the to-be-decoded region for which entropy decoding is skipped may be determined based on the probability estimation result of the to-be-decoded region; and the probability of the value of the identifier may be determined based on the number of feature points in the to-be-decoded region for which entropy decoding is skipped and the total number of feature points in the to-be-decoded region. For details, please refer to the above description and will not be repeated here.
[0356] For example, in one implementation of S903, the probability of the identifier value may be determined based on the sum of the probability estimation results of multiple feature points in the area to be decoded.
[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, perform entropy decoding on the area to be decoded based on the probability estimation result of the area to be decoded to obtain feature values of feature points in the area 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 The feature values of all feature points in the image are obtained, then S907 can be directly executed; if the feature map is obtained The eigenvalues 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: Reconstruct based on the feature values of the feature points in the feature map to obtain a reconstructed image.
[0362] Figure 10 is a schematic diagram of an exemplary machine vision task based on encoding and decoding. Figure 10 is shown based on Figure 1b.
[0363] The encoding process and entropy decoding process of FIG10 can refer to the description of the above embodiment; 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 is used to determine the probability estimation result of the area to be encoded in the feature map;
[0368] The 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 steps in the encoding process in Figures 2 and 5a above.
[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, configured 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, perform entropy decoding on at least one sub-block in the region to be decoded or set the characteristic value of a characteristic point in at least one sub-block to a specific value to obtain a characteristic value of the characteristic point in the region to be decoded; when the identifier is a 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;
[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 execute the steps in the decoding process in FIG. 3 and FIG. 6 .
[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 is used to determine the probability estimation result of the area to be encoded in the feature map;
[0378] The entropy coding module is used to determine whether to skip entropy coding 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 of the to-be-coded region; if so, skip the entropy coding 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 a 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 a 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 steps in the encoding process in Figure 8 above.
[0380] Exemplarily, the present application proposes a decoder, which may include:
[0381] A receiving module, used for receiving code stream;
[0382] An entropy decoding module is configured to determine a probability estimation result of a region to be decoded in a feature map corresponding to a bitstream; determine a value probability of an identifier corresponding to the region to be decoded based on the probability estimation result of 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; decode the identifier from the bitstream based on the value probability of the identifier; when the identifier is the first value, set the characteristic value of the feature 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 the characteristic value of the feature 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 execute the steps in the decoding process in FIG. 9 above.
[0385] In an example, FIG11 shows a schematic block diagram of a device 1100 according to an embodiment of the present application. 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, in addition to a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clarity, all 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 transmitting 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 present application also provides a chip comprising one or more interface circuits and one or more processors. The one or more processors receive or send data via the one or more interface circuits. When the one or more processors execute computer instructions, the electronic device implements the encoding and decoding methods described in the above embodiments in the above-mentioned method steps. The interface circuit is a transceiver / transceiver pin 1102.
[0392] This embodiment further provides a computer-readable storage medium, which stores computer instructions. 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 to enable the chip to execute 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 distributed and completed by 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 this 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 merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, 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] Units described as separate components may or may not be physically separate, and 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 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, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0400] Any content of each embodiment of this 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 this 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 and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[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 this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this 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 disc (CD-ROM) or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the 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 will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using 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 communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[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 this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this 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, entropy coding is performed on the region to be coded based on the probability estimation result of the region to be coded, and the region to be coded is converted into The identifier corresponding to the area is set to the 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 the first value or the probability that the identifier is the 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
Patent Citations
Encoding and decoding method and electronic equipment
CN118632006A
Video decoding method and device, and video encoding method and device
CN111294599A
Image encoding method and device, and image decoding method and device
CN111988629A
Feature data encoding and decoding method and device
CN115442609A
Method and system to enhance video quality in compressed video by manipulating bit usage
US11330258B1
Cited By
Method and apparatus for signalling CUBE tool enable in a bitstream
WO2026068099A1
