Image processing method and device and color reconstruction model training method and device

By adjusting the data arrangement of RAW data in intelligent driving images and using the target color reconstruction model for encoding and decoding, the problem of RAW data storage pressure and slow encoding and decoding speed is solved, and efficient encoding and decoding processing and hardware adaptability are achieved. .

CN118612449APending Publication Date: 2024-09-06BEIJING HORIZON ROBOTICS TECH RES & DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410869509.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In the field of intelligent driving, the huge bit width of RAW data results in high storage pressure. Existing software solutions have slow encoding and decoding speeds and are difficult to adapt to standard hardware circuits, resulting in poor applicability.

Method used

By determining the color components of the image in multiple preset channels, adjusting the data arrangement, using the target color reconstruction model for encoding and decoding, and adapting the hardware circuit to improve speed and applicability.

Benefits of technology

It improves the encoding and decoding processing speed, enhances the adaptability to standard hardware circuits, and improves the efficiency and quality of encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612449A
    Figure CN118612449A
Patent Text Reader

Abstract

The invention discloses an image processing method and device and a color reconstruction model training method and device, and relates to the technical field of intelligent driving, and the method comprises the steps: determining a first image of a to-be-processed first data arrangement mode, and color components corresponding to a plurality of preset channels of the first image; based on the target color reconstruction model, adjusting the data arrangement mode of the first image to obtain a second image of a second data arrangement mode; encoding and decoding the second image to obtain a third image; and adjusting the data arrangement mode of the third image from the second data arrangement mode to the first data arrangement mode to obtain a reconstructed image corresponding to the first image. According to the technical scheme, the coding and decoding hardware circuit can directly perform coding and decoding processing on the second image data in the second data arrangement mode, so that the coding and decoding processing speed can be improved, the coding and decoding hardware circuit can be adapted, and the applicability is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of intelligent driving technology, and in particular to an image processing method and device, and a color reconstruction model training method and device. Background Art

[0002] In the field of intelligent driving, the raw image (RAW) data output by the image sensor has a larger dynamic range, which helps improve the performance of the perception algorithm in high-dynamic and extremely dark scenes. Therefore, the related technologies of RAW data have received more and more attention. However, due to the large bit width of RAW data, when large-scale RAW data collection is carried out, the collected RAW data needs to be stored, which will generate huge storage pressure. Therefore, how to efficiently compress (encode and decode) the collected RAW data is a technical problem that needs to be solved urgently.

[0003] At present, the encoding and decoding of RAW data is mainly realized by software solutions. However, when using software solutions to encode and decode RAW data, the speed is slow, and it is difficult to adapt to standard hardware circuits, and the applicability is poor. Summary of the invention

[0004] Generally, when using software solutions to encode RAW data, it is difficult to form relevant standards to adapt to relevant hardware circuits.

[0005] In order to solve the above technical problems, the present disclosure provides an image processing method, including: determining a first image of a first data arrangement mode to be processed, and color components of the first image corresponding to multiple preset channels respectively; adjusting the data arrangement mode of the first image based on the color components of the first image corresponding to multiple preset channels respectively and a target color reconstruction model, to obtain a second image of a second data arrangement mode; performing encoding and decoding processing on the second image to obtain a third image; adjusting the data arrangement mode of the third image from the second data arrangement mode to the first data arrangement mode, to obtain a reconstructed image corresponding to the first image.

[0006] The second aspect of the present disclosure provides a color reconstruction model training method, including: determining a plurality of sample image data of a first data arrangement mode and sample color components corresponding to each sample image data in a plurality of preset channels; adjusting the data arrangement mode of the sample image data based on the sample color components corresponding to each sample image data in a plurality of preset channels and an initial color reconstruction model to obtain first predicted image data of a second data arrangement mode; performing image data processing on the first predicted image data to obtain predicted reconstructed image data corresponding to the sample image data; and iteratively training the initial color reconstruction model based on the predicted reconstructed image data and the sample image data to obtain a target color reconstruction model.

[0007] The third aspect embodiment of the present disclosure proposes an image processing device, including: a first determination module, used to determine first image data of a first data arrangement mode to be processed, and color components of the first image data corresponding to multiple preset channels respectively; a first adjustment module, used to adjust the data arrangement mode of the first image data based on the color components of the first image data corresponding to multiple preset channels respectively and a target color reconstruction model, to obtain second image data of a second data arrangement mode; a codec processing module, used to perform codec processing on the second image data to obtain third image data; a second adjustment module, used to adjust the data arrangement mode of the third image data from the second data arrangement mode to the first data arrangement mode, to obtain reconstructed image data corresponding to the first image data.

[0008] The fourth aspect embodiment of the present disclosure provides a color reconstruction model training device, including: a second determination module, used to determine a plurality of sample image data of a first data arrangement mode and sample color components corresponding to each sample image data in a plurality of preset channels; a third adjustment module, used to adjust the data arrangement mode of the sample image data based on the sample color components corresponding to each sample image data in a plurality of preset channels and the initial color reconstruction model, so as to obtain first predicted image data of a second data arrangement mode; an image processing module, used to perform image data processing on the first predicted image data, so as to obtain predicted reconstructed image data corresponding to the sample image data; and a training module, used to iteratively train the initial color reconstruction model based on the predicted reconstructed image data and the sample image data, so as to obtain a target color reconstruction model.

[0009] The fifth aspect of the present disclosure provides a computer-readable storage medium, which stores a computer program. The computer program is used to execute the image processing method of the first aspect, or the computer program is used to execute the color reconstruction model training method of the second aspect.

[0010] The sixth aspect embodiment of the present disclosure provides an electronic device, which includes: a processor; a memory for storing processor executable instructions; a processor, configured to read executable instructions from the memory and execute the instructions to implement the image processing method of the first aspect above, or the color reconstruction model training method of the second aspect above.

