Data processing method, image enhancement method and model training method thereof
By receiving user request data, extracting training images and performing enhancement processing, combined with parameter adjustment of image enhancement model, the area smoothing and defect problems of convolutional neural networks in image and video enhancement are solved, achieving a more significant enhancement effect.
Patent Information
- Application Number
- CN202010208572.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2040-03-23
AI Technical Summary
In the prior art, when convolutional neural networks are used for image and video enhancement, there are problems of regional smoothing and image/video defects, resulting in insufficient enhancement effect.
A data processing method is provided, by receiving user request data, extracting training images, and enhancing the images according to preset enhancement algorithms. At the same time, input the image to the image enhancement model and adjust the model parameters to improve the enhancement effect.
By adjusting the parameters of the image enhancement model, the enhancement effect of images and video can be significantly improved, the area smoothing and defect problems can be solved, and the user's needs for visual effects can be met.
Smart Images

Figure BDA0002422026220000221 
Figure HDA0002422026230000011 
Figure HDA0002422026230000021
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a data processing method, an image enhancement method, and an image enhancement model training method. Background Art
[0002] With the development of Internet technology, the visual enhancement of images and videos has received more and more attention. When displayed on a display device, the image or video to be displayed will be enhanced before display to improve the visual effect for the user. The enhancement of the image or video to be displayed is usually achieved by using a convolutional neural network. However, although the output of the convolutional neural network can achieve the effect of image or video enhancement, there are problems such as regional smoothing or image / video defects, and the enhancement effect is not obvious. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention
[0003] In view of this, the embodiments of this specification provide a data processing method and a data processing device; at the same time, they involve an image enhancement method, an image enhancement device, an image enhancement model training method, an image enhancement model training device, three computing devices, and three computer-readable storage media to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, a data processing method is provided, including:
[0005] Receive request data uploaded by a user, wherein the request data includes a model training request;
[0006] Extracting a training image according to the request data, wherein the training image is used for model training;
[0007] According to a preset enhancement algorithm, the training image is enhanced to obtain a first image, and the training image is input into an image enhancement model to obtain a second image;
[0008] Adjusting parameters of the image enhancement model according to the first image and the second image;
[0009] The adjusted parameters of the image enhancement model are shown.
[0010] Optionally, after the step of extracting a training image according to the request data is executed, and the step of enhancing the training image according to a preset enhancement algorithm to obtain a first image, and inputting the training image into an image enhancement model, and before the step of obtaining a second image is executed, the method further includes:
[0011] displaying the training image to the user;
[0012] When receiving an adjustment request submitted by the user for the training image, adjusting the training image according to the adjustment request to obtain a target training image;
[0013] Accordingly, the step of performing enhancement processing on the training image according to a preset enhancement algorithm to obtain a first image, and inputting the training image into an image enhancement model to obtain a second image includes:
[0014] According to the preset enhancement algorithm, the target training image is enhanced to obtain the first image, and the target training image is input into the image enhancement model to obtain the second image.
[0015] Optionally, the step of performing enhancement processing on the training image according to a preset enhancement algorithm to obtain the first image includes:
[0016] Determining at least one training image dimension among the image dimensions based on image parameters of the training image in each image dimension;
[0017] According to the enhancement algorithm preset for the training image dimension, the training image is enhanced to obtain the first image.
[0018] Optionally, inputting the training image into an image enhancement model to obtain a second image includes:
[0019] Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result;
[0020] The image to be enhanced is input into the image enhancement model for image enhancement processing to obtain the second image.
[0021] Optionally, adjusting parameters of the image enhancement model according to the first image and the second image includes:
[0022] Determining a parameter to be enhanced of the second image based on a loss of the second image relative to the first image;
[0023] The parameters of the image enhancement model are adjusted according to the parameters to be enhanced.
[0024] Optionally, after the step of displaying the adjusted parameters of the image enhancement model is performed, the method further includes:
[0025] receiving adjustment data uploaded by the user, wherein the adjustment data includes a parameter adjustment request;
[0026] Determining a target parameter corresponding to the adjustment data among the parameters of the adjusted image enhancement model, and adjusting the target parameter according to the parameter adjustment request;
[0027] The adjusted target parameters of the image enhancement model are shown.
[0028] According to a second aspect of an embodiment of this specification, there is provided a data processing device, including:
[0029] A receiving module is configured to receive request data uploaded by a user, wherein the request data includes a model training request;
[0030] An extraction module is configured to extract a training image according to the request data, wherein the training image is used for model training;
[0031] an enhancement module, configured to perform enhancement processing on the training image according to a preset enhancement algorithm to obtain a first image, and input the training image into an image enhancement model to obtain a second image;
[0032] an adjustment module, configured to adjust parameters of the image enhancement model according to the first image and the second image;
[0033] The display module is configured to display the adjusted parameters of the image enhancement model.
[0034] According to a third aspect of the embodiments of this specification, there is provided an image enhancement method, comprising:
[0035] Get the image to be processed;
[0036] Inputting the image to be processed into a target image enhancement model for image enhancement processing;
[0037] Obtaining a target image corresponding to the image to be processed output by the target image enhancement model;
[0038] Among them, the target image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, and optimizes the image enhancement model according to the loss of the enhancement algorithm for enhancing the training image according to the input of the training image into the image enhancement model for enhancement processing relative to the training image dimension.
[0039] Optionally, the training image dimension is determined by:
[0040] Determine real image parameters of the real image in each of the image dimensions, and training image parameters of the training image in each of the image dimensions;
[0041] Comparing the training image parameters with the real image parameters;
[0042] The training image dimension is determined in the image dimension according to the comparison result.
[0043] Optionally, the process of performing enhancement processing on the training image by the enhancement algorithm of the training image dimension is as follows:
[0044] Extracting image parameters of the training image corresponding to the training image dimension;
[0045] Adjusting the image parameters according to the enhancement algorithm preset for the training image dimension, and obtaining the first image according to the adjustment result;
[0046] The first image is determined as a result of an enhancement algorithm of the training image dimension performing enhancement processing on the training image.
[0047] Optionally, the process of the image enhancement model performing enhancement processing on the training image is as follows:
[0048] Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result;
[0049] Inputting the image to be enhanced into the image enhancement model for image enhancement processing to obtain the second image;
[0050] The second image is determined as a result of the image enhancement model performing enhancement processing on the training image.
[0051] Optionally, the process of optimizing the image enhancement model is as follows:
[0052] constructing a first matrix based on the first image, and constructing a second matrix based on the second image;
[0053] Calculate the Euclidean distance between the first matrix and the second matrix to determine the loss of the second image relative to the first image;
[0054] The image enhancement model is optimized according to the loss of the second image relative to the first image.
[0055] According to a fourth aspect of the embodiments of this specification, there is provided an image enhancement device, comprising:
[0056] An acquisition module is configured to acquire an image to be processed;
[0057] An input module is configured to input the image to be processed into a target image enhancement model for image enhancement processing;
[0058] An output module, configured to obtain a target image corresponding to the image to be processed output by the target image enhancement model;
[0059] Among them, the target image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, and optimizes the image enhancement model according to the loss of the enhancement algorithm for enhancing the training image according to the input of the training image into the image enhancement model for enhancement processing relative to the training image dimension.
[0060] According to a fifth aspect of the embodiments of this specification, there is provided an image enhancement model training method, comprising:
[0061] Acquire at least one image set as a training sample; the training images contained in the image set have corresponding real images;
[0062] Determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension;
[0063] Performing enhancement processing on the training image according to an enhancement algorithm preset for the training image dimension to obtain a first image, and inputting the training image into an image enhancement model to perform image enhancement processing to obtain a second image;
[0064] The image enhancement model is optimized according to the loss of the second image relative to the first image.
[0065] Optionally, determining at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension includes:
[0066] Determine real image parameters of the real image in each of the image dimensions, and training image parameters of the training image in each of the image dimensions;
[0067] Comparing the training image parameters with the real image parameters;
[0068] The at least one training image dimension is determined in the image dimensions according to the comparison result.
[0069] Optionally, performing enhancement processing on the training image according to an enhancement algorithm preset according to the training image dimension to obtain the first image includes:
[0070] Extracting image parameters of the training image corresponding to the training image dimension;
[0071] The image parameters are adjusted according to the enhancement algorithm preset for the training image dimension, and the first image is obtained according to the adjustment result.
[0072] Optionally, inputting the training image into an image enhancement model for image enhancement processing to obtain a second image includes:
[0073] Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result;
[0074] The image to be enhanced is input into the image enhancement model for image enhancement processing to obtain the second image.
[0075] Optionally, the image enhancement model is trained in the following manner:
[0076] Construct training image samples based on the model real images corresponding to the model training images;
[0077] The training image samples are input into an initial image enhancement model for training to obtain the image enhancement model, wherein the initial image enhancement model is constructed based on the relationship between the model training image and the model real image.
[0078] Optionally, the loss of the second image relative to the first image is determined by:
[0079] constructing a first matrix based on the first image, and constructing a second matrix based on the second image;
[0080] The Euclidean distance between the first matrix and the second matrix is calculated to determine the loss of the second image relative to the first image.
[0081] Optionally, the optimizing the image enhancement model includes:
[0082] Determining a parameter to be enhanced of the second image based on a loss of the second image relative to the first image;
[0083] The corresponding model parameters in the image enhancement model are adjusted according to the parameters to be enhanced.
[0084] Optionally, after the step of optimizing the image enhancement model according to the loss of the second image relative to the first image is performed, the method further includes:
[0085] Obtaining a target image enhancement model according to a result of optimizing the image enhancement model;
[0086] Selecting a test image from a preset test image set and inputting it into the target image enhancement model for enhancement processing to obtain a predicted image corresponding to the test image;
[0087] Comparing the target image corresponding to the test image with the predicted image;
[0088] When the comparison result is qualified, the target image enhancement model is stored.
[0089] Optionally, the enhancement algorithm includes at least one of the following:
[0090] Guided filtering algorithm, contrast linear stretching algorithm, adaptive histogram equalization algorithm, non-local mean algorithm, sharpening algorithm, bilateral filtering algorithm.
[0091] According to a sixth aspect of the embodiments of this specification, there is provided an image enhancement model training device, including:
[0092] An acquisition module is configured to acquire at least one image set as a training sample; the training images contained in the image set have corresponding real images;
[0093] a determination module configured to determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension;
[0094] an enhancement module, configured to perform enhancement processing on the training image according to an enhancement algorithm preset for the training image dimension to obtain a first image, and to input the training image into an image enhancement model for image enhancement processing to obtain a second image;
[0095] The optimization module is configured to optimize the image enhancement model according to the loss of the second image relative to the first image.
[0096] According to a seventh aspect of an embodiment of this specification, a first computing device is provided, including:
[0097] Memory and processor;
[0098] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions:
[0099] Receive request data uploaded by a user, wherein the request data includes a model training request;
[0100] Extracting a training image according to the request data, wherein the training image is used for model training;
[0101] According to a preset enhancement algorithm, the training image is enhanced to obtain a first image, and the training image is input into an image enhancement model to obtain a second image;
[0102] Adjusting parameters of the image enhancement model according to the first image and the second image;
[0103] The adjusted parameters of the image enhancement model are shown.
[0104] According to an eighth aspect of the embodiments of this specification, a second computing device is provided, including:
[0105] Memory and processor;
[0106] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions:
[0107] Get the image to be processed;
[0108] Inputting the image to be processed into a target image enhancement model for image enhancement processing;
[0109] Obtaining a target image corresponding to the image to be processed output by the target image enhancement model;
[0110] Among them, the target image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, and optimizes the image enhancement model according to the loss of the enhancement algorithm for enhancing the training image according to the input of the training image into the image enhancement model for enhancement processing relative to the training image dimension.
[0111] According to a ninth aspect of the embodiments of this specification, a third computing device is provided, including:
[0112] Memory and processor;
[0113] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions:
[0114] Acquire at least one image set as a training sample; the training images contained in the image set have corresponding real images;
[0115] Determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension;
[0116] Performing enhancement processing on the training image according to an enhancement algorithm preset for the training image dimension to obtain a first image, and inputting the training image into an image enhancement model to perform image enhancement processing to obtain a second image;
[0117] The image enhancement model is optimized according to the loss of the second image relative to the first image.
[0118] According to the tenth aspect of the embodiments of this specification, there is provided a first computer-readable storage medium storing computer-executable instructions, which implement the steps of the data processing method when executed by a processor.
[0119] According to an eleventh aspect of the embodiments of this specification, a second computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the image enhancement method are implemented.
[0120] According to the twelfth aspect of the embodiments of this specification, a third computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the image enhancement model training method are implemented.
[0121] A data processing method provided in an embodiment of the present specification, upon receiving request data including a model training request submitted by a user for an image enhancement model, extracts a training image according to the request data, and enhances the training image according to a preset enhancement algorithm to obtain a first image, and simultaneously inputs the training image into the image enhancement model to obtain a second image, and then adjusts the parameters of the image enhancement model according to the first image and the second image, and displays the adjusted model parameters to the user, thereby improving the enhancement effect of the image enhancement model, and the parameter adjustment direction of the image enhancement model corresponds to the model training request of the user, so that the image enhancement model after the parameter adjustment can output an enhanced image that meets the user's needs, further improving the user experience.
[0122] An image enhancement method provided in an embodiment of the present specification determines the training image dimension by inputting the image to be processed into an image enhancement model using image parameters of the training image and the real image in each image dimension, performs enhancement processing on the training image according to the loss of the enhancement algorithm for the training image dimension, optimizes the image enhancement model to obtain a target image enhancement model, obtains the target image, and achieves improved enhancement effect on the image to be processed, thereby ensuring that the visual effect of the enhanced image is significantly improved.
[0123] An image enhancement model training method provided in an embodiment of the present specification determines at least one training image dimension based on image parameters of training images in at least one image set serving as training samples and their corresponding real images in each image dimension, enhances the training image according to the enhancement algorithm of the training image dimension to obtain a first image, and simultaneously inputs the training image into the image enhancement model to obtain a second image, and optimizes the image enhancement model based on the loss between the first image and the second image to obtain an image enhancement model with a higher output accuracy, thereby achieving better visual effects after image enhancement when the optimized image enhancement model is used for image enhancement, and optimizing the image enhancement model through the loss between the first image and the second image, so that the optimized image enhancement model can accurately determine the enhanced image dimension of the image to be enhanced, thereby ensuring that the enhanced image will not have the problem of over-enhancement while ensuring the display effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0124] Figure 1 is a flow chart of a data processing method provided by an embodiment of this specification;
[0125] Figure 2 It is a structural schematic diagram of a data processing method provided in an embodiment of this specification;
[0126] Figure 3 is a flow chart of an image enhancement method provided in an embodiment of this specification;
[0127] Figure 4 is a structural schematic diagram of an image enhancement method provided in an embodiment of this specification;
[0128] Figure 5 is a flowchart of an image enhancement model training method provided in an embodiment of this specification;
[0129] Figure 6 It is a structural diagram of an image enhancement model training method provided in an embodiment of this specification;
[0130] Figure 7 is a schematic diagram of an optimization process in an image enhancement model training method provided in an embodiment of this specification;
[0131] Figure 8 It is a structural schematic diagram of a data processing device provided in an embodiment of this specification;
[0132] Fig. 9 is a structural schematic diagram of an image enhancement device provided in an embodiment of this specification;
[0133] Fig.10It is a structural schematic diagram of an image enhancement model training device provided in an embodiment of this specification;
[0134] Fig.11 is a structural block diagram of a first computing device provided in an embodiment of this specification;
[0135] Fig.12 is a structural block diagram of a second computing device provided in an embodiment of this specification;
[0136] Fig.13 It is a structural block diagram of a third computing device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0137] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0138] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0139] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0140] In this specification, a data processing method and a data processing device are provided; at the same time, an image enhancement method, an image enhancement device, an image enhancement model training method, an image enhancement model training device, three computing devices, and three computer-readable storage media are involved, which are described in detail one by one in the following embodiments.
[0141] Figure 1 A flowchart of a data processing method provided according to an embodiment of this specification is shown. Figure 2A schematic diagram of a data processing method according to an embodiment of the present invention is shown. Figure 1 The specific steps include:
[0142] Step 102: Receive request data uploaded by the user.
[0143] In actual applications, as users' pursuit of visual effects of images or videos deepens, many users will choose to build image enhancement models on platforms that provide image enhancement services in order to obtain enhanced images that meet their own intentions, so that when image enhancement is needed, they can obtain enhanced images with better display effects through the platform. However, most platforms use neural networks to achieve image enhancement. Because the output results of the neural network are too smooth, although the image can be enhanced, it is easy to cause the loss of details, making the image tend to the mean, and the effect cannot meet the user's demand standards. In addition, the training process of the neural network is relatively simple, and the output results are difficult to meet the user's image enhancement needs.
[0144] See also Figure 2 As shown, the data processing method provided in this embodiment can adjust the parameters of the image enhancement model according to the needs of the user in order to provide image enhancement processing services to the user, so that the image enhancement model can output an enhanced image that meets the user's needs, extract a training image through the request data submitted by the user, and enhance the training image according to a preset enhancement algorithm to obtain a first image, and input the training image into the image enhancement model to obtain a second image, and then adjust the parameters of the image enhancement model according to the first image and the second image, and display the adjusted model parameters to the user, thereby improving the enhancement effect of the image enhancement model, and the parameter adjustment direction of the image enhancement model corresponds to the user's model training request, so that the image enhancement model with the adjusted parameters can output an enhanced image that meets the user's needs, further improving the user experience.
[0145] In specific implementation, the request data includes a model training request; the model training request refers to a request for training an image enhancement model, and the image enhancement model refers to a model that has a matching relationship with the user. The platform equipped with the model can train or optimize the model according to the needs of the user, so that the output effect of the image enhancement model finally obtained better meets the needs of the user;
[0146] Furthermore, when the user submits request data for the image enhancement model, it means that the image enhancement effect of the image enhancement model at this time cannot meet the user's needs, and a subsequent model parameter adjustment process is required according to the request data.
[0147] Step 104: extracting a training image according to the request data.
[0148] Specifically, based on the above-mentioned receipt of the request data containing the model training request, further, a training image is extracted according to the request data; wherein the training image is used for model training.
[0149] During specific implementation, the training image refers to an image used in the process of training the image enhancement model, and in the process of extracting the training image according to the request data, since the user is training the image enhancement model purposefully, the training image extracted at this time has a corresponding relationship with the request data. For example, the color enhancement effect of the image enhancement model is poor. At this time, the user needs to adjust the model parameters corresponding to the color dimension in the image enhancement model. When the request data submitted by the user contains a color training request, the training image of the color enhancement dimension of the training image enhancement model will be extracted according to the request for subsequent model optimization, so that the optimized model can meet the user's requirements for color enhancement effect.
[0150] In addition, after extracting the training image corresponding to the request data, in order to further ensure that the parameter adjustment result of the subsequent image enhancement model meets the needs of the user, the training image can be displayed to the user at this time, and the user can adjust the training image according to the needs. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0151] displaying the training image to the user;
[0152] When receiving an adjustment request submitted by the user for the training image, adjusting the training image according to the adjustment request to obtain a target training image;
[0153] After obtaining the target training image, further, the following step 106 will be executed to enhance the training image according to a preset enhancement algorithm to obtain a first image, and input the training image into an image enhancement model to obtain a second image; step 106 specifically refers to enhancing the target training image according to the preset enhancement algorithm to obtain the first image, and inputting the target training image into the image enhancement model to obtain the second image.
[0154] In practical applications, after extracting the training image corresponding to the request data, the training image can be displayed to the user, and it is detected whether an adjustment request submitted by the user for the training image is received within a preset time period. If so, it means that the user needs to adjust the training image at this time, indicating that if the extracted training image is used for subsequent training of the image enhancement model, it may cause the training result to not meet the user's needs. At this time, the user can make adjustments to the training image; according to the adjustment request submitted by the user, the training image is adjusted to obtain the target training image, and the parameters of the image enhancement model are subsequently adjusted by using the target training image to obtain a model that better meets the user's needs;
[0155] If not, it means that the user does not need to adjust the training image, indicating that if the extracted training image is used for subsequent image enhancement model training, an image enhancement model that meets the user's needs can be obtained, and the subsequent step 106 can be executed.
[0156] In the specific implementation, the training image is adjusted, specifically referring to adding or deleting sub-training images in the training image that do not meet the user's needs, so that the images finally used for training the model are all training images that meet the user's needs, which can ensure that the final adjustment direction meets the user's needs.
[0157] In summary, after the training image is extracted, in order to ensure that the final parameter adjustment result of the image enhancement model meets the user's needs, during this period, the training image can be displayed to the user to ask the user whether there is any adjustment requirement for the training image. When an adjustment request is received, the training image is directly processed according to the adjustment request to obtain the target training image, thereby further improving the user experience.
[0158] Step 106: enhance the training image according to a preset enhancement algorithm to obtain a first image, and input the training image into an image enhancement model to obtain a second image.
[0159] Specifically, based on the above-mentioned extraction of the training image, the training image is further enhanced according to a preset enhancement algorithm, and is enhanced by an image enhancement model to obtain a first image and a second image.
[0160] In practical applications, in the process of enhancing the training image according to a preset enhancement algorithm, the real image corresponding to the training image can be extracted, at least one training image dimension can be determined according to image parameters of the real image and the training image in each image dimension, and then the training image can be enhanced according to the enhancement algorithm preset for the training image dimension to obtain a first image;
[0161] Among them, at least one training image dimension corresponds to the request data, specifically when the user submits request data for the image enhancement model, the request data will carry the direction of training the image enhancement model, such as instructing to adjust the parameters of the color enhancement direction of the model. At this time, the extracted training image also corresponds to the request data, so at least one training image dimension determined based on the training image and the real image also corresponds to the training request.
[0162] Moreover, in the process of optimizing the image enhancement model, when the model is optimized according to the user's request data, the enhancement effect of the image enhancement model in other dimensions may decrease. For example, adjusting the color parameters of the image enhancement model may reduce the effect of the image enhancement model in the pixel dimension. At this time, the enhancement effect of the image enhancement model will deviate from the user's needs. In order to avoid this situation, in the process of extracting the training image corresponding to the request data, the enhancement effect of the extracted training image in other dimensions can be adjusted, so that the image enhancement model can also fine-tune the enhancement effects of other dimensions during the optimization process, thereby making the enhancement effect of the model better.
[0163] In a specific implementation, the training image dimension may be one or more. When the training image dimension is one, it means that the effect of the training image relative to its corresponding real image in one image dimension is different. When the training image dimension is multiple, it means that the effect of the training image relative to its corresponding real image in multiple image dimensions is different. The image dimension may include at least one of the following: image smoothing dimension, image edge dimension, image grayscale dimension, image equalization dimension, image pixel dimension and image sharpening dimension.
[0164] For example, the clarity parameter of the real image in the image clarity dimension is a1, the color parameter in the image color dimension is b1, and the sharpening parameter in the image sharpening dimension is c1. At this time, the image dimensions are determined to be the image clarity dimension, the image color dimension, and the image sharpening dimension. Correspondingly, the clarity parameter of the training image in the image clarity dimension is a2, the color parameter in the image color dimension is b2, and the sharpening parameter in the image sharpening dimension is c2, where c2 is less than c1, indicating that the effect of the training image in the sharpening dimension is different from the display effect of the real image in the sharpening dimension. At this time, it can be determined that the sharpening dimension is the training image dimension, and the parameters of the training image in this dimension need to be adjusted subsequently to achieve image enhancement processing of the training image in this dimension.
[0165] In summary, by comparing the image parameters corresponding to the training image and the real image, the image parameters with differences between the two can be determined, and the dimension to which the image parameters with differences belong is determined as the training image dimension, which facilitates the subsequent accurate enhancement processing of the training image and improves the optimization degree of the image enhancement model.
[0166] Furthermore, in order to improve the accuracy of subsequent parameter adjustment, the enhancement algorithm may be determined by the image parameters, thereby achieving enhancement processing of the training image. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0167] Determining at least one training image dimension among the image dimensions based on image parameters of the training image in each image dimension;
[0168] According to the enhancement algorithm preset for the training image dimension, the training image is enhanced to obtain the first image.
[0169] In practical applications, different training image dimensions will be set with different enhancement algorithms to adjust the image parameters of the training images of that dimension so that the training images after the image parameters are adjusted have a better display effect in that training image dimension. For example, if the training image dimension is an image smoothing dimension, then the training image can be enhanced according to the weighted least squares algorithm preset in the image smoothing dimension. The enhancement process is actually to smooth the training image to obtain a first image with a better display effect.
[0170] In addition, the enhancement algorithm includes at least one of the following: a guided filtering algorithm, a contrast linear stretching algorithm, an adaptive histogram equalization algorithm, a non-local mean algorithm, a sharpening algorithm, and a bilateral filtering algorithm.
[0171] Among them, the guided filtering algorithm (weighted least square filter) belongs to the image smoothing dimension, the contrast linear stretching algorithm (linear contrast stretch) belongs to the image grayscale dimension, the adaptive histogram equalization algorithm (adaptive histogram equalization) belongs to the image equalization dimension, the non-local means algorithm (Non-local means) belongs to the image pixel dimension, the sharpening algorithm (unsharpen mask) belongs to the image sharpening dimension, and the bilateral filtering algorithm (biletarial filter) belongs to the image denoising dimension; accordingly, the guided filtering algorithm is used to process the smoothness of the image, the contrast linear stretching algorithm is used to stretch the grayscale value of the image, the adaptive histogram equalization algorithm is used to process the light and dark distribution problem of the image, the non-local means algorithm is used to process the pixel points of the image, the sharpening algorithm is used to process the sharpening degree of the image, and the bilateral filtering algorithm is used to process the transmittance of the image.
[0172] In a specific implementation, based on the image parameters of the training image in each image dimension, at least one training image dimension in the image dimensions can be determined by selecting a real image corresponding to the training image, and comparing the image parameters of the real image with the image parameters of the training image to determine the at least one training image dimension. The image parameters of the training image in each image dimension can also be compared with the parameter threshold of each dimension to determine the at least one training image dimension, and subsequent enhancement processing can be performed to obtain the first image.
[0173] While the training image is enhanced by the enhancement algorithm, the training image is also enhanced by the image enhancement model. The specific implementation method is as follows:
[0174] Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result;
[0175] The image to be enhanced is input into the image enhancement model for image enhancement processing to obtain the second image.
[0176] Specifically, by extracting the image parameters corresponding to the training image in the training image dimension, and then adjusting the image parameters according to the enhancement algorithm preset in the training image dimension, the first image after the training image enhancement processing can be obtained according to the adjustment result, and at the same time, the high-frequency information of the training image is processed, and the image to be enhanced is obtained according to the processing result, and then the image to be enhanced is input into the image enhancement model for image enhancement processing, so as to obtain the second image corresponding to the enhanced training image.
[0177] Among them, the high-frequency information specifically refers to the set of image parameters of the training image in each image dimension. In the process of training the image enhancement model, in order to detect the enhancement effect of the image enhancement model, it is necessary to preprocess the image of the input model, that is, to perform low-quality processing on the training image, and randomly select at least one image dimension of the training image to reduce the image parameter to obtain the image to be enhanced, and then perform enhancement processing by the image enhancement model. The second image obtained is the enhancement processing result of the image to be enhanced; finally, based on the first image and the second image, the parameters of the image enhancement model can be adjusted, so that the user can obtain an image enhancement model with better enhancement effect.
[0178] Continuing with the above example, when it is determined that the dimension of the training image is the sharpening dimension, the training image will be adjusted according to the sharpening algorithm preset in the sharpening dimension, and the sharpening parameter c2 of the training image will be adjusted to c3. According to the adjustment result, the first enhanced image is obtained, and the training image is input into the image enhancement model for enhancement processing to obtain the second enhanced image; wherein, the clarity parameter of the first enhanced image is a2, the color parameter is b2, and the sharpening parameter is c3, and the clarity parameter of the second enhanced image is a3, the color parameter is b3, and the sharpening parameter is c4.
[0179] In summary, while the training image is enhanced according to the enhancement algorithm preset according to the training image dimension, the training image is also enhanced by the image enhancement model to obtain a first image and a second image, respectively, so as to adjust the parameters of the image enhancement model later, so that the user can obtain a better enhancement effect of the image enhancement model.
[0180] Step 108: Adjust the parameters of the image enhancement model according to the first image and the second image.
[0181] Specifically, on the basis of obtaining the first image and the second image by performing enhancement processing on the training image, further, the parameters of the image enhancement model are adjusted based on the first image and the second image.
[0182] In actual applications, although the second image is enhanced by the image enhancement model, the enhancement effect of the image enhancement model may not reach a good state at this time, and the output second image does not meet the standard of the real image corresponding to the training image, that is, there is a large difference between the second image and the real image. After the first image is enhanced by the enhancement algorithm, although there is a certain difference between the first image and the standard of the real image corresponding to the training image, the difference between the first image and the real image is small and within a controllable range. That is, the parameters of the image enhancement model can be adjusted according to the loss of the second image relative to the first image, and then the adjustment result is displayed to the user.
[0183] Furthermore, in order to accurately adjust the image enhancement model and obtain an image enhancement model that meets user needs, the parameters of the model can be adaptively adjusted by calculating the direct loss of the first image and the second image. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0184] Determining a parameter to be enhanced of the second image based on a loss of the second image relative to the first image;
[0185] The parameters of the image enhancement model are adjusted according to the parameters to be enhanced.
[0186] Specifically, after determining the loss of the second image relative to the first image, the parameters to be enhanced of the second image are determined based on the loss of the second image relative to the first image. The parameters to be enhanced specifically refer to image parameters of the second image that still need to be enhanced. At this time, it means that the enhancement effect of the image enhancement model corresponding to the parameters to be enhanced is not obvious enough, so the corresponding model parameters in the image enhancement model will be adjusted according to the parameters to be enhanced; the model parameters correspond to the parameters to be enhanced, and the visual effect of the output image of the model in the dimension to which the parameters to be enhanced belong can be enhanced by adjusting the model parameters.
[0187] In practical applications, the loss between the first image and the second image can be determined by calculating the Euclidean distance. First, a first matrix is constructed based on the first image, and a second matrix is constructed based on the second image. Then, the Euclidean distance between the first matrix and the second matrix is calculated, and finally, the loss of the second image relative to the first image is determined. In specific implementation, the loss of the second image relative to the first image can be determined by the following formula (1):
[0188]
[0189] in, represents the second image, i represents the first image, L MSE Indicates the loss between the two.
[0190] Continuing with the above example, the clarity parameter of the first enhanced image is a2, the color parameter is b2, and the sharpening parameter is c3. The clarity parameter of the second enhanced image is a3, the color parameter is b3, and the sharpening parameter is c4. By calculating the Euclidean distance loss between the first enhanced image and the second enhanced image, it is determined that a2 is close to a3, c3 is close to c4, and there is a large difference between b3 and b2. At this time, it can be determined that the enhancement effect of the second enhanced image output by the image enhancement model in the image color dimension is not obvious, and the parameter to be enhanced is determined to be the color parameter. According to the color parameter, the model parameters related to the processing layer that enhances the color parameters of the image in the image enhancement model are adjusted, and the parameter adjustment results are displayed to the user so that the user can determine the adjustment process of the model.
[0191] The corresponding model parameters in the image enhancement model are adjusted according to the parameters to be enhanced, so that the image enhancement model can be optimized in a targeted manner, thereby achieving a better enhancement effect of the optimized image enhancement model.
[0192] Step 110, displaying the adjusted parameters of the image enhancement model.
[0193] Specifically, on the basis of adjusting the parameters of the image enhancement model, the adjusted parameters of the image enhancement model will be further displayed to the user; when the adjusted parameters are displayed to the user, it may be relevant information on the adjustment of the parameters of the image enhancement model, or relevant information on the image enhancement effect that can be achieved by the adjusted image enhancement model.
[0194] In addition, after the adjusted parameters of the image enhancement model are displayed to the user, the adjustment result may deviate from the user's needs. In order to avoid this situation and affect the optimization of the image enhancement model and reduce the user's experience, the parameter adjustment permission can be opened to the user. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0195] receiving adjustment data uploaded by the user, wherein the adjustment data includes a parameter adjustment request;
[0196] Determining a target parameter corresponding to the adjustment data among the parameters of the adjusted image enhancement model, and adjusting the target parameter according to the parameter adjustment request;
[0197] The adjusted target parameters of the image enhancement model are shown.
[0198] In actual applications, after displaying the adjusted parameters of the image enhancement model to the user, if adjustment data for adjusting the adjusted parameters uploaded by the user is received, it means that the preliminary adjusted parameters do not meet the user's needs. Then, according to the parameter adjustment request contained in the adjustment data uploaded by the user, the target parameters corresponding to the adjustment data are determined in the preliminary adjusted parameters, and the target parameters are further adjusted according to the parameter adjustment request. At this time, the final adjusted target parameters can be displayed to the user, so that the final displayed adjusted target parameters are more in line with the user's needs, thereby making the enhancement effect of the final image enhancement model more in line with the user's needs.
[0199] The data processing method provided in this embodiment extracts a training image through the request data submitted by the user, and enhances the training image according to a preset enhancement algorithm to obtain a first image, and inputs the training image into an image enhancement model to obtain a second image, and then adjusts the parameters of the image enhancement model according to the first image and the second image, and displays the adjusted model parameters to the user, thereby improving the enhancement effect of the image enhancement model, and the parameter adjustment direction of the image enhancement model corresponds to the user's model training request, so that the image enhancement model with the adjusted parameters can output an enhanced image that meets the user's needs, further improving the user experience.
[0200] Figure 3 A flowchart of an image enhancement method provided according to an embodiment of this specification is shown. Figure 4 A schematic diagram of the structure of an image enhancement method provided according to an embodiment of the present specification is shown, wherein the diagram specifically includes the following steps:
[0201] Step 302: Obtain an image to be processed.
[0202] In practical applications, in the process of image enhancement, an image enhancement model based on a neural network is usually used. At the same time, in order to increase the realism of the image, the discriminant model is combined to enhance the image. However, whether it is a neural network or a discriminant model, although the target image obtained after image enhancement is enhanced, the target image is likely to lose details, and the loss constraint of the discriminant network will cause defects in the target image, which greatly reduces the final display effect.
[0203] See also Figure 4As shown, the image enhancement method provided in this embodiment, in order to achieve the visual effect of the image after enhancement processing that meets the user's demand standards and improve the enhancement processing effect of the image enhancement model, by inputting the image to be processed into the image parameters of the training image and the real image in each image dimension to determine the training image dimension, according to the loss of the enhancement algorithm for enhancing the training image input to the image enhancement model relative to the training image dimension, the image enhancement model is optimized to obtain the target image enhancement model, and the enhancement effect of the image to be processed is improved, thereby ensuring that the visual effect of the image after enhancement processing is significantly improved.
[0204] See also Figure 4 As shown, the image to be processed is an image that needs to be enhanced, and the number of the images to be processed can be multiple or one. In practical applications, in the process of enhancing the image to be processed by the image enhancement model, the image to be processed can be preprocessed before being input into the image enhancement model in order to improve the enhancement effect of the image to be processed. The preprocessing process specifically refers to trimming the image to be processed. The trimming method is to adjust the size or size of the image to be processed to the input standard of the image enhancement model, so as to facilitate image enhancement processing.
[0205] Step 304: input the image to be processed into a target image enhancement model for image enhancement processing.
[0206] Step 306: Obtain a target image corresponding to the image to be processed output by the target image enhancement model.
[0207] Specifically, the target image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, and optimizes the image enhancement model according to the loss of the enhancement algorithm for enhancing the training image according to the training image dimension when the training image is input into the image enhancement model for enhancement processing.
[0208] In one or more implementations of this embodiment, the training image dimension is determined by:
[0209] Determine real image parameters of the real image in each of the image dimensions, and training image parameters of the training image in each of the image dimensions;
[0210] Comparing the training image parameters with the real image parameters;
[0211] The training image dimension is determined in the image dimension according to the comparison result.
[0212] In actual applications, in the process of determining the training image dimension, the real image parameters of the real image in each image dimension and the training image parameters of the training image in each image dimension will be determined respectively. After that, the training image parameters and the real image parameters will be compared to understand the difference image parameters between the training image and the real image, and then determine the image dimension to which the difference image parameters belong, and determine this dimension as the training image dimension.
[0213] For example, the clarity parameter of the real image in the image clarity dimension is a1, the color parameter in the image color dimension is b1, and the sharpening parameter in the image sharpening dimension is c1. At this time, the image dimensions are determined to be the image clarity dimension, the image color dimension, and the image sharpening dimension. Correspondingly, the clarity parameter of the training image in the image clarity dimension is a2, the color parameter in the image color dimension is b2, and the sharpening parameter in the image sharpening dimension is c2, where c2 is less than c1, indicating that the effect of the training image in the sharpening dimension is different from the display effect of the real image in the sharpening dimension. At this time, it can be determined that the sharpening dimension is the training image dimension, and the parameters of the training image in this dimension need to be adjusted subsequently to achieve image enhancement processing of the training image in this dimension.
[0214] In one or more implementations of this embodiment, the process of enhancing the training image by the training image dimension enhancement algorithm is as follows:
[0215] Extracting image parameters of the training image corresponding to the training image dimension;
[0216] Adjust the image parameters according to the enhancement algorithm preset for the training image dimension, and obtain the first image according to the adjustment result;
[0217] The first image is determined as a result of an enhancement algorithm of the training image dimension performing enhancement processing on the training image.
[0218] In one or more implementations of this embodiment, the process of the image enhancement model performing enhancement processing on the training image is as follows:
[0219] Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result;
[0220] Inputting the image to be enhanced into the image enhancement model for image enhancement processing to obtain the second image;
[0221] The second image is determined as a result of the image enhancement model performing enhancement processing on the training image.
[0222] In practical applications, by extracting the image parameters corresponding to the training image in the training image dimension, and then adjusting the image parameters according to the enhancement algorithm preset in the training image dimension, the first image after the training image enhancement processing can be obtained according to the adjustment result. At the same time, the high-frequency information of the training image is processed, and the image to be enhanced is obtained according to the processing result. The image to be enhanced is then input into the image enhancement model for image enhancement processing, and the second image corresponding to the enhanced training image can be obtained.
[0223] Among them, the high-frequency information specifically refers to the set of image parameters of the training image in each image dimension. In the process of training the image enhancement model, in order to detect the enhancement effect of the image enhancement model, it is necessary to preprocess the image of the input model, that is, the training image is processed with low quality, and the image parameters of at least one image dimension of the training image are randomly selected to be reduced to obtain the image to be enhanced, and then the image enhancement model is used to perform enhancement processing. The second image obtained is the enhancement processing result of the image to be enhanced; finally, based on the first image and the second image, the image enhancement model can be optimized to obtain a target image enhancement model with better enhancement effect.
[0224] Continuing with the above example, when it is determined that the dimension of the training image is the sharpening dimension, the training image will be adjusted according to the sharpening algorithm preset in the sharpening dimension, and the sharpening parameter c2 of the training image will be adjusted to c3. According to the adjustment result, the first enhanced image is obtained, and the training image is input into the image enhancement model for enhancement processing to obtain the second enhanced image; wherein, the clarity parameter of the first enhanced image is a2, the color parameter is b2, and the sharpening parameter is c3, and the clarity parameter of the second enhanced image is a3, the color parameter is b3, and the sharpening parameter is c4.
[0225] In one or more implementations of this embodiment, the process of optimizing the image enhancement model is as follows:
[0226] constructing a first matrix based on the first image, and constructing a second matrix based on the second image;
[0227] Calculate the Euclidean distance between the first matrix and the second matrix to determine the loss of the second image relative to the first image;
[0228] The image enhancement model is optimized according to the loss of the second image relative to the first image.
[0229] In practical applications, a first matrix is first constructed based on the first image, and a second matrix is first constructed based on the second image. Then, the Euclidean distance between the first matrix and the second matrix is calculated, and finally, the loss of the second image relative to the first image is determined.
[0230] In a specific implementation, after determining the loss of the second image relative to the first image, the parameters to be enhanced of the second image are determined based on the loss of the second image relative to the first image. The parameters to be enhanced specifically refer to image parameters of the second image that still need to be enhanced. At this time, it means that the enhancement effect of the image enhancement model corresponding to the parameters to be enhanced is not obvious enough, so the corresponding model parameters in the image enhancement model are adjusted according to the parameters to be enhanced; the model parameters correspond to the parameters to be enhanced, and the visual effect of the output image of the model in the dimension to which the parameters to be enhanced belong can be enhanced by adjusting the model parameters.
[0231] For example, when it is necessary to perform enhancement processing on the image to be processed, it can be determined that the display effect of the image to be processed is poor. The image to be processed is input into the image enhancement model for enhancement processing to obtain the target image output by the image enhancement model. The display effect of the enhanced image is effectively improved.
[0232] In practical applications, in the process of enhancing the image, it is not limited to enhancing the clarity of the image, but also the sharpness, brightness, pixels and other dimensions of the image can be enhanced, which will not be elaborated in this embodiment.
[0233] The image enhancement method provided in this embodiment determines the training image dimension by inputting the image to be processed into the image parameters of the training image and the real image in each image dimension, performs enhancement processing on the training image according to the loss of the enhancement algorithm for the training image dimension inputted into the image enhancement model, optimizes the image enhancement model to obtain the target image enhancement model, obtains the target image, and achieves effective improvement of the enhancement effect on the image to be processed, thereby ensuring that the visual effect of the image after the enhancement processing is significantly improved.
[0234] Figure 5 A flowchart of an image enhancement model training method provided according to an embodiment of this specification is shown. Figure 6 A schematic diagram of the structure of an image enhancement model training method provided according to an embodiment of the present specification is shown. Figure 7 A schematic diagram of an optimization process in an image enhancement model training method provided according to an embodiment of the present specification is shown, wherein: Figure 5 The specific steps include:
[0235] Step 502: Obtain at least one image set as training samples.
[0236] In practical applications, as users' pursuit of visual effects of images or videos deepens, image enhancement has become a more important development direction. Image enhancement is mostly achieved by using neural networks. Since the output of neural networks is too smooth, although image enhancement can be achieved, it is easy to cause loss of details, making the image tend to the mean, and the effect cannot meet user requirements. In addition, in some neural networks corresponding to image enhancement, discriminant networks are introduced to further increase the realism of the image and generate some reasonable texture details. However, the loss constraints of the discriminant network will inevitably produce defects, which have a greater impact on the visual effect.
[0237] See also Figure 6 As shown, the image enhancement model training method provided in this embodiment, in order to improve the enhancement effect of the image enhancement model, so that the visual effect of the image output by the model has a significant improvement, determines at least one training image dimension according to the image parameters of the training images in at least one image set as training samples and the corresponding real images in each image dimension, enhances the training image according to the enhancement algorithm of the training image dimension to obtain a first image, and inputs the training image into the image enhancement model to obtain a second image, and optimizes the image enhancement model based on the loss between the first image and the second image to obtain an image enhancement model with a higher output accuracy, so that when the optimized image enhancement model is used for image enhancement, the visual effect of the enhanced image can be better, and the image enhancement model is optimized by the loss between the first image and the second image, so that the optimized image enhancement model can accurately determine the enhanced image dimension of the image to be enhanced, so that the enhanced image will not have the problem of over-enhancement while ensuring the display effect.
[0238] In a specific implementation, the training images contained in the image set have corresponding real images; the image set specifically refers to a set of training images used in the process of training the image enhancement model, and the training images are images used in the process of optimizing the image enhancement model. Accordingly, the real images specifically refer to images corresponding to the training images. For example, the training image is a photo that has not been enhanced, then the real image at this time is a photo with a better display effect.
[0239] Furthermore, in the process of optimizing the image enhancement model, it is necessary to optimize the image enhancement model according to the preliminary training results of the training stage, that is, after the image enhancement model is preliminarily trained, in order to improve the image enhancement effect of the image enhancement model, it is necessary to optimize the intermediate image enhancement model after the preliminary training, and then test the image enhancement effect of the optimized image enhancement model. If the test is qualified, the optimized image enhancement model can be used. If the test is not qualified, the optimized image enhancement model needs to continue to be trained, and then the trained model needs to continue to be optimized until the model is qualified and can be used.
[0240] This embodiment will describe the process of optimizing the intermediate image enhancement model. Before the image enhancement model is detected to be qualified, any optimization stage can refer to the description content related to this embodiment, and no further details will be given here.
[0241] Step 504: Determine at least one training image dimension among the image dimensions based on the image parameters of the training image and the real image in each image dimension.
[0242] Specifically, based on the above-mentioned acquisition of at least one image set as training samples, further, the at least one training image dimension is determined based on the training images in the image set and their corresponding real images, wherein the image dimension specifically refers to the dimension to which each image parameter of the image belongs, and correspondingly, the training image dimension specifically refers to the dimension in which the image parameters of the training image are unqualified relative to the image parameters of its corresponding real image.
[0243] In actual applications, the training image dimension can be one or more. When the training image dimension is one, it means that the effect of the training image relative to its corresponding real image in one image dimension is different. When the training image dimension is multiple, it means that the effect of the training image relative to its corresponding real image in multiple image dimensions is different. Regardless of whether it is one training image dimension or multiple training image dimensions, the subsequent enhancement processing process of the training image is similar. This embodiment will be described in detail with at least one training image dimension. The case of multiple training image dimensions can be referenced based on this implementation, and this embodiment will not be elaborated in detail here.
[0244] In addition, the image dimension may include at least one of the following: an image smoothing dimension, an image edge dimension, an image grayscale dimension, an image equalization dimension, an image pixel dimension, and an image sharpening dimension.
[0245] Furthermore, in the process of determining the dimension of the training image, in order to enable subsequent accurate enhancement processing of the training image, it is necessary to determine the dimension of the training image based on a comparison result of image parameters between the real image and the training image. In one or more implementations of this embodiment, the specific process is as follows:
[0246] Determine real image parameters of the real image in each of the image dimensions, and training image parameters of the training image in each of the image dimensions;
[0247] Comparing the training image parameters with the real image parameters;
[0248] The at least one training image dimension is determined in the image dimensions according to the comparison result.
[0249] Specifically, the real image parameters of the real image in each image dimension and the training image parameters of the training image in each image dimension are determined respectively, and then the training image parameters are compared with the real image parameters to understand the difference image parameters between the training image and the real image, and then the image dimension to which the difference image parameters belong is determined, and this dimension is determined as the training image dimension.
[0250] For example, the clarity parameter of the real image in the image clarity dimension is a1, the color parameter in the image color dimension is b1, and the sharpening parameter in the image sharpening dimension is c1. At this time, the image dimensions are determined to be the image clarity dimension, the image color dimension, and the image sharpening dimension. Correspondingly, the clarity parameter of the training image in the image clarity dimension is a2, the color parameter in the image color dimension is b2, and the sharpening parameter in the image sharpening dimension is c2, where c2 is less than c1, indicating that the effect of the training image in the sharpening dimension is different from the display effect of the real image in the sharpening dimension. At this time, it can be determined that the sharpening dimension is the training image dimension, and the parameters of the training image in this dimension need to be adjusted subsequently to achieve image enhancement processing of the training image in this dimension.
[0251] In summary, by comparing the image parameters corresponding to the training image and the real image, the image parameters with differences between the two can be determined, and the dimension to which the image parameters with differences belong is determined as the training image dimension, which facilitates the subsequent accurate enhancement processing of the training image and improves the optimization degree of the image enhancement model.
[0252] Step 506: Enhance the training image according to the enhancement algorithm preset for the training image dimension to obtain a first image, and input the training image into an image enhancement model for image enhancement processing to obtain a second image.
[0253] Specifically, based on the above determination of the at least one training image dimension, it is further necessary to perform enhancement processing on the training image according to the training image dimension, and use the processing result to subsequently optimize the image enhancement model;
[0254] Based on this, the training image will be enhanced according to the enhancement algorithm preset in the training image dimension, and the first image can be obtained according to the enhancement processing result. At the same time, the training image will be input into the image enhancement model for image enhancement processing to obtain the second image; subsequently, the model will be optimized based on the first image and the second image.
[0255] In practical applications, different training image dimensions will be set with different enhancement algorithms to adjust the image parameters of the training images of that dimension so that the training images after the image parameters are adjusted have a better display effect in that training image dimension. For example, if the training image dimension is an image smoothing dimension, then the training image can be enhanced according to the weighted least squares algorithm preset in the image smoothing dimension. The enhancement process is actually to smooth the training image to obtain a first image with a better display effect.
[0256] In addition, the enhancement algorithm includes at least one of the following: a guided filtering algorithm, a contrast linear stretching algorithm, an adaptive histogram equalization algorithm, a non-local mean algorithm, a sharpening algorithm, and a bilateral filtering algorithm.
[0257] Among them, the guided filtering algorithm (weighted least square filter) belongs to the image smoothing dimension, the contrast linear stretching algorithm (linear contrast stretch) belongs to the image grayscale dimension, the adaptive histogram equalization algorithm (adaptive histogram equalization) belongs to the image equalization dimension, the non-local means algorithm (Non-local means) belongs to the image pixel dimension, the sharpening algorithm (unsharpen mask) belongs to the image sharpening dimension, and the bilateral filtering algorithm (biletarial filter) belongs to the image denoising dimension; accordingly, the guided filtering algorithm is used to process the smoothness of the image, the contrast linear stretching algorithm is used to stretch the grayscale value of the image, the adaptive histogram equalization algorithm is used to process the light and dark distribution problem of the image, the non-local means algorithm is used to process the pixel points of the image, the sharpening algorithm is used to process the sharpening degree of the image, and the bilateral filtering algorithm is used to process the transmittance of the image.
[0258] After determining the dimension of the training image, the training image can be enhanced according to an algorithm preset for the dimension of the training image, so that the image parameters of the image in the dimension of the training image can be adjusted, thereby making the visual effect of the enhanced image better.
[0259] Furthermore, in the process of enhancing the training image, the enhancement algorithm preset in the training image dimension and the image enhancement model are combined to perform the enhancement processing. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0260] Extracting image parameters of the training image corresponding to the training image dimension;
[0261] The image parameters are adjusted according to the enhancement algorithm preset for the training image dimension, and the first image is obtained according to the adjustment result.
[0262] While the training image is enhanced by the enhancement algorithm, the training image is also enhanced by the image enhancement model. The specific implementation method is as follows:
[0263] Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result;
[0264] The image to be enhanced is input into the image enhancement model for image enhancement processing to obtain the second image.
[0265] Specifically, by extracting the image parameters corresponding to the training image in the training image dimension, and then adjusting the image parameters according to the enhancement algorithm preset in the training image dimension, the first image after the training image enhancement processing can be obtained according to the adjustment result, and at the same time, the high-frequency information of the training image is processed, and the image to be enhanced is obtained according to the processing result, and then the image to be enhanced is input into the image enhancement model for image enhancement processing, so as to obtain the second image corresponding to the enhanced training image.
[0266] Among them, the high-frequency information specifically refers to the set of image parameters of the training image in each image dimension. In the process of training the image enhancement model, in order to detect the enhancement effect of the image enhancement model, it is necessary to preprocess the image of the input model, that is, the training image is processed with low quality, and the image parameters of at least one image dimension of the training image are randomly selected to be reduced to obtain the image to be enhanced, and then the image enhancement model is used to perform enhancement processing. The second image obtained is the enhancement processing result of the image to be enhanced; finally, based on the first image and the second image, the image enhancement model can be optimized to obtain an image enhancement model with better enhancement effect.
[0267] Continuing with the above example, when it is determined that the dimension of the training image is the sharpening dimension, the training image will be adjusted according to the sharpening algorithm preset in the sharpening dimension, and the sharpening parameter c2 of the training image will be adjusted to c3. According to the adjustment result, the first enhanced image is obtained, and the training image is input into the image enhancement model for enhancement processing to obtain the second enhanced image; wherein, the clarity parameter of the first enhanced image is a2, the color parameter is b2, and the sharpening parameter is c3, and the clarity parameter of the second enhanced image is a3, the color parameter is b3, and the sharpening parameter is c4.
[0268] In summary, while the training image is enhanced according to the enhancement algorithm preset according to the training image dimension, the training image is also enhanced by the image enhancement model to obtain a first image and a second image, respectively, so as to better optimize the image enhancement model in the future, thereby making the enhancement effect of the optimized image enhancement model better.
[0269] In addition, before the training image is input into the image enhancement model to obtain the second image, the image enhancement model needs to be trained before optimization can be performed. In one or more implementations of this embodiment, the specific process of training the image enhancement model is as follows:
[0270] Construct training image samples based on the model real images corresponding to the model training images;
[0271] The training image samples are input into an initial image enhancement model for training to obtain the image enhancement model, wherein the initial image enhancement model is constructed based on the relationship between the model training image and the model real image.
[0272] In practical applications, the model training image is the image used in the training process of the image enhancement model before the model is optimized. At this time, a training image sample is constructed based on the model training image and the corresponding model real image, and the training image sample is input into the initial image enhancement model for training to obtain the image enhancement model, wherein the initial image enhancement model is constructed based on the relationship between the model training image and the model real image.
[0273] Step 508: Optimize the image enhancement model according to the loss of the second image relative to the first image.
[0274] Specifically, on the basis of obtaining the first image and the second image by performing enhancement processing on the training image, the image enhancement model is further optimized based on the loss between the first image and the second image.
[0275] In actual applications, although the second image is enhanced by the image enhancement model, the enhancement effect of the image enhancement model may not reach a good state at this time, and the output second image does not meet the standard of the real image corresponding to the training image, that is, there is a large difference between the second image and the real image. After the first image is enhanced by the preset enhancement algorithm of the training image dimension, although there is a certain difference between the first image and the standard of the real image corresponding to the training image, the difference between the first image and the real image is small and within a controllable range. That is, the image enhancement model can be optimized according to the loss of the second image relative to the first image, so that the predicted image output by the image enhancement model is closer to the display effect of the real image.
[0276] Further, in the process of determining the loss of the second image relative to the first image, in order to effectively improve the enhancement effect of the image enhancement model, the Euclidean distance loss can be determined by calculating the Euclidean distance. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0277] constructing a first matrix based on the first image, and constructing a second matrix based on the second image;
[0278] The Euclidean distance between the first matrix and the second matrix is calculated to determine the loss of the second image relative to the first image.
[0279] In practical applications, firstly, a first matrix is constructed based on the first image, and a second matrix is constructed based on the second image. Then, the Euclidean distance between the first matrix and the second matrix is calculated, and finally, the loss of the second image relative to the first image is determined. In specific implementation, the loss of the second image relative to the first image can be determined by formula (1).
[0280] In summary, by constraining the image enhancement model with Euclidean distance loss, the optimized image enhancement model can enhance the details of the image that needs to be enhanced, thereby further improving the visual effect of the image.
[0281] Furthermore, in the process of optimizing the image enhancement model, it is necessary to adjust the model parameters in the image enhancement model corresponding to the image parameters with insignificant second image enhancement effect. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0282] Determining a parameter to be enhanced of the second image based on a loss of the second image relative to the first image;
[0283] The corresponding model parameters in the image enhancement model are adjusted according to the parameters to be enhanced.
[0284] Specifically, after determining the loss of the second image relative to the first image, the parameters to be enhanced of the second image are determined based on the loss of the second image relative to the first image. The parameters to be enhanced specifically refer to image parameters of the second image that still need to be enhanced. At this time, it means that the enhancement effect of the image enhancement model corresponding to the parameters to be enhanced is not obvious enough, so the corresponding model parameters in the image enhancement model will be adjusted according to the parameters to be enhanced; the model parameters correspond to the parameters to be enhanced, and the visual effect of the output image of the model in the dimension to which the parameters to be enhanced belong can be enhanced by adjusting the model parameters.
[0285] Continuing with the above example, the clarity parameter of the first enhanced image is a2, the color parameter is b2, and the sharpening parameter is c3. The clarity parameter of the second enhanced image is a3, the color parameter is b3, and the sharpening parameter is c4. By calculating the Euclidean distance loss between the first enhanced image and the second enhanced image, it is determined that a2 is close to a3, c3 is close to c4, and there is a large difference between b3 and b2. At this time, it can be determined that the enhancement effect of the second enhanced image output by the image enhancement model in the image color dimension is not obvious, and the parameter to be enhanced is determined to be the color parameter. According to the color parameter, the model parameters related to the processing layer that enhances the color parameters of the image in the image enhancement model are adjusted to achieve the optimization of the image enhancement model.
[0286] In summary, by adjusting the corresponding model parameters in the image enhancement model according to the parameters to be enhanced, the image enhancement model can be optimized in a targeted manner, thereby achieving better enhancement effect of the optimized image enhancement model and avoiding the problem of excessive enhancement leading to reduced image visual effect.
[0287] In addition, after the image enhancement model is optimized, in order to obtain an image enhancement model with better image enhancement effect, the optimized image enhancement model may be tested. In one or more implementations of this embodiment, the specific implementation method is as follows:
[0288] Obtaining a target image enhancement model according to a result of optimizing the image enhancement model;
[0289] Selecting a test image from a preset test image set and inputting it into the target image enhancement model for enhancement processing to obtain a predicted image corresponding to the test image;
[0290] Comparing the target image corresponding to the test image with the predicted image;
[0291] When the comparison result is qualified, the target image enhancement model is stored.
[0292] Specifically, the target image enhancement model is obtained based on the result of optimizing the image enhancement model, and then the target image enhancement model is tested by selecting a test image from a preset test image set, and the test image is input into the target image enhancement model for enhancement processing, so as to obtain a predicted image corresponding to the test image output by the target image enhancement model; further, the target image corresponding to the test image is compared with the predicted image;
[0293] If the comparison result is qualified, it indicates that the enhancement effect of the target image enhancement model is good. At this time, the target image enhancement model can be stored for image enhancement processing in practical applications; if the comparison result is unqualified, it indicates that the enhancement effect of the target image enhancement model is poor. At this time, the target image enhancement model can continue to be trained, and then the trained image enhancement model can be optimized until an image enhancement model with better enhancement processing effect is obtained.
[0294] In actual applications, in the process of comparing the real image corresponding to the test image with the predicted image, since the effect of the output result of the target image enhancement model is also close to the real image, there is a small deviation between the output result of the target image enhancement model and the real image. When comparing, it can be determined whether the comparison is qualified based on the size of the existing deviation. The smaller the deviation, the better the effect, and vice versa. The larger the deviation, the worse the effect.
[0295] In summary, by testing the target image enhancement model on the basis of obtaining the optimized target image enhancement model, the enhancement processing effect of the image enhancement model can be tested, so that an image enhancement model with better enhancement effect can be obtained for image enhancement processing, thereby improving the enhancement effect of the image enhancement model.
[0296] See also Figure 7 As shown, by determining the image parameters of the training image and the real image in the clarity dimension, color dimension and sharpness dimension, it is determined that there is a large difference in clarity and sharpness between the training image and the real image in the clarity dimension and sharpness dimension. At this time, the clarity dimension and sharpness dimension are determined as the training image dimension, that is, the clarity enhancement processing of the training image is performed according to the enhancement algorithm preset in the clarity dimension, and the sharpness enhancement processing of the training image is performed according to the enhancement algorithm preset in the sharpness dimension, so as to obtain a first image, as shown in FIG. Figure 7 As shown, the first image obtained after the training image is enhanced by the enhancement algorithm is close to the display effect of the real image;
[0297] At the same time, the training image is input into the image enhancement model for image enhancement processing to obtain the second image. Then, the Euclidean distance loss of the second image relative to the first image is calculated by formula (1). It is determined that although the second image is enhanced by the image enhancement model, the enhancement effect in the sharpening dimension is too strong, resulting in a poor display effect of the second image. Figure 7 The output image of the image enhancement model shown in the figure can be optimized according to the loss. That is, the relevant parameters of the image enhancement model's sharpening dimension are adjusted so that the image effect output by the image enhancement model is closer to the real image.
[0298] The image enhancement model training method provided in the present embodiment determines at least one training image dimension based on image parameters of training images in at least one image set serving as training samples and their corresponding real images in each image dimension, performs enhancement processing on the training image according to the enhancement algorithm of the training image dimension to obtain a first image, and inputs the training image into the image enhancement model to obtain a second image, and optimizes the image enhancement model based on the loss between the first image and the second image to obtain an image enhancement model with a higher output accuracy, thereby achieving better visual effects after image enhancement when the optimized image enhancement model is used for image enhancement, and optimizing the image enhancement model through the loss between the first image and the second image, so that the optimized image enhancement model can accurately determine the enhanced image dimension of the image to be enhanced, thereby ensuring that the enhanced image will not have the problem of over-enhancement while ensuring the display effect.
[0299] Corresponding to the above method embodiment, this specification also provides a data processing device embodiment, Figure 8 FIG. 1 shows a schematic diagram of the structure of a data processing device provided by an embodiment of the present specification. Figure 8 As shown, the device comprises:
[0300] The receiving module 802 is configured to receive request data uploaded by a user, wherein the request data includes a model training request;
[0301] An extraction module 804 is configured to extract a training image according to the request data, wherein the training image is used for model training;
[0302] The enhancement module 806 is configured to perform enhancement processing on the training image according to a preset enhancement algorithm to obtain a first image, and input the training image into an image enhancement model to obtain a second image;
[0303] An adjustment module 808 is configured to adjust parameters of the image enhancement model according to the first image and the second image;
[0304] The display module 810 is configured to display the adjusted parameters of the image enhancement model.
[0305] In an optional embodiment, the data processing device further includes:
[0306] A training image display module, configured to display the training image to the user;
[0307] a training image adjustment module, configured to, upon receiving an adjustment request submitted by the user for the training image, perform adjustment processing on the training image according to the adjustment request to obtain a target training image;
[0308] Accordingly, the enhancement module 806 is further configured to:
[0309] According to the preset enhancement algorithm, the target training image is enhanced to obtain the first image, and the target training image is input into the image enhancement model to obtain the second image.
[0310] In an optional embodiment, the enhancement module 806 includes:
[0311] an image dimension determination unit, configured to determine at least one training image dimension among the image dimensions based on image parameters of the training image in each image dimension;
[0312] The first enhancement unit is configured to perform enhancement processing on the training image according to the enhancement algorithm preset in the training image dimension to obtain the first image.
[0313] In an optional embodiment, the enhancement module 806 includes:
[0314] A processing unit, configured to process the high-frequency information of the training image and obtain an image to be enhanced according to the processing result;
[0315] The second enhancement unit is configured to input the image to be enhanced into the image enhancement model for image enhancement processing to obtain the second image.
[0316] In an optional embodiment, the adjustment module 808 includes:
[0317] a parameter determination unit, configured to determine a parameter to be enhanced of the second image based on a loss of the second image relative to the first image;
[0318] An adjustment unit is configured to adjust the parameters of the image enhancement model according to the parameters to be enhanced.
[0319] In an optional embodiment, the data processing device further includes:
[0320] An adjustment data receiving module is configured to receive adjustment data uploaded by the user, wherein the adjustment data includes a parameter adjustment request;
[0321] a target parameter adjustment module, configured to determine a target parameter corresponding to the adjustment data in the adjusted parameters of the image enhancement model, and adjust the target parameter according to the parameter adjustment request;
[0322] The target parameter display module is configured to display the adjusted target parameters of the image enhancement model.
[0323] The data processing device provided in this embodiment extracts a training image through the request data submitted by the user, and enhances the training image according to a preset enhancement algorithm to obtain a first image, and inputs the training image into an image enhancement model to obtain a second image, and then adjusts the parameters of the image enhancement model according to the first image and the second image, and displays the adjusted model parameters to the user, thereby improving the enhancement effect of the image enhancement model, and the parameter adjustment direction of the image enhancement model corresponds to the user's model training request, so that the image enhancement model with the adjusted parameters can output an enhanced image that meets the user's needs, further improving the user experience.
[0324] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.
[0325] Corresponding to the above method embodiment, this specification also provides an image enhancement device embodiment, Fig. 9 FIG. 1 shows a schematic diagram of the structure of an image enhancement device provided in an embodiment of the present specification. Fig. 9 As shown, the device comprises:
[0326] An acquisition module 902 is configured to acquire an image to be processed;
[0327] An input module 904 is configured to input the image to be processed into an image enhancement model for image enhancement processing;
[0328] An output module 906 is configured to obtain a target image corresponding to the image to be processed output by the image enhancement model;
[0329] Among them, the image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, and optimizes the image enhancement model according to the loss of the enhancement algorithm for enhancing the training image according to the input of the training image into the image enhancement model for enhancement processing relative to the training image dimension.
[0330] In an optional embodiment, the training image dimension is determined by:
[0331] Determine real image parameters of the real image in each of the image dimensions, and training image parameters of the training image in each of the image dimensions;
[0332] Comparing the training image parameters with the real image parameters;
[0333] The training image dimension is determined in the image dimension according to the comparison result.
[0334] In an optional embodiment, the process of enhancing the training image by the training image dimension enhancement algorithm is as follows:
[0335] Extracting image parameters of the training image corresponding to the training image dimension;
[0336] Adjust the image parameters according to the enhancement algorithm preset for the training image dimension, and obtain the first image according to the adjustment result;
[0337] The first image is determined as a result of an enhancement algorithm of the training image dimension performing enhancement processing on the training image.
[0338] In an optional embodiment, the process of the image enhancement model performing enhancement processing on the training image is as follows:
[0339] Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result;
[0340] Inputting the image to be enhanced into the image enhancement model for image enhancement processing to obtain the second image;
[0341] The second image is determined as a result of the image enhancement model performing enhancement processing on the training image.
[0342] In an optional embodiment, the process of optimizing the image enhancement model is as follows:
[0343] constructing a first matrix based on the first image, and constructing a second matrix based on the second image;
[0344] Calculate the Euclidean distance between the first matrix and the second matrix to determine the loss of the second image relative to the first image;
[0345] The image enhancement model is optimized according to the loss of the second image relative to the first image.
[0346] The image enhancement device provided in the present specification determines the training image dimension by inputting the image to be processed into the image parameters of the training image and the real image in each image dimension, performs enhancement processing on the training image according to the loss of the enhancement algorithm for the training image dimension inputted into the image enhancement model, optimizes the image enhancement model to obtain the image enhancement model, obtains the target image, and effectively improves the enhancement effect of the image to be processed, thereby ensuring that the visual effect of the image after the enhancement processing is significantly improved.
[0347] The above is a schematic scheme of an image enhancement device of this embodiment. It should be noted that the technical scheme of the image enhancement device and the technical scheme of the above-mentioned image enhancement method belong to the same concept, and the details not described in detail in the technical scheme of the image enhancement device can be referred to the description of the technical scheme of the above-mentioned image enhancement method.
[0348] Corresponding to the above method embodiment, this specification also provides an image enhancement model training device embodiment, Fig.10 FIG. 1 shows a schematic diagram of the structure of an image enhancement model training device provided in an embodiment of the present specification. Fig.10 As shown, the device comprises:
[0349] The acquisition module 1002 is configured to acquire at least one image set as a training sample; the training images contained in the image set have corresponding real images;
[0350] A determination module 1004 is configured to determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension;
[0351] The enhancement module 1006 is configured to perform enhancement processing on the training image according to the enhancement algorithm preset in the training image dimension to obtain a first image, and input the training image into an image enhancement model to perform image enhancement processing to obtain a second image;
[0352] The optimization module 1008 is configured to optimize the image enhancement model according to the loss of the second image relative to the first image.
[0353] In an optional embodiment, the determining module 1004 includes:
[0354] an image parameter determination unit, configured to determine real image parameters of the real image in each of the image dimensions, and training image parameters of the training image in each of the image dimensions;
[0355] a parameter comparison unit, configured to compare the training image parameters with the real image parameters;
[0356] The image dimension determination unit is configured to determine the at least one training image dimension in the image dimensions according to the comparison result.
[0357] In an optional embodiment, the enhancement module 1006 includes:
[0358] An image parameter extraction unit is configured to extract image parameters of the training image corresponding to the training image dimension;
[0359] The parameter adjustment unit is configured to adjust the image parameters according to the enhancement algorithm preset in the training image dimension, and obtain the first image according to the adjustment result.
[0360] In an optional embodiment, the enhancement module 1006 includes:
[0361] an information processing unit, configured to process the high-frequency information of the training image and obtain an image to be enhanced according to the processing result;
[0362] The model enhancement processing unit is configured to input the image to be enhanced into the image enhancement model for image enhancement processing to obtain the second image.
[0363] In an optional embodiment, the image enhancement model is trained in the following manner:
[0364] Construct training image samples based on the model real images corresponding to the model training images;
[0365] The training image samples are input into an initial image enhancement model for training to obtain the image enhancement model, wherein the initial image enhancement model is constructed based on the relationship between the model training image and the model real image.
[0366] In an optional embodiment, the optimization module 1008 includes:
[0367] a matrix construction unit configured to construct a first matrix based on the first image, and to construct a second matrix based on the second image;
[0368] The loss determination unit is configured to calculate the Euclidean distance between the first matrix and the second matrix, and determine the loss of the second image relative to the first image.
[0369] In an optional embodiment, the optimization module 1008 includes:
[0370] a unit for determining parameters to be enhanced, configured to determine the parameters to be enhanced of the second image based on the loss of the second image relative to the first image;
[0371] The adjustment unit is configured to adjust the corresponding model parameters in the image enhancement model according to the parameters to be enhanced.
[0372] In an optional embodiment, the image enhancement model training device further includes:
[0373] A model determination module is configured to obtain a target image enhancement model according to a result of optimizing the image enhancement model;
[0374] A testing module is configured to select a test image from a preset test image set and input it into the target image enhancement model for enhancement processing to obtain a predicted image corresponding to the test image;
[0375] a comparison module, configured to compare a target image corresponding to the test image with the predicted image;
[0376] The storage module is configured to store the target image enhancement model when the comparison result is qualified.
[0377] In an optional embodiment, the enhancement algorithm includes at least one of the following:
[0378] Guided filtering algorithm, contrast linear stretching algorithm, adaptive histogram equalization algorithm, non-local mean algorithm, sharpening algorithm, bilateral filtering algorithm.
[0379] The image enhancement model training device provided in the present specification determines at least one training image dimension based on the image parameters of the training images in at least one image set as training samples and the corresponding real images in each image dimension, enhances the training image according to the enhancement algorithm of the training image dimension to obtain a first image, and inputs the training image into the image enhancement model to obtain a second image. The image enhancement model is optimized based on the loss between the first image and the second image to obtain an image enhancement model with a higher output accuracy, so that when the optimized image enhancement model is used for image enhancement, the visual effect of the enhanced image can be better, and the image enhancement model is optimized by the loss between the first image and the second image, so that the optimized image enhancement model can accurately determine the enhanced image dimension of the image to be enhanced, so that the enhanced image will not have the problem of over-enhancement while ensuring the display effect.
[0380] The above is a schematic scheme of an image enhancement model training device of this embodiment. It should be noted that the technical scheme of the image enhancement model training device and the technical scheme of the above-mentioned image enhancement model training method belong to the same concept, and the details not described in detail in the technical scheme of the image enhancement model training device can be referred to the description of the technical scheme of the above-mentioned image enhancement model training method.
[0381] Fig.11 The structure block diagram of the first computing device 1100 provided according to an embodiment of the present specification is shown. The components of the computing device 1100 include but are not limited to a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 via a bus 1130, and the database 1150 is used to store data.
[0382] The computing device 1100 also includes an access device 1140 that enables the computing device 1100 to communicate via one or more networks 1160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0383] In one embodiment of the present specification, the above components of the computing device 1100 and Fig.11Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.11 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0384] The computing device 1100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 1100 may also be a mobile or stationary server.
[0385] The processor 1120 is used to execute the following computer executable instructions:
[0386] Receive request data uploaded by a user, wherein the request data includes a model training request;
[0387] Extracting a training image according to the request data, wherein the training image is used for model training;
[0388] According to a preset enhancement algorithm, the training image is enhanced to obtain a first image, and the training image is input into an image enhancement model to obtain a second image;
[0389] Adjusting parameters of the image enhancement model according to the first image and the second image;
[0390] The adjusted parameters of the image enhancement model are shown.
[0391] The above is a schematic scheme of the first computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.
[0392] Fig.12 The structure block diagram of the second computing device 1200 provided according to an embodiment of the present specification is shown. The components of the computing device 1200 include but are not limited to a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and the database 1250 is used to store data.
[0393] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0394] In one embodiment of the present specification, the above components of the computing device 1200 and Fig.12 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.12 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0395] The computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 1200 may also be a mobile or stationary server.
[0396] The processor 1220 is used to execute the following computer executable instructions:
[0397] Get the image to be processed;
[0398] Inputting the image to be processed into an image enhancement model for image enhancement processing;
[0399] Obtaining a target image corresponding to the image to be processed output by the image enhancement model;
[0400] Among them, the image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, and optimizes the image enhancement model according to the loss of the enhancement algorithm for enhancing the training image according to the input of the training image into the image enhancement model for enhancement processing relative to the training image dimension.
[0401] The above is a schematic scheme of the second computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned image enhancement method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned image enhancement method.
[0402] Fig.13 The structure block diagram of the third computing device 1300 provided according to an embodiment of the present specification is shown. The components of the computing device 1300 include but are not limited to a memory 1310 and a processor 1320. The processor 1320 is connected to the memory 1310 via a bus 1330, and the database 1350 is used to store data.
[0403] The computing device 1300 also includes an access device 1340 that enables the computing device 1300 to communicate via one or more networks 1360. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1340 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0404] In one embodiment of the present specification, the above components of the computing device 1300 and Fig.13 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.13 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0405] Computing device 1300 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 1300 may also be a mobile or stationary server.
[0406] The processor 1320 is used to execute the following computer executable instructions:
[0407] Acquire at least one image set as a training sample; the training images contained in the image set have corresponding real images;
[0408] Determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension;
[0409] Performing enhancement processing on the training image according to an enhancement algorithm preset for the training image dimension to obtain a first image, and inputting the training image into an image enhancement model to perform image enhancement processing to obtain a second image;
[0410] The image enhancement model is optimized according to the loss of the second image relative to the first image.
[0411] The above is a schematic scheme of the third computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned image enhancement model training method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned image enhancement model training method.
[0412] An embodiment of the present specification also provides a first computer-readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, are used to:
[0413] Receive request data uploaded by a user, wherein the request data includes a model training request;
[0414] Extracting a training image according to the request data, wherein the training image is used for model training;
[0415] According to a preset enhancement algorithm, the training image is enhanced to obtain a first image, and the training image is input into an image enhancement model to obtain a second image;
[0416] Adjusting parameters of the image enhancement model according to the first image and the second image;
[0417] The adjusted parameters of the image enhancement model are shown.
[0418] The above is a schematic scheme of the first computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned image enhancement method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned image enhancement method.
[0419] An embodiment of the present specification also provides a second computer-readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, the second computer-readable storage medium is used to:
[0420] Get the image to be processed;
[0421] Inputting the image to be processed into an image enhancement model for image enhancement processing;
[0422] Obtaining a target image corresponding to the image to be processed output by the image enhancement model;
[0423] Among them, the image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, and optimizes the image enhancement model according to the loss of the enhancement algorithm for enhancing the training image according to the input of the training image into the image enhancement model for enhancement processing relative to the training image dimension.
[0424] The above is a schematic scheme of the second computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned image enhancement method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned image enhancement method.
[0425] An embodiment of the present specification also provides a third computer-readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, is used to:
[0426] Acquire at least one image set as a training sample; the training images contained in the image set have corresponding real images;
[0427] Determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension;
[0428] Performing enhancement processing on the training image according to an enhancement algorithm preset for the training image dimension to obtain a first image, and inputting the training image into an image enhancement model to perform image enhancement processing to obtain a second image;
[0429] The image enhancement model is optimized according to the loss of the second image relative to the first image.
[0430] The above is a schematic scheme of the third computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned image enhancement model training method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned image enhancement model training method.
[0431] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0432] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0433] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that this specification is not limited by the order of the actions described, because according to this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this specification.
[0434] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0435] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A data processing method, comprising: Receive request data uploaded by a user, wherein the request data includes a model training request, the model training request carries a direction for training an image enhancement model, and the direction for training the image enhancement model includes at least one training image dimension; Extracting a training image according to the request data, wherein the training image is used for model training; According to a preset enhancement algorithm, the training image is enhanced to obtain a first image, and the training image is input into an image enhancement model to obtain a second image, wherein the enhancement process of the training image to obtain the first image according to the preset enhancement algorithm includes: extracting image parameters corresponding to the training image dimension of the training image, adjusting the image parameters according to a preset enhancement algorithm corresponding to at least one training image dimension included in the training direction of the image enhancement model, and obtaining a first image after the training image enhancement process according to the adjustment result; Adjusting parameters of the image enhancement model according to the first image and the second image, wherein a direction of adjusting the parameters of the image enhancement model corresponds to the direction carried in the model training request of the user; The adjusted parameters of the image enhancement model are shown.
2. The data processing method according to claim 1, after the step of extracting a training image according to the request data is executed, and the step of enhancing the training image according to a preset enhancement algorithm to obtain a first image, and inputting the training image into an image enhancement model, and before the step of obtaining a second image is executed, further comprising: displaying the training image to the user; When receiving an adjustment request submitted by the user for the training image, adjusting the training image according to the adjustment request to obtain a target training image; Accordingly, the step of performing enhancement processing on the training image according to a preset enhancement algorithm to obtain a first image, and inputting the training image into an image enhancement model to obtain a second image includes: According to the preset enhancement algorithm, the target training image is enhanced to obtain the first image, and the target training image is input into the image enhancement model to obtain the second image.
3. The data processing method according to claim 1, wherein the step of inputting the training image into an image enhancement model to obtain a second image comprises: Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result; The image to be enhanced is input into the image enhancement model for image enhancement processing to obtain the second image.
4. The data processing method according to claim 1, wherein adjusting the parameters of the image enhancement model according to the first image and the second image comprises: Determining a parameter to be enhanced of the second image based on a loss of the second image relative to the first image; The parameters of the image enhancement model are adjusted according to the parameters to be enhanced.
5. The data processing method according to claim 1, after the step of displaying the adjusted parameters of the image enhancement model is performed, further comprising: receiving adjustment data uploaded by the user, wherein the adjustment data includes a parameter adjustment request; Determining a target parameter corresponding to the adjustment data among the parameters of the adjusted image enhancement model, and adjusting the target parameter according to the parameter adjustment request; The adjusted target parameters of the image enhancement model are shown.
6. A data processing device, comprising: A receiving module is configured to receive request data uploaded by a user, wherein the request data includes a model training request, the model training request carries a direction for training an image enhancement model, and the direction for training the image enhancement model includes at least one training image dimension; An extraction module is configured to extract a training image according to the request data, wherein the training image is used for model training; The enhancement module is configured to perform enhancement processing on the training image according to a preset enhancement algorithm to obtain a first image, and input the training image into an image enhancement model to obtain a second image, wherein the enhancement processing on the training image according to the preset enhancement algorithm to obtain the first image includes: extracting image parameters corresponding to the training image dimension of the training image, adjusting the image parameters according to a preset enhancement algorithm corresponding to at least one training image dimension included in the training direction of the image enhancement model, and obtaining the first image after the training image enhancement processing according to the adjustment result; an adjustment module, configured to adjust parameters of the image enhancement model according to the first image and the second image, wherein a direction of adjusting the parameters of the image enhancement model corresponds to the direction carried in the model training request of the user; The display module is configured to display the adjusted parameters of the image enhancement model.
7. An image enhancement method, comprising: Get the image to be processed; Inputting the image to be processed into a target image enhancement model for image enhancement processing; Obtaining a target image corresponding to the image to be processed output by the target image enhancement model; The target image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, wherein the training image dimension is the direction for training the image enhancement model, and the image enhancement model is optimized according to the loss of the enhancement algorithm for enhancing the training image when the training image is input into the image enhancement model for enhancement processing relative to the training image dimension, and the optimization direction of the image enhancement model corresponds to the training direction. The determining of the training image dimension according to the image parameters of the training image and the real image in each image dimension includes: determining the real image parameters of the real image in each image dimension, and the training image parameters of the training image in each image dimension, comparing the training image parameters with the real image parameters, determining the image dimension to which the difference image parameters belong, and determining the image dimension to which the difference image parameters belong is the training image dimension.
8. According to the image enhancement method of claim 7, the process of the enhancement algorithm of the training image dimension performing enhancement processing on the training image is as follows: Extracting image parameters of the training image corresponding to the training image dimension; Adjust the image parameters according to the enhancement algorithm preset for the training image dimension, and obtain a first image according to the adjustment result; The first image is determined as a result of an enhancement algorithm of the training image dimension performing enhancement processing on the training image.
9. According to the image enhancement method of claim 8, the process of the image enhancement model performing enhancement processing on the training image is as follows: Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result; Inputting the image to be enhanced into the image enhancement model for image enhancement processing to obtain a second image; The second image is determined as a result of the image enhancement model performing enhancement processing on the training image.
10. According to the image enhancement method of claim 9, the process of optimizing the image enhancement model is as follows: constructing a first matrix based on the first image, and constructing a second matrix based on the second image; Calculate the Euclidean distance between the first matrix and the second matrix to determine the loss of the second image relative to the first image; The image enhancement model is optimized according to the loss of the second image relative to the first image.
11. An image enhancement device, comprising: An acquisition module, configured to acquire an image to be processed; An input module is configured to input the image to be processed into a target image enhancement model for image enhancement processing; An output module, configured to obtain a target image corresponding to the image to be processed output by the target image enhancement model; The target image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, wherein the training image dimension is the direction for training the image enhancement model, and the image enhancement model is optimized according to the loss of the enhancement algorithm for enhancing the training image when the training image is input into the image enhancement model for enhancement processing relative to the training image dimension, and the optimization direction of the image enhancement model corresponds to the training direction. The determining of the training image dimension according to the image parameters of the training image and the real image in each image dimension includes: determining the real image parameters of the real image in each image dimension, and the training image parameters of the training image in each image dimension, comparing the training image parameters with the real image parameters, determining the image dimension to which the difference image parameters belong, and determining the image dimension to which the difference image parameters belong is the training image dimension.
12. A method for training an image enhancement model, comprising: Acquire at least one image set as training samples; The training images contained in the image set have corresponding real images; Determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension, wherein the training image dimension is a direction for training the image enhancement model; The training image is enhanced according to the enhancement algorithm preset in the training image dimension to obtain a first image, and the training image is input into the image enhancement model for image enhancement to obtain a second image, wherein the enhancement of the training image according to the enhancement algorithm preset in the training image dimension to obtain the first image comprises: extracting image parameters corresponding to the training image dimension, adjusting the image parameters according to the preset enhancement algorithm corresponding to at least one training image dimension included in the training direction of the image enhancement model, and obtaining the first image after the training image enhancement processing according to the adjustment result; The image enhancement model is optimized according to the loss of the second image relative to the first image, and the optimization direction of the image enhancement model corresponds to the training direction.
13. The image enhancement model training method according to claim 12, wherein determining at least one training image dimension in the image dimensions based on the image parameters of the training image and the real image in each image dimension comprises: Determine real image parameters of the real image in each of the image dimensions, and training image parameters of the training image in each of the image dimensions; Comparing the training image parameters with the real image parameters; The at least one training image dimension is determined in the image dimensions according to the comparison result.
14. The image enhancement model training method according to claim 12, wherein the step of inputting the training image into the image enhancement model for image enhancement processing to obtain the second image comprises: Processing the high-frequency information of the training image, and obtaining the image to be enhanced according to the processing result; The image to be enhanced is input into the image enhancement model for image enhancement processing to obtain the second image.
15. The image enhancement model training method according to claim 12, wherein the image enhancement model is trained in the following manner: Construct training image samples based on the model real images corresponding to the model training images; The training image samples are input into an initial image enhancement model for training to obtain the image enhancement model, wherein the initial image enhancement model is constructed based on the relationship between the model training image and the model real image.
16. The image enhancement model training method according to claim 12, wherein the loss of the second image relative to the first image is determined by: constructing a first matrix based on the first image, and constructing a second matrix based on the second image; The Euclidean distance between the first matrix and the second matrix is calculated to determine the loss of the second image relative to the first image.
17. The image enhancement model training method according to claim 12, wherein the optimizing the image enhancement model comprises: Determining a parameter to be enhanced of the second image based on a loss of the second image relative to the first image; The corresponding model parameters in the image enhancement model are adjusted according to the parameters to be enhanced.
18. The image enhancement model training method according to claim 12, after the step of optimizing the image enhancement model according to the loss of the second image relative to the first image is performed, further comprising: Obtaining a target image enhancement model according to a result of optimizing the image enhancement model; Selecting a test image from a preset test image set and inputting it into the target image enhancement model for enhancement processing to obtain a predicted image corresponding to the test image; Comparing the target image corresponding to the test image with the predicted image; When the comparison result is qualified, the target image enhancement model is stored.
19. The image enhancement model training method according to claim 12, wherein the enhancement algorithm comprises at least one of the following: Guided filtering algorithm, contrast linear stretching algorithm, adaptive histogram equalization algorithm, non-local mean algorithm, sharpening algorithm, bilateral filtering algorithm.
20. An image enhancement model training device, comprising: An acquisition module, configured to acquire at least one image set as a training sample; The training images contained in the image set have corresponding real images; a determination module configured to determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension, wherein the training image dimension is a direction for training the image enhancement model; The enhancement module is configured to perform enhancement processing on the training image according to the enhancement algorithm preset in the training image dimension to obtain a first image, and input the training image into the image enhancement model for image enhancement processing to obtain a second image, wherein the enhancement processing on the training image according to the enhancement algorithm preset in the training image dimension to obtain the first image includes: extracting image parameters corresponding to the training image in the training image dimension, adjusting the image parameters according to the preset enhancement algorithm corresponding to at least one training image dimension included in the training direction of the image enhancement model, and obtaining the first image after the training image enhancement processing according to the adjustment result; The optimization module is configured to optimize the image enhancement model according to the loss of the second image relative to the first image, and the optimization direction of the image enhancement model corresponds to the training direction.
21. A computing device comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions: Receive request data uploaded by a user, wherein the request data includes a model training request, the model training request carries a direction for training an image enhancement model, and the direction for training the image enhancement model includes at least one training image dimension; Extracting a training image according to the request data, wherein the training image is used for model training; According to a preset enhancement algorithm, the training image is enhanced to obtain a first image, and the training image is input into an image enhancement model to obtain a second image, wherein the enhancement process of the training image to obtain the first image according to the preset enhancement algorithm includes: extracting image parameters corresponding to the training image dimension of the training image, adjusting the image parameters according to a preset enhancement algorithm corresponding to at least one training image dimension included in the training direction of the image enhancement model, and obtaining a first image after the training image enhancement process according to the adjustment result; Adjusting parameters of the image enhancement model according to the first image and the second image, wherein a direction of adjusting the parameters of the image enhancement model corresponds to the direction carried in the model training request of the user; The adjusted parameters of the image enhancement model are shown.
22. A computing device comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions: Get the image to be processed; Inputting the image to be processed into a target image enhancement model for image enhancement processing; Obtaining a target image corresponding to the image to be processed output by the target image enhancement model; The target image enhancement model determines the training image dimension according to the image parameters of the training image and the real image in each image dimension, wherein the training image dimension is the direction for training the image enhancement model, and the image enhancement model is optimized according to the loss of the enhancement algorithm for enhancing the training image when the training image is input into the image enhancement model for enhancement processing relative to the training image dimension, and the optimization direction of the image enhancement model corresponds to the training direction. The determining of the training image dimension according to the image parameters of the training image and the real image in each image dimension includes: determining the real image parameters of the real image in each image dimension, and the training image parameters of the training image in each image dimension, comparing the training image parameters with the real image parameters, determining the image dimension to which the difference image parameters belong, and determining the image dimension to which the difference image parameters belong is the training image dimension.
23. A computing device comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions: Acquire at least one image set as a training sample; the training images contained in the image set have corresponding real images; Determine at least one training image dimension among the image dimensions based on image parameters of the training image and the real image in each image dimension, wherein the training image dimension is a direction for training the image enhancement model; The training image is enhanced according to the enhancement algorithm preset in the training image dimension to obtain a first image, and the training image is input into the image enhancement model for image enhancement to obtain a second image, wherein the enhancement of the training image according to the enhancement algorithm preset in the training image dimension to obtain the first image comprises: extracting image parameters corresponding to the training image dimension, adjusting the image parameters according to the preset enhancement algorithm corresponding to at least one training image dimension included in the training direction of the image enhancement model, and obtaining the first image after the training image enhancement processing according to the adjustment result; The image enhancement model is optimized according to the loss of the second image relative to the first image, and the optimization direction of the image enhancement model corresponds to the training direction.
24. A computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 5.
25. A computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the image enhancement method according to any one of claims 7 to 10.
26. A computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the image enhancement model training method described in any one of claims 12 to 19.
Citation Information
Patent Citations
Model generation method and device, image enhancement method and device and computer readable storage medium
CN109859152A