Image enhancement method and device
The features and color brightness of images are enhanced in the field of computer vision through neural networks and Laplacian enhancement algorithms, which solves the problem of unsatisfactory image enhancement effects in the existing technology and achieves significant improvements in image details, color and brightness.
Patent Information
- Application Number
- CN201910943355.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-30
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2039-09-30
AI Technical Summary
The existing technology has unsatisfactory image enhancement processing effects in the field of computer vision. Especially when faced with problems such as blur, low contrast, and low brightness, it is difficult to effectively improve the details, color, and brightness performance of the image.
Neural network is used for feature enhancement processing. The Laplacian enhancement algorithm and the improved Laplacian enhancement algorithm are used to enhance the detailed features of the image to be processed, and the confidence image features and illumination compensation image features are combined to enhance the color and brightness to avoid artifacts. Texture problem, gradually enhance the image features of different convolutional layers.
Significantly improves the effect of image enhancement processing, improves image performance in terms of details, color and brightness, avoids pseudo-texture problems, and improves image clarity and recognition effects.
Smart Images

Figure CN112581379B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and more specifically, to an image enhancement method and device in the field of computer vision. Background Art
[0002] Computer vision is an integral part of various intelligent / autonomous systems in various application fields, such as manufacturing, inspection, document analysis, medical diagnosis, and military. It is a discipline about how to use cameras / camcorders and computers to obtain the data and information we need about the objects being photographed. Figuratively speaking, it is to equip computers with eyes (cameras / camcorders) and brains (algorithms) to replace human eyes in identifying, tracking, and measuring targets, so that computers can perceive the environment. Because perception can be seen as extracting information from sensory signals, computer vision can also be seen as a science that studies how to make artificial systems "perceive" from images or multidimensional data. In general, computer vision uses various imaging systems to replace visual organs to obtain input information, and then computers replace the brain to complete the processing and interpretation of these input information. The ultimate research goal of computer vision is to enable computers to observe and understand the world through vision like humans, and have the ability to adapt to the environment autonomously.
[0003] Image enhancement is an important branch of image processing. Image enhancement technology can improve image quality without re-collecting data to meet more practical application needs. For example, image enhancement technology can make an originally unclear image clear or emphasize certain interesting features by purposefully emphasizing the overall or local characteristics of an image (or video), enlarging the difference between the features of different objects in the image, suppressing uninteresting features, thereby improving image quality, enriching the amount of information, and enhancing image interpretation and recognition effects to meet the needs of certain special analyses.
[0004] In the field of computer vision, it is often necessary to use acquisition equipment to obtain images (or videos) and identify or analyze the images. Usually, due to the shooting environment of the acquisition equipment or other unknown factors, the acquired images will appear blurred and have low contrast. The low imaging quality will affect the image display effect, image analysis and recognition, etc. The image or video can be enhanced first, and then the enhanced image or video can be identified or analyzed. However, in many cases, the effect of image enhancement processing is not ideal. Therefore, how to improve the effect of image enhancement processing has become a problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides an image enhancement method and device, which can enhance the performance of a to-be-processed image in terms of detail, color, and brightness, thereby improving the effect of image enhancement processing.
[0006] In a first aspect, an image enhancement method is provided, comprising: acquiring an image to be processed; performing feature enhancement processing on the image to be processed through a neural network to obtain enhanced image features of the image to be processed, the neural network comprising N convolutional layers, where N is a positive integer; performing color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image.
[0007] Exemplarily, the above-mentioned image to be processed may be an original image with poor image quality; for example, it may refer to an image to be processed obtained due to factors such as weather, distance, shooting environment, etc., and the image may be blurred, or have low image quality, or low image color and brightness.
[0008] It should be understood that the above-mentioned color enhancement processing can be used to improve the color distribution of the image to be processed and increase the color saturation of the image to be processed; the brightness enhancement processing can refer to adjusting the brightness of the image to be processed; the feature enhancement processing can refer to enhancing the details in the image so that the image includes more detail information; for example, the feature enhancement processing can refer to enhancing the detail features of the image to be processed.
[0009] The image enhancement method provided in the embodiment of the present application performs feature enhancement processing on the image to be processed to obtain image enhancement features of the image to be processed, and uses the image enhancement features to further perform color enhancement processing and brightness enhancement processing on the image to be processed, so that the detail features of the image to be processed can also be enhanced when performing color enhancement and brightness enhancement, so that the performance of the image to be processed in terms of details, color and brightness can be enhanced, thereby improving the effect of image enhancement processing.
[0010] It should be noted that image enhancement can also be referred to as image quality enhancement, for example, it may refer to processing the brightness, color, contrast, saturation and / or dynamic range of an image so that various indicators of the image meet preset conditions.
[0011] In combination with the first aspect, in certain implementations of the first aspect, the performing the feature enhancement processing on the image to be processed by a neural network to obtain enhanced image features of the image to be processed includes: performing the feature enhancement processing on the image to be processed by a Laplace enhancement algorithm to obtain enhanced image features of the image to be processed.
[0012] In an embodiment of the present application, feature enhancement of the image to be processed can be achieved through the Laplace enhancement algorithm, wherein the Laplace enhancement algorithm can achieve feature enhancement of the image to be processed without introducing new textures, thereby avoiding the problem of introducing pseudo textures in the output image after image enhancement processing to a certain extent, and can improve the effect of image enhancement processing.
[0013] In a possible implementation, the Laplace enhancement algorithm may enhance high-frequency features in the image to be processed, thereby obtaining enhanced image features of the image to be processed.
[0014] The high-frequency features of the above-mentioned image may refer to information such as details and texture of the image to be processed.
[0015] In combination with the first aspect, in certain implementations of the first aspect, the Laplace enhancement algorithm is used to perform the feature enhancement processing on the input image features of the ith convolutional layer according to the residual features of the ith convolutional layer among the N convolutional layers, to obtain the enhanced image features of the ith convolutional layer, wherein the residual features represent the difference between the input image features of the ith convolutional layer and the image features processed by the convolution operation in the ith convolutional layer, the enhanced image features of the ith convolutional layer are the input image features of the i+1th convolutional layer, the input image features are obtained based on the image to be processed, and i is a positive integer.
[0016] In an embodiment of the present application, the Laplace enhancement algorithm may be an improved Laplace enhancement algorithm. The improved Laplace enhancement algorithm of the embodiment of the present application may realize a progressive and step-by-step enhancement of image features of different convolutional layers by using the image features in the previous convolutional layer for the enhancement of subsequent image features, thereby improving the effect of image enhancement processing.
[0017] In combination with the first aspect, in some implementations of the first aspect, the enhanced image feature of the image to be processed is an image feature output by the Nth convolutional layer among the N convolutional layers, and the enhanced image feature of the image to be processed is obtained by the following equation:
[0018] L(F N )=Φ(F N )+s l ·(Φ(F N )-F N );
[0019] Among them, L(F N ) represents the enhanced image features of the Nth convolutional layer, F N represents the input image feature of the Nth convolutional layer, Ф represents the convolution kernel of the Nth convolutional layer, s lrepresents the scaling parameter obtained through learning, and N is a positive integer.
[0020] In the embodiment of the present application, the learnable parameter s l Replace the fixed scaling factor s in the traditional Laplace enhancement algorithm c ; At the same time, the residual features of adjacent layers are used for feature enhancement, and the residual features can be used to represent any information that needs to be emphasized. Therefore, the Laplace algorithm of the embodiment of the present application can not only enhance the high-frequency information of the image, but also realize the progressive enhancement of the image features of different convolutional layers, thereby improving the effect of image enhancement processing.
[0021] In combination with the first aspect, in certain implementations of the first aspect, the color enhancement processing and brightness enhancement processing are performed on the image to be processed according to the enhanced image features to obtain an output image, including: obtaining a confidence image feature and an illumination compensation image feature of the image to be processed according to the enhanced image features of the image to be processed, wherein the confidence image feature is used to perform color enhancement on the image to be processed, and the illumination compensation image feature is used to perform brightness enhancement on the image to be processed; and obtaining the output image according to the image to be processed, the confidence image feature, and the illumination compensation image feature.
[0022] It should be noted that the above-mentioned confidence image features may represent a mapping relationship or a mapping function for performing color enhancement processing on the image to be processed.
[0023] Exemplarily, the confidence image feature may correspond to the image feature of the image to be processed. For example, an element in the confidence image feature may be used to indicate the degree of scaling of the corresponding element in the image feature of the image to be processed. The color enhancement of the image to be processed may be achieved by scaling different regions in the image to be processed.
[0024] It should be understood that the enhanced image features of the above-mentioned image to be processed may include more detail features and textures; performing color enhancement and brightness enhancement processing on the image to be processed according to the enhanced image features of the image to be processed can enable the output image to achieve detail enhancement, and also improve the brightness and color of the output image.
[0025] In an embodiment of the present application, the confidence image features used for color enhancement processing and the illumination compensation image features used for brightness enhancement processing can be obtained through the enhanced image features of the image to be processed. Compared with the traditional scaling method, which directly enhances the color and brightness of each pixel in the image to be processed through a mapping function, the confidence image features and illumination compensation image features in the embodiment of the present application can not only perform color enhancement and brightness enhancement, but also achieve detail enhancement of the image to be processed, thereby improving the effect of image enhancement processing.
[0026] In combination with the first aspect, in some implementations of the first aspect, it also includes: obtaining the confidence image feature and the illumination compensation image feature by performing a convolution operation on the enhanced image feature of the image to be processed; obtaining the color enhanced image feature of the image to be processed by multiplying the image feature of the image to be processed with the confidence image feature; and fusing the color enhanced image feature with the illumination compensation image feature to obtain the output image.
[0027] In one possible implementation, the above-mentioned confident image features and the above-mentioned illumination compensation image features can be obtained in parallel through the enhanced image features of the image to be processed; for example, the enhanced image features of the image to be processed can be convolved by the first branch in the network model to obtain the above-mentioned confident image features; and the enhanced image features of the image to be processed can be convolved by the second branch in the network model to obtain the above-mentioned illumination compensation image features.
[0028] In a possible implementation manner, the fusion of the color enhancement image feature and the illumination compensation image feature may refer to adding the color enhancement image feature and the illumination compensation image feature.
[0029] In a second aspect, an image enhancement method is provided, comprising: detecting a first operation of a user for opening a camera; in response to the first operation, displaying a shooting interface on the display screen, the shooting interface including a viewfinder, and the viewfinder including a first image; detecting a second operation of the user instructing the camera; in response to the second operation, displaying a second image in the viewfinder, or saving the second image in the electronic device, the second image being obtained by performing color enhancement processing and brightness enhancement processing on the first image according to enhanced image features of the first image, the enhanced image features of the first image being obtained by performing feature enhancement processing on the first image through a neural network, the neural network comprising N convolutional layers, where N is a positive integer.
[0030] Among them, the specific process of performing feature enhancement processing on the first image can be obtained according to the above-mentioned first aspect and any implementation method of the first aspect.
[0031] In one possible implementation, the image enhancement method provided in the embodiment of the present application can be applied to the field of photography of smart terminals. The image enhancement method of the embodiment of the present application can be used to perform image enhancement processing on the original image with poor image quality obtained by the smart terminal to obtain an output image with improved image quality. For example, when the smart terminal is taking real-time photos, image enhancement processing can be performed on the original image obtained, and the output image after image enhancement processing can be displayed on the screen of the smart terminal. Alternatively, image enhancement processing can be performed on the original image obtained, and the output image after image enhancement processing can be saved in the photo album of the smart terminal.
[0032] In a third aspect, an image enhancement method is provided, comprising: obtaining a road picture to be processed; performing feature enhancement processing on the road picture to be processed through a neural network to obtain enhanced image features of the road picture to be processed, the neural network comprising N convolutional layers, where N is a positive integer; performing color enhancement processing and brightness enhancement processing on the road picture to be processed according to the enhanced image features to obtain a processed output road picture; and identifying information in the output road picture according to the processed output road picture.
[0033] The specific process of performing feature enhancement processing on the road image can be obtained according to the first aspect and any implementation method of the first aspect.
[0034] In a possible implementation, the image enhancement method provided in the embodiment of the present application can be applied to the field of autonomous driving. For example, it can be applied to the navigation system of an autonomous driving vehicle. The image enhancement method in the present application can be used to perform image enhancement processing on the original road image with low image quality during the navigation process of the autonomous driving vehicle on the road, and obtain the enhanced road image, thereby achieving the safety of the autonomous driving vehicle.
[0035] In a fourth aspect, an image enhancement method is provided, comprising: acquiring a street view picture; performing feature enhancement processing on the street view picture through a neural network to obtain enhanced image features of the street view picture, the neural network comprising N convolutional layers, where N is a positive integer; performing color enhancement processing and brightness enhancement processing on the street view picture according to the enhanced image features to obtain a processed output street view picture; and identifying information in the output street view picture according to the processed output street view picture.
[0036] The specific process of performing feature enhancement processing on the street view image can be obtained according to the first aspect and any implementation method of the first aspect.
[0037] In a possible implementation, the image enhancement method provided in the embodiment of the present application can be applied to the field of security. For example, the image enhancement method in the embodiment of the present application can be applied to the enhancement of surveillance images in safe cities. For example, the images (or videos) collected by surveillance equipment in public places are often affected by factors such as weather and distance, and there are problems such as blurred images and low image quality. The image enhancement method of the present application can be used to enhance the collected original image, so that important information such as license plate numbers and clear faces can be restored for public security personnel, providing important clues for case detection.
[0038] It should be understood that the expansion, limitation, explanation and description of the relevant contents in the above-mentioned first aspect also apply to the same contents in the second aspect, the third aspect and the fourth aspect.
[0039] In a fifth aspect, an image enhancement device is provided, comprising a module for executing the image enhancement method in any one of the implementations of the first to fourth aspects above.
[0040] In a sixth aspect, an image enhancement device is provided, comprising: a memory for storing programs; a processor for executing the programs stored in the memory, wherein when the programs stored in the memory are executed, the processor is used to execute: acquiring an image to be processed; performing feature enhancement processing on the image to be processed to obtain enhanced image features of the image to be processed; performing color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image.
[0041] In a possible implementation manner, the processor included in the above-mentioned image enhancement device is also used for the image enhancement method in the above-mentioned first to fourth aspects and any one of the implementation manners of the first to fourth aspects.
[0042] In the seventh aspect, a computer-readable medium is provided, which stores a program code for execution by a device, and the program code includes an image enhancement method for executing the above-mentioned first to fourth aspects and any one of the implementation methods of the first to fourth aspects.
[0043] In an eighth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is caused to execute the image enhancement method in any one of the implementations of the first to fourth aspects and the first to fourth aspects.
[0044] In the ninth aspect, a chip is provided, comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute the image enhancement method in any one of the implementation methods of the first to fourth aspects and the first to fourth aspects.
[0045] Optionally, as an implementation method, the chip may also include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the image enhancement method in the above-mentioned first to fourth aspects and any one of the implementation methods of the first to fourth aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a schematic diagram of an artificial intelligence main framework provided by an embodiment of the present application;
[0047] Figure 2 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0048] Figure 3 is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0049] Figure 4 is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0050] Figure 5 This is a schematic diagram of another application scenario provided by the embodiment of the present application.
[0051] Figure 6 It is a structural diagram of the system architecture provided by the embodiment of the present application;
[0052] Figure 7 It is a schematic diagram of a convolutional neural network structure provided in an embodiment of the present application;
[0053] Figure 8 It is a schematic diagram of a chip hardware structure provided in an embodiment of the present application;
[0054] Fig. 9 It is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0055] Fig.10 is a schematic flow chart of an image enhancement method provided in an embodiment of the present application;
[0056] Fig.11 is a structural schematic diagram of an image enhancement model provided in an embodiment of the present application;
[0057] Fig.12is a schematic diagram of a Laplace enhancement unit and a hybrid enhancement unit provided in an embodiment of the present application;
[0058] Fig.13 is a schematic diagram of feature enhancement processing provided in an embodiment of the present application;
[0059] Fig.14 is a schematic diagram of color enhancement processing and brightness enhancement processing provided in an embodiment of the present application;
[0060] Fig.15 is a schematic diagram of color enhancement processing and brightness enhancement processing provided in an embodiment of the present application;
[0061] Fig.16 is a schematic diagram of the visual quality evaluation results provided in the embodiment of the present application;
[0062] Fig.17 is a schematic flow chart of an image enhancement method provided in an embodiment of the present application;
[0063] Fig.18 is a set of display interface schematic diagrams provided in an embodiment of the present application;
[0064] Fig.19 is another set of display interface schematic diagrams provided in an embodiment of the present application;
[0065] Fig. 20 is a schematic block diagram of an image enhancement device provided in an embodiment of the present application;
[0066] Fig.21 It is a schematic diagram of the hardware structure of the image enhancement device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] It should be understood that the image in the embodiments of the present application may be a static image (or a static picture) or a dynamic image (or a dynamic picture). For example, the image in the present application may be a video or a dynamic picture, or the image in the present application may be a static picture or a photo. For ease of description, the present application will uniformly refer to static images or dynamic images as images in the following embodiments.
[0069] Figure 1A schematic diagram of an artificial intelligence main framework is shown, which describes the overall workflow of the artificial intelligence system and is applicable to general artificial intelligence field requirements.
[0070] The above artificial intelligence theme framework 100 is elaborated in detail below from two dimensions: "intelligent information chain" (horizontal axis) and "information technology (IT) value chain" (vertical axis).
[0071] The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data undergoes a condensed process of "data-information-knowledge-wisdom".
[0072] The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the system's industrial ecological process.
[0073] (1) Infrastructure 110
[0074] Infrastructure provides computing power support for artificial intelligence systems, enables communication with the outside world, and provides support through a basic platform.
[0075] The infrastructure can communicate with the outside world through sensors, and the computing power of the infrastructure can be provided by smart chips.
[0076] The smart chips here can be hardware acceleration chips such as central processing unit (CPU), neural-network processing unit (NPU), graphics processing unit (GPU), application specific integrated circuit (ASIC) and field programmable gate array (FPGA).
[0077] The basic platform of the infrastructure can include related platform guarantees and support such as distributed computing frameworks and networks, and can include cloud storage and computing, interconnected networks, etc.
[0078] For example, for infrastructure, data can be obtained through sensors and external communication, and then provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
[0079] (2) Data 120
[0080] The data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence. This data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.
[0081] (3) Data processing 130
[0082] The above data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other processing methods.
[0083] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0084] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0085] Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.
[0086] (4) General ability 140
[0087] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0088] (5) Smart products and industry applications 150
[0089] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart manufacturing, smart transportation, smart home, smart medical care, smart security, autonomous driving, safe cities, smart terminals, etc.
[0090] Figure 2 It is a schematic diagram of an application scenario of the image enhancement method provided in an embodiment of the present application.
[0091] like Figure 2As shown, the technical solution of the embodiment of the present application can be applied to an intelligent terminal, and the image enhancement method in the embodiment of the present application can perform image enhancement processing on the input image to obtain an output image after the input image is enhanced. The intelligent terminal can be mobile or fixed, for example, the intelligent terminal can be a mobile phone with image enhancement function, a tablet personal computer (tablet personal computer, TPC), a media player, a smart TV, a laptop computer (laptop computer, LC), a personal digital assistant (personal digital assistant, PDA), a personal computer (personal computer, PC), a camera, a video camera, a smart watch, augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR), a wearable device (wearable device, WD) or an autonomous driving vehicle, etc., and the embodiment of the present application is not limited to this.
[0092] It should be noted that in the embodiments of the present application, image enhancement may also be referred to as image quality enhancement, which may specifically refer to processing the brightness, color, contrast, saturation and / or dynamic range of an image so that various indicators of the image meet preset conditions. In the embodiments of the present application, image enhancement and image quality enhancement have the same meaning.
[0093] The following is an example of a specific application scenario of the embodiment of the present application.
[0094] Application scenario 1: Smart terminal photography
[0095] In one embodiment, Figure 3 As shown, the image enhancement method of the embodiment of the present application can be applied to the shooting of smart terminal devices (for example, mobile phones). The image enhancement method of the embodiment of the present application can be used to enhance the acquired original image of poor quality to obtain an output image with improved image quality.
[0096] It should be noted that in Figure 3 In order to distinguish the color image from the grayscale image, the color image is represented by diagonal filling.
[0097] Exemplarily, the image enhancement method of the embodiment of the present application can be used to perform image enhancement processing on the acquired original image when real-time photography is performed on a smart terminal, and the output image after the image enhancement processing is displayed on the screen of the smart terminal.
[0098] Exemplarily, the image enhancement method of the embodiment of the present application can be used to perform image enhancement processing on the acquired original image, and the output image after the image enhancement processing can be saved in the photo album of the smart terminal.
[0099] Exemplarily, the present application proposes an image enhancement method, which is applied to an electronic device with a display screen and a camera, comprising: detecting a first operation of a user for turning on a camera; in response to the first operation, displaying a shooting interface on the display screen, the shooting interface including a viewfinder, and the viewfinder including a first image; detecting a second operation of the user instructing the camera; in response to the second operation, displaying a second image in the viewfinder, or saving the second image in the electronic device, the second image being obtained by performing color enhancement processing and brightness enhancement processing on the first image according to enhanced image features of the first image, the enhanced image features of the first image being obtained by performing feature enhancement processing on the first image through a neural network, and the neural network comprising N convolutional layers, where N is a positive integer.
[0100] It should be noted that the image enhancement method provided in the embodiment of the present application is also applicable to the following Figures 6 to 16 The expansion, limitation, explanation and description of the image enhancement method in the relevant embodiments will not be repeated here.
[0101] Application scenario 2: Autonomous driving
[0102] In one embodiment, Figure 4 As shown, the image enhancement method of the embodiment of the present application can be applied to the field of autonomous driving. For example, it can be applied to the navigation system of an autonomous driving vehicle. Through the image enhancement method in the present application, the autonomous driving vehicle can perform image enhancement processing on the original road picture with low image quality during the navigation process of the road driving, and obtain the enhanced road picture, thereby achieving the safety of the autonomous driving vehicle.
[0103] Exemplarily, the present application provides an image enhancement method, which includes: obtaining a road picture to be processed; performing feature enhancement processing on the road picture to be processed through a neural network to obtain enhanced image features of the road picture to be processed, the neural network includes N convolutional layers, N is a positive integer; performing color enhancement processing and brightness enhancement processing on the road picture to be processed according to the enhanced image features to obtain a processed output road picture; and identifying information in the output road picture according to the processed output road picture.
[0104] It should be noted that the image enhancement method provided in the embodiment of the present application is also applicable to the following Figures 6 to 16The expansion, limitation, explanation and description of the image enhancement method in the relevant embodiments will not be repeated here.
[0105] Application scenario three: security field
[0106] In one embodiment, Figure 5 As shown, the image enhancement method of the embodiment of the present application can be applied to the field of security. For example, the image enhancement method of the embodiment of the present application can be applied to the enhancement of surveillance images in safe cities. For example, the images (or videos) collected by surveillance equipment in public places are often affected by factors such as weather and distance, and there are problems such as blurred images and low image quality. The image enhancement method of the present application can be used to enhance the collected pictures, so that important information such as license plate numbers and clear faces can be restored for public security personnel, providing important clues for case detection.
[0107] Exemplarily, the present application provides an image enhancement method, which includes: acquiring a street view picture; performing feature enhancement processing on the street view picture through a neural network to obtain enhanced image features of the street view picture, the neural network includes N convolutional layers, and N is a positive integer; performing color enhancement processing and brightness enhancement processing on the street view picture according to the enhanced image features to obtain a processed output street view picture; and identifying information in the output street view picture according to the processed output street view picture.
[0108] It should be noted that the image enhancement method provided in the embodiment of the present application is also applicable to the following Figures 6 to 16 The expansion, limitation, explanation and description of the image enhancement method in the relevant embodiments will not be repeated here.
[0109] Application scenario 4: Video source enhancement
[0110] In one embodiment, the image enhancement method of the embodiment of the present application can also be applied to the film source enhancement scenario. For example, when playing a movie using a smart terminal (such as a smart TV, smart screen, etc.), in order to display better image quality (picture quality), the original film source of the movie can be enhanced by the image enhancement method of the embodiment of the present application to improve the picture quality of the film source and obtain a better visual perception.
[0111] For example, when using a smart TV or smart screen to play old movies (the source of the old movies is relatively old and the image quality of the source is poor), the image enhancement method of the embodiment of the present application can be used to enhance the source of the old movies, which can show the visual sense of modern movies. For example, the source of the old movie can be enhanced into a high-dynamic range image (HDR) 10 or a high-quality video of the Dolby Vision standard by the image enhancement method of the embodiment of the present application.
[0112] Exemplarily, the present application provides an image enhancement method, which includes: obtaining an original image (for example, an original film source of a movie); performing feature enhancement processing on the original image through a neural network to obtain enhanced image features of the original image, the neural network includes N convolutional layers, and N is a positive integer; performing color enhancement processing and brightness enhancement processing on the original image according to the enhanced image features to obtain a processed output image (for example, a film source with improved image quality).
[0113] It should be noted that the image enhancement method provided in the embodiment of the present application is also applicable to the following Figures 6 to 16 The expansion, limitation, explanation and description of the image enhancement method in the relevant embodiments will not be repeated here.
[0114] It should be understood that the above is an example of an application scenario and does not limit the application scenario of the present application.
[0115] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and concepts of the neural networks that may be involved in the embodiments of the present application are first introduced below.
[0116] (1) Neural Network
[0117] A neural network can be composed of neural units. A neural unit can be a s The output of the operation unit can be:
[0118]
[0119] Where, s = 1, 2, ... n, n is a natural number greater than 1, W s For x s, b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
[0120] (2) Deep Neural Networks
[0121] A deep neural network (DNN), also known as a multi-layer neural network, can be understood as a neural network with multiple hidden layers. According to the position of different layers, the neural network inside the DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer.
[0122] Although DNN looks complicated, the work of each layer is not complicated. In simple terms, it can be expressed as the following linear relationship: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since DNN has many layers, the coefficient W and the offset vector The number of these parameters is also relatively large. The definitions of these parameters in DNN are as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscripts correspond to the third layer index 2 of the output and the second layer index 4 of the input.
[0123] In summary, the coefficients from the kth neuron in the L-1th layer to the jth neuron in the Lth layer are defined as
[0124] It should be noted that the input layer does not have a W parameter. In a deep neural network, more hidden layers allow the network to better describe complex situations in the real world. Theoretically, the more parameters a model has, the higher its complexity and the greater its "capacity", which means it can complete more complex learning tasks. Training a deep neural network is the process of learning the weight matrix, and its ultimate goal is to obtain the weight matrix of all layers of the trained deep neural network (the weight matrix formed by many layers of vector W).
[0125] (3) Convolutional Neural Network
[0126] Convolutional neural network (CNN) is a deep neural network with a convolutional structure. Convolutional neural network contains a feature extractor consisting of a convolution layer and a subsampling layer, which can be regarded as a filter. Convolutional layer refers to the neuron layer in the convolutional neural network that performs convolution processing on the input signal. In the convolutional layer of the convolutional neural network, a neuron can only be connected to some neurons in the adjacent layers. A convolutional layer usually contains several feature planes, each of which can be composed of some rectangularly arranged neural units. The neural units in the same feature plane share weights, and the shared weights here are convolution kernels. Shared weights can be understood as the way to extract image information is independent of position. The convolution kernel can be initialized in the form of a matrix of random size, and the convolution kernel can obtain reasonable weights through learning during the training process of the convolutional neural network. In addition, the direct benefit of shared weights is to reduce the connection between the layers of the convolutional neural network, while reducing the risk of overfitting.
[0127] (4) Loss Function
[0128] In the process of training a deep neural network, because we hope that the output of the deep neural network is as close as possible to the value we really want to predict, we can compare the predicted value of the current network with the target value we really want, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the deep neural network). For example, if the predicted value of the network is high, adjust the weight vector to make it predict a lower value, and keep adjusting until the deep neural network can predict the target value we really want or a value very close to the target value we really want. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value", which is the loss function or objective function, which are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the deep neural network becomes a process of minimizing this loss as much as possible.
[0129] (5) Back propagation algorithm
[0130] Neural networks can use the error back propagation (BP) algorithm to correct the size of the parameters in the initial neural network model during the training process, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the parameters in the initial neural network model are updated by back propagating the error loss information, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, which aims to obtain the optimal parameters of the neural network model, such as the weight matrix.
[0131] Figure 6 A system architecture 200 provided by an embodiment of the present application is shown.
[0132] exist Figure 6 In the embodiment of the present application, the data acquisition device 260 is used to collect training data. For the image enhancement method of the present application, the image enhancement model (also called image enhancement network) can be further trained by the training data, that is, the training data collected by the data acquisition device 260 can be a training image.
[0133] Exemplarily, in an embodiment of the present application, the training data for training the image enhancement model may include original images and sample enhanced images.
[0134] For example, the original image may refer to an image with lower image quality, and the sample enhanced image may refer to an image with higher image quality, for example, it may refer to an image that has been improved in one or more aspects such as brightness, color, and details relative to the sample image.
[0135] It should be understood that image enhancement can also be referred to as image quality enhancement, which can specifically refer to processing the brightness, color, contrast, saturation and / or dynamic range of an image so that various indicators of the image meet preset conditions. In the embodiments of the present application, image enhancement and image quality enhancement have the same meaning.
[0136] After the training data is collected, the data collection device 260 stores the training data in the database 230, and the training device 220 obtains the target model / rule 201 (i.e., the image enhancement model in the embodiment of the present application) through training based on the training data maintained in the database 230. The training device 220 inputs the training data into the image enhancement model until the difference between the predicted enhanced image and the sample enhanced image output by the training image enhancement model meets a preset condition (for example, the difference between the predicted enhanced image and the sample enhanced image is less than a certain threshold, or the difference between the predicted enhanced image and the sample enhanced image remains unchanged or no longer decreases), thereby completing the training of the target model / rule 201.
[0137] For example, the image enhancement model used to perform the image enhancement method in the embodiment of the present application can implement end-to-end training, for example, Fig.12 The image enhancement model shown can be trained end-to-end by inputting an image and a sample enhanced image (e.g., a true value image) corresponding to the input image.
[0138] In the embodiment provided in the present application, the target model / rule 201 is obtained by training the image enhancement model. It should be noted that in actual applications, the training data maintained in the database 230 may not necessarily come from the data acquisition device 260, but may also be received from other devices.
[0139] It should also be noted that the training device 220 does not necessarily train the target model / rule 201 entirely based on the training data maintained by the database 230, and may also obtain training data from the cloud or other places for model training, and the above description should not be used as a limitation on the embodiments of the present application. It should also be noted that at least part of the training data maintained in the database 230 can also be used in the process of executing the device 210 to process the processing to be processed.
[0140] The target model / rule 201 trained by the training device 220 can be applied to different systems or devices, such as Figure 6The execution device 210 shown may be a terminal, such as a mobile phone terminal, a tablet computer, a laptop computer, AR / VR, a vehicle-mounted terminal, etc., or may be a server or a cloud, etc.
[0141] exist Figure 6 In the embodiment, the execution device 210 is configured with an input / output (I / O) interface 212 for data interaction with an external device. A user may input data to the I / O interface 212 through a client device 240. The input data may include an image to be processed input by the client device in the embodiment of the present application.
[0142] Preprocessing module 213 and preprocessing module 214 are used to perform preprocessing according to the input data (such as the image to be processed) received by I / O interface 212. In the embodiment of the present application, preprocessing module 213 and preprocessing module 214 may be omitted (or only one of the preprocessing modules may be present), and the computing module 211 may be used directly to process the input data.
[0143] When the execution device 210 preprocesses the input data, or when the computing module 211 of the execution device 210 performs calculations and other related processing, the execution device 210 can call the data, code, etc. in the data storage system 250 for corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing into the data storage system 250.
[0144] Finally, the I / O interface 212 returns the processing result, such as the enhanced image to be processed, or the obtained output image, to the client device 240 for providing to the user.
[0145] It is worth noting that the training device 220 can generate corresponding target models / rules 201 based on different training data for different goals or different tasks. The corresponding target models / rules 201 can be used to achieve the above goals or complete the above tasks, thereby providing users with the desired results.
[0146] exist Figure 6 In the case shown in FIG. 2 , in one case, the user can manually provide input data, and the manual provision can be operated through the interface provided by the I / O interface 212 .
[0147] In another case, the client device 240 can automatically send input data to the I / O interface 212. If the client device 240 needs to obtain the user's authorization to automatically send the input data, the user can set the corresponding permissions in the client device 240. The user can view the results output by the execution device 210 in the client device 240, and the specific presentation form can be a specific method such as display, sound, action, etc. The client device 240 can also be used as a data acquisition terminal to collect the input data of the input I / O interface 212 and the output results of the output I / O interface 212 as shown in the figure as new sample data, and store them in the database 230. Of course, it is also possible not to collect through the client device 240, but the I / O interface 212 directly stores the input data of the input I / O interface 212 and the output results of the output I / O interface 212 as new sample data in the database 230.
[0148] It is worth noting that Figure 6 This is only a schematic diagram of a system architecture provided by an embodiment of the present application. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 6 In the embodiment, the data storage system 250 is an external memory relative to the execution device 210. In other cases, the data storage system 250 can also be placed in the execution device 210.
[0149] like Figure 6 As shown, the target model / rule 201 is obtained by training according to the training device 220. The target model / rule 201 can be an image enhancement model in the embodiment of the present application. Specifically, the image enhancement model provided in the embodiment of the present application can be a deep neural network, a convolutional neural network, or a deep convolutional neural network, etc.
[0150] Combine the following Figure 7 The focus is on a detailed introduction to the structure of the convolutional neural network. As mentioned in the basic concept introduction above, a convolutional neural network is a deep neural network with a convolutional structure and a deep learning architecture. A deep learning architecture refers to multiple levels of learning at different levels of abstraction through machine learning algorithms. As a deep learning architecture, a convolutional neural network is a feed-forward artificial neural network in which each neuron can respond to the image input into it.
[0151] The structure of the image enhancement model in the embodiment of the present application can be as follows Figure 7 As shown. Figure 7In the example, the convolutional neural network 300 may include an input layer 310, a convolutional layer / pooling layer 320 (wherein the pooling layer is optional), a fully connected layer 330, and an output layer 340. The input layer 310 may obtain an image to be processed, and the obtained image to be processed is passed to the convolutional layer / pooling layer 320 and the fully connected layer 330 for processing, and the processing result of the image may be obtained. Figure 7 The internal layer structure of CNN 300 is introduced in detail.
[0152] Convolutional layer / pooling layer 320:
[0153] like Figure 7 The shown convolution layer / pooling layer 320 may include layers 321-326 as shown in Examples. For example: in one implementation, layer 321 is a convolution layer, layer 322 is a pooling layer, layer 323 is a convolution layer, layer 324 is a pooling layer, layer 325 is a convolution layer, and layer 326 is a pooling layer; in another implementation, layers 321 and 322 are convolution layers, layer 323 is a pooling layer, layers 324 and 325 are convolution layers, and layer 326 is a pooling layer, that is, the output of a convolution layer can be used as the input of a subsequent pooling layer, or as the input of another convolution layer to continue the convolution operation.
[0154] The following will take convolutional layer 321 as an example to introduce the internal working principle of a convolutional layer.
[0155] The convolution layer 321 may include a plurality of convolution operators, which are also called kernels. The convolution operator is equivalent to a filter that extracts specific information from the input image matrix in image processing. The convolution operator may be essentially a weight matrix, which is usually predefined. In the process of performing convolution operations on the image, the weight matrix is usually processed one pixel after another (or two pixels after two pixels, etc., depending on the value of the stride) in the horizontal direction on the input image, thereby completing the work of extracting specific features from the image. The size of the weight matrix should be related to the size of the image. It should be noted that the depth dimension of the weight matrix is the same as the depth dimension of the input image. In the process of performing convolution operations, the weight matrix will extend to the entire depth of the input image. Therefore, convolution with a single weight matrix will produce a convolution output with a single depth dimension, but in most cases, a single weight matrix is not used, but multiple weight matrices of the same size (row × column), i.e., multiple isotype matrices, are applied. The output of each weight matrix is stacked to form the depth dimension of the convolved image, and the dimension here can be understood as being determined by the "multiple" described above.
[0156] Different weight matrices can be used to extract different features in the image. For example, one weight matrix is used to extract image edge information, another weight matrix is used to extract specific colors of the image, and another weight matrix is used to blur unnecessary noise points in the image. The multiple weight matrices have the same size (rows × columns), and the convolution feature maps extracted by the multiple weight matrices of the same size are also the same size. The extracted multiple convolution feature maps of the same size are then merged to form the output of the convolution operation.
[0157] The weight values in these weight matrices need to be obtained through a lot of training in practical applications. The weight matrices formed by the weight values obtained through training can be used to extract information from the input image, so that the convolutional neural network 300 can make correct predictions.
[0158] When the convolutional neural network 300 has multiple convolutional layers, the initial convolutional layer (for example, 321) often extracts more general features, which can also be called low-level features. As the depth of the convolutional neural network 300 increases, the features extracted by the later convolutional layers (for example, 326) become more and more complex, such as high-level semantic features. Features with higher semantics are more suitable for the problem to be solved.
[0159] Pooling layer:
[0160] Since it is often necessary to reduce the number of training parameters, it is often necessary to periodically introduce a pooling layer after the convolution layer. Figure 7 The layers 321-326 illustrated in 320 may be a convolution layer followed by a pooling layer, or multiple convolution layers followed by one or more pooling layers. In the image processing process, the purpose of the pooling layer is to reduce the spatial size of the image. The pooling layer may include an average pooling operator and / or a maximum pooling operator to sample the input image to obtain an image of a smaller size. The average pooling operator may calculate the pixel values in the image within a specific range to generate an average value as the result of average pooling. The maximum pooling operator may take the pixel with the largest value within a specific range as the result of maximum pooling.
[0161] In addition, just as the size of the weight matrix used in the convolutional layer should be related to the image size, the operator in the pooling layer should also be related to the image size. The size of the image output after processing by the pooling layer can be smaller than the size of the image input to the pooling layer. Each pixel in the image output by the pooling layer represents the average or maximum value of the corresponding sub-region of the image input to the pooling layer.
[0162] Fully connected layer 330:
[0163] After being processed by the convolution layer / pooling layer 320, the convolution neural network 300 is not sufficient to output the required output information. As mentioned above, the convolution layer / pooling layer 320 only extracts features and reduces the parameters brought by the input image. However, in order to generate the final output information (the required class information or other related information), the convolution neural network 300 needs to use the fully connected layer 330 to generate one or a group of outputs of the required number of classes. Therefore, the fully connected layer 330 may include multiple hidden layers (such as Figure 7 331, 332 to 33n) and the output layer 340 shown, the parameters contained in the multi-layer hidden layers can be pre-trained according to relevant training data of a specific task type. For example, the task type may include image enhancement, image recognition, image classification, image detection, and image super-resolution reconstruction, etc.
[0164] After the multiple hidden layers in the fully connected layer 330, that is, the last layer of the entire convolutional neural network 300 is the output layer 340, which has a loss function similar to the classification cross entropy, specifically used to calculate the prediction error. Once the forward propagation of the entire convolutional neural network 300 (such as Figure 7 The propagation from 310 to 340 is forward propagation), and the reverse propagation (such as Figure 7 The propagation from 340 to 310 is called back propagation) and then starts to update the weight values and biases of the aforementioned layers to reduce the loss of the convolutional neural network 300 and the error between the result output by the convolutional neural network 300 through the output layer and the ideal result.
[0165] It should be noted that Figure 7 The convolutional neural network shown is only an example of the structure of the image enhancement model of an embodiment of the present application. In specific applications, the convolutional neural network adopted by the image enhancement method of the embodiment of the present application may also exist in the form of other network models.
[0166] In an embodiment of the present application, the image enhancement device may include Figure 7 The convolutional neural network 300 shown in the figure can perform image enhancement processing on the image to be processed to obtain a processed output image.
[0167] Figure 8 The hardware structure of a chip provided in an embodiment of the present application includes a neural network processing unit 400 (NPU). The chip can be arranged in Figure 6 The execution device 210 shown in FIG. 1 is used to complete the calculation work of the calculation module 211. The chip can also be set in Figure 6The training device 220 shown in FIG. 2 is used to complete the training work of the training device 220 and output the target model / rule 201. Figure 7 The algorithms of each layer in the convolutional neural network shown can be found in Figure 8 is implemented in the chip shown.
[0168] The NPU 400 is mounted on the main central processing unit (CPU) as a coprocessor, and the main CPU assigns tasks. The core part of the NPU 400 is the operation circuit 403, and the controller 404 controls the operation circuit 403 to extract data from the memory (weight memory or input memory) and perform operations.
[0169] In some implementations, the operation circuit 403 includes multiple processing units (process engines, PEs) inside. In some implementations, the operation circuit 403 is a two-dimensional systolic array. The operation circuit 403 can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the operation circuit 403 is a general-purpose matrix processor.
[0170] For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The operation circuit 403 takes the corresponding data of the matrix B from the weight memory 402 and caches it on each PE in the operation circuit 403. The operation circuit 403 takes the matrix A data from the input memory 401 and performs a matrix operation with the matrix B, and the partial result or the final result of the matrix is stored in the accumulator 408 (accumulator).
[0171] The vector calculation unit 407 can further process the output of the operation circuit 403, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. For example, the vector calculation unit 407 can be used for network calculations of non-convolutional / non-FC layers in a neural network, such as pooling, batch normalization, local response normalization, etc.
[0172] In some implementations, the vector calculation unit 407 can store the processed output vector to the unified memory 406. For example, the vector calculation unit 407 can apply a nonlinear function to the output of the operation circuit 403, such as a vector of accumulated values, to generate an activation value. In some implementations, the vector calculation unit 407 generates a normalized value, a merged value, or both.
[0173] In some implementations, the vector of processed outputs can be used as activation input to the computational circuit 403, for example, for use in subsequent layers in a neural network.
[0174] The unified memory 406 is used to store input data and output data. The weight data is directly stored in the input data in the external memory into the input memory 401 and / or the unified memory 406 through the storage unit access controller 405 (direct memory access controller, DMAC), the weight data in the external memory is stored in the weight memory 402, and the data in the unified memory 406 is stored in the external memory.
[0175] The bus interface unit 410 (BIU) is used to implement the interaction between the main CPU, DMAC and instruction fetch memory 409 through the bus.
[0176] The instruction fetch buffer 409 connected to the controller 404 is used to store instructions used by the controller 404. The controller 404 is used to call the instructions cached in the instruction fetch buffer 409 to control the working process of the computing accelerator.
[0177] Generally, the unified memory 406, the input memory 401, the weight memory 402 and the instruction fetch memory 409 are all on-chip memories, and the external memory is a memory outside the NPU, which can be a double data rate synchronous dynamic random access memory (DDR SDRAM), a high bandwidth memory (HBM) or other readable and writable memory.
[0178] in, Figure 7 The operations of each layer in the convolutional neural network shown can be performed by the operation circuit 403 or the vector calculation unit 407.
[0179] Introduced above Figure 6 The execution device 210 in the embodiment of the present application can execute each step of the image enhancement method. Figure 7 The CNN model shown and Figure 8 The chip shown can also be used to execute the various steps of the image enhancement method of the embodiment of the present application.
[0180] Fig. 9The embodiment of the present application provides a system architecture 500. The system architecture includes a local device 520, a local device 530, an execution device 510 and a data storage system 550, wherein the local device 520 and the local device 530 are connected to the execution device 510 via a communication network.
[0181] Exemplarily, the execution device 510 may be implemented by one or more servers.
[0182] Optionally, the execution device 510 can be used in conjunction with other computing devices. For example, data storage, routers, load balancers and other devices. The execution device 510 can be arranged at one physical site, or distributed at multiple physical sites. The execution device 510 can use the data in the data storage system 550, or call the program code in the data storage system 550 to implement the image enhancement method of the embodiment of the present application.
[0183] It should be noted that the above-mentioned execution device 510 can also be called a cloud device, and in this case the execution device 510 can be deployed in the cloud.
[0184] Specifically, the execution device 510 can perform the following process: obtain an image to be processed; perform feature enhancement processing on the image to be processed through a neural network to obtain enhanced image features of the image to be processed, the neural network includes N convolutional layers, N is a positive integer; perform color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image.
[0185] In a possible implementation, the image enhancement method of the embodiment of the present application may be an offline method executed in the cloud. For example, the image enhancement method of the embodiment of the present application may be executed by the execution device 510 described above.
[0186] In a possible implementation, the image enhancement method of the embodiment of the present application may be executed by the local device 520 or the local device 530 .
[0187] In an embodiment of the present application, image enhancement may be performed on an acquired image to be processed with poor image quality, thereby obtaining an output image with improved performance in terms of image detail, image color, and image brightness.
[0188] For example, users may operate respective user devices (e.g., local device 520 and local device 530) to interact with execution device 510. Each local device may represent any computing device, such as a personal computer, a computer workstation, a smart phone, a tablet computer, a smart camera, a smart car or other type of cellular phone, a media consumption device, a wearable device, a set-top box, a game console, etc.
[0189] The local device of each user can interact with the execution device 510 through a communication network of any communication mechanism / communication standard. The communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.
[0190] In one implementation, the local device 520 and the local device 530 may obtain relevant parameters of the target neural network from the execution device 510, deploy the target neural network on the local device 520 and the local device 530, and use the target neural network to perform image enhancement processing, etc.
[0191] In another implementation, the target neural network can be directly deployed on the execution device 510, and the execution device 510 obtains the image to be processed from the local device 520 and the local device 530, and performs image enhancement processing on the image to be processed according to the target neural network.
[0192] For example, the above-mentioned target neural network can be an image enhancement model in an embodiment of the present application.
[0193] At present, the camera imaging and video of smart terminals are limited by the hardware performance of the optical sensors of smart terminals. The quality of the photos and videos taken is still not high enough, with problems such as high noise, low resolution, missing details, and color cast. Image (or picture) enhancement is the basis of various image processing applications. Computer vision often involves the problem of how to enhance the acquired images. The existing image enhancement methods can be divided into two categories: the first category is the scaling method, which is to scale the pixels or features of the input image or video by learning the mapping function of the conversion relationship between the original image or video and the target image or video; the second category is the generative method, which is to extract features from the input image or video through the generative adversarial network (GAN), generate new elements, and reconstruct the output image or video. However, for the scaling method, if the details of the original input image are not clear, the image enhanced by the scaling method cannot achieve enhanced details; for the generative method, pseudo texture will be introduced when performing image enhancement.
[0194] In view of this, an embodiment of the present application provides an image enhancement method, which performs feature enhancement processing on an image to be processed to obtain image enhancement features of the image to be processed, and uses the image enhancement features to further perform color enhancement processing and brightness enhancement processing on the image to be processed, so that the detail features of the image to be processed can also be enhanced when performing color enhancement and brightness enhancement, so that the performance of the image to be processed in terms of details, color and brightness can be enhanced, thereby improving the effect of image enhancement processing.
[0195] Fig.10 A schematic flow chart of an image enhancement method provided in an embodiment of the present application is shown. Fig.10 The image enhancement method shown can be performed by an image enhancement device, which can be Figure 6 The execution device 210 in Fig. 9 The execution device 510 or local device in. Fig.10 The method shown includes steps 610 to 630, and steps 610 to 630 are respectively described in detail below.
[0196] Step 610: Obtain an image to be processed.
[0197] Among them, the image to be processed can be an original image with poor image quality; for example, it can mean that the image to be processed obtained has problems such as image blur, low image quality, or low image color and brightness due to factors such as weather, distance, shooting environment, etc.
[0198] For example, the image to be processed may be an image captured by a camera of the electronic device, or the image to be processed may be an image obtained from the inside of the electronic device (for example, an image stored in an album of the electronic device, or a picture obtained by the electronic device from the cloud). Fig. 9 Any of the local devices or execution devices shown.
[0199] Step 620: Perform feature enhancement processing on the image to be processed through a neural network to obtain enhanced image features of the image to be processed. The neural network may include N convolutional layers, where N is a positive integer.
[0200] The feature enhancement process mentioned above may refer to enhancing the detail features of the image to be processed.
[0201] It should be understood that the above neural network may refer to Fig.11 The feature extraction part in the image enhancement model shown in the figure; the image enhancement model may include multiple neural networks, the feature extraction part may be a first neural network, and the feature reconstruction part may include a second neural network. For example, the first neural network may be used to perform feature enhancement processing on the image to be processed to obtain enhanced image features of the image to be processed; the second neural network may be used to perform color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image. Among them, Fig.13 The first neural network is shown as follows: Fig.14 Shown may be a second neural network.
[0202] It should be noted that feature enhancement processing can refer to purposefully emphasizing the overall or local characteristics of an image, making an originally unclear image clear or emphasizing certain features of interest, expanding the differences between features of different objects in the image, suppressing features of no interest, thereby improving image quality, enriching the amount of information, strengthening image interpretation and recognition effects, and meeting the needs of recognition and analysis.
[0203] Step 630: Perform color enhancement and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image.
[0204] Among them, color enhancement processing can be used to improve the color distribution of the image to be processed and increase the color saturation of the image to be processed. Brightness enhancement processing can refer to adjusting the brightness of the image to be processed. The above-mentioned feature enhancement processing, color enhancement processing and intensity enhancement processing can improve the clarity and quality of the image, making the outline of the object in the image clearer and the details more obvious.
[0205] It should be noted that, in the embodiments of the present application, the output image may refer to an image obtained by performing image enhancement on the acquired image to be processed. Image enhancement may be called image quality enhancement, and specifically may refer to processing the brightness, color, contrast, saturation and / or dynamic range of the image so that one or more indicators of the image meet preset conditions.
[0206] Exemplarily, the Laplace enhancement algorithm may be used to perform feature enhancement processing on the image to be processed to obtain enhanced image features of the image to be processed.
[0207] It should be understood that the enhanced image features of the image to be processed may refer to the enhanced image features obtained after enhancing the details or textures in the image to be processed.
[0208] In an embodiment of the present application, the Laplace enhancement algorithm can be used to enhance the detail features in the image to be processed, wherein the Laplace enhancement algorithm does not introduce new textures when used to perform feature enhancement on the image to be processed, thereby avoiding the problem of introducing pseudo textures in the output image obtained after image enhancement processing, and can improve the effect of image enhancement processing.
[0209] Exemplarily, the above-mentioned Laplace enhancement algorithm may refer to a traditional Laplace enhancement algorithm, which is an enhanced image feature obtained by fusing the original image features of the image to be processed with the high-frequency features of the image to be processed.
[0210] For example, feature enhancement is performed on the processed image by the following equation:
[0211] E=I+s c ·[Ih(I)];
[0212] Where I can represent the original image features of the image to be processed, E can represent the enhanced image features of the image to be processed, h can represent the fuzzy kernel function, s c It can represent the scaling factor of the constant value, and Ih(I) can represent the high-frequency features of the image to be processed.
[0213] It should be noted that the high-frequency features of an image may refer to information such as details and textures of the image; and the low-frequency features of an image may refer to contour information of the image.
[0214] Furthermore, in order to improve the feature enhancement processing effect of the image to be processed, an improved Laplace enhancement algorithm is proposed in the embodiment of the present application. The improved Laplace enhancement algorithm of the embodiment of the present application can realize the progressive and step-by-step enhancement of image features of different convolutional layers by using the image features in the previous convolutional layer for the enhancement of subsequent image features.
[0215] Optionally, the Laplace enhancement algorithm proposed in the embodiment of the present application can be used to perform feature enhancement processing on the input image features of the ith convolutional layer according to the residual features of the ith convolutional layer among the N convolutional layers to obtain the enhanced image features of the ith convolutional layer, wherein the residual features can represent the difference between the input image features of the ith convolutional layer and the image features after the convolution operation in the ith convolutional layer, the enhanced image features of the ith convolutional layer are the input image features of the i+1th convolutional layer, the input image features are obtained based on the image to be processed, and i is a positive integer.
[0216] Exemplarily, the enhanced image feature of the image to be processed may be the image feature output by the Nth convolutional layer among the N convolutional layers, and the enhanced image feature of the image to be processed is obtained by the following equation:
[0217] L(F N )=Φ(F N )+s l ·(Φ(F N )-F N );
[0218] Among them, L(F N ) can represent the enhanced image features of the Nth convolutional layer, F N can represent the input image features of the Nth convolutional layer, Ф can represent the convolution kernel of the Nth convolutional layer, s l It can represent the parameters obtained through learning, and N is a positive integer.
[0219] The Laplace enhancement algorithm proposed in the embodiment of the present application replaces the fixed scaling factor in the traditional Laplace enhancement algorithm with a learnable parameter; at the same time, the residual features of the adjacent layers are used for feature enhancement, and the residual features can be used to represent any information that needs to be emphasized. Therefore, the Laplace algorithm of the embodiment of the present application can not only enhance the high-frequency information of the image, but also gradually enhance the image features of different convolutional layers, thereby improving the effect of image feature enhancement.
[0220] Furthermore, in an embodiment of the present application, the color enhancement and brightness enhancement of the image to be processed can be performed using the acquired enhanced image features. Since the enhanced image features of the image to be processed include more detail features and textures, performing color enhancement and brightness enhancement processing on the image to be processed based on the enhanced image features of the image to be processed can achieve detail enhancement of the output image, and can also improve the brightness and color of the output image.
[0221] Exemplarily, performing color enhancement and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image may include: obtaining a confidence image feature and an illumination compensation image feature of the image to be processed according to the enhanced image features of the image to be processed, wherein the confidence image feature is used to perform color enhancement on the image to be processed, and the illumination compensation image feature is used to perform brightness enhancement on the image to be processed; and obtaining the output image according to the image to be processed, the confidence image feature, and the illumination compensation image feature.
[0222] It should be noted that the above-mentioned confidence image features may represent a mapping relationship or a mapping function for performing color enhancement processing on the image to be processed.
[0223] Exemplarily, the confidence image feature may correspond to the image feature of the image to be processed. For example, an element in the confidence image feature may be used to indicate the degree of scaling of the corresponding element in the image feature of the image to be processed. The color enhancement of the image to be processed may be achieved by scaling different regions in the image to be processed.
[0224] In an embodiment of the present application, the confidence image features used for color enhancement processing and the illumination compensation image features used for brightness enhancement processing can be obtained through the enhanced image features of the image to be processed. Compared with the traditional scaling method, which directly enhances the color and brightness of each pixel in the image to be processed through a mapping function, the confidence image features and illumination compensation image features in the embodiment of the present application can not only perform color enhancement and brightness enhancement, but also achieve detail enhancement of the image to be processed, thereby improving the effect of image enhancement processing.
[0225] For example, the confidence image feature and the illumination compensation image feature can be obtained by performing a convolution operation on the enhanced image feature of the image to be processed; the color enhanced image feature of the image to be processed is obtained by multiplying the image feature of the image to be processed with the confidence image feature; and the color enhanced image feature and the illumination compensation image feature are fused to obtain the output image.
[0226] It should be noted that the above-mentioned confidence image features and illumination compensation image features are obtained based on the enhanced image features of the image to be processed. Therefore, when the confidence image features are used to perform color enhancement on the image to be processed, they will also enhance the image features of the image to be processed to a certain extent; similarly, when the illumination compensation image features are used to perform brightness enhancement on the image to be processed, they will also enhance the image features of the image to be processed, thereby achieving enhancement of the details, color and brightness of the image to be processed.
[0227] In the embodiment of the present application, the confidence image features for color enhancement processing and the image features for brightness enhancement processing are obtained through the enhanced image features of the image to be processed. Compared with the traditional scaling method, which directly enhances the color and brightness of each pixel in the image to be processed through a mapping function, the confidence image features and illumination compensation image features in the embodiment of the present application can not only perform color enhancement and brightness enhancement, but also achieve detail enhancement of the image to be processed.
[0228] In one possible implementation, the above-mentioned confident image features and the above-mentioned illumination compensation image features can be obtained in parallel through the enhanced image features of the image to be processed; for example, the enhanced image features of the image to be processed can be convolved by the first branch in the network model to obtain the above-mentioned confident image features; and the enhanced image features of the image to be processed can be convolved by the second branch in the network model to obtain the above-mentioned illumination compensation image features.
[0229] In a possible implementation manner, an output image may be obtained through the image to be processed, the features of the confidence image, and the features of the illumination compensation image.
[0230] For example, the image features of the image to be processed (for example, the original image features of the image to be processed) can be multiplied with the confidence image features to achieve color enhancement in different areas of the image to be processed, thereby obtaining color enhanced image features; and then the color enhanced image features are fused with the illumination compensation image features to obtain an output image after image enhancement processing.
[0231] Exemplarily, the fusion of the color enhancement image features and the illumination compensation image features may refer to adding the color enhancement image features and the illumination compensation image features to obtain an output image.
[0232] In another possible implementation manner, an output image after image enhancement processing may be obtained through enhanced image features, confidence image features, and illumination compensation features of the image to be processed.
[0233] For example, the color enhancement of different regions in the image to be processed can be achieved by multiplying the enhanced image features of the image to be processed with the confidence image features to obtain color enhanced image features; the color enhanced image features are then fused with the illumination compensation image features to obtain an output image after image enhancement processing.
[0234] Fig.11 It is a schematic diagram of the model structure for image enhancement provided in an embodiment of the present application. Fig.11 The model shown can be deployed in an image enhancement device that performs the above-mentioned image enhancement method.
[0235] Fig.11 The model shown may include four parts, namely, an input part, a feature extraction part, a feature reconstruction part and an output part. The feature extraction part may include a Laplacian enhancing unit (LEU); the feature reconstruction part may include a hybrid enhancing module (HEM).
[0236] It should be understood that Fig.11 The image enhancement model shown may include multiple neural networks, the feature extraction part may be a first neural network, and the feature reconstruction part may include a second neural network. The first neural network may be used to perform feature enhancement processing on the image to be processed to obtain enhanced image features of the image to be processed; the second neural network may be used to perform color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image. For example, Fig.13 The first neural network is shown as follows: Fig.14 Shown may be a second neural network.
[0237] In the feature extraction part, the Laplace enhancement unit can be embedded into the convolution layer, and the extracted features can be enhanced by using the Laplace enhancement unit; specifically, the Laplace enhancement unit can be used to perform feature enhancement processing on the processed image through the Laplace enhancement algorithm.
[0238] For example, the extracted features are gradually enhanced through several layers of Laplace enhancement units, and the image features of the previous layer can be used to enhance the image features of the next layer. By superimposing the residual of the image features of the previous layer, the image features of different convolutional layers can be gradually enhanced, thereby improving the performance of image enhancement. For the feature reconstruction part, a hybrid enhancement unit can be used to achieve the advantages of both the scaling method and the generative method.
[0239] It should be noted that the hybrid enhancement unit may use the image features of the input image processed by the Laplace enhancement unit as input data, that is, the hybrid enhancement unit uses the enhanced image features of the output image output by the Laplace unit as input data. The Laplace enhancement unit may be used to perform feature enhancement processing on the output image through the Laplace algorithm, and the hybrid enhancement unit may be used to perform color enhancement processing and brightness enhancement processing on the output image.
[0240] For example, Fig.11 The image enhancement model for performing the image enhancement method provided by the embodiment of the present application shown can be called a hybrid progressive enhancing u-net (HPEU), which adopts LEU and HEM to increase the receptive field layer by layer; among them, LEU can realize feature enhancement processing of the output image based on more image information.
[0241] In addition, the Laplace enhancement unit can be used to enhance image features at different levels to different degrees. For example, in the shallower convolutional layer of the image enhancement model, the LEU can be mainly used to enhance local area features based on the edge information of the input image; in the deeper convolutional layer of the image enhancement model, due to the larger receptive field, the LEU can be used to enhance global features.
[0242] It should be noted that the above receptive field is a term in the field of deep neural networks in the field of computer vision, which is used to indicate the size of the range of perception of neurons at different positions within the neural network to the original image. The larger the value of the neuron's receptive field, the larger the range of the original image it can access, which also means that the neuron may contain more global and higher semantic features; while the smaller the value, the more local and detailed the features contained in the neuron are. The value of the receptive field can be roughly used to judge the level of abstraction of each layer.
[0243] Fig.12 Schematic diagram of the Laplace enhancement unit and the hybrid enhancement unit provided in the embodiment of the present application. Fig.12As shown, one or more Laplace enhancement units and hybrid enhancement units may be included. The input image is subjected to a convolution layer to extract features, and the extracted features are enhanced by the Laplace enhancement unit to obtain enhanced image features. Further, the enhanced image features are used as input data for subsequent convolution layers or subsequent Laplace enhancement unit layers. Until the enhanced image features are input to the hybrid enhancement unit, the feature channel can be divided into two parts, and the scaling component and the generation component are calculated respectively, and then the two components are fused to obtain the final enhanced image.
[0244] Among them, the above-mentioned scaling component can be used to achieve color enhancement, and the confidence map (also known as confidence image feature) can constrain the degree of color enhancement in different areas of the input image; the above-mentioned generation component can be used for lighting compensation, thereby achieving contrast and brightness enhancement.
[0245] For example, Fig.13 This is a schematic diagram of the Laplace enhancement unit processing flow (i.e., a schematic diagram of feature enhancement processing) proposed in the embodiment of the present application. Fig.13 As shown, the processing of the Laplace enhancement unit includes the following steps:
[0246] Step 1: Assume that the current network (first neural network) includes N convolutional layers, and the output data of the Nth convolutional layer is the image feature F N , that is, F N As input data for feature enhancement processing.
[0247] Step 2: Extract F through the Nth convolutional layer N The characteristic is denoted as Φ(F N ).
[0248] Step 3: Calculate Φ(F N ) and F N The residual between the two can be recorded as: Φ(F N )-F N , or, F N -Φ(F N ) and enhance the above residuals through learnable parameters.
[0249] Step 4: Compare the residual after the above enhancement processing with Φ(F N ) are superimposed to obtain the enhanced image features obtained after the Nth convolutional layer performs feature enhancement processing through the Laplace enhancement unit.
[0250] Exemplarily, the image features output by the Nth convolutional layer are obtained by the following equation:
[0251] L(F N )=Φ(F N )+sl ·(Φ(F N )-F N );
[0252] Among them, L(F N ) can represent the enhanced image features of the Nth convolutional layer, F N can represent the input image features of the Nth convolutional layer, Ф can represent the convolution kernel of the Nth convolutional layer, s l It can represent the parameters obtained through learning, and can be used to represent the degree of enhancement of image features by LEU each time.
[0253] It should be understood that the first neural network may include N convolutional layers, and the image features output by the Nth convolutional layer may be enhanced image features of the image to be processed obtained by performing feature enhancement processing on the image to be processed.
[0254] For example, l It can represent the scaling parameters obtained through learning, and the scaling parameters can perform scaling operations on different areas in the image, thereby achieving color enhancement in different areas of the image.
[0255] For example, Fig.14 This is a schematic diagram of the hybrid enhancement unit processing flow (i.e., a schematic diagram of the color enhancement processing and the brightness enhancement processing) proposed in the embodiment of the present application. Fig.14 As shown, the processing of the hybrid enhancement unit includes the following steps:
[0256] Step 1: Divide multiple feature channels of the enhanced image features output by the Laplace enhancement unit (that is, the enhanced image features output by the first neural network) into two branches, which are recorded as the first branch and the second branch.
[0257] Step 2: Perform a convolution operation on the first branch in the hybrid enhancement unit to obtain a confidence map, and then apply the confidence map to the input image for pixel-level scaling to obtain a scaling component.
[0258] It should be noted that the confidence map is the above Fig.10 The confidence image features in the enhancement processing method shown are used to perform color enhancement on the input image. For example, the confidence map can represent a mapping relationship or a mapping function for performing color enhancement on the input image. The scaling component is Fig.10 The color enhancement image features in the enhancement processing method shown.
[0259] Exemplarily, the confidence map may correspond to the input image. For example, an element in the image feature of the confidence map may be used to represent the degree of scaling of the corresponding element in the image feature of the input image. Color enhancement of the input image may be achieved by scaling different regions in the input image.
[0260] The confidence map may include several channels corresponding to the channels of the input image.
[0261] Exemplarily, applying the confidence map to the input image may refer to multiplying the confidence map with the input image, for example, multiplying the input image with the confidence map pixel by pixel.
[0262] Step 3: Perform a convolution operation on the second branch in the hybrid enhancement unit to obtain a generation component for illumination compensation.
[0263] It should be noted that the generation component is used to enhance the brightness of the input image; the generation component is the above Fig.10 The illumination compensation image features in the enhancement processing method shown.
[0264] Step 4: Fuse the image features of the two branches to obtain the output image after image enhancement.
[0265] For example, the scaling component is s[i,j]=x[i,j]·c[i,j], where x represents the input image, c represents the confidence map, and i and j represent the pixel coordinates. The final output image is y[i,j]=x[i,j]·c[i,j]+g[i,j].
[0266] In one possible implementation, assuming that the enhanced image features of the input image output by the Laplacian enhancement unit have N channels, the N channels can be divided into two branches, wherein the M channel features are convolved to obtain a confidence map, which can be used to calculate the scaling component, and the M channels can correspond to the R, G, and B channels of the image respectively; the other NM channels can be convolved to obtain a generated component, which is used for illumination compensation to achieve contrast and brightness enhancement.
[0267] It should be understood that since the generation component is used for illumination compensation, an illumination compensation image feature for illumination enhancement processing can be obtained by performing a convolution operation through a channel feature.
[0268] Exemplarily, in an embodiment of the present application, the confidence image features and illumination compensation image features of the input image can be obtained based on the hybrid enhancement module and the enhanced image features of the input image, wherein the hybrid enhancement module includes a first branch and a second branch, the first branch is used to obtain the confidence image features based on the enhanced image, and the second branch is used to obtain the illumination compensation image features based on the enhanced image features, the confidence image features can be used to represent a mapping relationship (for example, a mapping function) for color enhancement of the processed image, and the illumination compensation image features can be used to perform brightness enhancement on the input image; the output image is obtained based on the input image, the confidence image features, and the illumination compensation image features.
[0269] For example, Fig.15 It is a schematic diagram of the processing flow of the hybrid enhancement unit provided in the embodiment of the present application. Among them, the scale of the image to be processed and the confidence map can be the same, and the confidence map can be used to scale different areas of the input image to different degrees to achieve color enhancement; then the superposition generation component is used to achieve illumination compensation, and the contrast and brightness are enhanced, and finally the output image after feature enhancement, color enhancement and brightness enhancement of the input image is obtained.
[0270] It should be noted that the above confidence map may represent a mapping relationship or a mapping function for performing color enhancement processing on the image to be processed.
[0271] Exemplarily, the confidence map may correspond to the image to be processed. For example, an element in the image feature of the confidence map may be used to indicate the degree of scaling of the corresponding element in the image feature of the image to be processed. Color enhancement of the image to be processed may be achieved by scaling different regions in the image to be processed.
[0272] In an embodiment of the present application, the confidence map used for color enhancement processing and the illumination compensation image features used for brightness enhancement processing can be obtained through the enhanced image features of the image to be processed. Compared with the traditional scaling method, which directly enhances the color and brightness of each pixel in the image to be processed through a mapping function, the confidence image features and illumination compensation image features in the embodiment of the present application can not only perform color enhancement and brightness enhancement, but also achieve detail enhancement of the image to be processed.
[0273] Table 1
[0274] Model PSNR MS-SSIM Time(ms) Parameters Baseline 22.67 0.9355 371 3758879 +LEU 22.94 0.9352 383 3758903 +HEM 22.79 0.9405 390 3758828 This application 23.29 0.9431 408 3758852
[0275] Table 1 is the quantitative performance evaluation results on the MIT-Adobe FiveK dataset provided by the embodiment of the present application. Among them, Baseline represents the basic model architecture, that is, it can be a Unet model that does not include the above-mentioned hybrid enhancement unit (HEM) and the above-mentioned Laplace enhancement unit (LEU); +LEU represents an image enhancement Unet model including the above-mentioned Laplace enhancement unit; +HEM represents an image enhancement Unet model including the above-mentioned hybrid enhancement unit; Peak signal-to-noise ratio (peak signal-to-noise ratio, PSNR) is usually used as a measurement method for signal reconstruction quality in fields such as image processing, and can be defined by mean square error. Multi-scale structural similarity (multi-scale structural similarity index, MS-SSIM) can be used to measure the similarity of two images, and is used to evaluate the quality of the output image processed by the algorithm. The structural similarity index defines structural information as an attribute that reflects the structure of objects in the scene from the perspective of image composition, which is independent of brightness and contrast, and models distortion as a combination of three different factors: brightness, contrast and structure. For example, the mean is used as an estimate of brightness, the standard deviation is used as an estimate of contrast, and the covariance is used as a measure of structural similarity. Time is used to represent the time it takes for the model to perform image enhancement on the input image. Parameters can be used to describe the number of parameters contained in the neural network and to evaluate the size of the model.
[0276] From the performance evaluation results shown in Table 1, it can be seen that the image enhancement model (HPEU) proposed in the embodiment of the present application improves the PSNR by 0.62dB. In addition, the number of parameters is not increased too much, and the processing delay is increased by 37ms; that is, the image enhancement method proposed in the embodiment of the present application can effectively improve the image enhancement effect.
[0277] Table 2
[0278]
[0279] Table 2 is the quantitative performance evaluation results of different image enhancement models provided in the embodiment of the present application on the data set. Among them, data set 1 can represent the MIT-Adobe FiveK data set; data set 2 can represent the DPED-iPhone data set; the tested models include: Weakly Supervised Photo Enhancer for Digitalcamera (WESPE), context aggregation network (CAN), and range scaling global Unet (RSGUnet).
[0280] It can be seen from the performance evaluation results shown in Table 2 that the PSNR and SSIM of the image enhancement model proposed in this application on the DPED-iPhone dataset are not as good as those of the WESPE model, mainly due to the non-pixel-level alignment of the DPED-iPhone dataset. The DPED-iPhone dataset is an image pair obtained by simultaneously shooting a SLR camera and a mobile phone at the same scene and at the same angle. Since the sensors of the SLR camera and the mobile phone are different, the image taken by the SLR camera and the graphics taken by the camera are not aligned pixel by pixel, which causes HPEU to produce relative deviations during the downsampling process; on the MIT-AdobeFiveK dataset, the image enhancement model (HPEU) proposed in the embodiment of the present application has the highest PSNR and SSIM, and the visual effect is closer to the ground truth.
[0281] Table 3
[0282] Model PSNR MS-SSIM GDF 22.64 0.9353 HDR 22.27 0.9391 HPEU+ Guided Filtering 22.59 0.9383
[0283] Currently, there are fast processing methods for image enhancement for small-resolution images, such as upsampling the output image using the original image as a guide to obtain an enhanced image.
[0284] Table 3 is the quantitative performance evaluation results of adding guided filter to the model in the MIT-Adobe FiveK dataset provided by the embodiment of the present application. The tested models include: trainable guided filter model (GDF), high dynamic range network model (HDR) and image enhancement model (HPEU) provided by the embodiment of the present application with guided filter added.
[0285] It can be seen from the performance evaluation results shown in Table 3 that the performance of the network after adding guided filtering to the HPEU model proposed in the embodiment of the present application is close to that of the high dynamic range network model.
[0286] Table 4
[0287]
[0288] Table 4 is the evaluation result of the image enhancement processing runtime provided by the embodiment of the present application. From the runtime evaluation results shown in Table 4, it can be seen that under the same processing conditions, the image enhancement model (HPEU) proposed in the embodiment of the present application has the shortest runtime, and the computational efficiency of HPEU+Guided Filter is higher. After adding GuidedFilter to the HPEU model, the speed of HPEU+Guided Filter is faster than the GDF model and the HDR model, and the objective quantitative indicators are close.
[0289] Table 5
[0290] Model PSNR MS-SSIM Perceptual Index Input 17.08 0.8372 4.10 WESPE 22.57 0.9186 3.67 RSGUnet 22.83 0.9254 3.77 This application 23.02 0.9255 3.50
[0291] Table 5 is a quantitative evaluation result provided by the embodiment of the present application based on the DPED-iphone dataset after introducing visual perception loss, including objective evaluation indicators PSNR, SSIM and perceptual evaluation index (Perceptual Index).
[0292] It can be seen from the performance evaluation results shown in Table 5 that the image enhancement model (HPEU) proposed in the embodiment of the present application has good performance in detail enhancement and noise suppression.
[0293] Table 6
[0294]
[0295]
[0296] Table 6 is a diagram of various network models trained based on the MIT-Adobe FiveK dataset provided in an embodiment of the present application, and dataset A (DPED-iphone), dataset B (DPED-Sony) and dataset C (DPED-Blackberry) are used as test datasets to verify the generalization ability of the model.
[0297] It can be seen from the performance evaluation results shown in Table 6 that the PSNR of the image enhancement model (HPEU) provided in the embodiment of the present application exceeds that of other compared models, and its generalization ability is relatively the best.
[0298] Fig.16 is a schematic diagram of the visual quality evaluation results provided in the embodiment of the present application. Fig.16 In order to distinguish the color image from the grayscale image, the color image is represented by diagonal filling.
[0299] in, Fig.16 (a) represents an input image (eg, an image to be processed); Fig.16(b) represents a predicted output image obtained by using a basic model, where the basic model may not include the Unet model of the hybrid enhancement unit (HEM) and the Laplace enhancement unit (LEU); Fig.16 (c) represents the predicted output image obtained by the Unet model using the above Laplace enhancement unit; Fig.16 (d) represents the predicted output image obtained by the Unet model using the above hybrid enhancement unit; Fig.16 (e) represents a model using an embodiment of the present application (for example, Fig.11 or Fig.12 The predicted output image obtained by the model shown in the figure; Fig.16 (f) represents the ground truth image corresponding to the input image, and the ground truth image can represent the sample enhanced image corresponding to the input image; Fig.16 (e) represents the error Figure 1 , which is the residual between the predicted output image output by the basic model and the true value image; Fig.16 (h) represents the error Figure 2 , that is, the residual between the predicted output image output by the Unet model using the above Laplace enhancement unit and the true value image; Fig.16 (i) indicates the error Figure 3 , that is, the residual between the predicted output image output by the Unet model using the above hybrid enhancement unit and the true value image; Fig.16 (j) represents the error Figure 4 , that is, the residual between the predicted output image output by the model of the embodiment of the present application and the true value image.
[0300] from Fig.16 It can be seen from the schematic diagram of the visual quality evaluation results shown that the output image obtained by using the Laplace enhancement unit and the hybrid enhancement unit, that is, the image enhancement model proposed in the embodiment of the present application, is visually closest to the true image.
[0301] Fig.17 It is a schematic flow chart of the image enhancement method provided in the embodiment of the present application. Fig.17 The method 700 shown includes steps 710 to 740, which are described in detail below.
[0302] Step 710: Detect a first operation of the user for opening the camera.
[0303] Step 720: In response to the first operation, display a shooting interface on the display screen, wherein the shooting interface includes a viewfinder, and the viewfinder includes a first image.
[0304] In one example, the shooting behavior of the user may include a first operation of the user turning on a camera; in response to the first operation, displaying a shooting interface on a display screen.
[0305] Fig.18 (a) in FIG. 1 shows a graphical user interface (GUI) of a mobile phone, and the GUI is a desktop 810 of the mobile phone. When the electronic device detects that a user clicks an icon 820 of a camera application (application, APP) on the desktop 810, the camera application can be started and a display such as Fig.18 Another GUI shown in (b) of FIG. 8 is referred to as a shooting interface 830. The shooting interface 830 may include a viewfinder 840. In the preview state, the viewfinder 840 may display a preview image in real time.
[0306] It should be noted that in the embodiment of the present application, in order to distinguish the color image part from the grayscale image part, the color image part is represented by diagonal filling.
[0307] For example, see Fig.18 In (b), after the electronic device starts the camera, a first image may be displayed in the viewfinder 840, and the first image is a color image. The shooting interface may also include a control 850 for indicating a shooting mode, and other shooting controls.
[0308] In one example, the shooting behavior of the user may include a first operation of the user turning on the camera; in response to the first operation, a shooting interface is displayed on the display screen. For example, after the electronic device detects a first operation of the user clicking on the icon of a camera application (application, APP) on the desktop, the camera application can be started and the shooting interface can be displayed. The shooting interface may include a viewfinder, and it is understandable that the size of the viewfinder may be different in the photo mode and the video mode. For example, the viewfinder may be a viewfinder in the photo mode. In the video mode, the viewfinder may be the entire display screen. In the preview state, that is, before the user turns on the camera and presses the photo / video button, the preview image can be displayed in real time in the viewfinder.
[0309] In one example, the preview image may be a color image, and the preview image may be an image displayed when the camera is set to an automatic photographing mode.
[0310] Step 730: Detect a second operation instructing the user to perform on the camera.
[0311] In a possible implementation, it may be detected that the user indicates a second operation of the first processing mode. The first processing mode may be a professional shooting mode (for example, an image enhancement shooting mode). Fig.19 In (a), the shooting interface includes a shooting option 860. After the electronic device detects that the user clicks the shooting option 860, see Fig.19 In (b), the electronic device displays the shooting mode interface. After the electronic device detects that the user clicks on the shooting mode interface for indicating the professional shooting mode 861, the mobile phone enters the professional shooting mode, for example, the mobile phone performs the image enhancement shooting mode.
[0312] In a possible implementation, a second operation of the user for instructing shooting may be detected, where the second operation is an operation for instructing shooting when shooting a distant object, shooting a tiny object, or shooting in a poor shooting environment.
[0313] For example, see Fig.19 In (c) of FIG. 8 , a second operation 870 of the user for instructing shooting is detected.
[0314] In another possible implementation, a second operation for instructing shooting may be detected, that is, a second operation for not executing Fig.19 (a) and Fig.19 The operation shown in (b) is directly executed Fig.19 The second operation 870 indicating shooting is shown in (c) .
[0315] It should be understood that the second operation for the user to instruct the shooting behavior may include pressing a shooting button in the camera of the electronic device, or may include the user device instructing the electronic device to shoot through voice, or may include other instructions from the user to the electronic device to shoot. The above is for illustration only and does not limit the present application in any way.
[0316] Step 740: In response to the second operation, a second image is displayed in the viewfinder, or the second image is saved in the electronic device, wherein the second image is obtained by performing color enhancement processing and brightness enhancement processing on the first image according to the enhanced image features of the first image captured by the camera, and the enhanced image features of the first image are obtained by performing feature enhancement processing on the first image through a neural network, and the neural network includes N convolutional layers, where N is a positive integer.
[0317] It should be understood that the process of performing the image enhancement method on the first image can be referred to Fig.10 The image enhancement method shown in the figure, the image enhancement model that performs the image enhancement method can be used Fig.11 Model shown.
[0318] In one possible implementation, see Fig.19 , Fig.19 In (d), the second image is displayed in the viewfinder. Fig.19 In (c), the first image is displayed in the viewfinder, and the second image has the same or substantially the same content as the first image, but the image quality of the second image is better than that of the first image. For example, the detail display of the second image is better than that of the first image; or, the brightness of the second image is better than that of the first image; or, the brightness of the second image is better than that of the first image.
[0319] In another possible implementation, the viewfinder may not display Fig.19 Instead of saving the second image as shown in (d) of the electronic device, the second image is saved in the photo album of the electronic device.
[0320] Optionally, in a possible implementation manner, the enhanced image features of the first image are obtained by performing the feature enhancement processing on the first image according to a Laplace enhancement algorithm.
[0321] Optionally, in a possible implementation, the Laplace enhancement algorithm is used to perform the feature enhancement processing on the input image features of the ith convolutional layer according to the residual features of the ith convolutional layer among the N convolutional layers to obtain the enhanced image features of the ith convolutional layer, wherein the residual features represent the difference between the input image features of the ith convolutional layer and the image features after the convolution operation in the ith convolutional layer, the enhanced image features of the ith convolutional layer are the input image features of the (i+1)th convolutional layer, the input image features are obtained based on the first image, and i is a positive integer.
[0322] Optionally, in a possible implementation manner, the enhanced image feature of the first image is an image feature output by an Nth convolutional layer among the N convolutional layers, and the enhanced image feature of the first image is obtained by the following equation:
[0323] L(F N )=Φ(F N )+s l ·(Φ(F N )-F N );
[0324] Among them, L(F N ) represents the enhanced image features of the Nth convolutional layer, F N represents the input image feature of the Nth convolutional layer, Ф represents the convolution kernel of the Nth convolutional layer, s l represents the learned scaling parameter.
[0325] Optionally, in a possible implementation, the output image is obtained based on a first image, a confidence image feature and an illumination compensation image feature, the confidence image feature and the illumination compensation image feature are obtained based on an enhanced image feature of the first image, the confidence image feature is used to perform color enhancement on the first image, and the illumination compensation image feature is used to perform brightness enhancement on the first image.
[0326] Optionally, in a possible implementation, the output image is obtained by fusing a color enhanced image feature with an illumination compensation image feature, the color enhanced image feature is obtained by multiplying an image feature of the first image with the confidence image feature, the confidence image feature is obtained by performing a convolution operation on an enhanced image feature of the first image, and the illumination compensation image feature is obtained by performing a convolution operation on the enhanced image feature of the first image.
[0327] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.
[0328] Combination of the above Figures 1 to 19 , describes in detail the image enhancement method provided by the embodiment of the present application, and will now be combined with Fig. 20 and Fig.21 , describes the device embodiment of the present application in detail. It should be understood that the image enhancement device in the embodiment of the present application can execute the various image enhancement methods in the aforementioned embodiment of the present application, that is, the specific working process of the following various products can refer to the corresponding process in the aforementioned method embodiment.
[0329] Fig. 20 is a schematic block diagram of an image enhancement device provided in an embodiment of the present application. It should be understood that the image enhancement device 900 can perform Fig.10 The image enhancement method shown. The image enhancement device 900 includes: an acquisition unit 910 and a processing unit 920.
[0330] Among them, the acquisition unit 910 is used to acquire the image to be processed; the processing unit 920 is used to perform feature enhancement processing on the image to be processed through a neural network to obtain enhanced image features of the image to be processed, and the neural network includes N convolutional layers, N is a positive integer; according to the enhanced image features, the image to be processed is subjected to color enhancement processing and brightness enhancement processing to obtain an output image.
[0331] Optionally, as an embodiment, the processing unit 920 is specifically configured to:
[0332] The feature enhancement process is performed on the image to be processed by using a Laplace enhancement algorithm to obtain enhanced image features of the image to be processed.
[0333] Optionally, as an embodiment, the Laplace enhancement algorithm is used to perform the feature enhancement processing on the input image features of the ith convolutional layer according to the residual features of the ith convolutional layer among the N convolutional layers to obtain the enhanced image features of the ith convolutional layer, wherein the residual features represent the difference between the input image features of the ith convolutional layer and the image features processed by the convolution operation in the ith convolutional layer, the enhanced image features of the ith convolutional layer are the input image features of the (i+1)th convolutional layer, the input image features are obtained based on the image to be processed, and i is a positive integer less than or equal to N.
[0334] Optionally, as an embodiment, the enhanced image feature of the image to be processed is an image feature output by the Nth convolutional layer among the N convolutional layers, and the processing unit 920 is specifically used to: obtain the enhanced image feature of the image to be processed by the following equation:
[0335] L(F N )=Φ(F N )+s l ·(Φ(F N )-F N );
[0336] Among them, L(F N ) represents the enhanced image features of the Nth convolutional layer, F N represents the input image feature of the Nth convolutional layer, Ф represents the convolution kernel of the Nth convolutional layer, s l Represents the parameters obtained through learning.
[0337] Optionally, as an embodiment, the processing unit 920 is specifically configured to:
[0338] According to the enhanced image features of the image to be processed, a confidence image feature and an illumination compensation image feature of the image to be processed are obtained, wherein the confidence image feature is used to perform color enhancement on the image to be processed, and the illumination compensation image feature is used to perform brightness enhancement on the image to be processed;
[0339] The output image is obtained according to the image to be processed, the features of the confidence image and the features of the illumination compensation image.
[0340] Optionally, as an embodiment, the processing unit 920 is further configured to:
[0341] The confidence image feature and the illumination compensation image feature are obtained by performing a convolution operation on the enhanced image feature of the image to be processed;
[0342] Obtaining a color enhanced image feature of the image to be processed by multiplying the image feature of the image to be processed by the confidence image feature;
[0343] The color enhancement image feature is fused with the illumination compensation image feature to obtain the output image.
[0344] In one embodiment, Fig. 20 The enhancement device 900 shown can also be used to perform Figures 17 to 19 The image enhancement method shown.
[0345] It should be noted that the above-mentioned image enhancement device 900 is embodied in the form of a functional unit. The term "unit" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.
[0346] For example, a "unit" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.
[0347] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0348] Fig.21 Schematic diagram of the hardware structure of the image enhancement device provided in the embodiment of the present application. Fig.21 The image enhancement device 1000 shown (the device 1000 may be a computer device) includes a memory 1001, a processor 1002, a communication interface 1003 and a bus 1004. The memory 1001, the processor 1002 and the communication interface 1003 are connected to each other through the bus 1004.
[0349] The memory 1001 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 1001 may store a program. When the program stored in the memory 1001 is executed by the processor 1002, the processor 1002 is used to execute each step of the image enhancement method of the embodiment of the present application, for example, to execute Figures 10 to 15 Steps shown, or, perform Figures 17 to 19 The steps shown.
[0350] It should be understood that the image enhancement device shown in the embodiment of the present application can be a server, for example, a server in the cloud, or a chip configured in a server in the cloud; or, the image enhancement device shown in the embodiment of the present application can be a smart terminal, or a chip configured in a smart terminal.
[0351] The image enhancement method disclosed in the above embodiment of the present application can be applied to the processor 1002, or implemented by the processor 1002. The processor 1002 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above image enhancement method can be completed by an integrated logic circuit of hardware in the processor 1002 or an instruction in the form of software. For example, the processor 1002 may include Figure 8 The NPU chip is shown.
[0352] The above-mentioned processor 1002 can be a central processing unit (CPU), a graphics processing unit (GPU), a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1001, and the processor 1002 reads the instructions in the memory 1001, and completes the implementation of the present application in combination with its hardware. Fig. 20 The functions required to be performed by the units included in the image enhancement device shown, or the functions required to perform the method embodiments of the present application Figures 10 to 15 The image enhancement method shown, or executing the method embodiment of the present application Figures 17 to 19 The steps shown.
[0353] The communication interface 1003 uses a transceiver device such as but not limited to a transceiver to implement communication between the apparatus 1000 and other devices or a communication network.
[0354] The bus 1004 may include a path for transmitting information between various components of the image enhancement device 1000 (eg, the memory 1001 , the processor 1002 , and the communication interface 1003 ).
[0355] It should be noted that although the above-mentioned image enhancement device 1000 only shows a memory, a processor, and a communication interface, in the specific implementation process, those skilled in the art should understand that the image enhancement device 1000 may also include other devices necessary for normal operation. At the same time, those skilled in the art should understand that according to specific needs, the above-mentioned image enhancement device 1000 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the above-mentioned image enhancement device 1000 may also only include the devices necessary for implementing the embodiments of the present application, and does not necessarily include Fig.21 All devices shown in .
[0356] The embodiment of the present application also provides a chip, which includes a transceiver unit and a processing unit. The transceiver unit may be an input / output circuit or a communication interface; the processing unit may be a processor or a microprocessor or an integrated circuit integrated on the chip. The chip may execute the image enhancement method in the above method embodiment.
[0357] An embodiment of the present application also provides a computer-readable storage medium having instructions stored thereon, and when the instructions are executed, the image enhancement method in the above method embodiment is executed.
[0358] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed, perform the image enhancement method in the above method embodiment.
[0359] It should also be understood that in the embodiment of the present application, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the processor may also include a non-volatile random access memory. For example, the processor may also store information about the device type.
[0360] It should also be understood that in the embodiment of the present application, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the processor may also include a non-volatile random access memory. For example, the processor may also store information about the device type.
[0361] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0362] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0363] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0364] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0365] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0366] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0367] In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0368] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0369] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An image enhancement method, characterized in that: include: Get the image to be processed; Performing feature enhancement processing on the image to be processed by a neural network to obtain enhanced image features of the image to be processed, wherein the neural network includes N convolutional layers, where N is a positive integer; Performing color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image; The step of performing feature enhancement processing on the image to be processed by a neural network to obtain enhanced image features of the image to be processed includes: The feature enhancement processing is performed on the image to be processed by the Laplace enhancement algorithm to obtain the enhanced image features of the image to be processed, and the Laplace enhancement algorithm is used to perform the feature enhancement processing on the input image features of the i-th convolutional layer according to the residual features of the i-th convolutional layer in the N convolutional layers to obtain the enhanced image features of the i-th convolutional layer, wherein the residual features represent the difference between the input image features of the i-th convolutional layer and the image features processed by the convolution operation in the i-th convolutional layer, the enhanced image features of the i-th convolutional layer are the input image features of the i+1-th convolutional layer, and the input image features are obtained according to the image to be processed, and i is a positive integer less than or equal to N.
2. The image enhancement method according to claim 1, characterized in that: The enhanced image feature of the image to be processed is the enhanced image feature of the Nth convolutional layer in the N convolutional layers, and the enhanced image feature of the image to be processed is obtained according to the following equation: L(F N )=Φ(F N )+s l ·(Φ(F N )-F N ); Among them, L(F N ) represents the enhanced image features of the Nth convolutional layer, F N represents the input image feature of the Nth convolutional layer, Ф represents the convolution kernel of the Nth convolutional layer, s l Represents the parameters obtained through learning.
3. The image enhancement method according to claim 1 or 2, characterized in that: The step of performing color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image feature to obtain an output image includes: According to the enhanced image features of the image to be processed, a confidence image feature and an illumination compensation image feature of the image to be processed are obtained, wherein the confidence image feature is used to perform color enhancement on the image to be processed, and the illumination compensation image feature is used to perform brightness enhancement on the image to be processed; The output image is obtained according to the image to be processed, the features of the confidence image and the features of the illumination compensation image.
4. The image enhancement method according to claim 3, characterized in that: Also includes: The confidence image feature and the illumination compensation image feature are obtained by performing a convolution operation on the enhanced image feature of the image to be processed; Obtaining a color enhanced image feature of the image to be processed by multiplying the image feature of the image to be processed by the confidence image feature; The color enhancement image feature is fused with the illumination compensation image feature to obtain the output image.
5. An image enhancement device, characterized in that: include: An acquisition unit, used for acquiring an image to be processed; A processing unit, configured to perform feature enhancement processing on the image to be processed through a neural network to obtain enhanced image features of the image to be processed, wherein the neural network includes N convolutional layers, where N is a positive integer; perform color enhancement processing and brightness enhancement processing on the image to be processed according to the enhanced image features to obtain an output image; The processing unit is specifically used for: The feature enhancement processing is performed on the image to be processed by the Laplace enhancement algorithm to obtain the enhanced image features of the image to be processed, and the Laplace enhancement algorithm is used to perform the feature enhancement processing on the input image features of the i-th convolutional layer according to the residual features of the i-th convolutional layer in the N convolutional layers to obtain the enhanced image features of the i-th convolutional layer, wherein the residual features represent the difference between the input image features of the i-th convolutional layer and the image features processed by the convolution operation in the i-th convolutional layer, the enhanced image features of the i-th convolutional layer are the input image features of the i+1-th convolutional layer, and the input image features are obtained according to the image to be processed, and i is a positive integer less than or equal to N.
6. The image enhancement device according to claim 5, characterized in that: The enhanced image features of the image to be processed are image features output by the Nth convolutional layer among the N convolutional layers, and the processing unit is specifically used for: The enhanced image features of the image to be processed are obtained according to the following equation: L(F N )=Φ(F N )+s l ·(Φ(F N )-F N ); Among them, L(F N ) represents the enhanced image features of the Nth convolutional layer, F N represents the input image feature of the Nth convolutional layer, Ф represents the convolution kernel of the Nth convolutional layer, s l represents the learned scaling parameter.
7. The image enhancement device according to claim 5 or 6, characterized in that: The processing unit is specifically used for: According to the enhanced image features of the image to be processed, a confidence image feature and an illumination compensation image feature of the image to be processed are obtained, wherein the confidence image feature is used to perform color enhancement on the image to be processed, and the illumination compensation image feature is used to perform brightness enhancement on the image to be processed; The output image is obtained according to the image to be processed, the features of the confidence image and the features of the illumination compensation image.
8. The image enhancement device according to claim 7, characterized in that: The processing unit is also used for: The confidence image feature and the illumination compensation image feature are obtained by performing a convolution operation on the enhanced image feature of the image to be processed; Obtaining a color enhanced image feature of the image to be processed by multiplying the image feature of the image to be processed by the confidence image feature; The color enhancement image feature is fused with the illumination compensation image feature to obtain the output image.
9. An image enhancement device, characterized in that: include: Memory, used to store programs; A processor, configured to execute the program stored in the memory. When the processor executes the program stored in the memory, the processor is configured to execute the image enhancement method according to any one of claims 1 to 4.
10. A computer-readable medium, characterized in that The computer readable medium stores a program code, and when the computer program code is executed on a computer, the computer is enabled to execute the image enhancement method according to any one of claims 1 to 4.
11. A chip, characterized in that: include: A processor and a data interface, wherein the processor reads instructions stored in the memory through the data interface to execute the image enhancement method according to any one of claims 1 to 4.