[0011] An image processing method provided by the embodiment of the present disclosure, when encoding and decoding first image data of a first data arrangement mode, firstly adjusts the data arrangement structure of the first image data based on the color components and target color reconstruction model respectively corresponding to the first image in multiple preset channels, obtains second image data of a second data arrangement mode, and then performs encoding and decoding processing on the second image data of the second data arrangement mode. Since the second image data of the second data arrangement mode can be directly encoded and decoded by the encoding and decoding hardware circuit, the speed of the encoding and decoding processing can be improved, and the standard encoding and decoding hardware circuit can be adapted, and the applicability is stronger. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of an image processing method provided by an exemplary embodiment of the present disclosure.

[0013] Figure 2 It is a flowchart of another image processing method provided by an exemplary embodiment of the present disclosure.

[0014] Figure 3 It is a flowchart of another image processing method provided by an exemplary embodiment of the present disclosure.

[0015] Figure 4 It is a flowchart of a color reconstruction model training method provided by an exemplary embodiment of the present disclosure.

[0016] Figure 5 It is a flowchart of another color reconstruction model training method provided by an exemplary embodiment of the present disclosure.

[0017] Figure 6 It is a flowchart of another color reconstruction model training method provided by an exemplary embodiment of the present disclosure.

[0018] Figure 7 It is a schematic diagram of the composition structure of an image processing device provided by an exemplary embodiment of the present disclosure.

[0019] Figure 8 It is a schematic diagram of the composition structure of another image processing device provided by an exemplary embodiment of the present disclosure.

[0020] Fig. 9 It is a schematic diagram of the composition structure of another image processing device provided by an exemplary embodiment of the present disclosure.

[0021] Fig.10 It is a schematic diagram of the composition structure of a color reconstruction model training device provided by an exemplary embodiment of the present disclosure.

[0022] Fig.11It is a schematic diagram of the composition structure of another color reconstruction model training device provided by an exemplary embodiment of the present disclosure.

[0023] Fig.12 It is a schematic diagram of the composition structure of another color reconstruction model training device provided by an exemplary embodiment of the present disclosure.

[0024] Fig.13 It is a schematic diagram of the composition structure of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] To explain the present disclosure, example embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. It should be understood that the present disclosure is not limited to the example embodiments.

[0026] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

[0027] Application Overview

[0028] Since the RAW format is an uncompressed or lossy image format, all the original data of the photo is retained. Compared with other image formats (such as the Joint Photographic Experts Group (JPEG) format), image data in the RAW format (also called RAW data) has higher image quality, a larger dynamic range, and a greater color depth. Therefore, RAW data can not only be used in the photography industry to enable photographers to post-process images more flexibly, but can also be used in the field of intelligent driving to improve the performance of perception algorithms in high-dynamic and extremely dark scenes. The disclosed embodiment takes the application of RAW data to the perception module in the field of intelligent driving as an example for illustrative explanation.

[0029] In the field of intelligent driving, a vehicle is usually equipped with multiple (for example, 9 to 11) image acquisition devices, and the multiple image acquisition devices are used to collect RAW data in real time, store the real-time collected RAW data, and then process the RAW data to perceive the target object in the vehicle's driving environment. However, the bit width of RAW data is large and the number of image acquisition devices is large. Therefore, the amount of collected RAW data is extremely large, and when storing the collected RAW images, huge storage pressure will be generated. Furthermore, how to efficiently compress (encode and decode) the collected RAW data is a technical problem that needs to be solved urgently.

[0030] At present, the encoding and decoding of RAW data is mainly realized through software solutions. However, although the software solution can achieve a higher compression rate and better compression quality, the software solution is slow and difficult to adapt to standard hardware circuits when encoding and decoding RAW images, and has poor applicability.

[0031] Based on the above technical problems, the disclosed embodiment provides an image processing method, which first adjusts the data arrangement of the first image data based on the color components and target color reconstruction models corresponding to the first image data in multiple preset channels when encoding and decoding the first image data in the first data arrangement mode, obtains the second image data in the second data arrangement mode, and then performs encoding and decoding processing on the second image data in the second data arrangement mode. Since the encoding and decoding hardware circuit can directly encode and decode the second image data in the second data arrangement mode, the speed of the encoding and decoding processing can be improved, and the standard encoding and decoding hardware circuit can be adapted, and the applicability is stronger.

[0032] Exemplary Methods

[0033] Figure 1 FIG. 1 is a flow chart of an image processing method provided by an exemplary embodiment of the present disclosure. The image processing method can be applied to electronic devices (such as vehicle-mounted system-on-a-chip (SOC)), such as Figure 1 As shown, the method includes steps 101 to 104.

[0034] Step 101 : determining first image data of a first data arrangement mode to be processed, and color components of the first image data corresponding to a plurality of preset channels respectively.

[0035] Exemplarily, the ratio of each color component corresponding to the first data arrangement may be 2:1:1. In some examples, the first data arrangement may correspond to the RGGB Bayer arrangement, and the ratio of each color component (such as G component, B component, R component) corresponding to the RGGB Bayer arrangement may be 2:1:1. In other examples, the first data arrangement may correspond to the RYYB arrangement, and the ratio of each color component (such as Y component, B component, R component) corresponding to the RYYB arrangement is also 2:1:1.

[0036] Exemplarily, the G component may refer to a plurality of corresponding pixels on the G channel; the B component may refer to a plurality of corresponding pixels on the B channel; and the R component may refer to a plurality of corresponding pixels on the R channel. In some examples, the ratio of the G component, the B component, and the R component is 2:1:1, which means that the ratio of the number of corresponding pixels on the G channel, the number of corresponding pixels on the B channel, and the number of corresponding pixels on the R channel is 2:1:1.

