Image enhancement method and device

CN118696332APending Publication Date: 2024-09-24SONY (CHINA) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380022198.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-02-25
Filing Date
2023-02-24
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively handle many types of image distortion, especially under harsh lighting conditions. Traditional methods such as histogram equalization and retinal theory have problems such as enhanced noise, low efficiency, and unsuitability. Deep learning methods are limited by Data scarcity and domain bias make it impossible to achieve satisfactory results in practical applications.

Method used

By obtaining image quality information, image enhancement model training is performed based on high-order features, using deep neural networks to extract feature vectors, and constructing loss functions to optimize model parameters to achieve universal enhancement of various types of distortion, reduce data requirements, and avoid Reference image dependencies.

Benefits of technology

It improves the accuracy and stability of image enhancement, is suitable for various types of distortion, simplifies the image processing process, reduces computational overhead, enhances the contrast perception effect, and improves the accuracy of image applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118696332A
    Figure CN118696332A
Patent Text Reader

Abstract

An apparatus and method for training an image enhancement model, the apparatus comprising a processing circuit configured to enhance a distorted sample image using an image enhancement model to obtain an enhanced sample image from the distorted sample image; determining the quality information of the enhanced sample image based on the local feature vectors of the specific number of image blocks in the enhanced sample image; and performing configuration parameter optimization of the image enhancement model based on the quality information of the enhanced sample image.
Need to check novelty before this filing date? Find Prior Art

Description

Image enhancement method and device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202210191132.1 filed on February 25, 2022, the entirety of which is incorporated herein by reference. Technical Field

[0003] The present disclosure relates to image signal processing, and in particular to image enhancement. Background Art

[0004] With the rapid development of display and processing technologies, digital images are playing an increasingly important role in our daily lives. For example, object detection, recognition, comparison, and tracking in static images or a series of moving images (such as videos) are widely and importantly used in image processing, computer vision, pattern recognition, and other fields, playing a vital role in these fields.

[0005] However, digital images are susceptible to various distortions during acquisition, processing, and transmission, such as blur, noise, compression distortion, etc. Therefore, it is necessary to perform appropriate processing on the distorted images to reduce or even eliminate the distortion and enhance the image.

[0006] Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Likewise, unless otherwise indicated, it should not be assumed that problems identified with respect to one or more approaches qualify as prior art based on this section.

[0007] Summary of the Invention

[0008] This Summary is provided to introduce the concepts of the present disclosure in a simplified form, which are described in detail later in the Detailed Description.

[0009] One object of the present disclosure is to optimize image signal processing, in particular to optimize distortion-free image enhancement.

[0010] In one aspect of the present disclosure, a training device for an image enhancement model is provided, the device comprising a processing circuit configured to enhance a distorted sample image using a model for distorted image enhancement to obtain an enhanced sample image from the distorted sample image; determine quality information of the enhanced sample image based on local feature vectors of a specific number of image blocks in the enhanced sample image; and perform configuration parameter optimization of the model for distorted image enhancement based on the quality information of the enhanced sample image.

[0011] In another aspect of the present disclosure, a training method for an image enhancement model is provided, the method comprising enhancing a distorted sample image using a model for distorted image enhancement to obtain an enhanced sample image from the distorted sample image; determining quality information of the enhanced sample image based on local feature vectors of a specific number of image blocks in the enhanced sample image; and performing configuration parameter optimization of the model for distorted image enhancement based on the quality information of the enhanced sample image.

[0012] In another aspect of the present disclosure, an image enhancement device is provided, comprising a processing circuit configured to acquire a distorted image; and apply an image enhancement model trained according to an embodiment of the present disclosure to the distorted image to obtain an enhanced image.

[0013] In yet another aspect of the present disclosure, an image enhancement method is provided, the method comprising acquiring a distorted image; and applying an image enhancement model trained according to an embodiment of the present disclosure to the distorted image to obtain an enhanced image.

[0014] In yet another aspect, a device is provided, comprising at least one processor and at least one storage device having stored thereon instructions that, when executed by the at least one processor, cause the at least one processor to perform the method as described herein.

[0015] In yet another aspect, a storage medium having stored thereon instructions is provided, which when executed by a processor may cause the method as described herein to be performed.

[0016] In yet another aspect, a program product is provided, comprising instructions which, when executed by a processor, cause the processor to perform the method as described herein.

[0017] In yet another aspect, a computer program is provided which, when executed by a processor, enables the processor to implement the method according to any embodiment of the present disclosure.

[0018] Further features of the present disclosure will become apparent from the following description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Preferred embodiments of the present disclosure are described below with reference to the accompanying drawings. The drawings described herein are intended to provide a further understanding of the present disclosure. Together with the following detailed description, each of the drawings is incorporated into and forms a part of this specification and is used to explain the present disclosure. It should be understood that the drawings described below relate only to some embodiments of the present disclosure and are not intended to limit the present disclosure.

[0020] FIG1 shows a general conceptual diagram of an image signal processing flow for distortion image enhancement.

[0021] FIG2 shows a block diagram of a training device for an image enhancement model according to an embodiment of the present disclosure.

[0022] FIG3A shows a flowchart of a method for training an image enhancement model according to an embodiment of the present disclosure, and FIG3B shows a schematic diagram of a training processing flow of an image enhancement model according to an embodiment of the present disclosure.

[0023] FIG4 shows a block diagram of an image enhancement device according to an embodiment of the present disclosure.

[0024] FIG5 shows a flowchart of an image enhancement method according to an embodiment of the present disclosure.

[0025] FIG6 shows a schematic diagram of image enhancement processing according to an embodiment of the present disclosure.

[0026] FIG7 shows an exemplary image enhancement application scenario according to an embodiment of the present disclosure.

[0027] FIG8 shows a signaling interaction flow chart of an exemplary image enhancement according to an embodiment of the present disclosure.

[0028] FIG9 shows a flowchart of an exemplary image enhancement according to an embodiment of the present disclosure.

[0029] 10A to 10C illustrate exemplary image enhancement effect diagrams according to an embodiment of the present disclosure.

[0030] FIG11 illustrates a block diagram showing an exemplary hardware configuration of a computer system capable of implementing an embodiment of the present disclosure.

[0031] It should be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not necessarily drawn to scale. The same or similar reference numerals are used throughout the drawings to indicate the same or similar parts. Therefore, once an item is defined in one drawing, it may not be discussed further in subsequent drawings. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. However, it should be understood that the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The drawings and the following description of the embodiments are actually only illustrative and do not constitute any limitation on the present disclosure and its application or use. It should be understood that the present disclosure can be implemented in various forms and should not be interpreted as being limited to the embodiments set forth herein.

[0033] In addition, when describing exemplary embodiments of the present disclosure below in conjunction with the accompanying drawings, for the sake of clarity and conciseness, not all features of the embodiments are described in the specification. It should be noted that in order to avoid obscuring the present disclosure with unnecessary details, only the processing steps and / or device structures that are closely related to the solutions according to the present disclosure are shown in the accompanying drawings, while other details that are not relevant to the present disclosure are omitted.

[0034] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in different orders and / or performed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect. Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values ​​of the parts and steps set forth in these embodiments should be interpreted as being merely exemplary and do not limit the scope of the present disclosure.

[0035] In the present disclosure, the terms "first," "second," etc. are used merely to distinguish between elements or steps, but are not intended to indicate temporal order, priority, or importance.

[0036] With the increasing popularity of electronic photographic equipment, such as various digital cameras and portable devices equipped with photographic equipment, people are increasingly using electronic photographic equipment to collect / acquire photos, videos, etc. of various scenes, and transmit and save the images of the collected / acquired photos, videos, etc. for application in various applications. However, the image is inevitably affected by distortion (such as inappropriate shooting scene information, compression, defocus blur, motion blur, noise, abnormal exposure, etc.) during the process of collection and transmission. The introduction of distortion will affect the image, such as causing the original image information to be lost / changed to a certain extent, making the image information incomplete and inaccurate, which may result in inaccurate or even wrong detail information, and then affect the image application effect, such as affecting the accuracy of subsequent image-based object recognition / detection. Therefore, image processing is required to suppress, correct or even eliminate distortion, aiming to obtain an enhanced image from a contaminated (e.g., noisy, blurry, compressed, etc.) image.

[0037] However, conventional technologies for distorted images are mainly designed for a single distortion type, but most images in real life belong to multiple distortion types. Simply applying image processing for a single distortion type is difficult to achieve the desired effect.

[0038] In particular, poor lighting conditions can cause various image distortions and impair human perception. Dark environments also hinder computer vision applications such as autonomous driving and surveillance. Therefore, a number of methods have been proposed to enhance the visibility of dark images. Classic methods include histogram equalization and retinal theory. In the histogram equalization method, image contrast is enhanced by equalizing the histogram. The main problem is that it will bring about a large enhancement noise. In the retinal theory method, the low-light image needs to be decomposed into a reflectance map and an illumination map. The decomposition process is time-consuming. Secondly, decomposition errors can easily cause the image to be blurred or unevenly enhanced. Moreover, in addition to failing to achieve better processing results, such methods are mainly only applicable to dark light / low light related distortions and cannot be applied to other types of distortion to obtain good processing results.

[0039] Furthermore, while deep learning methods can be used to process distorted images, similar to many computer vision tasks, which outperform traditional methods, the scarcity of real-world training image pairs and domain bias limit the use of supervised learning methods in practical applications. Although unsupervised low-light image enhancement methods have been proposed, some of these methods still require the use of unpaired, normally illuminated images as references. This increases data requirements and significantly affects the style of the output image. Other methods make strong assumptions about the image's exposure, which limits the enhancement effect and reduces its stability, leading to insufficient enhancement, excessive noise enhancement, and even failed enhancements. Furthermore, the losses in these methods are based on low-level image features such as pixel values, which also limits their enhancement effectiveness.

