An image processing method, apparatus and device, storage medium, and product
By generating quantization indication information through a parameter prediction model and determining the target quantization parameters for image encoding, the problem of low encoding efficiency and high complexity in existing technologies is solved, and efficient end-to-end image encoding is achieved.
Patent Information
- Application Number
- CN202310431372.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-15
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-04-15
AI Technical Summary
Existing technologies, in the end-to-end image encoding process, rely on manual control of the range of quantization parameters, resulting in low encoding efficiency and high complexity.
The parameter prediction model obtained after parameter optimization is used to predict the target encoding parameters and the image, generate quantization indication information, use this information to determine the target quantization parameters for encoding, generate a bitstream and transmit it.
It enables automated and rapid determination of quantization parameters, improves image coding efficiency, avoids the introduction of high complexity, and ensures that the coding result closely approximates the content required by the target coding parameters.
Smart Images

Figure CN116347070B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an image processing method, an image processing apparatus, a computer device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] With the development of artificial intelligence technology, image encoding (i.e., compression) and the field of artificial intelligence are becoming increasingly intertwined. Various deep learning / machine learning-based models have been introduced into different image encoders to achieve more automated and efficient image encoding.
[0003] Currently, in end-to-end image encoding and decoding processes, the range of quantization parameters used in image encoding is often controlled manually. By controlling the range of quantization parameters, the encoding parameters of the generated image (such as bitrate / quality) are controlled. This approach introduces high complexity into the encoding process, and there is still room for improvement in image encoding efficiency. Summary of the Invention
[0004] This application provides an image processing method, apparatus, device, storage medium, and product that can effectively improve image encoding efficiency.
[0005] On one hand, embodiments of this application provide an image processing method, the method comprising:
[0006] Obtain the image to be processed, and the target encoding parameters of the image;
[0007] The parameter prediction model obtained after parameter optimization is called to perform prediction processing on the target encoding parameters and the image to obtain the quantization indication information of the image;
[0008] The image is encoded using target quantization parameters determined based on quantization indication information to obtain the image bitstream;
[0009] Transmit the bitstream to the receiving end of the image.
[0010] On the one hand, embodiments of this application provide another image processing method, which includes:
[0011] Receive the bitstream of the image transmitted by the sending end; the bitstream contains target quantization parameters; the target quantization parameters are determined based on the quantization indication information of the image, which is obtained by calling the parameter prediction model after parameter optimization and performing prediction processing on the image and the target coding parameters of the image;
[0012] The target quantization parameters are used to decode the bitstream to obtain the decoded image.
[0013] On one hand, embodiments of this application provide an image processing apparatus, which includes:
[0014] The acquisition unit is used to acquire the image to be processed and the target encoding parameters of the image;
[0015] The processing unit is used to process the target coding parameters and the image according to the corresponding rules obtained after parameter optimization, so as to obtain the predicted quantization parameters corresponding to the target coding parameters and the image; and to encode the image using the target quantization parameters determined based on the predicted quantization parameters to obtain the image bitstream.
[0016] The transmitting unit is used to transmit the bitstream to the receiving end of the image.
[0017] On the one hand, embodiments of this application provide another image processing apparatus, which includes:
[0018] The receiving unit is used to receive the bitstream of the image transmitted by the sending end; the bitstream contains target quantization parameters; the target quantization parameters are determined based on the predicted quantization parameters, which are obtained by performing corresponding processing on the target coding parameters and the image according to the corresponding rules obtained after parameter optimization;
[0019] The processing unit is used to decode the bitstream using the target quantization parameters to obtain the decoded image.
[0020] On one hand, embodiments of this application provide a computer device, the computer device comprising:
[0021] A processor is used to execute computer programs;
[0022] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the image processing method described above.
[0023] On one hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is loaded by a processor and executed as described above in the image processing method.
[0024] On one hand, embodiments of this application provide a computer program product, which includes a computer program or computer instructions, and the computer program or computer instructions implement the above-described image processing method when executed by a processor.
[0025] In this embodiment, the image to be processed and its target encoding parameters can be obtained. A parameter prediction model, optimized by the parameters, is then invoked to predict the target encoding parameters and the image, yielding quantization indication information for the image. This allows for relatively rapid acquisition of the prediction result, i.e., the quantization indication information, through the data prediction capability of the parameter prediction model. Furthermore, since the parameter prediction model is optimized, it possesses relatively accurate data prediction capabilities compared to the model before optimization, ensuring the validity of the prediction results to a certain extent. Subsequently, the image can be encoded using the target quantization parameters determined based on the quantization indication information to obtain the image's bitstream, which is then transmitted to the image receiving end. During this process, the quantization indication information provides a clearer indication, narrowing the search for the target quantization parameters to a smaller range, thereby improving processing efficiency. Encoding the image using the target quantization parameters ensures that the image's encoding result is as close as possible to the content required by the target encoding parameters, achieving control of the image's encoding parameters by controlling the target quantization parameters. The entire solution can automatically generate and encode target quantization parameters for encoding, achieving end-to-end image encoding, avoiding the introduction of high complexity in the image encoding process, and effectively improving the efficiency of image encoding. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is an architecture diagram of an image processing system provided in an embodiment of this application;
[0028] Figure 2 This is a schematic flowchart of an image processing method provided in an embodiment of this application;
[0029] Figure 3a This is a schematic diagram of a corresponding rule provided in an embodiment of this application;
[0030] Figure 3b This is a schematic diagram of another corresponding rule provided in an embodiment of this application;
[0031] Figure 4 This is a flowchart illustrating another image processing method provided in an embodiment of this application;
[0032] Figure 5a This is a schematic diagram of a target application interface provided in an embodiment of this application;
[0033] Figure 5b This is a schematic diagram illustrating the display of candidate encoding parameters provided in an embodiment of this application;
[0034] Figure 5c This is a schematic diagram illustrating a selection result provided in an embodiment of this application;
[0035] Figure 6a This is a schematic diagram illustrating a model training and model application process provided in an embodiment of this application;
[0036] Figure 6b This is a schematic diagram of an image processing flow provided in an embodiment of this application;
[0037] Figure 7 This is a flowchart illustrating another image processing method provided in an embodiment of this application;
[0038] Figure 8a This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application;
[0039] Figure 8b This is a schematic diagram of another image processing device provided in an embodiment of this application;
[0040] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0042] This application proposes an image processing scheme, which relates to an image processing system, method and related equipment. The scheme includes an image processing flow at the transmitting end and an image processing flow at the receiving end.
[0043] (1) Image processing flow at the sending end.
[0044] ① Obtain the image to be processed and the target encoding parameters of the image; ② Call the parameter prediction model obtained after parameter optimization to perform prediction processing on the target encoding parameters and the image to obtain the quantization indication information of the image; ③ Encode the image using the target quantization parameters determined based on the quantization indication information to obtain the image bitstream; ④ Transmit the bitstream to the image receiving end.
[0045] (2) Image processing flow at the receiving end.
[0046] ① Receive the image bitstream transmitted by the sending end; the bitstream contains target quantization parameters; the target quantization parameters are determined based on quantization indication information, which is obtained by calling the parameter prediction model after parameter optimization and performing prediction processing on the image and the target encoding parameters of the image; ② Use the target quantization parameters to decode the bitstream to obtain the decoded image.
[0047] Using the image processing scheme described above, at the image transmitting end, a parameter prediction model obtained after parameter optimization can be invoked to predict the quantization indication information of the image. Based on this quantization indication information, the target quantization parameters can be determined, and the image can be encoded using these target quantization parameters to obtain the image bitstream. In this process, the parameter prediction model can automatically and quickly determine the quantization indication information, thereby improving the speed of determining the target quantization parameters used for encoding and increasing the overall encoding efficiency of the image. After the encoded bitstream is sent to the image receiving end, it can be decoded according to the target quantization parameters contained in the bitstream to obtain the decoded image.
[0048] Furthermore, the image processing scheme provided in this application is applicable to encoding standards including, but not limited to: Artificial Intelligence (AI) based image compression (i.e., JPEG AI) encoding standard and conventional image encoding standards. For ease of understanding, the image processing method provided in this application uses JPEG AI as a platform to illustrate the implementation details of the image processing method provided in this application.
[0049] The following is combined with Figure 1 A suitable image processing system for implementing the embodiments of this application will be described. Please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is an architecture diagram of an image processing system provided in an embodiment of this application. For example... Figure 1 As shown, the image processing system includes at least one terminal device (including terminal device 101a and terminal device 101b) and a server 102; each terminal device can establish a communication connection with the server 102 via wired or wireless means.
[0050] The terminal device includes, but is not limited to, smartphones, tablets, smart wearable devices, smart voice interaction devices, smart home appliances, personal computers, in-vehicle terminals, smart cameras, etc., and this application does not limit this. The number of terminal devices is not limited in this application. Server 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to these. The number of servers is not limited in this application.
[0051] In this application, the term "at least one" means one or more, and "multiple" means two or more; for example, "at least one terminal device" means one, two, or more terminal devices. "Multiple servers" means two or more servers.
[0052] Any terminal device can act as either a transmitter or a receiver of an image. For ease of understanding, the image processing method provided in this application embodiment will be described below using terminal device 101a as the transmitter and terminal device 101b as the receiver as an example.
[0053] Terminal device 101a can be used to perform the following processing procedures:
[0054] ① Obtain the image to be processed and the target encoding parameters of the image; ② Call the parameter prediction model obtained after parameter optimization to perform prediction processing on the target encoding parameters and the image to obtain the quantization indication information of the image; ③ Encode the image using the target quantization parameters determined based on the quantization indication information to obtain the image bitstream; ④ Transmit the bitstream to the image receiving end.
[0055] Terminal device 101b can be used to perform the following processing procedures:
[0056] ① Receive the bitstream of the image transmitted by the sending end; the bitstream contains target quantization parameters; the target quantization parameters are determined based on the quantization indication information of the image, which is obtained by calling the parameter prediction model after parameter optimization and performing prediction processing on the image and the target encoding parameters of the image; ② Use the target quantization parameters to decode the bitstream to obtain the decoded image of the image.
[0057] Server 102 can be used to provide various services to support image processing, including but not limited to: storage services, transmission services, compression services, etc. Specifically, the storage service allows images transmitted by terminal devices to be stored locally on the server or in a database connected to the server; the transmission service can be used to assist in the transmission of images between different terminal devices; and the compression service can be used to compress images provided by server 102 to terminal devices before transmission.
[0058] This solution can be applied to various image transmission scenarios, including but not limited to social interaction scenarios, storage scenarios, gaming scenarios, or other scenarios requiring image transmission. For example, in a social interaction scenario, images, emoticons, GIFs, or videos are sent during a conversation. In this scenario, the server can send an image from one terminal device (e.g., terminal device 101a) to another terminal device (terminal device 101b). In a storage scenario, photos and / or videos locally on a terminal device are saved to the cloud. Any terminal device (e.g., terminal device 101a) can act as the image sender when sending the image, and as the image receiver if it requests to download the image from the cloud. In a gaming scenario, such as cloud gaming, the server can act as the image sender, and the terminal device requesting the game (e.g., terminal device 101a) can act as the image receiver. Upon receiving a data request from a terminal device, the server 102 can send each frame of the game screen to that terminal device (e.g., terminal device 101a).
[0059] The image processing system and method provided in this application can acquire the image to be processed and its target encoding parameters, and call the parameter prediction model obtained after parameter optimization to perform prediction processing on the target encoding parameters and the image, thereby obtaining the quantization indication information of the image. In this way, the data prediction capability of the parameter prediction model allows for relatively rapid acquisition of the prediction result, i.e., the quantization indication information. Furthermore, the parameter prediction model is obtained after parameter optimization; compared to the model before optimization, it possesses relatively accurate data prediction capabilities, ensuring the validity of the prediction result (i.e., the quantization indication information) to a certain extent. Subsequently, the image can be encoded using the target quantization parameters determined based on the quantization indication information to obtain the image's bitstream, which is then transmitted to the image receiving end. During this process, the quantization indication information provides a clearer indication, narrowing the search for the target quantization parameters to a smaller range, thereby improving processing efficiency. Encoding the image using the target quantization parameters ensures that the image's encoding result is as close as possible to the content required by the target encoding parameters, realizing the control of the image's encoding parameters by controlling the target quantization parameters. The entire solution can automatically generate and encode target quantization parameters for encoding, achieving end-to-end image encoding, avoiding the introduction of high complexity in the image encoding process, and effectively improving the efficiency of image encoding.
[0060] It should be noted that the acquisition and processing of relevant data (such as images to be processed, sample images used for training, etc.) in this application embodiment should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0061] The image processing method provided in the embodiments of this application will be described next.
[0062] Please see Figure 2 This is a schematic flowchart of an image processing method provided in an embodiment of this application. This image processing method can be performed by a computer device (such as...) Figure 1 The image processing method may include the following steps S201-S204, which are executed by the terminal device 101a) in the system shown.
[0063] S201, Obtain the image to be processed, and the target encoding parameters of the image.
[0064] The image to be processed refers to an image awaiting encoding. Specifically, it can be any image acquired from any image transmission scenario. For example, an image sent by one party to another in a social conversation, or an image sent to a storage device by a party with storage needs in a storage scenario. Based on the image's source, the image can be any of the following: a frame from a video, a single picture, or an image from an image stream. Based on the image's content, the image can be any of the following: an image containing natural scenery, an image containing people, an image containing architecture, etc. This application does not impose any limitations on this.
[0065] The target coding parameters of an image refer to the coding parameters required for image encoding. These parameters include those describing the encoding result (e.g., bitrate) and / or those describing the decoded image (e.g., quality). The target coding parameters serve as a benchmark for image encoding to evaluate whether the encoding result meets expectations. For example, if the target coding parameters include a target quality, the decoded and reconstructed image must meet the quality standard indicated by that target quality. If the target coding parameters include a target bitrate, the bitstream obtained after encoding the image must meet that target bitrate. These target coding parameters can be set manually for the image or automatically based on the image's characteristics (e.g., system default coding parameters). Computer equipment can acquire the image to be processed and its target coding parameters according to processing requirements. For example, if the processing requirement is image storage, the image to be stored can be acquired locally, and the target coding parameters can be determined according to storage quality requirements, such as storing the image as a high-definition image.
[0066] Optionally, the target coding parameters include, but are not limited to, one or more of the following: target bitrate, target quality, target resolution, target compression ratio, and target interval between keyframes. The different types of coding parameters are described below, as shown in ①-⑤.
[0067] ① Bit rate refers to the number of bits transmitted per unit of time, measured in bits per second (bps). Bit rate can also be called bit rate. Bit rate can be used to reflect the degree of image distortion. The higher the bit rate, the less image distortion and the clearer the picture; conversely, the lower the bit rate, the greater the image distortion and the rougher the picture.
[0068] ② Quality describes the degree to which the content represented by an image matches the reality. This includes, but is not limited to, the similarity between the image and the original object or image in terms of color, sharpness, clarity, and detail. Image quality is affected by many factors such as image resolution and color. For example, higher image resolution results in clearer image details and better visual effects; conversely, image distortion reduces image quality. In this application embodiment, target quality can be indicated by the following quality metrics: PSNR (Peak Signal-to-Noise Ratio), SSIM (Structural Similarity), and MSE (Mean Squared Error). PSNR quantifies the reconstruction quality of images and videos affected by lossy compression; a higher PSNR indicates better image quality. SSIM measures the similarity between two images; a higher SSIM value indicates less image distortion. Mean Squared Error is a full-reference image quality evaluation metric; a higher mean squared error indicates better image quality.
[0069] ③ Resolution describes the detail and sharpness of an image and is expressed by the number of pixels. Image resolution affects display quality and detail. Higher resolution means more pixels, resulting in higher detail accuracy and a sharper image; lower resolution means fewer pixels, leading to blurred details. Different resolutions can be used in different applications to meet specific business needs. For example, high-definition television and video production typically require high-resolution images, while network transmission and mobile devices require compressed, low-resolution images to reduce file size and transmission bandwidth.
[0070] ④ Compression ratio refers to the ratio of the compressed image size to the original image size. A higher compression ratio results in a smaller compressed image size, thus reducing the need for storage and transmission resources. In lossy compression, a certain amount of information is discarded or approximated during the compression process, affecting the quality of the compressed image and leading to a decrease in image quality.
[0071] ⑤ The interval between keyframes refers to the distance between two keyframes. A keyframe is an IDR (Instantaneous Decoder Refresh) frame, a type of I-frame. The distance between keyframes can be represented by the number of frames between IDR frames; this distance can also be called the keyframe period. Illustratively, at least one keyframe can be used per second of video. Increasing the number of keyframes can improve quality, but it also increases bandwidth and network load.
[0072] For applications requiring the transmission of large numbers of images, the compression ratio can be optimized to reduce data transmission volume while maintaining image quality. Therefore, if the encoding parameters include both quality and compression ratio, a balance must be struck between these two factors to meet different needs. Furthermore, different compression ratios also imply a trade-off between image quality and bitrate. If the encoding parameters only include the compression ratio, a suitable ratio can be selected based on the specific circumstances to achieve the desired image quality and compression effect.
[0073] S202, call the parameter prediction model obtained after parameter optimization, perform prediction processing on the target coding parameters and the image, and obtain the quantization indication information of the image.
[0074] A parameter prediction model is essentially a mapping rule, which describes the mapping between an image and its encoding parameters, and quantization parameters. This rule indicates the correspondence between the image, its encoding parameters, and the quantization parameters. The quantization parameters control the accuracy of the transformation coefficients after image transformation. Parameter prediction models can be derived from deep learning based on neural networks. Types of parameter prediction models include, but are not limited to, convolutional neural networks, residual neural networks, etc.
[0075] In one feasible implementation, different images can correspond to different correspondence rules based on their content. Specifically, an image and an encoding parameter can jointly correspond to a quantization parameter; the same image with different encoding parameters, or different images with the same encoding parameters, can correspond to different quantization parameters. Illustratively, the correspondence relationship indicated by the correspondence rules can be as follows: Figure 3a As shown. Image P1 and encoding parameter Y1 can correspond to quantization parameter Q1, image P2 and encoding parameter Y2 can correspond to quantization parameter Q2. Image P1 and encoding parameter Y2 can correspond to quantization parameter Q3, image P2 and encoding parameter Y2 can correspond to quantization parameter Q4, where quantization parameters Q1, Q2, Q3, and Q4 are all different.
[0076] In another feasible implementation, different image components can correspond to different rules. Image components are the basic elements that make up an image. Based on color, image components can include components of different colors; for example, in the RGB color space, image components include R, G, and B components. Based on frequency, image components can include, but are not limited to, high-frequency components, mid-frequency components, and low-frequency components. Low-frequency components form the basic grayscale levels of the image, describing the main parts of the image; mid-frequency components determine the basic structure of the image; high-frequency components form the edges and details of the image, corresponding to parts of the image with dramatic changes, and the human eye is also more sensitive to high-frequency components. Based on type, image components include, but are not limited to, luminance components, chrominance components, etc. In the field of image processing, image components can be used to analyze image features and extract useful information, which is beneficial for image coding.
[0077] A coding parameter and an image component can share a common quantization parameter; different components of an image with the same coding parameter may correspond to different quantization parameters. Different images with the same components and the same coding parameter may have the same quantization parameter. For example, ... Figure 3b The diagram illustrates the correspondence, where each quantization parameter is determined based on the encoding parameters and the image components. Different images, under the same encoding parameters, correspond to different quantization parameters based on their different image components. For example, image P1, under encoding parameters Y1, corresponds to quantization parameter Q11 for the luminance component and quantization parameter Q12 for the chrominance component, and quantization parameters Q11 and Q12 are different.
[0078] Through the parameter prediction model, the prediction processing of the target coding parameters and the image is carried out. Specifically, according to the instructions of the corresponding rules, the quantization indication information of the image is determined. This quantization indication information can be used to indicate one or more predicted quantization parameters that correspond to both the target coding parameters and the image. The quantization indication information can be an identifier of a predicted quantization parameter, an identifier of a group of quantization parameters (containing multiple predicted quantization parameters), or it can be a predicted quantization parameter itself, which can be used to encode the image.
[0079] By introducing a parametric prediction model, given an image and target coding parameters, the model can directly predict and process these parameters, quickly outputting quantization indication information for the image. This enables learning-based end-to-end control of image coding parameters (e.g., bitrate) and improves processing efficiency. This parametric prediction model can be applied to various deep learning-based end-to-end image coding schemes, exhibiting high versatility and scalability.
[0080] S203, the image is encoded using the target quantization parameters determined based on the quantization indication information to obtain the image bitstream.
[0081] In image transmission scenarios, images can be encoded to compress them for more efficient use of available bandwidth and storage space. For digital media, this helps compress video size, allowing more video content to be transmitted within the same bandwidth and improving the viewing experience. In streaming services, movie and television program transmission, and online video sharing platforms, image encoding is a crucial means of ensuring high-quality data transmission. Here, targeted quantization parameters can be used to encode images, where the targeted quantization parameters are determined based on the image's quantization indication information.
[0082] To ensure that image encoding closely approximates the expected result, after obtaining the quantization indication information, a target quantization parameter determined based on the quantization indication can be acquired first. This target quantization parameter is one that ensures the image encoding result closely matches the expected result; it can be the same as or different from the predicted quantization parameter indicated by the quantization indication information. For example, a new quantization parameter obtained by adjusting the predicted quantization parameter can be used as the target quantization parameter, which will be different from the predicted quantization parameter. Encoding using the target quantization parameter results in a bitstream whose encoding parameters match the target encoding parameter, thus ensuring that the image encoding result closely approximates the expected result; for example, the decoded and reconstructed image should possess the image quality required by the target encoding parameter.
[0083] S204, transmit the bitstream to the image receiving end.
[0084] When the target quantization parameter is the same as the predicted quantization parameter indicated by the quantization indication information, the transmitted bitstream is the bitstream to be transmitted obtained by encoding the image using the predicted quantization parameter. When the target quantization parameter is different from the predicted quantization parameter indicated by the quantization indication information, the transmitted bitstream is the bitstream obtained by encoding the determined target quantization parameter. The image receiving end refers to the end that receives the image bitstream. Depending on the image transmission scenario, the receiving end may include, but is not limited to, computer devices such as servers and terminal devices; this application does not impose any restrictions on this. The image is transmitted between the sending end and the receiving end in the form of a bitstream, and the receiving end can reconstruct the image corresponding to the bitstream by decoding the bitstream.
[0085] In the process of encoding an image using target quantization parameters, end-to-end image encoding and decoding can be performed based on deep learning. Specifically, the encoder at the transmitting end (also known as the encoder) can first map the original image into latent variables and write them into the bitstream through an entropy encoder; the receiver (also known as the decoder) decodes the latent variables from the bitstream through an entropy decoder, and then inputs the latent variables into a synthesis transform network, which then passes through a channel filter module to obtain the reconstructed image (also known as the decoded image).
[0086] The image processing method provided in this application, for the image to be processed and its target coding parameters, can call a parameter prediction model obtained after parameter optimization to perform prediction processing and obtain quantization indication information of the image. In this way, through the data prediction capability of the parameter prediction model, the image and target coding parameters can be processed automatically, and the prediction result, i.e., the quantization indication information, can be obtained relatively quickly. Furthermore, the parameter prediction model is obtained after parameter optimization, and compared to the model before parameter optimization, this parameter prediction model has a relatively accurate data prediction capability, which can ensure the validity of the prediction result to a certain extent. Then, the image can be encoded using the target quantization parameters determined based on the quantization indication information to obtain the image bitstream, and then the bitstream can be transmitted to the image receiving end. In this process, the quantization indication information can provide a clearer indication, narrowing the search for the target quantization parameters to a smaller range, thereby improving processing efficiency. Encoding the image using the target quantization parameters allows the image encoding result to be as close as possible to the content required by the target coding parameters, realizing the control of the image coding parameters by controlling the target quantization parameters. The entire scheme can automatically generate and encode target quantization parameters for encoding, achieving end-to-end image encoding. This avoids introducing high complexity during the image encoding process and effectively improves the efficiency of image encoding. Please see [link / reference]. Figure 4 This is a schematic flowchart of an image processing method provided in an embodiment of this application. This image processing method can be performed by a computer device (such as...) Figure 1 The image processing method may include the following steps S401-S405, which are executed by the terminal device 101a) in the system shown.
[0087] S401, Obtain the image to be processed, and the target encoding parameters of the image.
[0088] In one embodiment, the image to be processed includes an image to be transmitted or stored. For example, an image to be transmitted to another object, or an image to be stored in the cloud. The transmission or storage of the image can be achieved based on operation instructions initiated by the object, and the target encoding parameters can also be determined based on the object's operation, thus enabling personalized settings of the encoding parameters required for the image. The process for determining the target encoding parameters may specifically include the following:
[0089] First, the target application interface is displayed, which is used to display images.
[0090] The target application interface is the functional interface provided by the target application that supports the transmission or storage of images. Target applications include, but are not limited to: social applications, game applications, live streaming applications, shopping applications, etc. For example, such as... Figure 5aThe target application interface shown can be a conversation interface provided by a social application. This conversation interface 510 displays a successfully transmitted image 511 and a received image 512. The images can be displayed as thumbnails or in their entirety.
[0091] Then, in response to the parameter setting operation on the image, multiple candidate coding parameters and the image display quality description information corresponding to each candidate coding parameter are displayed.
[0092] In response, it is used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0093] Parameter setting operations refer to operations used to trigger the setting of target encoding parameters for an image. The types of parameter setting operations include, but are not limited to: gesture operations (such as long press), voice operations, and operations based on function options in the target application interface. For example, a function option might be a parameter setting option; clicking this option can trigger the display of multiple candidate encoding parameters. Similarly, a function option might be a confirmation option for selecting an image; clicking this option can trigger the display of multiple candidate encoding parameters. Through the response to parameter setting operations, multiple candidate encoding parameters can be displayed, and each of these candidate encoding parameters can also correspond to image display quality description information. Candidate encoding parameters are encoding parameters waiting to be selected, including but not limited to one or more of the following: bitrate, quality, resolution, compression ratio, and keyframe interval. Image display quality description information describes the quality of the image during display, and this information can be displayed in one or more combinations of text, icons, numbers, etc. Different candidate encoding parameters can have different bitrate values, corresponding to different image display quality description information. Each candidate encoding parameter can be displayed in the target application interface, in other interfaces independent of the target application interface, or in a floating window; this application does not impose any restrictions on this. For example, please see Figure 5b The diagram shows the display of candidate encoding parameters. Each candidate encoding parameter is displayed in a pop-up window 521, which floats above the session interface 520. The candidate encoding parameters are resolutions, and each resolution corresponds to a level of image display quality at that resolution.
[0094] Finally, the candidate coding parameters selected from multiple candidate coding parameters according to the selection operation will be used as the target coding parameters for the image.
[0095] A computer device can select at least one candidate encoding parameter from multiple candidate encoding parameters based on a selection operation. The selection operation includes, but is not limited to, gesture operations (such as click operations) and voice operations. As one feasible implementation, a candidate encoding parameter can be selected from the displayed multiple candidate encoding parameters as needed and used as the target encoding parameter. As another feasible implementation, multiple candidate encoding parameters can be selected, and each candidate encoding parameter can be used as a target encoding parameter. Subsequently, for any target encoding parameter, the corresponding target quantization parameter can be obtained for subsequent image encoding processing.
[0096] In one feasible approach, the parameter setting operation can also apply to multiple images simultaneously. Therefore, after selecting a candidate encoding parameter through a selection operation, the same encoding parameter can be given to multiple images, but due to differences in image content, the quantization parameters obtained based on corresponding rules may differ. As described above... Figure 5b Based on the illustrated diagram, multiple images can be selected simultaneously, and the selected images can be assigned the same resolution (a target encoding parameter) based on parameter setting operations and selection operations, such as... Figure 5c The selection result shown indicates that 1080p resolution was selected as the target encoding parameter for the image. Optionally, the target encoding parameter can also be set automatically based on image recognition. For example, multiple candidate quantization parameters can be selected according to their fit with the image, and the encoding parameter with the highest fit can be set as the target encoding parameter. In another approach, candidate quantization parameters can be arranged in order of fit with the image, specifically by placing the most suitable parameters first, according to the user's habits, and recommendation tags can be provided to assist in the selection process.
[0097] As can be seen, by providing a target application interface, the target encoding parameters of the image to be processed can be provided to the object for independent setting, so as to achieve more personalized and flexible setting of the encoding parameters required for image transmission.
[0098] S402, call the parameter prediction model obtained after parameter optimization, perform prediction processing on the target encoding parameters and the image, and obtain the quantization indication information of the image.
[0099] The process of obtaining the parameter prediction model will be described below. In one embodiment, the parameter prediction model can be obtained by optimizing the parameters using the following methods (i) and (ii).
[0100] Method (1) uses training data for training. Specifically, it includes the following steps 1.1-1.3.
[0101] Step 1.1: Obtain the image set.
[0102] The image set contains sample images of different types, including any one or both of the following: images with different resolutions and images with different content. The content of an image refers to visually perceptible and recognizable elements such as objects, scenes, or patterns, like buildings or streets in an image. The image set can include sample images with the same content but different resolutions, sample images with different content but the same resolution, and sample images with different content but different resolutions. For example, the image set contains 100 sample images, specifically: 10 sample images corresponding to image P1 at 10 different resolutions, 10 sample images corresponding to image P2 at 10 different resolutions, ..., 10 sample images corresponding to image P10 at 10 different resolutions, and the content of each image from P1 to P10 differs accordingly. The sources of the sample images in the image set include, but are not limited to: images from content platforms, a frame from a video, screenshots, images from the internet, etc.
[0103] Step 1.2: Encode each sample image based on the candidate quantization parameters determined by multiple candidate parameter ranges to obtain the training encoding parameters for each sample image.
[0104] Specifically, multiple candidate parameter intervals can be obtained, each containing different candidate quantization parameters, specifically, the values of the candidate quantization parameters differ. Then, candidate quantization parameters for training can be determined from each candidate parameter interval. Next, each determined candidate quantization parameter is iterated through, and each sample image is encoded using the corresponding candidate quantization parameter to obtain the actual encoding parameters under that candidate quantization parameter, such as the actual bitrate and the quality of the reconstructed image. These are then used as the training encoding parameters for the corresponding sample image. This allows the generation of training encoding parameters for each sample image in the image set under the determined candidate quantization parameters. One training encoding parameter may correspond to one or more candidate quantization parameters.
[0105] For example, the candidate set β corresponding to the candidate quantization parameters determined based on multiple candidate parameter ranges. train_cand_tGiven the image set containing 100 images with the parameters {0.002, 0.01, 0.05, 0.1, 0.5, and 1}, we can iterate through each candidate quantization parameter in the candidate set. We encode each image once with the candidate quantization parameter 0.002 to obtain the corresponding bitstream, and thus the bitrate and reconstructed image quality. Similarly, we encode each image once with the candidate quantization parameter 0.01 to obtain the corresponding bitstream, and thus the bitrate and reconstructed image quality. This process continues, resulting in 100 sets of training encoding parameters. Each set of training encoding parameters contains encoding parameters corresponding to 6 different candidate quantization parameters.
[0106] At this point, the training data required for model training, including sample images and training encoding parameters for the sample images, has been completed. By using the above training data to train the model, the model can extract some common features from massive images and encoding parameters, construct rules for images and encoding parameters corresponding to quantization parameters, and apply them to predictive processing of images and target encoding parameters.
[0107] Step 1.3: Determine the sample group based on each sample image and its training encoding parameters, and use the candidate quantization parameters corresponding to the training encoding parameters of each sample image as the supervision data of the sample group to optimize the parameters of the initial parameter prediction model and obtain the parameter prediction model.
[0108] In one implementation, a sample image and its training encoding parameters can constitute a sample group. Since the encoding parameters obtained by encoding a sample image under different candidate quantization parameters may differ, different sample groups may contain the same sample image but different training encoding parameters. For example, sample image sample1 and its training encoding parameters A1 can constitute one sample group, and sample image sample1 and its training encoding parameters A2 can constitute another sample group. Furthermore, different sample groups may also contain different sample images and different training encoding parameters, or different sample images and the same training encoding parameters. The specific choice depends on the actual encoding result of the sample image.
[0109] In another implementation, the sample image contains multiple components, and a sample image and its corresponding training encoding parameters constitute a sample group. The sample image is encoded according to candidate quantization parameters, specifically by encoding each component of the sample image, to obtain the training encoding parameters corresponding to each component, thus constructing the sample group. For example, if the sample image contains chroma and luminance components, encoding the chroma and luminance components respectively according to the candidate quantization parameters yields training encoding parameters Z1 for the chroma component and Z2 for the luminance component. It is understood that by training the model using the sample group obtained in this way, a parameter prediction model corresponding to each component of the image can be obtained, so that in practical applications, the parameter prediction model corresponding to each component can be called to execute steps such as S402.
[0110] Candidate quantization parameters corresponding to the training encoding parameters in a sample group can serve as supervision data for that sample group. Since the training encoding parameters are obtained by encoding the sample images according to the candidate quantization parameters, there is a corresponding relationship between the training encoding parameters and the candidate quantization parameters based on the content of the sample images. For example, sample group 1 includes a sample image sample1 and its training encoding parameter A1. This training encoding parameter A1 is determined by encoding the sample image sample1 using the candidate quantization parameter train-cand1. Therefore, the training encoding parameter A1 corresponds to the candidate quantization parameter train-cand1, and the sample image sample1 can be used as one of the constraints of this correspondence. In other words, the sample image sample1 corresponds to the candidate quantization parameter train-cand1 under the training encoding parameter A1. Furthermore, the candidate quantization parameter train-cand1 can serve as supervision data for sample group 1. Supervision data for different sample groups may be the same or different. For example, the supervision data for sample groups group1 and group2 both use the candidate quantization parameter train-cand1 because different sample images in these two sample groups are encoded using the same candidate quantization parameter. For example, the supervised data for sample group 1 is the candidate quantization parameter train-cand1, and the supervised data for sample group 3 is the candidate quantization parameter train-cand3.
[0111] An initial parameter prediction model is a parameter prediction model that includes initial parameters. This initial parameter prediction model can be a model obtained through random initialization, or a model that has been pre-trained to have good image processing capabilities (such as feature extraction). Subsequently, using a sample set and the supervised data of that sample set, the parameters of the initial parameter prediction model can be optimized, and corresponding rules are gradually formed during the parameter optimization process to describe the correspondence between the image and the encoding parameters to the quantization parameters.
[0112] In one feasible implementation, we will take any sample group as an example for illustration. Parameter optimization of the initial parameter prediction model includes the following: For any sample group, the initial parameter prediction model can be invoked to perform prediction processing on the training encoding parameters and sample images included in any sample group to obtain the prediction quantization parameters corresponding to any sample group; then, based on the difference between the prediction quantization parameters corresponding to any sample group and the supervised data of the sample group, the parameters of the initial parameter prediction model are adjusted to obtain the parameter prediction model.
[0113] Before or during adjustment, the initial parameter prediction model may not have established accurate corresponding rules. Calling the initial parameter prediction model can predict data from any sample group (e.g., sample group 1). The resulting predicted quantization parameters for any sample group (e.g., sample group 1) may not correspond to the training encoded parameters. Therefore, it is necessary to first calculate the difference between the supervised data (i.e., the candidate quantization parameters corresponding to the training encoded parameters) of any sample group (e.g., sample group 1) and the predicted quantization parameters of that sample group (e.g., sample group 1). In one feasible approach, this difference can be constructed based on some loss function, such as cross-entropy loss. Then, based on the constructed loss value and according to the training objective (e.g., minimizing the loss value as much as possible), the parameters of the initial parameter prediction model are adjusted to update the parameters and achieve parameter optimization.
[0114] It is understood that corresponding prediction quantization parameters can be obtained for each sample group. Then, training data consisting of multiple sample groups in a batch can be used. Based on the differences between the prediction quantization parameters and the corresponding supervised data for each sample group, the parameters of the initial parameter prediction model can be adjusted to optimize the parameters of the initial parameter prediction model. Furthermore, the parameter adjustment of the initial parameter prediction model is an iterative process. Through continuous iterative adjustments, the model can converge, and the converged model is taken as the parameter prediction model. The convergence mentioned above can include any one or more of the following: the initial parameter prediction model's loss during training is minimized; the initial parameter prediction model's loss during training is stable, and with increasing training iterations, the loss no longer changes or the change is less than a preset threshold; the initial parameter prediction model's training time reaches a preset training time; the initial parameter prediction model's iterative training number reaches a preset training number; and so on. This application does not impose any limitations on this.
[0115] In summary, the training process described in steps 1.1-1.3 above aims to learn the features and patterns of the model from the training data, and obtain a model that can better match the distribution of the real data. During the model training process, optimization methods such as gradient descent can be used to minimize the error between the predicted value (i.e., the predicted quantization parameter) and the true value (i.e., the candidate quantization parameter).
[0116] By training the model with sample images of different types (e.g., varying content and / or resolution) and different encoding parameters, the final trained parameter prediction model can adaptively adjust the selection of corresponding quantization parameters under given target encoding parameters based on the content of the input image. This makes the determination of quantization parameters more flexible and better adapted to the image. Furthermore, training the parameter prediction model using machine learning or deep learning methods to select the predicted quantization parameters for each image and its corresponding encoding parameters, and applying this to image encoding, can achieve more efficient image encoding and improve its overall efficiency.
[0117] For a detailed flowchart illustrating the process involved in Method (I) and the application of the parameter prediction model, please refer to [link / reference needed]. Figure 6aThe example shown illustrates the process. First, a sample group, including sample images and their training encoding parameters (such as bitrate), can be input into an initial parameter prediction model (such as a convolutional neural network). This model then predicts the training encoding parameters and the sample images, outputting the predicted quantization parameters corresponding to the sample group. The parameters of the initial parameter prediction model are then adjusted based on the differences between the predicted quantization parameters and the candidate quantization parameters for the sample group. Parameter optimization is achieved through model training, resulting in the parameter prediction model. In practical applications, this parameter prediction model can be used as input to predict the quantization parameters of the image, along with the target encoding parameters (such as target bitrate / quality). Finally, it outputs quantization indication information to indicate the predicted quantization parameters of the image, allowing for further determination of the target quantization parameters for image encoding.
[0118] Method (ii) uses training data for parameter estimation. Specifically, it includes the following steps 2.1-2.3.
[0119] Step 2.1: Obtain the sample image and the corresponding training encoding parameters.
[0120] The training encoding parameters corresponding to the sample images can be found in step 1.2 of method (I) above; the specific process will not be repeated here. It should be noted that the training encoding parameters corresponding to the obtained sample images can be different under different candidate quantization encoding parameters. This application does not limit the number of sample images obtained in step 2.1 or the number of training encoding parameters corresponding to the sample images. For ease of understanding, this application uses a single sample image and one training encoding parameter of that sample image as an example for illustration.
[0121] Step 2.2: Perform feature extraction processing on the sample image based on the sample image size and the pixel values in the sample image to obtain the image features of the sample image.
[0122] The sample image size refers to the dimensions of the sample image, used to describe its size. The values of pixels in the sample image include, but are not limited to, one or more of the following: chroma value, luminance value, and grayscale value. Specifically, the chroma value of a pixel refers to its specific numerical value in a particular color space, used to represent the color information of that pixel. These color spaces include, but are not limited to: RGB (Red, Green, Blue), YUV (a color space encoding true-color, where "Y" represents luminance (Luminance, Luma), and "U" and "V" represent chroma (Chrominance, Chroma)), CMYK (C for Cyan, M for Magenta, Y for Yellow, K for Black), and HSB (Hue, Saturation, Brightness, H for Hue; S for Saturation; B for Luminance) color space. In the RGB color space, chromaticity values can be represented using a triplet (r, g, b), where r, g, and b represent the color intensities of the red, green, and blue channels, respectively, with values ranging from 0 to 255. In other color spaces, such as YUV and HSB, chromaticity values are typically represented using different combinations of color channels. Both luminance and grayscale values can be used to represent the brightness information of each pixel in an image. The difference is that luminance values are a measure of light intensity based on physical perception, used to describe the perceived brightness of an image by the human eye, and can be calculated using different color spaces. Grayscale values, on the other hand, are an image representation that eliminates color information; they are the result of converting a color image to a grayscale image. They can be obtained by calculating the average of the RGB channels in the original color image, or by using other calculation methods. The value range for both grayscale and luminance values is typically from 0 to 255.
[0123] In one feasible implementation, feature extraction from a sample image may include the following sub-steps: First, the sample image can be transformed to obtain a transformed sample image. The transformed sample image contains the transformed values (also called transformed values) of each pixel in the sample image. The transformed values of each pixel in the transformed sample image can be chroma values, brightness values, or grayscale values. Then, the image features of the sample image are determined according to the image size of the sample image and the pixel values of the transformed sample image. In one implementation, the values of each pixel in the transformed sample image can be summed to obtain the sum value of each pixel in the transformed sample image. Then, the ratio between this sum value and the number of pixels in the transformed sample image is used as the image feature of the sample image.
[0124] Schematic, a Hadaman transform is applied to a sample image to obtain a transformed sample image. The more uniformly the sample data of the sample image is distributed, the more concentrated the data in the transformed sample image will be on the corners of the matrix (used to represent the values of pixels in the sample image), thus concentrating the effective information in the sample image. The process of extracting image features X from the sample image can be shown in Equation (1) below.
[0125]
[0126] Where X represents the image features of the sample image, H represents the height of the sample image, and W represents the width of the sample image. ij The value of the pixel in the i-th row and j-th column of the sample image represents the result of the corresponding position after the sample image has undergone the Hadaman transform; that is, a transformed value after the Hadaman transform. Optionally, this transformed value can be any of the transformed chroma value, transformed luminance value, transformed grayscale value, etc. The image features extracted in the above manner are global features of the sample image, which can provide a relatively comprehensive description of the sample image.
[0127] In another implementation, the values of pixels within a preset region of the transformed sample image can be summed to obtain a sum corresponding to that preset region. The ratio between this sum and the number of pixels within the preset region is then used as the image feature of the sample image. The size of the preset region is smaller than the size of the sample image; therefore, the obtained image feature can be a local feature of the sample image.
[0128] Alternatively, the image features of the sample image can be determined directly using the values of each pixel in the sample image and the image size of the sample image, without performing any transformation processing on the sample image.
[0129] Step 2.3: Based on the image features of the sample image, the training encoding parameters corresponding to the sample image, and the candidate quantization parameters corresponding to the training encoding parameters, fit the parameters of the initial parameter prediction model to optimize the parameters of the initial prediction model and obtain the parameter prediction model.
[0130] The initial parameter prediction model can be a parameterized mathematical model determined empirically. It uses image features of the sample images, training encoding parameters, and candidate quantization parameters to perform parameter fitting (also known as parameter estimation). This constructs a mapping relationship from (image, encoding parameters) to the quantization parameters, i.e., the correspondence between (image, encoding parameters) and the quantization parameters. The specific process of fitting the parameters of the initial parameter prediction model can be seen in equation (2) below.
[0131]
[0132] Where y represents the training encoding parameters of the sample image, such as bitrate or quality. n, α, and γ are all parameters of the initial parameter model. n represents the set hyperparameter (positive integer), β represents the number of terms in the initial parameter model, i represents the index of the parameter term, and α is a parameter of the initial parameter model, which needs to be obtained through fitting, i.e., the unknown in this formula. X represents the image features of the sample image, β represents the candidate quantization parameters corresponding to the training encoding parameters, and γ represents the parameters of the initial parameter model.
[0133] It should be noted that multiple sample images with different resolutions and / or content differences can be used to repeat steps (2.1)-(2.3) above to continuously optimize the model parameters, thereby estimating the model parameters through the training data. When the parameters obtained from multiple fittings no longer change, or the changes in parameters obtained from different fittings are relatively small (e.g., the difference between parameters is less than a threshold), a parameter prediction model can be obtained. During the parameter fitting process, probabilistic methods such as maximum likelihood estimation can be used, with the optimization goal being to maximize the probability of the observed data.
[0134] The initial parameter model α is fitted using the method described above. During the fitting process, a mapping relationship between image content, coding parameters, and quantization parameters can be constructed. This ensures that the parameter prediction model obtained through parameter fitting is a correspondence rule, or in other words, includes a correspondence rule. Thus, for an image to be encoded and given coding parameters (e.g., target bitrate), the image can be input into this parameter prediction model, and prediction can be performed using the correspondence rule to obtain the predicted quantization parameters. Image encoding is then performed based on these predicted quantization parameters.
[0135] In summary, steps 2.1-2.3 described above derive a parameter prediction model based on parameter fitting. The goal of parameter fitting is to estimate the model parameters given the model and data distribution, thereby better describing the data distribution. In this way, the parameter prediction model can effectively describe the relationship between image and encoding parameters, and their corresponding quantization parameters.
[0136] Furthermore, depending on the optimization environment of the parameter prediction model, optimization can include one or more of the following: offline training (or offline fitting), online training (or online fitting), or a combination of offline and online training (or a combination of online and offline fitting). This application does not impose any limitations on this. When the training encoding parameters include bitrate, calling the parameter prediction model to predict quantization parameters involves bitrate control in end-to-end image compression based on deep learning. In actual encoding, for a given input image and its target bitrate / quality, the parameter prediction model can quickly output its corresponding quantization parameters or a more suitable initial value for subsequent searches, reducing the complexity of the encoding process and further improving the efficiency of image encoding under the end-to-end image bitrate control algorithm based on deep learning.
[0137] In one embodiment, it may also be possible to: detect whether the matched image encoder has been updated; if so, obtain a new sample group through the updated image encoder, and optimize the parameters of the parameter prediction model through the new sample group to obtain the optimized parameter prediction model.
[0138] A matched image encoder can be used to encode sample images according to candidate quantization parameters to obtain the training encoding parameters of the sample images. Image encoders can be autoencoders, variational autoencoders, or other encoders using various neural networks. End-to-end image encoding and decoding can be achieved through image encoders, reducing manual adjustments and making the encoding and decoding process more automated.
[0139] An image encoder update can be caused by changes in the network parameters of the neural network within the image encoder, such as using a new number of channels in the neural network used to encode the luminance and chrominance components. It can also be an update to other parameters or the structure of the image encoder. When a matching update to the image encoder is detected, the updated image encoder can be used to re-encode the sample image using candidate quantization parameters.
[0140] Updates to the image encoder can affect the encoding parameters, causing a mismatch between the image encoder and the parameter prediction model. Therefore, new training encoding parameters can be constructed to obtain a new sample set. Using this new sample set, the parameter prediction model can be further optimized following steps (I) or (II) described above, while the original correspondence rules can be updated. By further optimizing the parameter prediction model, it becomes possible to match the optimized model with the image encoder. The parameter prediction model can then optimize as the matched image encoder is updated, thereby improving the encoding performance.
[0141] Understandably, if the encoder of the detected matching image is not updated, the parameters of the parameter prediction model remain unchanged, and the parameter prediction model can be applied subsequently to predict the quantization parameters corresponding to the image and encoding parameters.
[0142] In one feasible implementation, the parameter prediction model is a correspondence rule, enabling it to describe the correspondence between image, encoding parameters, and quantization parameters. In another feasible implementation, the parameter prediction model can be further optimized, generating a correspondence rule based on the optimized model. The parameter prediction model used here can also be the optimized model.
[0143] In one embodiment, based on the relationship between different components of an image and different correspondence rules, the above step S402 may include the following sub-steps S4021-S4023.
[0144] S4021. Obtain the parameter prediction model corresponding to the components of the image.
[0145] An image can contain multiple components, each with its own parametric prediction model. Specifically, one component of an image can correspond to one parametric prediction model, and different components can correspond to different parametric prediction models. Here, we can obtain the parametric prediction model corresponding to at least one component of the image. For example, if an image contains luminance and chrominance components, we can obtain one or both of the parametric prediction models corresponding to the luminance and chrominance components. Which component's parametric prediction models to obtain can be determined based on specific business requirements (e.g., encoding only the luminance component), or we can default to obtaining the parametric prediction model corresponding to each component of the image.
[0146] S4022. Call the parameter prediction model corresponding to the image components, perform prediction processing on the target coding parameters and the image, and obtain the quantization indication information corresponding to the image components.
[0147] After obtaining the parameter prediction model corresponding to the image components, the model can be called to predict the target coding parameters and the corresponding image components, thereby obtaining the quantization indicator information corresponding to that component. This quantization indicator information is used to indicate the predicted quantization parameters for that component. In the specific prediction process, the quantization indicator information can be obtained by following the rule that image components and coding parameters correspond to quantization parameters. For example: according to... Figure 3b The corresponding rules shown indicate that quantization indication information for quantization parameter Q11 can be obtained based on the luminance component of image P1 and the encoding parameter Y1.
[0148] Understandably, if an image contains multiple components, a corresponding parameter prediction model can be obtained for at least one component of the image, and the corresponding quantization indication information is predicted according to S4022. Then, the target quantization parameters are determined based on this quantization indication information. For example, if the image components include a luminance component and a chrominance component, the parameter prediction model corresponding to the luminance component is called to perform prediction processing on the target encoding parameters and the luminance component of the image to obtain the quantization indication information corresponding to the luminance component. Similarly, the parameter prediction model corresponding to the chrominance component is called to perform prediction processing on the target encoding parameters and the chrominance component of the image to obtain the quantization indication information corresponding to the chrominance component.
[0149] For some components in an image, if a corresponding parameter prediction model is not available to predict quantization indication information, other methods can be used to obtain the quantization indication information corresponding to the components. Other methods include directly searching for the quantization indication information in a manually defined search space. Specifically, to obtain the target bitrate / quality, the encoder can select a pre-defined search range for the quantization indication information β based on the target bitrate / quality, and then find the most suitable quantization indication information β within this range using a binary search. Specifically, the encoder will start by trying the maximum and minimum β values within this range, and then each time calculate the corresponding gain vector (which can be understood as a predicted quantization parameter or a set of quantization parameters) based on β for encoding; then compare the encoding result with the target bitrate / quality, modify the search range of β, and find the final suitable β after several iterations.
[0150] S4023. Determine the quantization indication information of the image based on the quantization indication information corresponding to the components of the image.
[0151] If each of the multiple components in an image is predicted using a corresponding parameter prediction model to obtain corresponding quantization indication information, then the quantization indication information corresponding to each component can be combined to obtain the quantization indication information of the image. Therefore, the quantization indication information of the image can be used to indicate multiple predictive quantization parameters. If one of the multiple components in an image is predicted using a corresponding parameter prediction model to obtain quantization indication information for that component, then the quantization indication information corresponding to that component can be used as the quantization indication information of the image.
[0152] In summary, based on the content described in S4021-S4023 above, predicting the quantization indication information corresponding to each image component allows for more precise prediction of image quantization parameters. By matching the target quantization parameters with the image components and using the target quantization parameters for image encoding, the encoding effect can be further improved. Furthermore, quantization indication information for only some components can be flexibly selected according to business needs to encode only those components, satisfying some personalized business requirements.
[0153] S403, determine the target quantization parameters based on quantization indication information.
[0154] In one embodiment, quantization indication information is used to indicate a predicted quantization parameter. The quantization indication information itself is a predicted quantization parameter that can be directly used to encode an image, or the quantization indication information is a parameter identifier for a predicted quantization parameter, which can be a number, letter, or string, etc. One parameter identifier corresponds to one predicted quantization parameter, and the predicted quantization parameter can be determined based on the quantization indication information. Therefore, determining the target quantization parameter based on the quantization indication information specifically includes the following methods (1)-(2).
[0155] (1) The predicted quantization parameter is determined as the target quantization parameter.
[0156] Based on the relatively accurate correspondence described by the correspondence rule, the predicted quantization parameter obtained according to the rule can be considered effective. After encoding the image using the predicted quantization parameter, encoding parameters that match the target encoding parameters can be obtained. Therefore, the predicted quantization parameter can be directly used as the target quantization parameter, that is, subsequent encoding can be performed directly using the predicted quantization parameter without determining new quantization parameters based on the predicted quantization parameter. This avoids repeated encoding and verification of the effectiveness of the predicted quantization parameter, improves the overall efficiency of image encoding, and to a certain extent guarantees the effect of image encoding.
[0157] (2) Adaptively adjust the predicted quantization parameters to obtain the target quantization parameters.
[0158] Specifically, the predictive quantization parameters are adaptively adjusted based on the results obtained from encoding using the predicted quantization parameters. By encoding the image using the predicted quantization parameters, the effectiveness of the predicted quantization parameters is verified, and then, when the effectiveness of the predicted quantization parameters is low, the predicted quantization parameters can be adaptively adjusted.
[0159] Since the predicted quantization parameter is a relatively suitable initial quantization parameter determined based on the corresponding rules, the target quantization parameter is further determined by using the predicted quantization parameter as the basis for adjustment during the adaptive adjustment process. Compared with searching for the target quantization parameter in the search space of manually defined quantization parameters, this can greatly reduce the number of repeated encodings, simplify the process of determining the target quantization parameter, and thus improve encoding efficiency.
[0160] In one feasible implementation, the predicted quantization parameters are adaptively adjusted to obtain the target quantization parameters. The specific implementation may include the following steps 1-4.
[0161] Step 1: Encode the image using predictive quantization parameters to obtain the image bitstream to be transmitted.
[0162] First, the image can be encoded using the predictive quantization parameter to obtain a bitstream to be transmitted. This bitstream can be used to indicate the number of bits occupied by the image during transmission or storage, and can be represented using multi-base numbers (e.g., binary). The bitstream to be transmitted corresponds to the predictive quantization parameter, and the size of the bitstream to be transmitted can be measured by the bit rate. The size of the bitstream to be transmitted has a certain impact on one or more of the following: the efficiency of image transmission, encoding, and decoding, and image quality.
[0163] Step 2: Obtain the encoding parameters corresponding to the bitstream to be transmitted, and compare the encoding parameters corresponding to the bitstream to be transmitted with the target encoding parameters to obtain the comparison result.
[0164] The encoding parameters corresponding to the bitstream to be transmitted and the target encoding parameters of the image contain parameters of the same dimension, but the specific parameter values may differ. For example, the encoding parameters corresponding to the bitstream to be transmitted and the target encoding parameters of the image may both contain bitrate, or both contain quality parameters to describe the quality of the image, or contain other encoding parameters, such as resolution, compression ratio, etc.
[0165] To verify the effectiveness of the predicted quantization parameters and ensure the encoding result closely approximates expectations, the encoding parameters corresponding to the bitstream to be transmitted can be compared with the target encoding parameters. The comparison result can be used to indicate whether the encoding parameters of the bitstream to be transmitted match the target encoding parameters of the image. In one possible approach, the comparison between parameters can be a comparison of their numerical values. This matching can refer to whether the parameter values match, for example, whether the parameter values are equal, or whether the difference between different parameter values is within a difference threshold. Different processing is applied to the predicted quantization parameters based on the different indications of the comparison results.
[0166] Step 3: If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted match the target encoding parameters, then the predicted quantization parameters are determined as the target quantization parameters.
[0167] If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted match the target encoding parameters, it means that the encoding result obtained by encoding the image using the predicted quantization parameters is close to the expectation. Therefore, the predicted quantization parameters can be directly determined as the target quantization parameters, and the encoded bitstream to be transmitted can be directly transmitted as the image bitstream without further encoding of the image, thus saving encoding resources. Optionally, the matching here can be that the encoding parameters corresponding to the bitstream to be transmitted are equal to the target encoding parameters, or that the difference between the parameter values of the bitstream to be transmitted and the target encoding parameters is within a difference threshold.
[0168] Step 4: If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted do not match the target encoding parameters, then adjust the predictive quantization parameters so that the image can be encoded according to the adjusted predictive quantization parameters before determining the target quantization parameters.
[0169] If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted do not match the target encoding parameters, it means that the encoding result obtained by encoding the image using the predicted quantization parameters differs significantly from the expectation. Therefore, the predicted quantization parameters can be adjusted accordingly to obtain adjusted predicted quantization parameters, thereby reducing the gap with the expectation. The adjusted predicted quantization parameters are new quantization parameters, and their parameter values differ from the expected values. Then, following steps 1-2 above, the adjusted predicted quantization parameters can be used to encode the image again to verify their effectiveness. Specifically, based on the encoding of the new bitstream to be transmitted, a comparison with the target encoding parameters can be used to obtain a new comparison result, further evaluating whether the predicted quantization parameters can be directly used as the target quantization parameters.
[0170] To illustrate, if the new alignment result indicates that the coding parameters of the bitstream to be transmitted, encoded under the adjusted quantization parameters, match the target coding parameters, then the adjusted predicted quantization parameters can be directly determined as the target quantization parameters. Otherwise, further adjustments are made based on the adjusted predicted quantization parameters to obtain a new quantization parameter. This process continues until the latest alignment result indicates that the latest coding parameters match the target coding parameters, at which point the latest coding parameters can be determined as the target coding parameters.
[0171] As can be seen, the adaptive adjustment method described in steps 1-4 above is based on the result of the actual encoding of the image using the predicted quantization parameters. It compares the encoding parameters corresponding to the actual encoding result with the target encoding parameters to determine whether they match, and then decides whether to adjust the currently obtained predicted quantization parameters to a new quantization parameter. This enables adaptive adjustment of the predicted quantization parameters and makes the adjustment more reliable.
[0172] It should be noted that the sequence numbers of the steps in this application do not constitute a restriction on the order of execution. For example, steps 3 and 4 above are performed when the comparison results indicate different contents.
[0173] Furthermore, in one feasible approach, adjusting the prediction quantization parameters can be achieved in either of the following ways: ① or ②.
[0174] ① Based on the candidate parameter interval to which the predicted quantization parameter belongs among multiple candidate parameter intervals, adjust the predicted quantization parameter to obtain the adjusted predicted quantization parameter.
[0175] Here, "multiple" refers to two or more candidate parameter intervals. A candidate parameter interval is a range of different values for a quantization parameter. For example, this candidate parameter interval may contain multiple candidate quantization parameters with consecutive values. The value ranges of the quantization parameters corresponding to different candidate parameter intervals are different. In one feasible implementation, each candidate parameter interval can be obtained by uniformly or non-uniformly dividing the values of the quantization parameter. Uniform division means dividing the entire value range of the quantization parameter equally, while non-uniform division means dividing the entire value range of the quantization parameter proportionally. Illustratively, candidate parameter intervals obtained by non-uniform division include: [0.002, 0.01, [0.01, 0.05, [0.05, 0.1, [0.1, 0.5], [0.5, 1]}. In another feasible implementation, it can also be obtained by adaptively dividing based on the characteristics of each region of the image. For example, for an image with obvious brightness, the size of each candidate parameter interval can be logarithmically related to the size of the previous candidate parameter interval.
[0176] By comparing the predicted quantization parameter value with the range of parameter values constituting the candidate parameter interval, the candidate parameter interval to which the predicted quantization parameter belongs can be determined. Then, within this candidate parameter interval, a quantization parameter other than the predicted quantization parameter can be selected as the adjusted quantization parameter. The selection from the candidate parameter interval can be random or based on the matching degree between the encoding parameters of the bitstream to be transmitted and the target encoding parameters. In this way, the adjusted predicted quantization parameter belongs to the same candidate parameter interval as the predicted quantization parameter, but the specific parameter values differ.
[0177] In this approach, by dividing the candidate parameter range, the value of the quantization parameter can be limited to a smaller range. Furthermore, based on the candidate parameter range to which the predicted quantization parameter belongs, the range of adaptive adjustment can be narrowed, thereby determining the target quantization parameter more efficiently and improving the efficiency of determining the target quantization parameter used for image encoding.
[0178] ② Adjust the prediction quantization parameters according to the adjustment range to obtain the adjusted prediction quantization parameters.
[0179] The adjustment range is a numerical value used to describe the magnitude of parameter adjustment. It can be a preset setting, such as an adjustment range of ±10%. The specific implementation of adjusting the predictive quantization parameters according to this adjustment range may include: first, obtaining the relationship between the encoding parameters of the bitstream to be transmitted and the target encoding parameters. If this relationship indicates that the encoding parameters are less than the target encoding parameters, it means that the encoding of the bitstream to be transmitted has not met the encoding requirements, and the predictive quantization parameters can be adjusted based on the relationship between the quantization parameters and the encoding parameters.
[0180] Schematic illustration: Encoding parameters include bitrate, and there is a negative correlation between bitrate and quantization parameters: the larger the quantization parameter, the smaller the bitrate after image compression; conversely, the smaller the quantization parameter, the larger the bitrate after image compression. If the bitrate of the transmitted bitstream is less than the target bitrate, the quantization parameter can be appropriately reduced in the decreasing direction to increase the bitrate after image compression, thereby increasing the image transmission speed. Otherwise, the quantization parameter can be appropriately increased in the increasing direction to ensure that the compressed image is transmitted within the supported bandwidth, saving transmission resources. If encoding parameters include quality, based on the negative correlation between image quality and quantization parameters, the quantization parameter can also be adjusted in a similar manner to achieve the required image quality.
[0181] In this approach, when the coding parameters of the bitstream to be transmitted and the target coding parameters are not significantly different, the predictive quantization parameters can be adjusted more finely based on the adjustment range, resulting in more precise adjustments. This effectively increases the probability of a match between the coding parameters of the bitstream to be transmitted obtained based on the adjusted predictive quantization parameters and the target coding parameters, reduces the number of repeated encoding steps, and improves overall coding efficiency.
[0182] In another embodiment, quantization indication information is used to indicate a group of quantization parameters, which includes multiple predicted quantization parameters. Optionally, one predicted quantization parameter corresponds to one component of the image, and different predicted quantization parameters may correspond to different components of the image.
[0183] As one feasible approach, for any predicted quantization parameter in the quantization parameter group, this predicted quantization parameter can be determined as the target quantization parameter, or the predicted quantization parameter can be adaptively adjusted to obtain the target quantization parameter. For details, please refer to the aforementioned related introduction, which will not be repeated here. It should be noted that for each predicted quantization parameter in the quantization parameter group, a corresponding target quantization parameter can be determined. This results in multiple target quantization parameters, with each target quantization parameter corresponding to a component, allowing the corresponding target quantization parameter to be used to encode the image components.
[0184] As another possible approach, a predictive quantization parameter can be first determined from the quantization parameter set as a reference quantization parameter, and then the target quantization parameter can be determined based on this reference quantization parameter.
[0185] Specifically, a reference quantization parameter can be determined from the quantization parameter set according to the corresponding business requirements. This business requirement can be used to describe the encoding needs of the image. For example, if the business requirement is to encode only the brightness information of the image, then according to the correspondence between the predicted quantization parameters and the image components, the predicted quantization parameter corresponding to the brightness component can be determined from multiple predicted quantization parameters and used as the reference quantization parameter. For the specific implementation of determining the target quantization parameter based on the reference quantization parameter, please refer to the above introduction on determining the target quantization parameter based on the predicted quantization parameter, which will not be repeated here.
[0186] Compared to determining the target quantization parameters for each component and then selecting the target quantization parameters for the desired component, first selecting the predicted quantization parameters corresponding to the component and then determining the target quantization parameters based on the predicted quantization parameters can save processing resources and time, effectively improve processing efficiency, and ultimately improve overall coding efficiency.
[0187] Furthermore, if the quantization indication information of an image contains quantization indication information corresponding to each component of the image, then based on the quantization indication information corresponding to each component, multiple independent target quantization parameters can be determined in the manner described above, and each target quantization parameter corresponds to a corresponding component of the image, so as to encode the corresponding component of the image using each target quantization parameter to obtain the image bitstream.
[0188] In another embodiment, determining the target quantization parameter based on the quantization indication information may further include the following: first, determining reference quantization indication information based on the quantization indication information; the reference quantization indication information is used to indicate a predicted quantization parameter or a group of quantization parameters; then, determining the target quantization parameter based on the reference quantization indication information.
[0189] Specifically, during the training process of the end-to-end image compression model, for the known quantization indication information β∈{β t}, thus obtaining the gain vector pair Including the positive gain vector m t and inverse gain vector Here, the gain vector can be viewed as a predicted quantization parameter or a set of quantization parameters indicated by the quantization indication information. As part of the model, the encoder and decoder are aware of these gain vectors. Generally, there are gain vector m and inverse gain vector m... -1The dimension of the residual tensor *r* is equal to the number of channels in the latent space (a data space capable of representing all the essential information needed to represent the original data points). Each element of the residual tensor *r* of the inner gain unit can be multiplied by a gain factor specified in the forward gain vector *m* (all elements of each channel share the same scaling factor). The decoding residual tensor of the inner inverse gain unit... Each element can be multiplied by the inverse gain vector m -1 The gain factor specified in the code (all elements of each channel share the same scaling factor).
[0190] Quantization indication information β∈{β t In some non-learnable codecs (such as JPEG, HEVC, and VVC), quantization parameters can be indicated. A higher β indicates lower quantization loss, a larger bitstream, and less distortion; a lower β indicates higher quantization loss, a smaller bitstream, and greater distortion.
[0191] Since β is a continuous value and known quantization information β∈{β} is used in training, t The values of} are used for training. In practical applications, there may be situations where the predicted quantization indication information does not correspond to the predicted quantization parameters, affecting the image coding rate.
[0192] To meet the requirements of different target coding parameters for image coding, it is necessary to find new quantization indicator information β. v Then, the current gain vector is modified to determine the target quantization parameters used to encode the image. Specifically, this includes the following two methods.
[0193] Method 1: β v Quantization indication information not known during the training process {β t Within this range, the corresponding predictive quantization parameter cannot be directly found. β v The indicated prediction quantization parameters are determined according to the following rule shown in equation (3).
[0194]
[0195] in, v This represents the quantitative indication information obtained based on the reference prediction model, specifically greater than {β}. t}β in the dictionary max The parameter, or less than {β} t}β in the dictionary min The parameter, namely β v <β min Or β v >β max . β tThis indicates reference quantization information, which refers to parameters learned or fitted by the parameter prediction model. v It is β v The corresponding gain vector represents a prediction quantization parameter or a set of quantization parameters; m t Is with v v The gain vector closest to the corresponding gain vector represents the reference quantization indication information β. t The indicated prediction quantization parameter or a set of quantization parameters. Following the above method, for β... v The closest gain vector m can be used. t and the corresponding β t A new gain vector m is obtained v .
[0196] Method 2: β s <β v <β m , where β s and β m This is known quantitative indication information.
[0197] For details, please refer to β. v The reference quantization indicator information is obtained by interpolating with adjacent quantization indicator information and then performing interpolation based on the adjacent quantization indicator information.
[0198] Specifically, linear interpolation can be used to obtain the interpolation parameter L, as shown in equation (4) below.
[0199]
[0200] Where, β s and β m It is a dictionary {β t} in β v Two adjacent quantization indication messages,
[0201] Then, interpolation can be performed based on the interpolation parameters and the known quantization indication information. Specifically, the gain vector can be calculated as the geometric mean of the reference gain vector, as shown in equation (5).
[0202]
[0203] Where, m v Indicates β v The corresponding gain vector, Corresponding to β m The corresponding gain vector, Corresponding to β s The corresponding gain vector; L represents β s β v and βm The ratio. ⊙ indicates element-wise multiplication. Thus, the known quantization information {β} can be obtained. t}:β s <β v <β m In the middle, we obtain β v The corresponding gain vector m v .
[0204] The parameter β can be sent to the decoder as a 16-bit fixed-point number. Similar to the quantization parameter in HEVC / VVC, β allows the primary and secondary components to be different, and this information can be marked as a high-level syntax element.
[0205] After the above processing, reference quantization indication information can be determined, and based on a predicted quantization parameter or a group of quantization parameters indicated by the reference quantization indication information, the target quantization parameter can be finally determined. The method for determining the target quantization parameter based on a predicted quantization parameter or a group of quantization parameters indicated by the reference quantization indication information can be referred to the above description, and will not be repeated here.
[0206] S404 uses the target quantization parameters to encode the image, obtaining the image bitstream.
[0207] In one embodiment, a target quantization parameter is determined based on quantization indication information. This target quantization parameter can be a predicted quantization parameter indicated by the quantization indication information, or a new quantization parameter obtained by adjusting the predicted quantization parameter. In another embodiment, multiple target quantization parameters are determined based on the quantization indication information, and each target quantization parameter corresponds to a component of the image. Therefore, when encoding the image, according to the correspondence between the target quantization parameters and image components, the corresponding target quantization parameters can be used to encode the image components, resulting in the bitstreams corresponding to each component. These bitstreams are then integrated to obtain the image bitstream.
[0208] As an feasible approach, since the image encoder may be updated, the encoding parameters corresponding to the bitstream of the encoded image before the image encoder is updated may not match the target encoding parameters. Therefore, it is also possible to detect whether the encoding parameters corresponding to the bitstream match the target encoding parameters to determine whether to determine new quantization parameters to re-encode the image and obtain a new bitstream of the image.
[0209] S405 transmits the bitstream to the image receiving end.
[0210] During the process of encoding an image according to the target quantization parameters, the target quantization parameters are also encoded into the image bitstream and transmitted to the receiving end through the bitstream so that the receiving end can decode the received image bitstream according to the target quantization parameters.
[0211] For the content shown in steps S401-S405 above, for example, please refer to Figure 6b The flowchart shown illustrates the process. Given an input image and a specified target encoding parameter (e.g., target bitrate R), a parameter prediction model outputs quantization indication information to indicate the predicted quantization parameters. These predicted quantization parameters can then be directly used for encoding, resulting in a bitstream. Specifically, when the encoding parameters of the bitstream obtained using the predicted quantization parameters differ significantly from the target encoding parameters, a target quantization parameter, different from the predicted quantization parameters, can be determined based on the predicted quantization parameters. This target quantization parameter is then used for encoding, ultimately outputting the bitstream.
[0212] The image processing method provided in this application, by calling a parameter prediction model obtained after parameter optimization, predicts the image and target coding parameters, and can quickly obtain quantization indication information to indicate the predicted quantization parameters. It is evident that directly obtaining quantization indication information to indicate a predicted quantization parameter or a group of quantization parameters through model prediction can significantly narrow the search range for quantization parameters. In the process of determining the target quantization parameter based on the quantization indication information, actual encoding is performed to verify whether the predicted quantization parameter can be used as the target quantization parameter. The narrowing of the quantization parameter search range by the quantization indication information can greatly reduce the number of repeated encodings, thereby reducing the complexity of the encoding process and improving encoding efficiency. Furthermore, the parameter prediction model can be obtained through model training or parameter fitting, enabling end-to-end image encoding processing. The parameter prediction model can also be further optimized, giving it a certain degree of scalability. In the process of optimizing the parameter prediction model, different types of sample images and different coding parameters are used, enabling the model to more accurately describe the correspondence between the image and the coding parameters to the quantization parameters.
[0213] Please see Figure 7 This is a schematic flowchart of an image processing method provided in an embodiment of this application. This image processing method can be performed by a computer device (such as...) Figure 1 The image processing method may include the following steps S701-S702, which can be executed by any terminal device 101b) in the system shown.
[0214] S701 receives the bitstream of the image transmitted by the sending end, which contains the target quantization parameters.
[0215] The target quantization parameters are determined based on the quantization indication information of the image. The quantization indication information is obtained by calling the parameter prediction model after parameter optimization and performing prediction processing on the target encoding parameters and the image.
[0216] If the target coding parameter is the predicted quantization parameter indicated by the quantization indication information, then the received image bitstream is obtained by encoding the image using that predicted quantization parameter; if the target coding parameter is obtained by adjusting the predicted quantization parameter indicated by the quantization indication information, then the received image bitstream is obtained by encoding the image using a new quantization parameter.
[0217] S702 uses the target quantization parameters to decode the bitstream and obtain the decoded image.
[0218] In one feasible approach, based on deep learning-based end-to-end image encoding at the transmitting end, the end-to-end image decoding process at the receiving end includes the following: first, decoding the bitstream to recover the latent variables mapped to the image at the transmitting end; then, inputting these latent variables and the target quantization parameters into a neural network for decoding to perform a nonlinear transformation; finally, reconstructing the image using a channel filter to obtain the decoded image (also known as the reconstructed image). The target quantization parameters control the quality and size of the model when compressing the image. In lossy encoding, there are certain differences between the decoded image and the encoded image due to distortion. In lossless encoding, the decoded image can almost be restored to the original image.
[0219] The image processing method provided in this application receives the transmitted bitstream at the receiving end and decodes the bitstream based on the target quantization parameters contained in the bitstream. It can control the quality of the decoded image, thereby making the decoded image as close as possible to the requirements of the sending end.
[0220] Please see Figure 8a , Figure 8a This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application. The aforementioned image processing apparatus can be a computer program (including program code) running on the aforementioned computer device (such as a terminal device or server), for example, the image processing apparatus is an application software; the image processing apparatus can be used to execute corresponding steps in the image processing method provided in the embodiments of this application. Figure 8a As shown, the image processing apparatus 800 may include the following units.
[0221] The acquisition unit 801 is used to acquire the image to be processed and the target encoding parameters of the image;
[0222] The processing unit 802 is used to call the parameter prediction model obtained after parameter optimization, perform prediction processing on the target encoding parameters and the image to obtain the quantization indication information of the image; and encode the image using the target quantization parameters determined based on the quantization indication information to obtain the image bitstream.
[0223] The transmitting unit 803 is used to transmit the bit stream to the receiving end of the image.
[0224] In one embodiment, the quantization indication information is used to indicate a predicted quantization parameter, and the processing unit 802 is also used to determine the predicted quantization parameter as the target quantization parameter; or, to perform adaptive adjustment processing on the predicted quantization parameter to obtain the target quantization parameter.
[0225] In one embodiment, the processing unit 802 is further configured to:
[0226] The image is encoded using predictive quantization parameters to obtain the image bitstream to be transmitted;
[0227] Obtain the encoding parameters corresponding to the bitstream to be transmitted, and compare the encoding parameters corresponding to the bitstream to be transmitted with the target encoding parameters to obtain the comparison result;
[0228] If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted match the target encoding parameters, then the predicted quantization parameters are determined as the target quantization parameters;
[0229] If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted do not match the target encoding parameters, the predicted quantization parameters are adjusted so that the image can be encoded according to the adjusted predicted quantization parameters before the target quantization parameters are determined.
[0230] In one embodiment, the processing unit 802 is further configured to: adjust the predicted quantization parameter according to the candidate parameter interval to which the predicted quantization parameter belongs among multiple candidate parameter intervals to obtain the adjusted predicted quantization parameter; or, adjust the predicted quantization parameter according to the adjustment magnitude to obtain the adjusted predicted quantization parameter.
[0231] In one embodiment, the quantization indication information is used to indicate a quantization parameter group, which includes multiple predicted quantization parameters. The processing unit 802 is further used to: determine a predicted quantization parameter from the quantization parameter group as a reference quantization parameter; and determine a target quantization parameter based on the reference quantization parameter.
[0232] In one embodiment, the processing unit 802 is further configured to:
[0233] Reference quantization information is determined based on the quantization information;
[0234] The target quantization parameter is determined based on a predictive quantization parameter or a group of quantization parameters indicated by the reference quantization indication information.
[0235] In one embodiment, the processing unit 802 is further configured to:
[0236] Obtain the parameter prediction model corresponding to the components of the image;
[0237] The parameter prediction model corresponding to the image components is invoked to perform prediction processing on the target coding parameters and the image, thereby obtaining the quantization indication information corresponding to the image components.
[0238] The quantization indicator information of the image is determined based on the quantization indicator information corresponding to the image components.
[0239] In one embodiment, the processing unit 802 is further configured to:
[0240] Obtain the image set; the image set contains sample images of different types, which include any one or two of the following: images with different resolutions and images with different content.
[0241] Each sample image is encoded based on the candidate quantization parameters determined by multiple candidate parameter ranges to obtain the training encoding parameters for each sample image.
[0242] Based on each sample image and its training encoding parameters, a sample group is determined. The candidate quantization parameters corresponding to the training encoding parameters of each sample image are used as the supervision data of the sample group. The parameters of the initial parameter prediction model are optimized to obtain the parameter prediction model.
[0243] In one embodiment, the processing unit 802 is further configured to:
[0244] For any sample group, the initial parameter prediction model is invoked to perform prediction processing on the training encoding parameters and sample images included in any sample group, so as to obtain the prediction quantization parameters corresponding to any sample group.
[0245] Based on the difference between the predicted quantization parameters corresponding to any sample group and the supervised data of any sample group, the parameters of the initial parameter prediction model are adjusted to obtain the parameter prediction model.
[0246] In another embodiment, the processing unit 802 is further configured to:
[0247] Obtain the sample image and the corresponding training encoding parameters;
[0248] The sample image is processed by feature extraction based on the sample image size and the pixel values in the sample image to obtain the image features of the sample image;
[0249] Based on the image features of the sample image, the corresponding training encoding parameters of the sample image, and the candidate quantization parameters corresponding to the training encoding parameters, the parameters of the initial parameter prediction model are fitted to optimize the parameters of the initial prediction model, thus obtaining the parameter prediction model.
[0250] In one embodiment, the image to be processed includes an image to be transmitted or stored; the display unit 804 is used for:
[0251] Display the target application interface, which is used to display images;
[0252] In response to parameter setting operations on the image, multiple candidate coding parameters and image display quality description information corresponding to each candidate coding parameter are displayed;
[0253] The candidate coding parameters selected from multiple candidate coding parameters according to the selection operation are used as the target coding parameters of the image.
[0254] In one embodiment, the processing unit 802 is further configured to: detect whether the matched image encoder has been updated; if so, obtain a new sample group through the updated image encoder, and optimize the parameters of the parameter prediction model through the new sample group to obtain an optimized parameter prediction model.
[0255] In one embodiment, the target encoding parameters include one or more of the following: target bitrate, target quality, target resolution, target compression ratio, and target interval between keyframes.
[0256] Please see Figure 8b , Figure 8b This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application. The aforementioned image processing apparatus can be a computer program (including program code) running on the aforementioned computer device (such as a terminal device or server), for example, the image processing apparatus is an application software; the image processing apparatus can be used to execute corresponding steps in the image processing method provided in the embodiments of this application. Figure 8b As shown, the image processing apparatus 810 may include the following units.
[0257] The receiving unit 811 is used to receive the bit stream of the image transmitted by the sending end; the bit stream contains target quantization parameters; the target quantization parameters are determined based on the quantization indication information of the image, and the quantization indication information is obtained by calling the parameter prediction model obtained after parameter optimization and performing prediction processing on the target coding parameters and the image;
[0258] The processing unit 812 is used to decode the bitstream using the target quantization parameters to obtain the decoded image of the image.
[0259] It is understood that the functions of each unit in the image processing apparatus 800 and image processing apparatus 810 described in the embodiments of this application can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, and will not be repeated here. In addition, the beneficial effects of using the same method will not be repeated here.
[0260] Please see Figure 9 , Figure 9This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Specifically, it may include an input device 901, an output device 902, a processor 903, a memory 904, a network interface 905, and at least one communication bus 906. The processor 903 may be a Central Processing Unit (CPU). The processor may further include a hardware chip. The hardware chip may be an Application-Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), etc. The PLD may be a Field-Programmable Gate Array (FPGA), a Generic Array Logic (GAL), etc.
[0261] Memory 904 may include volatile memory, such as random-access memory (RAM); memory 904 may also include non-volatile memory, such as flash memory, solid-state drive (SSD), etc.; memory 904 may be high-speed RAM or non-volatile memory, such as at least one disk drive. Optionally, memory 904 may also be at least one storage device located remotely from the aforementioned processor 903. Memory 904 may also include combinations of the above-mentioned types of memory. Figure 9 As shown, the memory 904, which is a computer-readable storage medium, may include an operating system, a network communication module, an interface module, and a device control application.
[0262] The network interface 905 may include a standard wired interface or a wireless interface (such as a Wi-Fi interface). This network interface serves as a communication interface and can be used to provide data communication functions. The communication bus 906 is responsible for connecting various communication components. The input device 901 receives input instructions to generate signal inputs related to object settings and function control. In one embodiment, the input device 901 includes, but is not limited to, one or more of a touch panel, a physical keyboard or virtual keyboard, function keys, and a mouse. The output device 902 is used to output data information. In this embodiment, the output device 902 can be used to display the target application interface, etc. The output device 902 may include a display screen or other display devices. The processor 903 is the control center of the terminal device. It is connected to various parts of the entire terminal device by various interfaces and lines, and performs various functions by scheduling and running computer programs stored in the memory 904.
[0263] In one embodiment, the processor 903 can be used to call a computer program in memory to perform the following operations: acquire the image to be processed and the target encoding parameters of the image; call the parameter prediction model obtained after parameter optimization to perform prediction processing on the target encoding parameters and the image to obtain quantization indication information of the image; encode the image using the target quantization parameters determined based on the quantization indication information to obtain the image bitstream; and transmit the bitstream to the receiving end of the image.
[0264] In one embodiment, the quantization indication information is used to indicate a predicted quantization parameter, and the processor 903 is also used to determine the predicted quantization parameter as the target quantization parameter; or, to perform adaptive adjustment processing on the predicted quantization parameter to obtain the target quantization parameter.
[0265] In one embodiment, the processor 903 is further configured to:
[0266] The image is encoded using predictive quantization parameters to obtain the image bitstream to be transmitted;
[0267] Obtain the encoding parameters corresponding to the bitstream to be transmitted, and compare the encoding parameters corresponding to the bitstream to be transmitted with the target encoding parameters to obtain the comparison result;
[0268] If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted match the target encoding parameters, then the predicted quantization parameters are determined as the target quantization parameters;
[0269] If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted do not match the target encoding parameters, the predicted quantization parameters are adjusted so that the image can be encoded according to the adjusted predicted quantization parameters before the target quantization parameters are determined.
[0270] In one embodiment, the processor 903 is further configured to: adjust the predicted quantization parameter according to the candidate parameter interval to which the predicted quantization parameter belongs among multiple candidate parameter intervals to obtain the adjusted predicted quantization parameter; or, adjust the predicted quantization parameter according to the adjustment magnitude to obtain the adjusted predicted quantization parameter.
[0271] In one embodiment, the quantization indication information is used to indicate a quantization parameter group, which includes multiple predicted quantization parameters. The processor 903 is further used to: determine a predicted quantization parameter from the quantization parameter group as a reference quantization parameter; and determine a target quantization parameter based on the reference quantization parameter.
[0272] In one embodiment, the processor 903 is further configured to:
[0273] Reference quantization information is determined based on the quantization information;
[0274] The target quantization parameter is determined based on a predictive quantization parameter or a group of quantization parameters indicated by the reference quantization indication information.
[0275] In one embodiment, the processor 903 is further configured to:
[0276] Obtain the parameter prediction model corresponding to the components of the image;
[0277] The parameter prediction model corresponding to the image components is invoked to perform prediction processing on the target coding parameters and the image, thereby obtaining the quantization indication information corresponding to the image components.
[0278] The quantization indicator information of the image is determined based on the quantization indicator information corresponding to the image components.
[0279] In one embodiment, the processor 903 is further configured to:
[0280] Obtain the image set; the image set contains sample images of different types, which include any one or two of the following: images with different resolutions and images with different content.
[0281] Each sample image is encoded based on the candidate quantization parameters determined by multiple candidate parameter ranges to obtain the training encoding parameters for each sample image.
[0282] Based on each sample image and its training encoding parameters, a sample group is determined. The candidate quantization parameters corresponding to the training encoding parameters of each sample image are used as the supervision data of the sample group. The parameters of the initial parameter prediction model are optimized to obtain the parameter prediction model.
[0283] In one embodiment, the processor 903 is further configured to:
[0284] For any sample group, the initial parameter prediction model is invoked to perform prediction processing on the training encoding parameters and sample images included in any sample group, so as to obtain the prediction quantization parameters corresponding to any sample group.
[0285] Based on the difference between the predicted quantization parameters corresponding to any sample group and the supervised data of any sample group, the parameters of the initial parameter prediction model are adjusted to obtain the parameter prediction model.
[0286] In another embodiment, processor 903 is further configured to:
[0287] Obtain the sample image and the corresponding training encoding parameters;
[0288] The sample image is processed by feature extraction based on the sample image size and the pixel values in the sample image to obtain the image features of the sample image;
[0289] Based on the image features of the sample image, the corresponding training encoding parameters of the sample image, and the candidate quantization parameters corresponding to the training encoding parameters, the parameters of the initial parameter prediction model are fitted to optimize the parameters of the initial prediction model, thus obtaining the parameter prediction model.
[0290] In one embodiment, the image to be processed includes an image to be transmitted or stored; the processor 903 is used to invoke the output device 902, so that the output device 902:
[0291] Display the target application interface, which is used to display images;
[0292] In response to parameter setting operations on the image, multiple candidate coding parameters and image display quality description information corresponding to each candidate coding parameter are displayed;
[0293] The candidate coding parameters selected from multiple candidate coding parameters according to the selection operation are used as the target coding parameters of the image.
[0294] In one embodiment, the processor 903 is further configured to: detect whether the matched image encoder has been updated; if so, obtain a new sample group through the updated image encoder, and optimize the parameters of the parameter prediction model through the new sample group to obtain an optimized parameter prediction model.
[0295] In one embodiment, the target encoding parameters include one or more of the following: target bitrate, target quality, target resolution, target compression ratio, and target interval between keyframes.
[0296] In another embodiment, the processor 903 may be used to call a computer program in memory to perform the following operations: receiving a bitstream of an image transmitted by a transmitter; the bitstream containing target quantization parameters; the target quantization parameters being determined based on quantization indication information of the image, the quantization indication information being obtained by calling a parameter prediction model obtained after parameter optimization and performing prediction processing on the target encoding parameters and the image; and decoding the bitstream using the target quantization parameters to obtain a decoded image of the image.
[0297] It should be understood that the computer device 900 described in the embodiments of this application can perform the image processing method described in the corresponding embodiments above, and can also perform the methods described above. Figure 8a The corresponding embodiment relates to the image processing device 800 and Figure 8b The description of the image processing apparatus 810 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0298] Furthermore, it should be noted that an exemplary embodiment of this application also provides a storage medium storing a computer program for the aforementioned display processing method. This computer program includes program instructions that, when loaded and executed by one or more processors, can implement the display processing method described in the embodiments, which will not be repeated here. The beneficial effects of employing the same method will also not be repeated here. It is understood that the program instructions can be deployed on one or more computer devices capable of communicating with each other for execution.
[0299] The aforementioned computer-readable storage medium can be an internal storage unit of the display processing apparatus or the computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0300] One aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in one aspect of the embodiments of this application.
[0301] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.
[0302] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.
[0303] The above-disclosed embodiments are merely some of the embodiments of this application, and should not be construed as limiting the scope of this application. Those skilled in the art can understand that all or part of the processes for implementing the above embodiments, and equivalent changes made in accordance with the claims of this application, still fall within the scope of this application.
Claims
1. An image processing method, characterized in that, include: Obtain the image to be processed, and the target encoding parameters of the image; The parameter prediction model obtained after parameter optimization is called to perform prediction processing on the target encoding parameters and the image to obtain the quantization indication information of the image; The quantization indication information includes the identifier of a quantization parameter group, which includes multiple predicted quantization parameters. Here, an image and an encoding parameter jointly correspond to a quantization parameter; the same image but different encoding parameters or different images but the same encoding parameter correspond to different quantization parameters. Alternatively, an encoding parameter and a component of an image jointly correspond to a quantization parameter, and different components of an image and the same encoding parameter correspond to different quantization parameters. The image is encoded using target quantization parameters determined based on the quantization indication information to obtain the image bitstream; The bitstream is transmitted to the receiving end of the image; The parameter prediction model is obtained by optimizing the parameters of an initial parameter prediction model using a sample set and the supervised data of the sample set. A sample set includes a sample image and the training encoding parameters of the sample image, or a sample set includes a component of the sample image and the training encoding parameters corresponding to the component of the sample image. The supervised data of the sample set includes candidate quantization parameters corresponding to the training encoding parameters in the sample set, and the candidate quantization parameters are determined from a candidate parameter range.
2. The method as described in claim 1, characterized in that, The quantization indication information is used to indicate a predicted quantization parameter. Before encoding the image using the target quantization parameter determined based on the quantization indication information, the method further includes: The predicted quantization parameter is determined as the target quantization parameter; or The predicted quantization parameters are adaptively adjusted to obtain the target quantization parameters.
3. The method as described in claim 2, characterized in that, The adaptive adjustment of the predicted quantization parameters to obtain the target quantization parameters includes: The image is encoded using the predicted quantization parameters to obtain the image's bitstream to be transmitted; Obtain the encoding parameters corresponding to the bitstream to be transmitted, and compare the encoding parameters corresponding to the bitstream to be transmitted with the target encoding parameters to obtain the comparison result; If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted match the target encoding parameters, then the predicted quantization parameter is determined as the target quantization parameter; If the comparison result indicates that the encoding parameters corresponding to the bitstream to be transmitted do not match the target encoding parameters, then the predicted quantization parameters are adjusted so that the image can be encoded according to the adjusted predicted quantization parameters before determining the target quantization parameters.
4. The method as described in claim 3, characterized in that, The adjustment of the prediction quantization parameters includes: Based on the candidate parameter interval to which the predicted quantization parameter belongs among multiple candidate parameter intervals, the predicted quantization parameter is adjusted to obtain the adjusted predicted quantization parameter; or, The prediction quantization parameters are adjusted according to the adjustment range to obtain the adjusted prediction quantization parameters.
5. The method as described in claim 1, characterized in that, The quantization indication information is used to indicate a quantization parameter group, which includes multiple predicted quantization parameters; before encoding the image using the target quantization parameters determined based on the quantization indication information, the method further includes: A predictive quantization parameter is determined from the set of quantization parameters as a reference quantization parameter; The target quantization parameters are determined based on the reference quantization parameters.
6. The method as described in claim 1, characterized in that, Before encoding the image using target quantization parameters determined based on the quantization indication information, the method further includes: Reference quantization indication information is determined based on the quantization indication information; The target quantization parameter is determined based on a predicted quantization parameter or a group of quantization parameters indicated by the reference quantization indication information.
7. The method as described in claim 1, characterized in that, The parameter prediction model obtained after parameter optimization performs prediction processing on the target encoding parameters and the image to obtain the quantization indication information of the image, including: Obtain the parameter prediction model corresponding to the components of the image; The parameter prediction model corresponding to the components of the image is invoked to perform prediction processing on the target encoding parameters and the image, thereby obtaining quantization indication information corresponding to the components of the image; The quantization indication information of the image is determined based on the quantization indication information corresponding to the components of the image.
8. The method as described in claim 1, characterized in that, The method further includes: Obtain an image set; the image set contains sample images of different types, including any one or two of the following: images with different resolutions and images with different content. Each sample image is encoded based on the candidate quantization parameters determined by multiple candidate parameter ranges to obtain the training encoding parameters for each sample image. Based on each sample image and its training encoding parameters, a sample group is determined, and the candidate quantization parameters corresponding to the training encoding parameters of each sample image are used as the supervision data of the sample group. The initial parameter prediction model is then optimized to obtain the parameter prediction model.
9. The method as described in claim 8, characterized in that, The parameter optimization of the initial parameter prediction model includes: For any sample group, the initial parameter prediction model is invoked to perform prediction processing on the training encoding parameters and sample images included in the sample group, so as to obtain the prediction quantization parameters corresponding to the sample group. Based on the difference between the predicted quantization parameters corresponding to any sample group and the supervision data of any sample group, the parameters of the initial parameter prediction model are adjusted to obtain the parameter prediction model.
10. The method as described in claim 1, characterized in that, The method further includes: Obtain the sample image and the corresponding training encoding parameters of the sample image; Based on the sample image size and the pixel values in the sample image, feature extraction processing is performed on the sample image to obtain the image features of the sample image; Based on the image features of the sample image, the training encoding parameters corresponding to the sample image, and the candidate quantization parameters, the parameters of the initial parameter prediction model are fitted to optimize the parameters of the initial prediction model, thereby obtaining the parameter prediction model.
11. The method as described in claim 1, characterized in that, The image to be processed includes an image to be transmitted or stored; the method further includes: Display the target application interface, which is used to display the image; In response to parameter setting operations on the image, multiple candidate encoding parameters and image display quality description information corresponding to each candidate encoding parameter are displayed; The candidate coding parameters selected from the plurality of candidate coding parameters according to the selection operation are used as the target coding parameters of the image.
12. The method according to any one of claims 8-11, characterized in that, The method further includes: Detect whether the encoder of the matched image has been updated; If so, a new sample set is obtained through the updated image encoder, and the parameters of the parameter prediction model are optimized using the new sample set to obtain the optimized parameter prediction model.
13. The method as described in claim 1, characterized in that, The target encoding parameters include one or more of the following: target bit rate, target quality, target resolution, target compression ratio, and target interval between keyframes.
14. An image processing apparatus, characterized in that, include: An acquisition unit is used to acquire the image to be processed and the target encoding parameters of the image; The processing unit is used to call the parameter prediction model obtained after parameter optimization, perform prediction processing on the target encoding parameters and the image to obtain the quantization indication information of the image; and encode the image using the target quantization parameters determined based on the quantization indication information to obtain the bitstream of the image. The quantization indication information includes the identifier of a quantization parameter group, which includes multiple predicted quantization parameters. Here, an image and an encoding parameter jointly correspond to a quantization parameter; the same image but different encoding parameters or different images but the same encoding parameter correspond to different quantization parameters. Alternatively, an encoding parameter and a component of an image jointly correspond to a quantization parameter, and different components of an image and the same encoding parameter correspond to different quantization parameters. A transmitting unit is used to transmit the bitstream to the receiving end of the image; The parameter prediction model is obtained by optimizing the parameters of an initial parameter prediction model using a sample set and the supervised data of the sample set. A sample set includes a sample image and the training encoding parameters of the sample image, or a sample set includes a component of the sample image and the training encoding parameters corresponding to the component of the sample image. The supervised data of the sample set includes candidate quantization parameters corresponding to the training encoding parameters in the sample set, and the candidate quantization parameters are determined from a candidate parameter range.
15. An image processing apparatus, characterized in that, include: The receiving unit is used to receive the image bitstream transmitted by the sending end; The bitstream contains target quantization parameters; The target quantization parameters are determined based on the quantization indication information of the image. The quantization indication information is obtained by calling the parameter prediction model after parameter optimization and performing prediction processing on the target encoding parameters and the image. The processing unit is used to decode the bitstream using the target quantization parameters to obtain the decoded image of the image; The quantization indication information includes an identifier for a quantization parameter group, which includes multiple predicted quantization parameters. An image and an encoding parameter jointly correspond to a quantization parameter. Different quantization parameters are corresponding to the same image but different encoding parameters, or different images but the same encoding parameter. Alternatively, an encoding parameter and a component of an image jointly correspond to a quantization parameter. Different components of an image and the same encoding parameter correspond to different quantization parameters. The parameter prediction model is obtained by optimizing the parameters of an initial parameter prediction model using a sample group and the supervised data of the sample group. A sample group includes a sample image and the training encoding parameters of the sample image, or a sample group includes a component of a sample image and the training encoding parameters corresponding to that component. The supervised data of the sample group includes candidate quantization parameters corresponding to the training encoding parameters in the sample group, and the candidate quantization parameters are determined from the candidate parameter range.
16. A computer device, characterized in that, include: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the image processing method as described in any one of claims 1-13.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the image processing method as described in any one of claims 1-13.
18. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which are executed by a processor to implement the image processing method as described in any one of claims 1-13.
Citation Information
Patent Citations
Video frame encoding method, video frame encoding equipment and device with storage function
CN110198444A