[0037] Exemplarily, the first image data may be RAW data collected by an image acquisition device of the vehicle during driving. In some examples, the first image data may be RAW data in a Bayer arrangement of RGGB. The present application embodiment does not limit the data arrangement of RAW data, and the present disclosure embodiment takes the data arrangement of RAW data in a Bayer arrangement of RGGB as an example for illustrative description.

[0038] Exemplarily, the plurality of preset channels may correspond to the plurality of color channels. Taking the first image data in the first data arrangement mode as RAW data in the Bayer arrangement mode of RGGB as an example, in some examples, the plurality of preset channels may include a first preset channel corresponding to color G (also referred to as a G channel), a second preset channel corresponding to color B (also referred to as an R channel), and a third preset channel corresponding to color R (also referred to as a B channel).

[0039] Exemplarily, different preset channels may correspond to different color components. For example, multiple preset channels include a first preset channel corresponding to color G, a second preset channel corresponding to color B, and a third preset channel corresponding to color R. In some examples, the color component corresponding to the first preset channel may include a first color component (G component) corresponding to color G; the color component corresponding to the second preset channel may include a second color component (B component) corresponding to color B; and the color component corresponding to the third preset channel may include a third color component (R component) corresponding to color R.

[0040] Exemplarily, step 101 may include: the vehicle-mounted SOC receives the RAW data in the RGGB Bayer format sent in real time by the image acquisition device, and then splits the RAW data according to the first preset channel corresponding to color G, the second preset channel corresponding to color B, and the third preset channel corresponding to color R, to obtain the first color component corresponding to the G channel, the second color component corresponding to the B channel, and the third color component corresponding to the R channel. The ratio of the first color component, the second color component, and the third color component is 2:1:1.

[0041] Step 102, based on the color components of the first image data corresponding to a plurality of preset channels and the target color reconstruction model, adjust the data arrangement of the first image data to obtain second image data in a second data arrangement.

[0042] Exemplarily, different from the first data arrangement, the ratio of each color component corresponding to the second data arrangement may be 4:1:1. In some examples, the second data arrangement may correspond to an arrangement of a Y (brightness) UV (chrominance) 420 format, and the ratio of the Y component, the U component, and the V component is 4:1:1.

[0043] Exemplarily, the second image data may be image data obtained by adjusting the data arrangement of the first graphic data, and is also RAW data.

[0044] Exemplarily, the target color reconstruction model is a color reconstruction model that can be trained and is used to perform demosaicing on input color components and output the demosaiced color components.

[0045] In some examples, since the demosaicing process reconstructs the corresponding color component, the color component after the demosaicing process can be referred to as the reconstructed color component. In other examples, since the demosaicing process completes the missing part of the color component, the color component after the demosaicing process can also be referred to as the full color component.

[0046] Exemplarily, step 102 may include: taking the G component of the first image data corresponding to the first preset channel as the Y component, the R component of the first image data corresponding to the second preset channel as the U component, and the B component of the first image data corresponding to the third preset channel as the V component, and adjusting the G component, R component and / or B component based on the target color reconstruction model to obtain second image data in which the ratio of the G component, the R component and the B component is 4:1:1.

[0047] Step 103: perform encoding and decoding processing on the second image data to obtain third image data.

[0048] Exemplarily, the coding and decoding process may include a coding and decoding process corresponding to a standard video coding and decoding algorithm. In some examples, the standard video coding and decoding algorithm may be implemented by a standard encoder (hardware circuit) and a standard decoder (hardware circuit).

[0049] Exemplarily, since the third image data is image data obtained after encoding and decoding the second image data, when the second image data is correctly encoded and decoded, the third image data may be the same as the second image data.

[0050] Exemplarily, step 103 may include: encoding the second image data by a standard encoder to obtain the encoded second image data; and then decoding the encoded second image data by a standard decoder to obtain the third image data.

[0051] Step 104: Adjust the data arrangement of the third image data from the second data arrangement to the first data arrangement to obtain a reconstructed image corresponding to the first image.

[0052] Exemplarily, step 104 may include: performing sampling and reorganization processing on the third image data to obtain a reconstructed image corresponding to the first image.

[0053] The image processing method provided by the embodiment of the present disclosure adjusts the data arrangement of the first image data based on the color components and target color reconstruction models corresponding to the first image data in multiple preset channels when encoding and decoding the first image data in the first data arrangement mode, obtains the second image data in the second data arrangement mode, and then performs encoding and decoding processing on the second image data in the second data arrangement mode. Since the encoding and decoding hardware circuit can directly perform encoding and decoding processing on the second image data in the second data arrangement mode, the speed of the encoding and decoding processing can be improved, and the standard encoding and decoding hardware circuit can be adapted, and the applicability is stronger.

[0054] like Figure 2 As shown in the above Figure 1 Based on the illustrated embodiment, step 102 may include the following steps 1021 and 1022 .

[0055] Step 1021 , performing color reconstruction on color components corresponding to a plurality of preset channels respectively based on a target color reconstruction model, to obtain a reconstructed color component corresponding to a first preset channel among the plurality of preset channels.

[0056] Exemplarily, taking the data arrangement of the first image data as the RGGB Bayer arrangement as an example, the first preset channel may be a preset channel corresponding to the Y component among the R component, the G component, and the B component of the first image data. In some examples, the first preset channel may be a G channel corresponding to the G component.

[0057] Exemplarily, step 1021 may include: the target color reconstruction model processes the color components corresponding to the multiple preset channels respectively input, outputs the full color components corresponding to each of the multiple preset channels respectively, and determines the full color component corresponding to the first preset channel in the multiple preset channels obtained as the reconstructed color component corresponding to the first preset channel.