[0040] In view of this, the present disclosure proposes an improved distorted image enhancement scheme. In particular, the present disclosure proposes obtaining improved information indicating / evaluating image quality, and training an image enhancement model for distorted image enhancement based on such information indicating image quality, so as to obtain an improved image enhancement model and improve the distorted image enhancement effect. In particular, in the context of the present disclosure, image quality is particularly related to the degree of distortion of the image, and generally, the smaller the degree of distortion, the better the image quality. The information indicating / evaluating image quality in the context of the present disclosure can be referred to as image quality information, which can be determined by obtaining high-order features such as image content from the image itself, and then training can be performed based on the information.

[0041] On the one hand, unlike current evaluation and enhancement algorithms based on basic image features such as pixel values, the high-order features obtained in this disclosure can effectively address a variety of distortion types, rather than being limited to specific types of distortion. As a result, the image enhancement model trained based on high-order features has improved universality for distortion enhancement. On the other hand, unlike most deep learning methods that require a large amount of reference annotated data, this solution is based solely on the distorted image to be enhanced, requiring no reference and only the distorted image for training, thereby reducing data requirements and not relying on the style of the reference image.

[0042] The following describes in detail the embodiments of the present disclosure in conjunction with exemplary examples. It should be noted that the images mentioned in the context of the present disclosure, such as distorted images to be enhanced, images used for model training, etc., may refer to any appropriate type of image, such as color images, grayscale images, etc. The type of image is not specifically limited, as long as such images can be processed for feature extraction and can be used for model training and image enhancement. In addition, the image can be the original image or a processed version of the image, such as a version of the image that has undergone preliminary filtering or preprocessing before performing the operations of the present disclosure on the image. Such preliminary preprocessing belongs to some preliminary processing that can be performed before distortion removal / enhancement. For example, the original image obtained by the camera device, or the image that has been subjected to specific processing on the original image, such as preliminary filtering, color adjustment, normalization, etc. It should be noted that the preprocessing operation can also include other types of preprocessing operations known in the art, which will not be described in detail here. In the description of the present disclosure, image and picture can be equivalent to each other and used interchangeably.

[0043] In the embodiments of the present disclosure, images can be obtained through various appropriate means. In particular, photos and videos of various scenes can be obtained through various electronic photographic devices, such as various digital cameras, portable devices equipped with photographic devices, etc., and can be transmitted and stored in various appropriate ways to construct a training sample source or directly used for image enhancement.

[0044] It should be noted that the technical solutions of the present disclosure can be applied to various appropriate tasks, including but not limited to computer vision tasks. In some embodiments, the computer vision tasks include at least one of image classification, object detection, object segmentation, instance segmentation, and panoptic segmentation, so that different tasks can be tuned separately. Computer vision tasks can generally be used in various application scenarios, and distorted image enhancement can then be adaptively performed for computer vision tasks or various application scenarios used by computer vision tasks.

[0045] As an example, one of its application scenarios is autonomous driving. Autonomous driving applications require the support of a series of computer vision tasks, including lane detection, signal light recognition, sign recognition, and vehicle and pedestrian detection. Lane detection requires segmenting lanes based on images, which requires accurate identification of lane lines on the road surface. Signal light recognition requires accurate identification of the position and color of signal lights. Sign recognition requires accurate identification of lane markings or roadside signs. As another example, another application scenario is unmanned retail. Unmanned retail applications primarily require facial detection, facial verification, and product detection capabilities.

[0046] Figure 1 illustrates a process flow for distorted image enhancement according to an embodiment of the present disclosure. During image enhancement, a distorted image is acquired from a distorted image source and fed into a distorted image enhancement model for processing to obtain an enhanced output image. The distorted image source may include any data to be enhanced, such as image data acquired by a camera, and image enhancement may be performed after a certain number of images have been acquired. Alternatively, the distorted image may be acquired in real time by a camera and fed into the distortion enhancement model for enhancement.

[0047] The distortion enhancement model can be trained by optimizing the configuration parameters of the model based on the evaluation of the enhanced sample image. In this case, the distorted image input to the distortion enhancement model can be sample image data, which can be obtained from a distorted sample image source. The distorted sample image source can be different from the aforementioned distorted image source, or alternatively, also included in the distorted image source. During the training process of the distorted image enhancement model, the distorted sample image is input for enhancement, and then feature extraction is performed from the enhanced image to obtain information for evaluating / indicating the quality of the enhanced image. The model configuration parameters are then optimized based on the information, for example, indicators for evaluating the model effect are determined based on the information, and if necessary, feedback can be provided based on the effect to adjust / optimize the parameters of the distorted image enhancement model, thereby performing optimized training of the distorted image enhancement model.

[0048] Figure 2 shows a block diagram of a model training device for distorted image enhancement according to an embodiment of the present disclosure. As shown in Figure 2, device 200 includes processing circuitry 202, which is configured to enhance a distorted sample image using an image enhancement model to obtain an enhanced sample image from the distorted sample image; determine quality information of the enhanced sample image based on image features of a specific number of image blocks in the enhanced sample image; and optimize configuration parameters of the image enhancement model based on the quality information of the enhanced sample image. The image enhancement model here is a trained model for distorted image enhancement.

[0049] According to some embodiments of the present disclosure, the distorted sample images can be various types of images, such as the aforementioned original images or images that have undergone specific preprocessing. Furthermore, the distorted sample images can be selected from a specific database or captured by a photographic device within a specific time period. The specific database can be pre-built and pre-stored in any appropriate device, as long as it can be accessed and images can be selected from it for training.

[0050] In some embodiments, the distorted image can involve various types of distortion, without particular limitation. For example, the distortion in the distorted image includes at least one of low light (or underexposure), fog, motion blur, camera shake, and sensor noise. In the context of this disclosure, low-light images are used as a representative example, and the embodiments of this disclosure are introduced through the enhancement of low-light images. The enhancement methods for other distortions are the same as for low light, requiring only replacing the low-light image with an image of another type of distortion.

[0051] According to some embodiments of the present disclosure, the image enhancement model used for distorted image enhancement can be any appropriate type of model. In some embodiments, the model can be a neural network model, preferably a deep neural network (DNN) network. When applying the image enhancement model for image enhancement, at the initial stage, the configuration parameters of the image enhancement model can be pre-set or initially set, or in the case of iteration, can be the configuration parameters set in the previous iteration operation, which will be described in detail later.

[0052] According to an embodiment of the present disclosure, image quality information obtained based on local image features in an image, such as image block features (which may be referred to as local image blocks) contained in the image, can be obtained by appropriately combining local image features in the image, which may include spatial information, so that it can be a feature indicating the entire image and can better reflect the overall quality of the image.

[0053] According to embodiments of the present disclosure, image quality information indicates image quality, particularly information reflecting image distortion, perceptual effects, and the like. In some embodiments, image quality information may preferably be information related to image contrast perception, considering that image perception, particularly contrast perception, corresponds to the degree of image distortion. This information can more accurately reflect image quality, such as the degree of distortion. This information can be expressed in various appropriate forms. For example, it can take the form of a score that directly indicates image quality, an index that indicates the level of image quality, and so on. As an example, the quality information can be an image quality score that indicates the contrast perception of the image. Generally, a higher image quality score indicates higher / better contrast perception and lower distortion, indicating better distortion suppression / enhancement. This is because contrast perception is reduced in the presence of distortion, and higher distortion levels further reduce contrast perception. In some embodiments of the present disclosure, image quality information can be derived based on statistical values ​​of differences in local image features, as will be described in detail later.

[0054] According to some embodiments of the present disclosure, image blocks used for feature extraction may be determined in various appropriate ways. The image blocks are not particularly limited and may take any shape, number, etc. The size of the image blocks is also not particularly limited, as long as the acquired image blocks are sufficient to support feature extraction.

[0055] According to an embodiment of the present disclosure, the specific number of image blocks are arbitrarily selected from image blocks segmented from the enhanced sample image, or are obtained by traversing the enhanced sample image with a specific window.

[0056] In some embodiments, for an enhanced sample image, the image can be segmented into image blocks of a specific size, and then a specific number of image blocks can be arbitrarily selected from the segmented image blocks. The shape and size of the image blocks are not particularly limited, as long as the image can be properly segmented. For example, the size and resolution of the image blocks can be pre-set, and if the enhanced sample image cannot be properly segmented, the size and resolution of the enhanced sample image can be appropriately adjusted so that a complete segmentation result can be obtained. In other embodiments, a window with a pre-set size can be used to traverse the enhanced image, such as continuous traversal or random traversal, so that a specific number of images can be selected from the image.

[0057] In some embodiments, the local image features extracted from the image may be various appropriate image features, such as SIFT features or other appropriate image features that reflect the local image. Preferably, the extracted local image features are high-order image features, such as high-order features related to the image content, etc. The high-order image features have a low dependence on the distortion type, that is, relatively comprehensive and effective features can be extracted for various types of distorted images, so that the obtained image quality information can more accurately reflect the quality of the image, such as the degree of distortion, perceptual effects (for example, contrast perception), etc. In this way, multiple degrees of distortion can be measured, thereby improving the accuracy of the evaluation of the degree of image distortion in the absence of a reference and an unclear distortion type.

[0058] According to some embodiments of the present disclosure, local image features can be obtained in various appropriate ways and can be expressed in various appropriate forms, such as vector form, etc. In some embodiments, features can be extracted from local images by appropriate feature extractors, and local images can also be referred to as image blocks contained in the image. The feature extractor can be of any appropriate type. In some embodiments, the image features of image blocks are extracted from a specific number of image blocks using a deep neural network (DNN) feature extractor as local image features, which can also be equivalently referred to as local features of the image blocks, and because they are often expressed in vector form, they can also be referred to as local feature vectors. In some embodiments, the DNN feature extractor can be obtained in various appropriate ways, for example, it can be pre-trained based on one or more computer vision tasks, and only the feature extraction part is retained when used, and the weights are fixed. Therefore, in the application composition, picture features can be obtained by using a pre-trained DNN feature extractor.