[0058] In some examples, after the target color reconstruction model outputs the full color components corresponding to each preset channel, it also includes: sampling the full color component corresponding to the second preset channel and the full color component corresponding to the third preset channel according to the data arrangement format corresponding to the first data arrangement method, to obtain the second color component corresponding to the second preset channel and the third color component corresponding to the third preset channel.

[0059] Step 1022: Combine the reconstructed color component, the second color component corresponding to the second preset channel among the plurality of preset channels, and the third color component corresponding to the third preset channel among the plurality of preset channels to obtain a second image.

[0060] Exemplarily, step 1032 may include: combining the reconstructed color component, the second color component, and the third color component in a preset combination manner to obtain a second image.

[0061] In some examples, the preset combination method may correspond to the arrangement method corresponding to the YUV420 format. For example, the preset combination method may be to arrange the reconstructed color component, the second color component, and the third color component in sequence from top to bottom.

[0062] In the disclosed embodiment, since the target color reconstruction model can ensure the encoding quality and improve the compression rate, the color components corresponding to the multiple preset channels are reconstructed based on the target color reconstruction model, and the reconstructed color components of the target data distribution corresponding to the high-quality encoding can be obtained. Furthermore, the reconstructed color components corresponding to the first preset channel, the second color components corresponding to the second preset channel among the multiple preset channels, and the third color components corresponding to the third preset channel among the multiple preset channels are combined to obtain the second image data of the target data distribution, thereby improving the encoding quality and compression rate of the second image data.

[0063] like Figure 3 As shown in the above Figure 2 Based on the illustrated embodiment, step 1021 may include the following steps 301 and 302 .

[0064] Step 301 : split a first color component corresponding to a first preset channel among a plurality of preset channels to obtain a first sub-color component and a second sub-color component corresponding to the first preset channel.

[0065] Exemplarily, the data arrangement of the first image data is a Bayer arrangement of RGGB, the first preset channel is a G channel, and the first color component is a G component. The first sub-color component may be a first sub-G component, the second sub-color component may be a second sub-G component, and the numbers of pixels corresponding to the first sub-G component, the second sub-G component, the R component, and the B component are all the same.

[0066] It can be understood that since the ratio of the first color component, the second color component and the third color component in the first image data is 2:1:1, that is, the number of pixels corresponding to the first color component is twice the number of pixels corresponding to the second color component and / or the third color component, it is necessary to split the first color component into two first sub-color components and second sub-color components with the same amount of data before performing color reconstruction on the first color component, the second color component and the third color component through the target color model, so that the data amounts of the first sub-color component, the second sub-color component, the second color component and the third color component are all the same.

[0067] Step 302 : Perform color reconstruction on the first sub-color component, the second sub-color component, the second color component, and the third color component based on a target color reconstruction model to obtain a reconstructed color component corresponding to a first preset channel.

[0068] In some examples of the present disclosure, step 302 may include: performing feature extraction on the first sub-color component, the second sub-color component, the second color component and the third color component based on the target feature extraction sub-model in the target color reconstruction model to obtain image color features; performing color reconstruction on the image color features through the target reconstruction sub-model in the target color reconstruction model to obtain the reconstructed color component corresponding to the first preset channel.

[0069] Exemplarily, the target feature submodel may refer to a neural network model for feature extraction after training is completed, and includes at least one feature layer. The at least one feature layer may include first to sixth feature layers connected in sequence. Among them, the first to fifth feature layers are convolution layers, and the sixth feature layer is a global pooling layer. In some examples, the first feature layer, the second feature layer, the fourth feature layer, and the fifth feature layer may all be convolution layers with a convolution kernel size of 3, a step size of 1, and an activation function of a ReLU function. The third feature layer may be a convolution layer with a convolution kernel size of 3, a step size of 2, and an activation function of a ReLU function.

[0070] Exemplarily, performing feature extraction on the first sub-color component, the second sub-color component, the second color component and the third color component based on the target feature extraction sub-model in the target color reconstruction model to obtain image color features can include: inputting the first sub-color component, the second sub-color component, the second color component and the third color component as a whole data into the target color reconstruction model, and performing feature extraction on the input first sub-color component, the second sub-color component, the second color component and the third color component in sequence through each feature layer in the target feature extraction sub-model to obtain image color features that contain overall features and whose sizes decrease in sequence.

[0071] It can be understood that since the target color reconstruction model is able to ensure the encoding quality and improve the compression rate, the first sub-color component, the second sub-color component, the second color component and the third color component are feature extracted based on the target feature extraction sub-model in the target color reconstruction model. The feature richness of the obtained image color features can also ensure that the reconstructed color components of the target data distribution are obtained after color reconstruction of the image color features.

[0072] Exemplarily, the target reconstruction submodel may refer to a reconstruction submodel that has been trained, and includes at least one upper acquisition layer and at least one fusion layer. In some examples, the upsampling multiple of at least one upper acquisition layer may be 2, and may include a bilinear interpolation layer and at least one convolution layer. The disclosed embodiment does not limit the number of at least one convolution layer in the upper acquisition layer and the size, step size, and activation function of the convolution kernel of each convolution layer. The disclosed embodiment takes the example that the upper acquisition layer includes a convolution layer, and the convolution kernel size of the convolution layer is 3, the step size is 1, and the activation function is the ReLU function.

[0073] In some examples, the at least one fusion layer may include a first fusion layer and a second fusion layer, wherein the first fusion layer and the second fusion layer may both be convolution layers with a convolution kernel size of 3, a step size of 1, and an activation function of a ReLU function.

[0074] Exemplarily, taking the example that the target feature extraction submodel includes the first to sixth feature layers, and the target reconstruction submodel includes at least one upper acquisition layer and at least one fusion layer. Performing color reconstruction on the image color features through the target reconstruction submodel in the target color reconstruction model to obtain the reconstructed color component corresponding to the first preset channel may include: splicing the features output by the second feature layer in the target feature extraction submodel and the features output by the target reconstruction submodel including at least one upper acquisition layer along the channel dimension to obtain a spliced ​​feature; then performing feature fusion on the spliced ​​features in turn through each fusion layer in at least one fusion layer, reconstructing the size of the spliced ​​features, and obtaining the image color components corresponding to each preset channel.

[0075] In the disclosed embodiment, since the target color reconstruction model can ensure the encoding quality and improve the compression rate, the first sub-color component, the second sub-color component, the second color component and the third color component are color reconstructed based on the target color reconstruction model, and the data distribution of the reconstructed color component corresponding to the first preset channel obtained can ensure the encoding quality of subsequent image data and improve the compression rate of image data encoding.

[0076] In order to improve the accuracy of color reconstruction of the color reconstruction model, the initial color reconstruction model can be trained in advance to obtain the target color reconstruction model used in the above embodiments. The present disclosure also provides a color reconstruction model training method, such as Figure 4 As shown, the method includes the following steps 401 to 404.

[0077] Step 401 : determining a plurality of sample image data in a first data arrangement mode and sample color components corresponding to each sample image data in a plurality of preset channels.

[0078] Exemplarily, the sample image data may be RAW data collected by multiple vehicles during driving. The sample color components may be obtained by splitting the sample image according to multiple preset channels. In some examples, the first image data in the first data arrangement mode is RAW data in the Bayer arrangement mode of RGGB as an example. Similar to the color components corresponding to the first image data in multiple preset channels, the sample color components corresponding to each sample image data in multiple preset channels may include a first sample color component corresponding to the G channel, a second sample color component corresponding to the B channel, and a third sample color component corresponding to the R channel.

[0079] Exemplarily, the implementation of step 401 is similar to the implementation of step 101, and will not be described in detail in the embodiment of the present disclosure.

[0080] Step 402 , based on the sample color components corresponding to each sample image data in a plurality of preset channels and the initial color reconstruction model, the data arrangement of the sample image data is adjusted to obtain first predicted image data in a second data arrangement.

[0081] In some embodiments of the present disclosure, step 402 may include: performing color reconstruction on sample color components corresponding to multiple preset channels respectively based on an initial color reconstruction model to obtain a predicted reconstructed color component corresponding to a first preset channel among the multiple preset channels; combining the predicted reconstructed color component, a second sample color component corresponding to a second preset channel among the multiple preset channels, and a third sample color component corresponding to a third preset channel among the multiple preset channels to obtain first predicted image data of a second data arrangement method.

[0082] Exemplarily, color reconstruction is performed on sample color components corresponding to multiple preset channels based on the initial color reconstruction model to obtain a predicted reconstructed color component corresponding to a first preset channel among the multiple preset channels; the predicted reconstructed color component, a second sample color component corresponding to a second preset channel among the multiple preset channels, and a third sample color component corresponding to a third preset channel among the multiple preset channels are combined to obtain the first predicted image data of the second data arrangement method. The implementation method can refer to steps 1021 and 1022.

[0083] In some embodiments of the present disclosure, color reconstruction is performed on sample color components corresponding to multiple preset channels respectively based on an initial color reconstruction model to obtain a predicted reconstructed color component corresponding to a first preset channel among the multiple preset channels, which may include: splitting a first sample color component corresponding to a first preset channel among the multiple preset channels to obtain a first sub-sample color component and a second sub-sample color component corresponding to the first preset channel; color reconstruction is performed on the first sub-sample color component, the second sub-sample color component, the second sample color component, and the third sample color component based on the initial color reconstruction model to obtain a predicted reconstructed color component corresponding to the first preset channel; wherein the data amounts of the first sub-sample color component, the second sub-sample color component, the second sample color component, and the third sample color component are the same.

[0084] Exemplarily, a first sample color component corresponding to a first preset channel among multiple preset channels is split to obtain a first sub-sample color component and a second sub-sample color component corresponding to the first preset channel; the first sub-sample color component, the second sub-sample color component, the second sample color component and the third sample color component are color reconstructed based on an initial color reconstruction model to obtain a predicted reconstructed color component corresponding to the first preset channel. For implementation, see steps 301 and 302.

[0085] In some embodiments of the present disclosure, color reconstruction is performed on the first subsample color component, the second subsample color component, the second sample color component and the third sample color component based on an initial color reconstruction model to obtain predicted reconstructed color components corresponding to a first preset channel, which may include: extracting features of the first subsample color component, the second subsample color component, the second color component and the third color component based on an initial feature extraction submodel in the initial color reconstruction model to obtain sample image color features; color reconstructing the sample image color features through the initial reconstruction submodel in the initial color reconstruction model to obtain predicted reconstructed color components corresponding to the first preset channel.

[0086] Exemplarily, based on the initial feature extraction submodel in the initial color reconstruction model, feature extraction is performed on the first sub-sample color component, the second sub-sample color component, the second color component and the third color component to obtain sample image color features; the sample image color features are color reconstructed by the initial reconstruction submodel in the initial color reconstruction model to obtain the predicted reconstructed color component corresponding to the first preset channel. The implementation method is similar to that based on the target feature extraction submodel in the target color reconstruction model, feature extraction is performed on the first sub-color component, the second sub-color component, the second color component and the third color component to obtain image color features; the image color features are color reconstructed by the target reconstruction submodel in the target color reconstruction model to obtain the reconstructed color component corresponding to the first preset channel. The embodiments of the present disclosure are not limited to this.