[0059] According to some embodiments of the present disclosure, determining image quality information may include calculating the difference values ​​between local feature vectors of corresponding image blocks in the specific number of image blocks, and determining the image quality information based on the statistical characteristics of the difference values ​​between the calculated local feature vectors. According to some embodiments of the present disclosure, various appropriate methods may be used to calculate the difference values ​​between local feature vectors. As an example, the calculation method includes at least one of the L norm, the log-L norm, and the radial basis function. According to an embodiment of the present disclosure, the statistical value may be any appropriate statistical feature, including at least one of the mean, the median, the minimum, and the quantile. In this way, image quality information that better characterizes the image quality can be obtained.

[0060] It should be noted that for an image block, its corresponding image block can be determined from a predetermined number of image blocks in any appropriate manner. In one embodiment, for an image block, any one of the remaining image blocks in a specific number of image blocks can be selected as its corresponding image block. As yet another embodiment, for an image block, its corresponding image block is an image block in the specific number of image blocks that has a specific neighbor relationship with the image block.

[0061] According to an embodiment of the present disclosure, for each of the specific number of image blocks, its Kth nearest neighbor image block is selected as its corresponding image block to calculate the difference value between the local feature vectors between the two. It should be noted that for an image block, its Kth nearest neighbor image block can be an image block that is Kth in distance from the image block from the smallest to the largest. The distance between image blocks can be calculated in various appropriate ways, such as by the difference between the features of the image blocks. The features extracted here can be the local features of the aforementioned image blocks, or other types of image block features, which will not be described in detail here. As an example, feature extraction is performed on all image blocks, and for each image block, the difference value between its feature vector and other image blocks is calculated, and then the calculated feature vector difference values ​​are sorted from the smallest to the largest, and the difference value ranked K is selected from them for use in calculating image quality information.

[0062] In the embodiment of the present disclosure, the image quality information CP(X) related to contrast perception (CP) can be calculated as follows: Let X be the input image, x i is a randomly selected image patch from X, with a total of n, and g is a feature extractor, such as a DNN feature extractor. As an example, the portion of the VGG16BN pre-trained on ImageNet from the input layer to the last batch normalization layer can be used as the DNN feature extractor. Then:

[0063] Among them, ε represents the image block x i The extracted feature vector of another corresponding image block, such as the Kth nearest neighbor image block, can be used to calculate image quality information. The above formula is based on the entropy estimation based on the sampled K nearest neighbors. The above formula can be used to calculate image quality information of the enhanced image, and can also be used to calculate image quality information of the unenhanced distorted image.

[0064] According to embodiments of the present disclosure, image quality information can indicate / evaluate the performance of an image enhancement model on image enhancement, such as the degree of distortion of the image obtained after image enhancement. This information can correspond to the enhancement effect of the image enhancement model and can be used to train / optimize the image enhancement model, thereby improving the image enhancement performance of the image enhancement model in real-world environments. It should be noted that the image quality information here can, in a sense, be considered to be a model evaluation score based on the model output obtained by enhancing a distorted image using the image enhancement model, and the image configuration model can be optimized based on this score.

[0065] In some embodiments, optimizing the image configuration model may include, for example, tuning the configuration parameters of the image enhancement model to optimize the image enhancement model. The configuration parameters of the image enhancement model are the configuration parameters used by the image enhancement model to enhance the sample image during the image enhancement process. Here, the optimization of the configuration parameters takes into account the execution effect / completion status of the image enhancement, and is optimized with the goal of making the execution effect of the image enhancement better. In some embodiments, the configuration parameters can be adjusted so that the effect achieved when the image enhancement is completed based on the adjusted configuration parameters is better.

[0066] According to an embodiment of the present disclosure, a loss function is constructed based on the quality information of the enhanced sample image to train the model for distorted image enhancement. In particular, the image quality information representing contrast perception can be used to construct a loss function for model training in an appropriate manner, which may depend on the model used and the model training method.

[0067] In some embodiments, the image quality information indicating contrast perception can be used in direct proportion as a loss function. Specifically, in the model training of a specific mode, the larger the loss function is, the better and easier it is to converge. In this case, it is exactly synchronized with the image quality requirements, so the image quality information can be used in direct proportion to construct the loss function. In other embodiments, the loss function depends on the negation or inverse of the quality information of the enhanced sample image. Specifically, in the model training of a specific mode, the smaller the loss function is, the better and easier it is to converge. In this case, it is exactly opposite to the image quality requirements, and it is necessary to invert the loss function for training. It should be pointed out that contrast perception or image quality information can also be used as a loss function in other appropriate ways. For example, other functions constructed based on image quality information, forward functions or reverse functions, etc. can be used, which will not be described in detail here.

[0068] As described above, by constructing a loss function based on image quality information for evaluating image quality to train an image enhancement model, the resulting image enhancement model can accurately and efficiently improve / enhance distorted images. In particular, it can accurately and efficiently enhance the contrast perception effect of images.

[0069] Specifically, since no reference is required during model training, only distorted images are needed for training, data requirements are reduced. Furthermore, during model training, deep learning is used to extract image feature vectors to obtain high-level features such as image content. These extracted high-level features can better cover various types of image distortion, meaning that relatively comprehensive and effective features can be extracted for all types of distorted images. Image quality information is then determined based on these high-level features, which is then used for model training. The resulting model can better apply to a variety of distortion types, resulting in greater universality.

[0070] According to an embodiment of the present disclosure, additionally or alternatively, in addition to the aforementioned image quality information, the loss function for model training may also be constructed based on other parameters / indicators.

[0071] In some embodiments, the loss function used for model training can also be constructed based on consistency information that indicates / evaluates image consistency. Image consistency refers to the consistency / similarity between the image enhanced by applying the model and the distorted image. Therefore, the consistency information can be expressed in any appropriate form as long as it can reflect the consistency between the images. Preferably, depending on the model training method, etc., the obtained image consistency information can be directly used or inverted to obtain the content consistency loss.

[0072] According to some embodiments of the present disclosure, image consistency information can be obtained in various appropriate ways. In some embodiments, the consistency between the images can be determined based on an image feature vector between the distorted image and the enhanced image, preferably based on image feature vectors of corresponding image blocks contained in the distorted image and the enhanced image.

[0073] The image blocks used to determine image consistency and their feature extraction can be determined in various appropriate ways. In some embodiments, the method of determining the image blocks for image consistency and the image feature extractor used to extract the image feature components can be the same as the aforementioned case for determining the image quality information, and will not be described in detail here. In other embodiments, an image block that is at least different from the image block for determining the image quality information and / or a feature extractor that is different from the feature extractor used to determine the image quality information can be used for feature extraction. In still other embodiments, even all image blocks can be used for determining image consistency.

[0074] According to some embodiments of the present disclosure, image blocks in the distorted image and the enhanced image can be obtained in the same manner. For example, the distorted image and the enhanced image can be segmented in the same / corresponding manner, and the image blocks, or even all image blocks, can be selected correspondingly. For example, if the distorted image and the enhanced image have different sizes / resolutions, they can be resized to have the same size / resolution and then segmented in the same / corresponding manner.

[0075] According to an embodiment of the present disclosure, image consistency information can be determined based on the feature vector difference between the corresponding pixels / image blocks in the distorted image and the enhanced image. Specifically, for each pixel / image block in the distorted image, the distance between its pixel value / feature value and the corresponding pixel / image block in the enhanced image is calculated, and then the statistical value of the pixel value / feature value distance between all image blocks is used to determine the consistency between the distorted image and the enhanced image. In some embodiments, the distance between pixel values / feature values ​​can be determined based on the difference between pixel values / feature values. As an example, calculating consistency includes calculating the L-norm of the corresponding pixel value difference between the distorted sample image and the enhanced image; or calculating the L-norm of the corresponding local feature difference between the distorted sample image and the enhanced image.

[0076] In other embodiments, image consistency information can be determined based on all image blocks in the distorted image and the enhanced image. Specifically, for each image block in the distorted image, the difference between its feature vector and that of each image block in the enhanced image is calculated, and then the statistical value of the feature vector differences between all image blocks is used to determine the consistency between the distorted image and the enhanced image. Such consistency information may correspond to a consistency evaluation index, which may be in various appropriate forms. As an example, specifically, the distance from the enhanced image feature vector to all input image feature vectors can be calculated, and the distance from the enhanced image feature vector to the corresponding position feature vector can be used as the positive example distance, and the other distances can be used as the negative example distance, and the negative cross entropy loss can be calculated to obtain the content consistency loss as the consistency information. Preferably, the vector distance is calculated using Euclidean distance, and the content consistency loss is calculated using negative cross entropy loss as the consistency information. In addition, preferably, when using negative cross entropy loss to calculate the content consistency loss, the square of its negative cross entropy temperature parameter is used as its weight.

[0077] According to embodiments of the present disclosure, an image enhancement model can be trained based on both quality information and consistency information. The optimization goal is to improve image quality information while maintaining high content consistency, thereby further optimizing the trained image enhancement model. In particular, the quality information and consistency information can be combined in any suitable manner to construct a loss function.

[0078] In some embodiments, a loss function for training the model for distorted image enhancement can be constructed based on a linear combination of the quality information of the enhanced sample image and the consistency information. For example, the loss function can be constructed by simply adding the quality information loss and the consistency loss. For another example, the loss function can be constructed by taking a weighted sum of the quality information loss and the consistency loss, where the weight of each loss can be appropriately set, for example, manually or based on experience.