[0087] Step 403: perform image data processing on the first predicted image data to obtain predicted reconstructed image data corresponding to the sample image data.

[0088] Exemplarily, the predicted reconstructed image data may be predicted first image data. In some examples, the data arrangement of the predicted reconstructed image data is the same as the data arrangement of the first image data, and both are first data arrangements.

[0089] Exemplarily, step 403 may include: firstly performing encoding and decoding processing on the first predicted image data, and then adjusting the data arrangement of the predicted image data after the encoding and decoding processing to obtain the predicted reconstructed image data corresponding to the sample image data.

[0090] Step 404, iteratively training the initial color reconstruction model based on the predicted reconstructed image data and the sample image data to obtain a target color reconstruction model.

[0091] Exemplarily, step 404 may include: using the predicted reconstructed image data as the initial training output of the initial color reconstruction model and the sample image data as the supervision information (i.e., through self-supervision), iteratively training the initial color reconstruction model to obtain a trained color reconstruction model, and determining the trained color reconstruction model as the target color reconstruction model.

[0092] The color reconstruction model training method provided in the embodiment of the present disclosure adopts a self-supervised model training method, takes the quality of encoding and decoding as the optimization goal, and jointly optimizes the color reconstruction method and the back-end encoding and decoding algorithm. In this way, it can ensure that the trained target color reconstruction model can output the color reconstruction components of the target data distribution, thereby ensuring the encoding quality of the image data and improving the compression rate.

[0093] like Figure 5 As shown in the above Figure 4Based on the illustrated embodiment, step 403 may include the following steps 4031 and 4032 .

[0094] Step 4031, encoding and decoding the first predicted image data through the encoding and decoding model to obtain second predicted image data.

[0095] Exemplarily, the codec model may be a pre-trained proxy network.In some examples, the codec model may include an encoder sub-model and a decoder sub-model.

[0096] Exemplarily, the training method of the codec model may include: determining multiple sample images and sample codec images corresponding to each sample image; inputting each sample image into an initial encoder sub-model in the initial codec model to obtain predicted codec image features, and then inputting the predicted codec image features into an initial decoder sub-model in the initial encoder model to obtain a predicted codec image; then using the predicted codec image as the initial training output of the initial codec model and the sample codec image as supervision information, iteratively training the initial codec model to obtain a trained codec model.

[0097] In some examples, determining the sample codec image corresponding to each sample image may include: inputting each sample image into a standard encoder (hardware circuit) to obtain a sample encoded image, then inputting the sample encoded image into a standard decoder (hardware circuit) to obtain a sample decoded image, and using the sample decoded image as the sample codec image.

[0098] In some examples, the loss function of the encoding and decoding model can be the following formula (1).

[0099]

[0100] Where R represents the bit rate of the standard encoder; represents a sample decoded image output by a standard decoder; represents the output prediction codec image of the codec model; D=d(,) represents the mean square error (MSE) loss; λ represents the proportional adjustment factor of the codec model.

[0101] Step 4032: Adjust the data arrangement of the second predicted image data from the second data arrangement to the first data arrangement, and obtain predicted reconstructed image data corresponding to the sample image data.

[0102] Exemplarily, the implementation of step 4032 is similar to the implementation of step 104, and will not be described in detail in this embodiment of the present disclosure.

[0103] In the disclosed embodiment, the first predicted image data is encoded and decoded through the codec model to obtain the second predicted image data. Not only is the solution relatively simple, but it can also solve some non-differentiable operations (including parameter updates, gradient feedback, etc.), and directly perform joint optimization with the color reconstruction model to achieve end-to-end optimization of the entire codec system.

[0104] like Figure 6 As shown in the above Figure 4 Based on the illustrated embodiment, step 404 may include the following steps 4041 to 4043.

[0105] Step 4041, determining the bit rate corresponding to the sample image data, and the image data difference value between the sample image data and the predicted reconstructed image data.

[0106] For example, the code rate corresponding to the sample image data can be determined according to the compression rate requirement. p express.

[0107] In some examples, determining the bit rate corresponding to the sample image data may include: querying a preset bit rate by means of a bit rate query instruction.

[0108] Exemplarily, determining the image data difference value between the sample image data and the predicted reconstructed image data may include calculating the MSE loss between the sample image data and the predicted reconstructed image data.

[0109] Step 4042, determining the loss value according to the bit rate corresponding to the sample image data and the image data difference value.

[0110] Exemplarily, the loss value may be calculated by a loss function of a color reconstruction model. In some examples, the loss function of the color reconstruction model may be the following formula (2).

[0111]

[0112] in, represents sample image data; Represents the predicted reconstructed image data; p Represents the scaling factor of the color reconstruction model.

[0113] Step 4043, iteratively update the initial color reconstruction model according to the loss value to obtain the target color reconstruction model.

[0114] For example, step 4043 may include: continuously iteratively optimizing the initial color reconstruction model according to the loss value until the loss value satisfies a preset convergence condition, thereby obtaining a color reconstruction model for de-mosaicing corresponding to high-quality encoding.

[0115] In the disclosed embodiment, since the loss value includes not only the bit rate corresponding to the sample image data but also the image data difference value between the sample image data and the predicted reconstructed image data, the target color reconstruction model obtained by iteratively updating the initial color reconstruction model according to the loss value can ensure the image encoding quality and improve the compression rate.

[0116] Exemplary Devices

[0117] Figure 7 FIG. 1 is a schematic diagram of the composition structure of an image processing device provided by an exemplary embodiment of the present disclosure. Figure 7 As shown, the image processing device 70 may include a first determination module 701 , a first adjustment module 702 , a codec processing module 703 and a second adjustment module 704 .

[0118] A first determination module 701 is used to determine first image data of a first data arrangement mode to be processed, and color components corresponding to the first image data in a plurality of preset channels;

[0119] A first adjustment module 702 is used to adjust the data arrangement of the first image data based on the color components corresponding to the first image data in a plurality of preset channels and the target color reconstruction model, so as to obtain second image data in a second data arrangement;

[0120] The encoding and decoding processing module 703 is used to perform encoding and decoding processing on the second image data to obtain third image data;

[0121] The second adjustment module 704 is used to adjust the data arrangement of the third image data from the second data arrangement to the first data arrangement to obtain reconstructed image data corresponding to the first image data.

[0122] In some embodiments, Figure 8 As shown in the above Figure 7 Based on the illustrated embodiment, the first adjustment module 702 may include a color reconstruction unit 7021 and a combination unit 7022 .

[0123] A color reconstruction unit 7021 is used to perform color reconstruction on color components corresponding to a plurality of preset channels respectively based on a target color reconstruction model to obtain a reconstructed color component corresponding to a first preset channel among the plurality of preset channels;

[0124] The combining unit 7022 is used to combine the reconstructed color component, the second color component corresponding to the second preset channel among the multiple preset channels, and the third color component corresponding to the third preset channel among the multiple preset channels to obtain second image data.

[0125] In some embodiments, Fig. 9 As shown in the above Figure 8 Based on the illustrated embodiment, the color reconstruction unit 7021 may include a splitting subunit 901 and a color reconstruction subunit 902 .

[0126] The splitting subunit 901 is used to split a first color component corresponding to a first preset channel among the multiple preset channels to obtain a first sub-color component and a second sub-color component corresponding to the first preset channel;

[0127] The color reconstruction subunit 902 is used to perform color reconstruction on the first sub-color component, the second sub-color component, the second color component and the third color component based on the target color reconstruction model to obtain the reconstructed color component corresponding to the first preset channel; wherein the data amount of the first sub-color component, the second sub-color component, the second color component and the third color component is the same.

[0128] In some embodiments, the color reconstruction subunit 902 is specifically used to perform feature extraction on the first sub-color component, the second sub-color component, the second color component and the third color component based on the target feature extraction submodel in the target color reconstruction model to obtain image color features; perform color reconstruction on the image color features through the target reconstruction submodel in the target color reconstruction model to obtain the reconstructed color component corresponding to the first preset channel.

[0129] Regarding an image processing device in the above embodiment, the specific manner in which each module performs operations and the corresponding beneficial effects have been described in detail in the corresponding embodiment part of the aforementioned image processing method part. Please refer to the corresponding execution operation manner and beneficial technical effects of the above exemplary method part, which will not be repeated here.

[0130] Fig.10 FIG. 1 is a schematic diagram of the composition structure of a color reconstruction model training device provided by an exemplary embodiment of the present disclosure. Fig.10 As shown, the color reconstruction model training device 100 may include: a second determination module 1001 , a third adjustment module 1002 , an image processing module 1003 and a training module 1004 .

[0131] The second determination module 1001 is used to determine a plurality of sample image data in a first data arrangement mode and sample color components corresponding to each sample image data in a plurality of preset channels;

[0132] The third adjustment module 1002 is used to adjust the data arrangement of the sample image data based on the sample color components and the initial color reconstruction model corresponding to each sample image data in multiple preset channels, so as to obtain the first predicted image data in the second data arrangement;

[0133] An image processing module 1003 is used to perform image data processing on the first predicted image data to obtain predicted reconstructed image data corresponding to the sample image data;

[0134] The training module 1004 is used to iteratively train the initial color reconstruction model based on the predicted reconstructed image data and the sample image data to obtain a target color reconstruction model.

[0135] In some embodiments, Fig.11 As shown in the above Fig.10 Based on the illustrated embodiment, the image processing module 1003 may include: a coding and decoding processing unit 1101 and an adjustment unit 1102 .

[0136] The encoding and decoding processing unit 1101 is used to perform encoding and decoding processing on the first predicted image data through the encoding and decoding model to obtain second predicted image data.

[0137] The adjusting unit 1102 is used to adjust the data arrangement mode of the second predicted image data from the second data arrangement mode to the first data arrangement mode, so as to obtain the predicted reconstructed image data corresponding to the sample image data.

[0138] In some embodiments, Fig.12 As shown in the above Fig.10 On the basis of the illustrated embodiment, the training module 1004 includes: a first determination unit 1201 , a second determination unit 1202 and an iteration unit 1203 .

[0139] A first determining unit 1201 is used to determine a bit rate corresponding to the sample image data and an image data difference value between the sample image data and the predicted reconstructed image data;

[0140] A second determining unit 1202 is used to determine a loss value according to a bit rate corresponding to the sample image data and the image data difference value;

[0141] The iterative unit 1203 is used to iteratively update the initial color reconstruction model according to the loss value to obtain the target color reconstruction model.

[0142] Regarding a color reconstruction model training device in the above embodiment, the specific manner in which each module performs operations and the corresponding beneficial effects have been described in detail in the corresponding embodiment part of the aforementioned color reconstruction model training method part. Please refer to the corresponding execution operation manner and beneficial technical effects of the above exemplary method part, which will not be repeated here.

[0143] Exemplary Electronic Devices

[0144] Fig.13is a schematic diagram of a composition structure of an electronic device provided by an exemplary embodiment of the present disclosure, such as Fig.13 As shown, the electronic device 130 includes one or more processors 1301 and a memory 1302 .

[0145] The processor 1301 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 130 to perform desired functions.

[0146] The memory 1302 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor 1301 may run the program instructions to implement the image processing method or color reconstruction model training method of each embodiment of the present application described above and / or other desired functions.