[0079] In other embodiments, the quality information and the consistency evaluation index can be weighted and combined. According to some embodiments, the quality information of the sample image (i.e., the sample image before enhancement) can be used as a weight to weight the consistency loss of the enhanced sample image. For example, the consistency information can be further multiplied by the quality information of the enhanced image, and then the weighted consistency loss is used as the loss function for training the image enhancement model for distorted image enhancement. Here, the quality information of the sample image can be determined in the manner described above and will not be described in detail here.

[0080] According to some other embodiments, the quality information of the sample image can be used as a weight to weight the consistency loss, and then a linear combination or weighted sum of the weighted consistency loss and the quality loss of the enhanced sample image is used as a loss function for training the image enhancement model for distorted image enhancement.

[0081] From the above, a loss can be constructed based on both image quality and image consistency. This further optimizes the trained model and enables better enhancement of distorted images, thereby improving image quality while maintaining high content consistency. Furthermore, in the embodiments of the present disclosure, model training can be performed solely based on distorted images, and in particular, enhanced images, without reference to other data, thus saving data overhead.

[0082] According to embodiments of the present disclosure, image enhancement model parameters can be updated / optimized using various appropriate methods, such as using a gradient descent optimizer based on a loss function. This is a commonly used method in the art and will not be described in detail here.

[0083] In the structural example of the above-mentioned apparatus, the processing circuit 202 can be in the form of a general-purpose processor or a dedicated processing circuit, such as an ASIC. For example, the processing circuit 202 can be constructed by a circuit (hardware) or a central processing device (such as a central processing unit (CPU)). In addition, the processing circuit 202 can carry a program (software) for operating the circuit (hardware) or the central processing device. The program can be stored in a memory (such as, arranged in the memory) or an external storage medium connected from the outside, and can be downloaded via a network (such as the Internet).

[0084] According to an embodiment of the present disclosure, the processing circuit 202 may include various units for implementing the above functions, such as an enhancement unit 204, configured to enhance the distorted sample image using an image enhancement model to obtain an enhanced sample image from the distorted sample image; a quality information determination unit 206, configured to determine the quality information of the enhanced sample image based on the local feature vectors of a specific number of image blocks in the enhanced sample image; and an optimization unit 208, configured to perform configuration parameter optimization of the image enhancement model based on the quality information of the enhanced sample image. Preferably, the quality information may indicate the contrast perception of the enhanced sample image. Preferably, the local feature vector of the image block may be a high-order image feature extracted from the image block.

[0085] In some embodiments, the quality information determination unit 206 may include a difference value calculation unit 210, which is configured to calculate the difference values ​​between the local feature vectors between corresponding image blocks in the specific number of image blocks, thereby determining the image quality information based on the statistical characteristics of the difference values ​​between the calculated local feature vectors.

[0086] In some embodiments, the processing circuit 202 may further include a consistency indicator generation unit 212, also referred to as a consistency information determination unit, configured to determine consistency information between the distorted sample image and the enhanced sample image. Preferably, the consistency information is determined based on the difference between the feature vectors of the distorted sample image and the enhanced sample image. Thus, the model for distorted image enhancement can be trained based on the quality score of the enhanced sample image and the consistency evaluation indicator.

[0087] It should be noted that although FIG2 shows the various units as separate units, one or more of these units may be combined into a single unit, or split into multiple units. In addition, some units may not be included in the processing circuit or even the training device, and thus may be shown with dashed lines. As an example, the consistency information determination unit 212 may also be included in the optimization unit 210, or even outside the processing circuit 202, and thus may also be shown with dashed lines.

[0088] It should be noted that the above-mentioned units are merely logical modules divided according to the specific functions they implement, and are not intended to limit specific implementation methods. For example, they can be implemented in software, hardware, or a combination of software and hardware. In actual implementation, the above-mentioned units can be implemented as independent physical entities, or can also be implemented by a single entity (for example, a processor (CPU or DSP, etc.), an integrated circuit, etc.). In addition, the above-mentioned units are shown with dotted lines in the accompanying drawings to indicate that these units may not actually exist, and the operations / functions they implement can be implemented by the processing circuit itself.

[0089] It should be understood that Figure 2 is only a schematic structural configuration of a device for model training of distorted image enhancement. The training device 200 may also include other possible components, such as memory, network interface, controller, etc., which are not shown for the sake of clarity. In particular, the processing circuit can be associated with the memory. For example, the processing circuit can be directly or indirectly (for example, other components may be connected in the middle) connected to the memory to access image processing related data. The memory can store various data and / or information generated by the processing circuit 202. The memory can also be located within the optimization device but outside the processing circuit, or even outside the optimization device. The memory can be volatile memory and / or non-volatile memory. For example, the memory can include but is not limited to random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), and flash memory.

[0090] The following describes a flowchart of a model training method for distorted image enhancement according to an embodiment of the present disclosure with reference to FIG3A . In method 300 , in an enhancement step S301 , a distorted sample image is enhanced using an image enhancement model to obtain an enhanced sample image from the distorted sample image; in a quality information determination step S302 , quality information of the enhanced sample image is determined based on local feature vectors of a specific number of image blocks in the enhanced sample image; and in an optimization step S304 , configuration parameters of the image enhancement model are optimized based on the quality information of the enhanced sample image.

[0091] Preferably, the quality information determination step S302 may further include calculating the difference values ​​between the local feature vectors between the object image blocks in the specific number of image blocks, thereby determining the image quality information based on the statistical characteristics of the difference values ​​between the calculated local feature vectors.

[0092] Preferably, the method further includes a consistency information determination step (S303), in which a consistency evaluation index between the distorted sample image and the enhanced image is determined. This allows the model for distorted image enhancement to be trained based on the quality information of the enhanced sample image and the consistency information. This consistency calculation step can be performed before the optimization step, or it can be included in the optimization step, as shown by the dashed line.

[0093] It should be noted that these steps can be performed by any appropriate device or device component, such as the aforementioned tuning device, the processing circuit in the tuning device, the corresponding components in the processing circuit, etc. It should be noted that the image processing method according to the embodiments of the present disclosure may also include other steps, such as the various further processing described above. Moreover, these further processing can also be performed by appropriate devices or device components and will not be described in detail here.

[0094] According to an embodiment of the present disclosure, the model training of the present disclosure is preferably performed iteratively, that is, the above-mentioned model training process can be regarded as an iterative operation in the model training, and whether to perform the next iteration will be determined based on whether the iteration termination condition can be met.

[0095] According to an embodiment of the present disclosure, the processing circuit is further configured to iteratively perform image enhancement model training, i.e., optimize the configuration parameters of the image enhancement model. In other words, the aforementioned process of enhancing the image, determining quality information of the enhanced image, optionally determining image consistency information, and finally optimizing the configuration parameters of the image enhancement model can be iteratively performed. Each iteration of the process can be performed as described above, as shown in FIG3B .

[0096] In some embodiments, the initial values ​​of the configuration parameters of the model for distorted image enhancement, such as the initial weight values, can be randomly initialized or pre-trained based on other computer vision tasks. Then, the image quality information can be determined as described above and a loss function can be constructed based thereon for training. If the training end condition cannot be met, the next training operation is performed using the image enhancement model with optimized configuration parameters until the training end condition is met.

[0097] In an embodiment of the present disclosure, during each iteration, the image blocks used in operations such as image quality information determination and image consistency information determination can adopt the same image blocks as those in the previous iteration, such as size, position, etc.; of course, they can be different, for example, in each iteration, the image blocks used in operations such as image quality information determination and image consistency determination, such as size, position, etc., are re-determined.

[0098] In some embodiments, the image blocks in each iteration are randomly selected, or can be selected from pre-segmented image blocks, or can be randomly selected by traversing the image using a window. In some embodiments, when the model training is performed iteratively, the image block correspondence can remain the same during the image quality information determination process, for example, the same K-th nearest neighbor can be used throughout, that is, the K value remains unchanged across iterations. Alternatively, the image block correspondence can vary during the iteration, for example, the K value can be different in different iterations, that is, different K-th nearest neighbors are used in the image quality information determination process in different iterations.

[0099] According to embodiments of the present disclosure, the iterative process of model training / configuration parameter optimization can be performed in any appropriate manner. In particular, the iteration can be terminated according to specific conditions. In some embodiments of the present disclosure, the processing circuit is configured to iteratively train the model for distorted image enhancement, wherein the training is stopped when one of the following conditions is met: (1) the quality information based on the enhanced sample image is better than a specific threshold; (2) the number of iterations reaches a specific number threshold; and (3) the image quality performance value after the specific number of times is no longer better than the previous image enhancement quality.

[0100] In particular, the iteration termination condition includes at least one of the following: stopping the iteration when the number of iterations reaches a predetermined threshold; stopping the iteration when the evaluation result after one iteration, such as the result obtained using the image enhancement model, especially the image quality score and / or the combination of the image quality score and the consistency evaluation is no longer better than the result of the previous iteration; and stopping the iteration when the result obtained by the image enhancement model after a specific number of iterations is no longer better than the result obtained in the previous specific number of iterations.

[0101] As an example, the predetermined number of times threshold can be any appropriate value, which can be appropriately set by the operator, for example, based on experience or based on the workload requirements of the relevant equipment, or based on the results of the previous parameter adjustment operation, for example, it can be set to the empirical value of the number of iterations of the previous parameter adjustment operation. For example, the predetermined number of times threshold can be 30 times. As another example, if the evaluation score for the first threshold number of times in a row does not increase compared to the previous repetition, the iteration can be stopped. Here, the evaluation score for the first threshold number of times in a row refers to the evaluation score obtained by continuously performing the configuration parameter adjustment for the first threshold number of times and then calculating the adjusted configuration parameters. The continuous execution of the first threshold number of adjustments can be performed as described above and will not be described in detail here. Preferably, the first threshold is 10 times.

[0102] In addition, the image enhancement model parameters in each iteration can be appropriately updated / optimized. This update / optimization can be performed in various appropriate ways, for example, a gradient descent optimizer can be used to update / optimize the parameters.

[0103] According to an embodiment of the present disclosure, an improved distorted image enhancement scheme is also proposed, wherein the image enhancement model trained according to the embodiment of the present disclosure can be applied to the distorted image to be corrected / enhanced to obtain an enhanced image.

[0104] Figure 4 shows a block diagram of a device for distorted image enhancement according to an embodiment of the present disclosure. As shown in Figure 4, device 400 includes processing circuitry 402 configured to acquire a distorted image and apply a distorted image enhancement model trained according to the aforementioned embodiments to the distorted image to be enhanced, thereby obtaining an enhanced image.

[0105] According to some embodiments of the present disclosure, the distorted image to be enhanced may be the entire acquired distorted image, so that the acquired distorted image can be directly used as the distorted image to be enhanced. That is, the distorted image enhancement model can be directly applied to the acquired distorted image to achieve image enhancement. In other embodiments of the present disclosure, specific conditions or information may also be considered in the image enhancement process. As an example, the distorted image to be enhanced may be a portion of the acquired distorted image, which may be determined taking into account specific conditions or information. In some embodiments, the above-mentioned image enhancement process may also be performed taking into account the image quality score. In particular, the above-mentioned image enhancement process may be performed based on the quality information (e.g., image quality score) of the acquired or to-be-processed distorted image, such as deciding whether to apply the distorted image enhancement model. In some embodiments, for a distorted image acquired or to be processed, the quality score of the distorted image can be first calculated, and then it can be determined whether the quality score of the distorted image is higher than a preset threshold or a specific threshold. When the image quality score is greater than the preset threshold or the specific threshold, the distorted image can be directly output; when the image quality score is less than the preset threshold or the specific threshold, such a distorted image can be considered to need to be enhanced, which can be referred to as a distorted image to be enhanced. The distorted image is enhanced using an image enhancement model according to an embodiment of the present disclosure. Here, enhancement can be performed on the distorted image in the manner described above based on the image quality information (image quality score) and / or the enhancement model, as shown in Figure 6.

[0106] In some embodiments of the present disclosure, the preset threshold or specific threshold can be set manually, for example, according to the application scenario, or calculated based on the empirical distribution of distorted and undistorted images. As an example, an a priori operation can be used to determine the image quality score value that can distinguish between distorted and undistorted images. If the image quality score is higher than this, it can be considered to be an undistorted image, otherwise it will be considered to be a distorted image. As another example, the threshold can be determined by the image quality score distribution based on the reference image. In particular, for existing distorted images and undistorted images, the empirical distribution of their image quality scores, such as Gaussian distribution, is calculated respectively, and then the statistical value of the empirical distribution is calculated to determine the threshold.

[0107] Existing automatic image enhancement methods require first classifying the type of image distortion and then performing different enhancements based on the classification results. Therefore, if the classification is incorrect or unstable, it will directly lead to enhancement failure. In contrast, the image enhancement method according to the embodiments of the present disclosure does not require classification, making it simpler and more stable.

[0108] Moreover, by precalculating the quality score of the distorted image and not enhancing the distorted image when the quality score of the distorted image is greater than a threshold, the computational overhead can be further saved while still meeting the image application requirements.

[0109] According to embodiments of the present disclosure, processing circuit 402 can be implemented in various appropriate manners, as described above for processing circuit 202, and will not be described in detail here. In particular, according to embodiments of the present disclosure, processing circuit 402 can include various units for implementing the aforementioned functions, such as an acquisition unit 404 configured to acquire a distorted image; and an enhancement unit 406 configured to apply the distorted image enhancement model trained according to the aforementioned embodiments to the distorted image to be enhanced, to obtain an enhanced image.

[0110] In some embodiments, the processing circuit 402 may further include a determination unit 408 configured to determine whether the image quality information of the distorted image is greater than a preset threshold or a specific threshold. When the image quality information of the distorted image is greater than the preset threshold or the specific threshold, the distorted image is directly output; when the image quality information of the distorted image is less than the preset threshold or the specific threshold, the distorted image is enhanced using a distorted image enhancement model trained according to the preceding claims. Here, the image quality information of the distorted image can be determined as described above, which can be performed within the processing circuit 402 or even the determination unit 408, or can be determined by another device outside the processing circuit and provided to the processing circuit or even the determination unit. In particular, the determination unit 408 is also shown with dashed lines to indicate that it may not be included in the processing circuit. For example, it may be located within the processing circuit and merely transmit the determination result to the processing circuit.

[0111] It should be understood that the device 400 may also include other possible components, such as memory, network interface, controller, etc. In particular, the processing circuit may be associated with the memory. For example, the processing circuit may be directly or indirectly (for example, other components may be connected in the middle) connected to, or even include, a memory to access image processing related data. The memory can store various data and / or information generated by the processing circuit 402. The memory may also be located within the optimization device but outside the processing circuit, or even outside the optimization device. The memory may be a volatile memory and / or a non-volatile memory. For example, the memory may include, but is not limited to, a random access memory (RAM), a dynamic random access memory (DRAM), a static random access memory (SRAM), a read-only memory (ROM), and a flash memory.

[0112] The following describes a flowchart of a distorted image enhancement method according to an embodiment of the present disclosure with reference to FIG5 . In method 500 , in an acquisition step S501 , a distorted image is acquired; in an enhancement step S503 , the distorted image enhancement model trained according to the aforementioned embodiment is applied to the distorted image to be enhanced to obtain an enhanced image.

[0113] In some embodiments, the method 500 may further include a determination step S502, wherein it is determined whether the image quality information of the distorted image is greater than a preset threshold or a specific threshold. When the image quality information of the distorted image is greater than the preset threshold or the specific threshold, the distorted image is directly output; when the distorted image quality information is less than the preset threshold or the specific threshold, the distorted image is enhanced using the distorted image enhancement model trained according to the preceding claims. This determination step may be performed before the enhancement step, or may be included in the enhancement step, or even outside of the method 500, as indicated by a dashed line.

[0114] It should be noted that these steps can be performed by any appropriate device or device component, such as the aforementioned image enhancement device, the processing circuit in the image enhancement device, the corresponding components in the processing circuit, etc. It should be noted that the image enhancement method according to the embodiments of the present disclosure may also include other steps, such as the various further processing described above. Moreover, these further processing can also be performed by appropriate devices or device components and will not be described in detail here.

[0115] The following will describe in detail an exemplary implementation of image enhancement model training and application according to the present disclosure with reference to Figures 7-9, which show both image enhancement model training and application, i.e., performing image enhancement model training and generating enhanced output based on the trained image enhancement model.

[0116] Figure 7 shows a scenario in which distorted image enhancement according to an embodiment of the present disclosure can be implemented, wherein the input image to be proofread / enhanced can be a distorted image, such as a low-light image. When implementing the distorted image enhancement model training in the present disclosure, the distorted (low-light pictures are used as an example here) pictures, DNN feature extractors, DNN enhancers, and gradient descent-based optimizers are involved or needed to be used, wherein the gradient descent optimizer is used to optimize the weights of the DNN enhancer, and the optimization goal is to improve the picture quality score while maintaining high content consistency. The trained model is then applied to output the enhanced picture. Here, low-light pictures are used as a representative, and the embodiment of the present disclosure is introduced through the enhancement of low-light pictures. The enhancement methods of other distortions are consistent with low-light, and it is only necessary to replace the low-light pictures with pictures of other distorted types.

[0117] Figure 8 illustrates a signaling interaction flow chart for an exemplary image enhancement process according to an embodiment of the present disclosure. Specifically, the distorted image enhancement framework illustrated in Figure 8 illustrates an example of training a distorted image enhancement model, where both image quality scores and image content consistency are used for model training. Such a distorted image enhancement model can be applied to a distorted image to be enhanced, which can be derived from a distorted image data source, to obtain an enhanced image output.

[0118] In the information interaction process of the distorted image enhancement framework, data is read from the low-light image data source and input into the DNN enhancer and DNN feature extractor respectively. The output of the aforementioned DNN enhancer is also input into the DNN feature extractor, and the output of the aforementioned DNN feature extractor can be input into the contrast perception calculation module and the content consistency calculation module. Specifically, the feature vector extracted from the enhanced image is used to calculate the image quality score of the enhanced image, and the feature vectors extracted from both the low-light image and the enhanced image can be used to calculate the content consistency between the low-light image and the enhanced image. Thus, the output results of the aforementioned contrast perception calculation and content consistency calculation modules are input into the gradient descent optimizer, and based on the output results of the aforementioned gradient descent optimizer, the parameters of the DNN enhancer are updated accordingly.

[0119] In the framework of Figure 8 , the low-light image data source can be used as an example of an image library that provides images for image enhancement model training. During training, it is a database that stores training data. Alternatively, the low-light image data source can also be used to provide low-light image data to which the model is applied for enhancement. As an example, the low-light image data can be captured by a camera, and the low-light image data source can store the image data stream captured by the camera.

[0120] The contrast perception calculation module can serve as an example of an image quality information determination unit according to embodiments of the present disclosure. As described above, the module can determine quality information of the pre- and post-enhancement images according to embodiments of the present disclosure, including calculating the contrast perception of the enhanced image. Preferably, this module is also used to calculate the contrast perception of the input image as an input image quality assessment.

[0121] The content consistency calculation module can be used as an example of a consistency information determination unit according to an embodiment of the present disclosure. As described above, the module can calculate the content consistency between the input distorted image and the enhanced image based on their respective feature vectors according to an embodiment of the present disclosure. Preferably, negative cross entropy loss is used as an indicator of content consistency.

[0122] A DNN enhancer can be used as an example of an image enhancement model according to embodiments of the present disclosure. It can be used to input a low-light image and output an enhanced image with the same resolution as the input image. Optionally, it can be a U-Net, FCN, or Deeplab-v3 model. Preferably, the DNN enhancer in this disclosure is a U-Net.