[0147] In one example, the electronic device 130 may further include: an input device 1303 and an output device 1304 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0148] Of course, to simplify, Fig.13 Only some of the components related to the present application in the electronic device 130 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 130 may also include any other appropriate components.

[0149] Exemplary computer program products and computer-readable storage media

[0150] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the image processing method or color reconstruction model training method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0151] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0152] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the image processing method or color reconstruction model training method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0153] Computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0154] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0155] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0156] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0157] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0158] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. An image processing method, comprising: Determine first image data of a first data arrangement mode to be processed, and color components corresponding to the first image data in a plurality of preset channels; Based on the color components of the first image data respectively corresponding to a plurality of preset channels and a target color reconstruction model, adjusting the data arrangement of the first image data to obtain second image data in a second data arrangement; Performing encoding and decoding processing on the second image data to obtain third image data; The data arrangement mode of the third image data is adjusted from the second data arrangement mode to the first data arrangement mode to obtain reconstructed image data corresponding to the first image data.

2. The method according to claim 1, wherein: The step of adjusting the data arrangement of the first image data based on the color components and the target color reconstruction model respectively corresponding to the plurality of preset channels of the first image data to obtain the second image data in the second data arrangement comprises: Performing color reconstruction on the color components respectively corresponding to the plurality of preset channels based on the target color reconstruction model to obtain a reconstructed color component corresponding to a first preset channel among the plurality of preset channels; The reconstructed color component, the second color component corresponding to the second preset channel among the multiple preset channels, and the third color component corresponding to the third preset channel among the multiple preset channels are combined to obtain the second image data.

3. The method according to claim 2, wherein: The color reconstruction is performed on the color components respectively corresponding to the plurality of preset channels based on the target color reconstruction model to obtain a reconstructed color component corresponding to a first preset channel among the plurality of preset channels, including: Splitting a first color component corresponding to a first preset channel among the multiple preset channels to obtain a first sub-color component and a second sub-color component corresponding to the first preset channel; Performing color reconstruction on the first sub-color component, the second sub-color component, the second color component, and the third color component based on the target color reconstruction model to obtain a reconstructed color component corresponding to the first preset channel; The data amounts of the first sub-color component, the second sub-color component, the second color component and the third color component are the same.

4. The method according to claim 3, wherein: The performing color reconstruction on the first sub-color component, the second sub-color component, the second color component, and the third color component based on the target color reconstruction model to obtain the reconstructed color component corresponding to the first preset channel includes: Performing feature extraction on the first sub-color component, the second sub-color component, the second color component, and the third color component based on a target feature extraction sub-model in the target color reconstruction model to obtain image color features; The color features of the image are reconstructed using a target reconstruction sub-model in the target color reconstruction model to obtain a reconstructed color component corresponding to the first preset channel.

5. A color reconstruction model training method, comprising: Determine a plurality of sample image data in a first data arrangement mode and sample color components corresponding to each of the sample image data in a plurality of preset channels; Based on the sample color components and the initial color reconstruction model respectively corresponding to each of the sample image data in the plurality of preset channels, the data arrangement of the sample image data is adjusted to obtain first predicted image data in a second data arrangement; Performing image data processing on the first predicted image data to obtain predicted reconstructed image data corresponding to the sample image data; Based on the predicted reconstructed image data and the sample image data, the initial color reconstruction model is iteratively trained to obtain a target color reconstruction model.

6. The method according to claim 5, wherein: The performing image data processing on the first predicted image data to obtain predicted reconstructed image data corresponding to the sample image includes: Performing encoding and decoding processing on the first predicted image data through a coding and decoding model to obtain the second predicted image data; The data arrangement mode of the second predicted image data is adjusted from the second data arrangement mode to the first data arrangement mode to obtain predicted reconstructed image data corresponding to the sample image data.

7. The method according to any one of claims 5 or 6, wherein: The iteratively training the initial color reconstruction model based on the predicted reconstructed image data and the sample image data to obtain a target color reconstruction model includes: Determining a bit rate corresponding to the sample image data and an image data difference value between the sample image data and the predicted reconstructed image data; Determining a loss value according to a bit rate corresponding to the sample image data and a difference value of the image data; The initial color reconstruction model is iteratively updated according to the loss value to obtain the target color reconstruction model.

8. An image processing device, comprising: A first determination module, used to determine first image data of a first data arrangement mode to be processed, and color components corresponding to the first image data in a plurality of preset channels; A first adjustment module is used to adjust the data arrangement of the first image data based on the color components corresponding to the first image data in a plurality of preset channels and a target color reconstruction model, so as to obtain second image data in a second data arrangement; A coding and decoding processing module, used for performing coding and decoding processing on the second image data to obtain third image data; The second adjustment module is used to adjust the data arrangement of the third image data from the second data arrangement to the first data arrangement to obtain reconstructed image data corresponding to the first image data.

9. A color reconstruction model training device, comprising: A second determination module is used to determine a plurality of sample image data in a first data arrangement mode and sample color components corresponding to each of the sample image data in a plurality of preset channels; A third adjustment module is used to adjust the data arrangement of the sample image data based on the sample color components and the initial color reconstruction model respectively corresponding to the plurality of preset channels of each sample image data, so as to obtain first predicted image data of a second data arrangement; An image processing module, used for performing image data processing on the first predicted image data to obtain predicted reconstructed image data corresponding to the sample image data; A training module is used to iteratively train the initial color reconstruction model based on the predicted reconstructed image data and the sample image data to obtain a target color reconstruction model.

10. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the image processing method described in any one of claims 1 to 4, or the computer program is used to execute the color reconstruction model training method described in any one of claims 5 to 7.

11. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the image processing method described in any one of claims 1 to 4, or the color reconstruction model training method described in any one of claims 5 to 7.