[0123] A DNN feature extractor can be used as an example of a feature vector extractor according to an embodiment of the present disclosure. It inputs an image block and outputs its high-order feature vector. Preferably, the DNN feature extractor in the present disclosure is the neural network between the input layer and the last batch normalization layer in the VGG16BN model. In the present disclosure, the DNN feature extractor is a pre-trained network pre-trained based on any specific computer vision task. Optionally, the DNN feature extractor in the present disclosure is pre-trained based on the ImageNet classification task.

[0124] A gradient descent optimizer can be used for model training based on a loss function. It calculates the training loss based on contrast perception and content consistency, and calculates the weight update gradient based on the training loss and the weights of the DNN enhancer, thereby reducing the training loss. A gradient descent optimizer can be a commonly used optimizer for iterative model training / optimization in the art.

[0125] Figure 9 shows a flowchart of an exemplary image enhancement according to an embodiment of the present disclosure, which includes model training and application. In conjunction with the application scenario shown in Figure 7, the specific implementation of the distorted image enhancement solution according to an embodiment of the present disclosure is as follows.

[0126] a) Randomly initialize the weights of the DNN enhancer.

[0127] b) Input the low-light image into the DNN enhancer to obtain the enhanced image.

[0128] c) Randomly extract a certain number of image blocks from the enhanced image. Preferably, 128 image blocks of 256x256 pixels may be extracted. If the input image size is smaller than 256x256 pixels, it may be stretched. Optionally, the image blocks may be horizontally flipped for data augmentation.

[0129] d) Extract feature vectors from all image patches using a DNN feature extractor. Preferably, a VGG16BN pre-trained on ImageNet can be used as the feature extractor, retaining only the portion up to the last batch normalization layer.

[0130] e) Based on the extracted feature vectors, calculate the difference between all two features, preferably the logarithmic L2 norm.

[0131] f) For each eigenvector, calculate a statistic of the difference between it and the other eigenvectors, preferably the 7th smallest value or median, which is the difference between the eigenvector and its corresponding eigenvector, where the corresponding eigenvector is the eigenvector corresponding to such value.

[0132] g) The statistics of all eigenvectors are averaged as the contrast perception of the image, which is the image quality information of the image, and the inverse of the average is used as the contrast perception loss.

[0133] h) Randomly extract a certain number of image blocks from the enhanced image, and extract image blocks at corresponding positions from the low-light input image. Preferably, the extracted image blocks can be consistent with those in c).

[0134] i) Extract feature vectors from all image blocks using a DNN feature extractor, preferably the same DNN feature extractor as in d).

[0135] j) Based on the extracted feature vector, the content consistency loss is calculated. Optionally, the content consistency loss can be obtained by calculating the distance from the enhanced image feature vector to its corresponding low-light image feature vector and inverting it. Optionally, it can be obtained by calculating the distance from the enhanced image feature vector to all input image feature vectors, taking its distance to the feature vector at the corresponding position as the positive example distance, and other distances as the negative example distance, and calculating the negative cross entropy loss. Preferably, the Euclidean distance is used to calculate the vector distance, and the negative cross entropy loss is used to calculate the content consistency loss. In addition, preferably, when using the negative cross entropy loss to calculate the content consistency loss, the square of its negative cross entropy temperature parameter is used as its weight.

[0136] k) Based on the input low-light image, calculate its distortion level, use the distortion level as a weight for content consistency, and obtain image quality weighted consistency. Preferably, calculate the contrast perception of the input image as the weight.

[0137] l) Combine the contrast perception loss and the image quality weighted consistency loss as the training loss function. Preferably, the weights are both 1, and the content consistency loss uses the negative cross entropy loss.

[0138] m) Using a gradient descent optimizer, based on the input low-light image, optimize the weights of the DNN enhancer to reduce the training loss function. Optionally, the optimizer is at least one of SGD, Adam, RMSProp, and Adabound.

[0139] n) During training, to improve computational efficiency and stability, it is preferable to divide the training low-light images into multiple batches, and calculate the loss and perform gradient descent on each batch of data at a time. Specifically, a total loss can be calculated for all images in a batch of distorted images. The loss can be calculated using various appropriate methods, such as a statistical value of the loss for each image, such as the sum of the image losses, the mean of the losses, the median of the losses, etc., and then gradient descent is performed based on the total loss, rather than calculating the loss for each image and performing gradient descent based on the loss as previously done.

[0140] o) To achieve better results, the enhanced model training can preferably be performed iteratively. Specifically, based on the optimized DNN enhancer, steps b) through n) are repeated until the number of repetitions reaches a first threshold, or the loss function does not decrease after a second threshold number of consecutive repetitions. Preferably, the first threshold is 30 times, and the second threshold is 10 times.

[0141] The above operations can be considered as the training process of the image enhancement model according to the present disclosure, thereby obtaining an improved image enhancement model. Then, by applying such an image enhancement model, an enhanced image can be output.

[0142] The following describes, with examples, the improvement effects that can be achieved by the no-reference training image enhancement model according to the embodiments of the present disclosure, particularly improving the visual effects of low-light images.

[0143] In this example, existing public image data is used to train a neural network-based DNN enhancer to enhance the visual effects of low-light images. The DNN enhancer used in this disclosure is U-Net, with random initial weights. The gradient descent optimizer used is an optimization algorithm known in the art, such as Adabound. The content consistency loss used is the negative cross entropy loss, the temperature parameter is 0.01, and the image quality weighted consistency loss is calculated based on contrast perception. And this disclosure was run a total of 10 times. For comparison, RetinexNet is a low-light image enhancement method based on deep learning and with reference images that is well known in the art. It can be used as a baseline when there is a reference for this task. By comparing the enhancement results, it can be seen that the method of the present disclosure can be used for low-light image enhancement without the use of reference images, and achieves similar effects to RetinexNet, and is superior to other existing methods, as shown in Figure 10A.

[0144] The following will describe with examples how better model training and application can be achieved based on both image quality score and content consistency as model training according to an embodiment of the present disclosure, for example, an experiment in which the effect of image quality weighted consistency can be better than that of content consistency.

[0145] In this embodiment, the training method described above can be used to train the enhancement model, but the weighted consistency of image quality is used as the evaluation criterion, rather than just content consistency. Since the content consistency calculates the difference between the enhanced image and the input image, it tends to keep the image unchanged. When the input image is darker and the image quality is poor, the visibility of the picture content is poor, and it is necessary to reduce the restrictions on content consistency so that the image is more enhanced. The present disclosure uses content consistency or weighted consistency of image quality (based on contrast perception weighting) on ​​two public data sets known in the art (LOL and FiveK) to enhance the quality of the image. The specific results are summarized in Table 1, and Figure 10B shows the effect diagram.

[0146] Table 1

[0147] The higher the PSNR (peak signal-to-noise ratio) and SSIM (structural similarity), the lower the MSE (mean square error), the better the picture quality. This disclosure was run 10 times, and the mean and standard deviation are given here (in brackets). The mean and standard deviation of using image quality weighted consistency are better than using only content consistency. It can be seen that image quality weighted consistency is better than content consistency. On the one hand, this reflects that image quality-based weighting helps to improve the effect of the DNN enhancer, and on the other hand, it also reflects the usability of contrast perception as an assessment of the degree of image distortion.

[0148] The following will describe another application example of the image enhancement model obtained by reference-free training according to the embodiment of the present disclosure with reference to examples. In particular, the reference-free training DNN enhancer according to the embodiment of the present disclosure can improve the face detection effect of low-light pictures. In this example, the training method as described above can be used to train the enhancement model, which is applied to the DarkFace dataset containing low-light face photos, and the effect of the face detection model before and after enhancement is tested. By comparing the face detection results using unenhanced low-light pictures and pictures enhanced by the present disclosure, it can be seen that the pictures enhanced by the present disclosure can significantly improve the face detection effect.

[0149] The following will describe another application example of the image enhancement model obtained by reference-free training according to the embodiment of the present disclosure with reference to examples. In particular, the reference-free training DNN enhancer according to the embodiment of the present disclosure improves the visual effect of foggy pictures, as shown in Figure 10C. In this example, the training method as described above can be used to train the enhancement model, which is applied to a data set containing foggy pictures and corresponding fog-free pictures, and the enhancement effect is tested. The enhanced picture by our method can reach PSNR=18.518 and SSIM=0.798. However, Dark Channel Prior (dark color prior method), one of the current mainstream methods, can only achieve PSNR=14.840 and SSIM=0.761. The method of the present disclosure can be used for foggy picture enhancement without the use of reference pictures, and is superior to the current methods.

[0150] The following describes another application example of an image enhancement model obtained through reference-free training according to an embodiment of the present disclosure. Specifically, in an application where the image enhancement model is used to enhance a distorted image, the image quality score of the distorted image can be first determined to determine whether to enhance the image.

[0151] In this example, the enhancement model obtained by training the enhancement model using the training method described above can be used to implement automatic image enhancement. When using a USB camera to capture an image, the automatic image enhancement system first needs to calculate the image quality score of the image captured by the camera. Here, the image quality score can be calculated as described above, for example, using the aforementioned formula (1).

[0152] After calculating the image quality score, it is necessary to compare whether it is greater than a preset threshold. If it is, it can be directly output. Otherwise, the DNN enhancer will be called to enhance the image. This threshold can be manually determined, preferably 4. Alternatively, in this embodiment, it can be calculated using the following method:

[0153] a) Using existing distorted and undistorted images, calculate the empirical distribution of their image quality scores

[0154] b) Use a Gaussian distribution to fit its empirical distribution. The mean and standard deviation of the image quality score of the distorted image are recorded as m1 and s1, respectively, and the mean and standard deviation of the undistorted image are recorded as m2 and s2, respectively.

[0155] c) The threshold can be calculated as: (m1s2–m2s1) / (s2–s1).

[0156] In this way, it is possible to directly determine whether the distorted image needs to be enhanced before applying the model for distortion enhancement. This can avoid applying the model when it is determined that the image does not need to be enhanced, thereby reducing the operating overhead to a certain extent, and the image enhancement effect will basically not be significantly degraded.

[0157] The technology of the present disclosure can be used for many applications. For example, the technology of the present disclosure can be used to monitor, identify, and track objects in static images or moving videos captured by a camera, and is particularly advantageous for portable devices equipped with cameras, (camera-based) mobile phones, and the like.

[0158] The technology disclosed herein can be applied to various products. The technology disclosed herein can be applied to various camera devices, such as lenses installed in portable devices, camera devices on drones, camera devices in monitoring equipment, etc. For example, the technology disclosed herein can be applied to the camera device itself, such as being built into a camera lens or integrated with the camera lens. In this way, the technology disclosed herein can be in the form of a software program so that it can be executed by the processor of the camera device, or integrated in the form of an integrated circuit or a processor; or used in a device connected to the camera device, such as a portable mobile device equipped with the camera device. In this way, the technology disclosed herein can be in the form of a software program so that it can be executed by the processor of the camera device, or integrated in the form of an integrated circuit or a processor, or even integrated in an existing processing circuit, for performing ghost reflection compensation during the photo-taking process.

[0159] In some embodiments, the enhanced device of the present disclosure can be integrated into any device including an image acquisition device, such as a photographic device or other image acquisition / processing device, for example, in the form of an integrated circuit, a processor, or even within the device's existing processing circuitry. Alternatively, the enhanced device can be removably attached to the device as a separate component, such as a standalone module or included with other components that can be removably attached to the device. In some embodiments, the enhanced device can even be located on a remote device with which the device can communicate.

[0160] In some embodiments, the disclosed methods can be implemented via software algorithms, allowing for convenient integration into various types of devices including image capture devices, such as video cameras, still cameras (e.g., SLR cameras, mirrorless cameras), portable photography devices, and other image capture / processing devices. Specifically, the disclosed methods can be implemented as computer programs, instructions, etc., and executed by a processor of a photography device to enhance images captured by the image capture device.

[0161] According to an embodiment of the present disclosure, a photographic device is also proposed, comprising: an image acquisition module configured to acquire an image, the acquired image including a distorted image to be enhanced / corrected, and an enhancement device for enhancing the image passed through the image acquisition device module. The enhancement device can be implemented in various appropriate ways, especially the image enhancement device according to the present disclosure as described above. In particular, although not shown, the photographic device may further include a lens unit, a photographic filter, etc., which may process the collected light. It should be noted that, although not shown, the image acquisition device may further include any appropriate unit, such as an image signal processor (ISP), etc.

[0162] The image enhancement scheme according to the embodiments of the present disclosure can be integrated into various photographic devices in an appropriate manner and called in an appropriate manner. As an example, it can be called in a specific photographic mode that may produce distorted images. In addition, the scheme of the present disclosure can be applied to certain specific shooting modes that may produce distortion. For example, given that a large amount of light reflection may be caused when shooting close objects, which may in turn cause large distortion; as another example, it is also possible to take pictures in specific scenes, such as cloudy days, foggy days, etc. The scheme according to the present disclosure is also particularly suitable for night scene shooting-related modes of the camera device, etc.

[0163] It should be noted that the technical solution of the present disclosure is particularly applicable to cameras in portable devices, such as cameras in mobile phones, tablet computers, etc. The lens and / or camera filter of the camera can be fixed or replaceable.

[0164] In addition, it should be understood that the above series of processes and devices can also be implemented by software and / or firmware. In the case of implementation by software and / or firmware, the program constituting the software is installed from a storage medium or a network to a computer with a dedicated hardware structure, such as a general-purpose personal computer 1100 shown in Figure 11. When various programs are installed, the computer can perform various functions, etc. Figure 11 is a block diagram showing an example structure of a personal computer of an optimization device that can be used in an embodiment of the present disclosure. In one example, the personal computer can correspond to the above-mentioned exemplary optimization device according to the present disclosure.

[0165] 11 , a central processing unit (CPU) 1101 executes various processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage section 1108 to a random access memory (RAM) 1103. In the RAM 1103, data required when the CPU 1101 executes various processes and the like is also stored as needed.

[0166] The CPU 1101, the ROM 1102, and the RAM 1103 are connected to one another via a bus 1104. An input / output interface 1105 is also connected to the bus 1104.

[0167] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet.

[0168] A drive 1110 is also connected to the input / output interface 1105 as needed. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 1110 as needed so that a computer program read therefrom is installed in the storage section 1108 as needed.

[0169] In the case of realizing the above-described series of processing by software, a program constituting the software is installed from a network such as the Internet or a storage medium such as the removable medium 1111 .

[0170] Those skilled in the art will appreciate that such storage media are not limited to the removable media 1111 shown in FIG11 , which stores programs therein and is distributed separately from the device to provide the programs to users. Examples of the removable media 1111 include magnetic disks (including floppy disks (registered trademark)), optical disks (including compact disk read-only memories (CD-ROMs) and digital versatile disks (DVDs)), magneto-optical disks (including minidiscs (MDs) (registered trademark)), and semiconductor memories. Alternatively, the storage medium may be the ROM 1102, a hard disk included in the storage section 1108, or the like, in which the programs are stored and distributed to users together with the device containing them.

[0171] It should be noted that the methods and apparatus described herein may be implemented as software, firmware, hardware, or any combination thereof. Some components may, for example, be implemented as software running on a digital signal processor or microprocessor. Other components may, for example, be implemented as hardware and / or an application-specific integrated circuit.

[0172] In addition, the methods and systems of the present disclosure may be implemented in a variety of ways. For example, the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination thereof. The order of the steps of the method described above is merely illustrative, and unless otherwise specifically stated, the steps of the method of the present disclosure are not limited to the order specifically described above. In addition, in some embodiments, the present disclosure may also be embodied as a program recorded in a recording medium, including machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers recording media that store programs for implementing the method according to the present disclosure. Such storage media may include, but are not limited to, floppy disks, optical disks, magneto-optical disks, memory cards, memory sticks, and the like.

[0173] Those skilled in the art will appreciate that the boundaries between the above-mentioned operations are merely illustrative. Multiple operations can be combined into a single operation, a single operation can be distributed among additional operations, and operations can be performed at least partially overlapping in time. Moreover, alternative embodiments can include multiple instances of specific operations, and the order of operations can be changed in various other embodiments. However, other modifications, variations, and replacements are also possible. Therefore, this specification and the accompanying drawings should be considered illustrative, not restrictive.

[0174] In addition, embodiments of the present disclosure may further include the following illustrative examples (EE).

[0175] EE 1. A device for training an image enhancement model, the device comprising a processing circuit configured to:

[0176] The distorted sample image is enhanced by using an image enhancement model to obtain an enhanced sample image from the distorted sample image;

[0177] determining quality information of the enhanced sample image based on local feature vectors of a specific number of image blocks in the enhanced sample image, the quality information indicating contrast perception of the enhanced sample image;

[0178] Configuration parameter optimization of the image enhancement model is performed based on the quality information of the enhanced sample image.

[0179] EE 2. The device according to EE 1, wherein the specific number of image blocks are arbitrarily selected from image blocks segmented from the enhanced sample image, or are obtained by traversing the enhanced sample image with a specific window.

[0180] EE 3. The apparatus according to EE 1 or EE 2, wherein determining the image quality information comprises:

[0181] Calculating difference values ​​between local feature vectors of corresponding image blocks in the specific number of image blocks, and

[0182] Image quality information is determined based on statistical characteristics of the calculated difference values ​​between the local feature vectors.

[0183] EE 4. The device according to EE 1 or 2, wherein, for each image block in the specific number of image blocks, its Kth nearest neighbor image block is selected as its corresponding image block to calculate the difference value between the local feature vectors therebetween.

[0184] EE 5. The device according to EE 1, wherein a loss function is constructed based on the quality information of the enhanced sample image to optimize the configuration parameters of the image enhancement model.

[0185] EE 6. The device according to EE 5, wherein the loss function depends on the negation or inverse of the quality information of the enhanced sample image.

[0186] EE 7. The device according to EE 1, wherein the processing circuit is further configured to:

[0187] determining consistency information between the distorted sample image and the enhanced image, and

[0188] Configuration parameter optimization of the image enhancement model is performed based on the quality information of the sample image or the enhanced sample image and the consistency information.

[0189] EE 8. The apparatus according to EE 7, wherein performing configuration parameter optimization of the image enhancement model based on the quality information of the sample image or the enhanced sample image and the consistency information comprises at least one of the following:

[0190] A linear combination of the quality information of the enhanced sample image and the consistency evaluation index is used as a loss function for optimizing the configuration parameters of the image enhancement model;

[0191] Using the quality information of the sample image as a weight to weight the consistency evaluation index to serve as a loss function for optimizing the configuration parameters of the image enhancement model; and

[0192] The consistency evaluation index is weighted using the quality information of the sample image as a weight, and then a linear combination of the weighted consistency evaluation index and the quality information of the enhanced sample image is used as a loss function for optimizing the configuration parameters of the image enhancement model.

[0193] EE 9. The device according to EE 7, wherein the similarity between the feature vectors of the distorted sample image and the enhanced image is used as the consistency information.

[0194] EE 10. The apparatus according to EE 9, wherein calculating the similarity comprises at least one of the following:

[0195] Calculating the L-norm of the difference between corresponding pixel values ​​of the distorted sample image and the enhanced image;

[0196] Calculating the L-norm of the corresponding local feature differences between the distorted sample image and the enhanced image; or

[0197] Calculate the negative cross entropy of the image blocks of the distorted sample image and the enhanced image.

[0198] EE 11. The apparatus according to EE 1, wherein high-order image features of the image blocks are extracted from a specific number of image blocks as local feature vectors by using a deep neural network (DNN) feature extractor.

[0199] EE 12. The device according to EE 3, wherein the calculation method of the difference value between the local feature vectors includes at least one of L norm, log-L norm, and radial basis function.

[0200] EE 13. The device according to EE 1, wherein the initial values ​​of the configuration parameters of the image enhancement model can be randomly initialized or pre-trained based on other computer vision tasks.

[0201] EE 14. The apparatus according to EE 1, wherein the processing circuit is configured to iteratively perform optimization of configuration parameters of the image enhancement model, wherein the optimization is stopped if one of the following conditions is met:

[0202] A value of a loss function based on the quality information of the enhanced sample image is less than a specific threshold;

[0203] The number of iterations reaches a certain threshold;

[0204] The performance value after a certain number of times is no longer better than the previous image enhancement quality.

[0205] EE 15. An image enhancement device, the device comprising a processing circuit, the processing circuit being configured to:

[0206] Obtaining a distorted image;

[0207] The distorted image enhancement model trained by the device according to the aforementioned EE is applied to the distorted image to be enhanced to obtain an enhanced image.

[0208] EE 16. The device according to EE 15, wherein the processing circuit is further configured to:

[0209] determining whether the image quality information of the distorted image is greater than a specific threshold,

[0210] When the image quality information of the distorted image is greater than a specific threshold, the distorted image is directly output; when the distorted image quality information is less than a specific threshold, the distorted image is enhanced using a distorted image enhancement model trained according to the aforementioned EE.

[0211] EE 17. A method for training an image enhancement model, the method comprising:

[0212] The distorted sample image is enhanced by using an image enhancement model to obtain an enhanced sample image from the distorted sample image;

[0213] determining quality information of the enhanced sample image based on local feature vectors of a specific number of image blocks in the enhanced sample image, the quality information indicating contrast perception of the enhanced sample image;

[0214] Configuration parameter optimization of the image enhancement model is performed based on the quality information of the enhanced sample image.

[0215] EE 18. An image enhancement method, the method comprising:

[0216] Obtaining a distorted image;

[0217] The image enhancement model trained by the device according to the aforementioned EE is applied to the distorted image to be enhanced to obtain an enhanced image.

[0218] EE 19. A device comprising

[0219] at least one processor; and

[0220] At least one storage device storing thereon instructions, which, when executed by the at least one processor, cause the at least one processor to perform the method according to EE 17 or 18.

[0221] EE 20. A storage medium storing instructions, which, when executed by a processor, enable the method according to EE 17 or 18 to be performed.

[0222] EE 21. A program product comprising instructions which, when executed by a processor, enable the method according to EE 17 or 18 to be performed.

[0223] EE 22. A computer program, which, when executed by a processor, enables the method according to EE 17 or 18 to be performed.

[0224] Although the present disclosure and its advantages have been described in detail, it should be understood that various changes, substitutions and transformations can be made without departing from the spirit and scope of the present disclosure as defined by the appended claims. Moreover, the terms "comprises," "comprising," or any other variations thereof in the embodiments of the present disclosure are intended to cover non-exclusive inclusions, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0225] Although some specific embodiments of the present disclosure have been described in detail, it should be understood by those skilled in the art that the above embodiments are merely illustrative and do not limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be combined, modified, or replaced without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A training device for an image enhancement model, the device comprising a processing circuit configured to: The distorted sample image is enhanced by using an image enhancement model to obtain an enhanced sample image from the distorted sample image; determining quality information of the enhanced sample image based on local feature vectors of a specific number of image blocks in the enhanced sample image, the quality information indicating contrast perception of the enhanced sample image; Configuration parameter optimization of the image enhancement model is performed based on the quality information of the enhanced sample image.

2. The device according to claim 1, wherein The specific number of image blocks are arbitrarily selected from image blocks segmented from the enhanced sample image, or are obtained by traversing the enhanced sample image with a specific window.

3. The device according to claim 1 or 2, wherein: Determine the image quality information including: Calculating difference values ​​between local feature vectors of corresponding image blocks in the specific number of image blocks, and Image quality information is determined based on statistical characteristics of the calculated difference values ​​between the local feature vectors.

4. The device according to claim 1 or 2, wherein For each image block in the specific number of image blocks, its Kth nearest neighbor image block is selected as its corresponding image block to calculate the difference value between the local feature vectors therebetween.

5. The apparatus according to claim 1, wherein A loss function is constructed based on the quality information of the enhanced sample image to optimize the configuration parameters of the image enhancement model.

6. The device according to claim 5, wherein The loss function depends on the negation or inverse of the quality information of the enhanced sample image.

7. The apparatus according to claim 1, wherein The processing circuit is further configured to: determining consistency information between the distorted sample image and the enhanced sample image, and The method is performed based on the quality information of the distorted sample image or the enhanced sample image and the consistency information. The configuration parameter optimization of the image enhancement model is described.

8. The apparatus according to claim 7, wherein Optimizing the configuration parameters of the image enhancement model based on the quality information of the distorted sample image or the enhanced sample image and the consistency information includes at least one of the following: A linear combination of the quality information of the enhanced sample image and the consistency information is used as a loss function for optimizing the configuration parameters of the image enhancement model; Using the quality information of the sample image as a weight to weight the consistency information, so as to serve as a loss function for optimizing the configuration parameters of the image enhancement model; and The consistency information is weighted using the quality information of the sample image as a weight, and then a linear combination of the weighted consistency information and the quality information of the enhanced sample image is used as a loss function for optimizing the configuration parameters of the image enhancement model.

9. The apparatus according to claim 7, wherein The similarity between the feature vectors of the distorted sample image and the enhanced sample image is used as the consistency information.

10. The apparatus according to claim 9, wherein Calculating the similarity includes at least one of the following: Calculating the L-norm of the difference between corresponding pixel values ​​of the distorted sample image and the enhanced sample image; Calculating the L-norm of the corresponding local feature differences between the distorted sample image and the enhanced sample image; or Calculate the negative cross entropy of the image blocks of the distorted sample image and the enhanced sample image.

11. The apparatus according to claim 1, wherein A deep neural network (DNN) feature extractor is used to extract high-order image features of a specific number of image blocks as local feature vectors.

12. The apparatus according to claim 3, wherein The calculation method of the difference value between the local feature vectors includes at least one of L norm, log-L norm, and radial basis function.

13. The apparatus according to claim 1, wherein The initial values ​​of the configuration parameters of the image enhancement model may be randomly initialized or pre-trained based on other computer vision tasks.

14. The apparatus according to claim 1, wherein The processing circuit is configured to iteratively perform optimization of configuration parameters of the image enhancement model, wherein the optimization is stopped if one of the following conditions is met: A value of a loss function based on the quality information of the enhanced sample image is less than a specific threshold; The number of iterations reaches a certain threshold; The performance value after a certain number of iterations is no longer better than the previous image enhancement quality.

15. An image enhancement device, the device comprising a processing circuit, the processing circuit being configured to: Obtaining a distorted image; An enhanced image is obtained by applying a distorted image enhancement model trained by the device according to any one of claims 1 to a distorted image to be enhanced.

16. The apparatus according to claim 15, wherein The processing circuit is further configured to: determining whether the image quality information of the distorted image is greater than a specific threshold, When the image quality information of the distorted image is greater than a specific threshold, the distorted image is directly output; when the distorted image quality information is less than a specific threshold, the distorted image is enhanced using a distorted image enhancement model trained by the device according to any one of claims 1-14.

17. A method for training an image enhancement model, the method comprising: The distorted sample image is enhanced by using an image enhancement model to obtain an enhanced sample image from the distorted sample image; determining quality information of the enhanced sample image based on local feature vectors of a specific number of image blocks in the enhanced sample image, the quality information indicating contrast perception of the enhanced sample image; Configuration parameter optimization of the image enhancement model is performed based on the quality information of the enhanced sample image.

18. The method according to claim 17, wherein Determining the quality information of the enhanced sample image includes: Calculating difference values ​​between local feature vectors of corresponding image blocks in the specific number of image blocks, and Image quality information is determined based on statistical characteristics of the calculated difference values ​​between the local feature vectors.

19. The method according to claim 17, further comprising: determining consistency information between the distorted sample image and the enhanced sample image, and Configuration parameter optimization of the image enhancement model is performed based on the quality information of the distorted sample image or the enhanced sample image and the consistency information.

20. The method according to claim 17, wherein The configuration parameter optimization of the image enhancement model is iteratively performed, wherein the optimization is stopped when one of the following conditions is met: A value of a loss function based on the quality information of the enhanced sample image is less than a specific threshold; The number of iterations reaches a certain threshold; The performance value after a certain number of iterations is no longer better than the previous image enhancement quality.

21. An image enhancement method, comprising: Obtaining a distorted image; An enhanced image is obtained by applying an image enhancement model trained by the device according to any one of claims 1 to 14 to a distorted image to be enhanced.

22. The method according to claim 21, further comprising: determining whether the image quality information of the distorted image is greater than a specific threshold, When the image quality information of the distorted image is greater than a specific threshold, the distorted image is directly output; when the distorted image quality information is less than a specific threshold, the distorted image is enhanced using a distorted image enhancement model trained by the device according to any one of claims 1-14.

23. A device comprising: at least one processor; and At least one storage device storing thereon instructions which, when executed by the at least one processor, cause the at least one processor to perform the method according to any one of claims 17-22.

24. A storage medium storing instructions which, when executed by a processor, enable execution of the method according to any one of claims 17 to 22.

25. A program product comprising instructions which, when executed by a processor, enable the method according to any one of claims 17 to 22 to be performed.

26. A computer program which, when executed by a processor, causes the method according to any one of claims 17 to 22 to be performed.