Image correction method and device based on neural network
The neural network-based image correction method addresses the limitations of existing methods by employing preprocessing, layer-by-layer feature extraction, and weighted averaging to enhance image quality in challenging lighting conditions.
Patent Information
- Application Number
- CN202411532882.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2024-12-31
AI Technical Summary
Existing neural network-based image correction methods fail to effectively address complex noise and nonlinear transformations, resulting in unsatisfactory image correction effects.
A neural network-based image correction method involving preprocessing, layer-by-layer feature extraction using convolutional layers, nonlinear activation functions, weighted averaging, and feature selection to remove noise interference.
Significantly improves image quality in low-light and high-noise environments by effectively removing noise interference and enhancing feature representation.
Smart Images

Figure CN119228674A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a method and device for image correction based on a neural network. Background Art
[0002] The purpose of image correction is to improve image quality and remove noise interference and distortion in the image to facilitate subsequent analysis and application. Traditional image correction methods usually rely on linear filtering, denoising algorithms or image enhancement techniques, which often have unsatisfactory effects when dealing with complex noise and nonlinear transformations, resulting in the quality of the corrected image failing to be significantly improved.
[0003] In recent years, the rapid development of deep learning technology has provided new ideas and methods for image processing. In particular, convolutional neural networks (CNNs) have achieved remarkable success in image feature extraction and classification tasks. However, existing neural network-based image correction methods still have certain limitations in feature fusion and noise removal, and fail to fully utilize the advantages of multi-layer feature data, resulting in less than ideal correction effects.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for image correction based on a neural network, so as to at least solve the technical problem of poor image correction effect in the prior art.
[0006] According to one aspect of an embodiment of the present invention, there is provided a neural network-based image correction method, comprising: acquiring an image to be processed, preprocessing the image to be processed to obtain a preprocessed image; using a convolutional layer of a neural network to perform layer-by-layer feature extraction on the preprocessed image to obtain feature data, applying a nonlinear activation function to perform nonlinear mapping on the feature data to obtain mapped data; using a weighted average and feature selection method to fuse the feature data and the mapped data to obtain noise interference, removing the noise interference from the image to be processed to obtain a corrected image.
[0007] According to another aspect of an embodiment of the present invention, there is also provided an image correction device based on a neural network, comprising: a preprocessing module, configured to acquire an image to be processed, preprocess the image to be processed, and obtain a preprocessed image; a mapping module, configured to use a convolutional layer of a neural network to perform layer-by-layer feature extraction on the preprocessed image to obtain feature data, apply a nonlinear activation function to perform nonlinear mapping on the feature data, and obtain mapped data; a correction module, configured to use a weighted average and feature selection method to fuse the feature data and the mapped data to obtain noise interference, remove the noise interference from the image to be processed, and obtain a corrected image.
[0008] In the embodiment of the present invention, an image to be processed is obtained, and the image to be processed is preprocessed to obtain a preprocessed image; the convolution layer of the neural network is used to extract features layer by layer from the preprocessed image to obtain feature data, and a nonlinear activation function is applied to perform nonlinear mapping on the feature data to obtain mapped data; the feature data and the mapped data are fused using weighted average and feature selection methods to obtain noise interference, and the noise interference is removed from the image to be processed to obtain a corrected image. The above scheme solves the technical problem of poor image correction effect in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0010] Figure 1 is a flow chart of a neural network-based image correction method according to an embodiment of the present invention;
[0011] Figure 2 is a flow chart of another neural network-based image correction method according to an embodiment of the present invention;
[0012] Figure 3 is a flow chart of a method for feature extraction and nonlinear mapping according to an embodiment of the present invention;
[0013] Figure 4 is a flow chart of a method for feature fusion and noise interference removal according to an embodiment of the present invention;
[0014] Figure 5 is a flowchart of another neural network-based image correction method according to an embodiment of the present invention;
[0015] Figure 6 is a schematic structural diagram of an image correction device based on a neural network according to an embodiment of the present invention;
[0016] Figure 7 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0019] According to an embodiment of the present invention, a method embodiment of a neural network-based image correction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0020] Figure 1 is an image correction method based on a neural network according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0021] Step S102, obtaining an image to be processed, and preprocessing the image to be processed to obtain a preprocessed image.
[0022] Step S104, using the convolution layer of the neural network to perform layer-by-layer feature extraction on the preprocessed image to obtain feature data, and applying a nonlinear activation function to perform nonlinear mapping on the feature data to obtain mapped data.
[0023] The convolution layer of the neural network is used to extract features layer by layer from the preprocessed image to obtain feature data. The feature data is downsampled using maximum pooling to obtain feature data after dimensionality reduction; a nonlinear activation function is applied to the feature data after dimensionality reduction to perform nonlinear mapping, and a deconvolution layer is used to upsample the feature data after nonlinear mapping to obtain the mapped data.
[0024] Step S106, using weighted average and feature selection method to fuse the feature data and the mapped data to obtain noise interference, remove the noise interference from the image to be processed, and obtain a corrected image.
[0025] First, the weight values of the feature data and the mapped data are dynamically adjusted based on the noise distribution in the local area of the image to be processed; for example, the noise distribution in the local area of the image to be processed is calculated, and the noise intensity is determined based on the noise distribution; the weight values of the feature data and the mapped data are proportionally adjusted according to the noise intensity to enhance the characteristics of the area with less noise influence.
[0026] Then, according to the weight value, the feature data and the mapped data are weighted averaged to obtain weighted data. For example, the feature data and the mapped data are element-by-element multiplied according to the weight value to obtain a weighted result; the weighted results are summed to obtain comprehensive feature information, and the comprehensive feature information is standardized to obtain the weighted data.
[0027] Then, feature selection is performed on the weighted data to screen out feature data related to noise features, and the noise interference used to characterize the noise interference layer is obtained. For example, the contribution of each feature in the weighted data is calculated; based on the comparison result of the contribution and the set threshold, the features whose contribution is higher than the set threshold are screened out to obtain a valid feature set; the valid feature set is integrated to form a feature layer for representing the noise interference.
[0028] The present application also provides a neural network-based image correction method, such as Figure 2 As shown, the method comprises the following steps:
[0029] Step S202, obtaining an image to be processed.
[0030] First, obtain the image to be processed. The original image is captured by the image sensor. In order to ensure the image quality, a high-resolution sensor is selected for data acquisition, and the image is captured under different lighting conditions to ensure that there is a rich data set for model training.
[0031] Step S204: feature extraction and nonlinear mapping.
[0032] Use deep convolutional neural network to extract features layer by layer from preprocessed images. The specific steps are as follows: Figure 3 As shown, including:
[0033] Step S2042, perform convolution.
[0034] In the initial stage of feature extraction, multiple convolutional layers are introduced. Each convolutional layer uses a 3×3 convolution kernel for feature extraction. This smaller convolution kernel can better capture local features. In order to keep the size of the feature map unchanged, the "same" padding strategy is adopted, so that after the convolution operation, the spatial dimension of the output feature map is the same as the input image. In addition, Batch Normalization (BN) is introduced after the first convolution layer, which helps to speed up the training process, reduce internal covariate shift, and improve the stability of the model. By standardizing the input of each layer, BN can significantly improve the training speed and convergence of deep networks.
[0035] Step S2044, non-linear activation function.
[0036] After the convolution operation, the ReLU activation function is applied for nonlinear mapping. ReLU (Rectified Linear Unit) can effectively introduce nonlinear characteristics, making the model more expressive. In subsequent layers, you can also consider using Leaky ReLU or PReLU (Parametric ReLU) to avoid the dead neuron problem. These activation functions can maintain the activity of neurons, improve the expressiveness of the network during feature extraction, and ensure that the network can capture more feature information.
[0037] Step S2046, perform pooling.
[0038] Next, the maximum pooling layer is introduced for feature downsampling. Using a 2×2 pooling window can effectively reduce the spatial dimension of the feature map while retaining significant feature information. The pooling operation is implemented by selecting the maximum value in the local area, which helps to reduce the amount of calculation and increase the abstraction level of the feature. In order to further improve the feature expression ability, after each downsampling, you can choose to introduce a Dropout layer. The Dropout technology prevents the model from overfitting by randomly discarding some neurons, enhances the generalization ability of the model, and makes the network more robust when facing new data.
[0039] Step S2048, perform deconvolution.
[0040] In the final stage of feature extraction, a deconvolution layer is introduced to perform upsampling and restore the spatial resolution of the feature map. The deconvolution operation can be expressed as:
[0041]
[0042] The application of the deconvolution layer effectively restores the image details and provides rich feature information for the subsequent fusion steps. The deconvolution operation can restore the spatial resolution of the feature map, so that the feature map output by the network can better correspond to the structure of the original image. The deconvolution operation can effectively restore the image details by performing reverse convolution on the feature map, providing rich feature information for the subsequent feature fusion steps.
[0043] Step S206: feature fusion and noise interference removal.
[0044] After feature extraction is completed, the feature data and the mapped data are fused to remove noise interference in the image to be processed. Figure 4 The following specific processes are shown:
[0045] Step S2062, feature fusion.
[0046] The dynamic weighting mechanism and feature selection method are used to fuse the feature data and the mapped data. Based on the noise distribution in the local area of the image to be processed, the weight values of the feature data and the mapped data are dynamically adjusted. The dynamic adjustment of the weight is based on the calculation of the noise intensity in the local area, so that the algorithm can adapt to different noise distributions and avoid the loss of feature information.
[0047] Specifically, in the selected local area, the noise level of each pixel is calculated. For each pixel, the standard deviation of its brightness value is calculated, or its difference with the surrounding pixels is compared to obtain the intensity of the noise. The noise intensity of all pixels in the local area is summarized to generate a noise distribution map to characterize the overall noise level of the area. According to the noise distribution of the local area, the weight values of the feature data and the mapped data are dynamically adjusted. The corresponding weight value is calculated according to the noise intensity. A baseline weight value can be set and then adjusted according to the noise intensity. For example: if the noise intensity is high, reduce the weight of the feature data to reduce the impact of noise on the result. If the noise intensity is low, increase the weight of the feature data to enhance the role of the feature in the final result. The range of weight adjustment is preset to ensure that excessive fluctuations are not introduced during the weight adjustment process. For example, the weight value is set to vary between 0.5 and 1.5.
[0048] Step S2064, weighted average.
[0049] After adjusting the weights, the feature data and the mapped data are weighted averaged to obtain comprehensive feature information. The calculation process of weighted average is:
[0050]
[0051] Among them, wj is the dynamically adjusted weight. In order to achieve this process, an adaptive weighting mechanism can be used to dynamically adjust the importance of each feature according to the noise intensity of the local area.
[0052] Step S2066, feature selection.
[0053] Perform feature selection on weighted data to filter out feature data related to noise features. Calculate the contribution of each feature in the weighted data, use information gain or mutual information as a metric, and filter out features with a contribution higher than the threshold according to the set threshold to form a valid feature set.
[0054] Step S2068, denoising processing.
[0055] The effective feature set is integrated to form a feature layer representing noise interference for subsequent correction processing. This layer can reflect the specific characteristics of the noise in the image and provide support for the denoising algorithm.
[0056] Combined with convolutional neural network (CNN) for noise removal, a denoising autoencoder is constructed, the input is weighted feature data, and the output is a denoised image. The autoencoder consists of an encoder and a decoder. The encoder is responsible for feature compression and the decoder is responsible for image reconstruction. The entire network is trained by minimizing the reconstruction error.
[0057] After the correction is completed, post-processing operations are performed on the image, such as enhancing contrast, adjusting brightness and color balance, to ensure that the output image quality meets the expected effect. The post-processing step uses image processing techniques such as histogram equalization and gamma correction to further enhance the visual effect of the image. The local contrast enhancement algorithm is used to enhance the local details of the image through the contrast-limited adaptive histogram equalization (CLAHE) method. The processed image is converted back to RGB format and saved as a common image format (such as JPEG, PNG) as required for subsequent applications.
[0058] Step S208: result evaluation and feedback.
[0059] Finally, the corrected images are evaluated. Evaluation indicators include image clarity, noise level, and user satisfaction. The correction effect is comprehensively evaluated in quantitative and qualitative ways, and feedback is collected in a timely manner to further optimize the model in subsequent iterations.
[0060] Image quality is quantitatively evaluated by calculating indicators such as peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM). These indicators can effectively reflect the clarity and detail retention of the image. Organize users to conduct subjective evaluations and collect user feedback on the corrected images. Obtain user satisfaction with image quality through questionnaires, user interviews, etc. According to the evaluation results, adjust the model parameters and network structure, and establish a feedback mechanism to achieve continuous improvement of the model. Regularly update the training data set and add new image types and lighting conditions to enhance the robustness of the model.
[0061] Through the above embodiments, combined with the dynamic weighting mechanism, multi-scale feature extraction, adaptive pooling and residual connection and other technical details and improvements, an efficient image correction method is successfully implemented. This method can significantly improve the image quality in low-light and high-noise environments, providing reliable technical support for various practical application scenarios.
[0062] The present application also provides another neural network-based image correction method, which is different from the above-mentioned embodiment mainly in the feature extraction process, such as Figure 5 As shown, the method comprises the following steps:
[0063] Step S502: obtaining an image to be processed.
[0064] Step S504: extracting feature data.
[0065] Specifically, all pixel points p that are more than 3 pixels away from the edge of the image are traversed, and their brightness is set to Ip. In this step, the boundary of the image is first defined, usually leaving a distance of 3 pixels at the upper, lower, left and right edges of the image to ensure that there will be no out-of-bounds errors in the calculation in the subsequent steps. For each pixel point p, record its brightness value Ip. The brightness can be calculated by obtaining the RGB value of the pixel and converting it into a grayscale value. The commonly used conversion formula is I = 0.299R + 0.587G + 0.114B.
[0066] Set the brightness threshold Tg = 0.2Ip. Dynamically set a brightness threshold according to the brightness of the current pixel p. The threshold Tg is 20% of Ip and is used to determine the sensitivity of brightness changes. This setting ensures adaptability under different brightness conditions and is suitable for image feature extraction under different lighting conditions.
[0067] Select 16 pixel points on a circle with a radius of 3 centered at pixel p. By calculating the pixel points around p, determine a circle with a radius of 3. When selecting these points, polar coordinate transformation can be used to ensure that 16 evenly distributed pixel points are selected. First, check the pixels labeled (1, 5, 9, 13). If more than 3 points have a brightness greater than Ip + Tg or less than Ip - Tg, then p may be a corner point; otherwise, it is not a corner point. Check the selected pixel points. If the brightness change of these points exceeds the set threshold, it indicates that there may be a corner point in this area. Determine the brightness change by checking Ipi > Ip + Tg or Ipi < Ip - Tg.
[0068] Continue to check the points labeled (2, 6, 10, 14). If more than 3 points still reach the brightness change threshold, continue to check the remaining two groups of points; otherwise, it is not a corner point. If the first group of labeled points fails to determine the corner point, continue to perform the same brightness check on the second group of labeled points. If more than 3 points still meet the conditions, continue to check the remaining two groups of points backward. This step-by-step checking strategy aims to improve the stability and robustness of the algorithm.
[0069] Loop through the above steps for each pixel point. Finally, the algorithm needs to traverse the entire image and repeat the above steps for each pixel point to identify all possible corner points. A nested loop structure can be used, with the outer loop traversing each valid pixel point.
[0070] Divide the image into several pixel blocks and label them sequentially. First, the entire image needs to be divided into multiple small regions according to a predetermined rule, and each region is called a pixel block. Each pixel block will be assigned a unique label for subsequent processing and analysis. In this process, the brightness level is also defined and divided into three levels: low, medium, and high. This classification is based on the brightness values of all pixels within the pixel block, so as to help understand the lighting conditions in different regions of the image.
[0071] Next, initialize a default feature extraction threshold. This threshold is an important parameter for subsequent feature point detection. A range of changes will be set so that it can be adjusted according to the actual situation in subsequent steps. At the same time, define an adjustment step factor to control the amplitude of change when increasing or decreasing the threshold.
[0072] Before feature extraction, randomly select three pixel blocks and calculate the average brightness value of all pixels inside them. Through this average value, the brightness interval where the pixel block is located can be determined. This determination is to ensure that corresponding adjustments can be made according to the lighting conditions of the scene in the subsequent feature extraction process.
[0073] If the average brightness of a pixel block belongs to the high brightness range, the feature extraction threshold will be increased to reduce the extraction of feature points in the overly bright area; conversely, if the average brightness of a pixel block belongs to the low brightness range, the threshold will be lowered to increase the extraction of feature points in the insufficiently illuminated area. For those pixel blocks in the middle brightness range, the threshold will remain unchanged. In addition, in order to prevent the threshold adjustment from exceeding the preset range, a check will be performed after each adjustment. If the threshold exceeds the set range after adjustment, it will be restored to the original value.
[0074] Finally, for each pixel block, the adjusted threshold is applied to detect feature points. This adaptive threshold feature extraction algorithm can effectively improve the detection effect of feature points under different brightness conditions. From the experimental results, it can be observed that in scenes with normal brightness, thanks to the adaptive threshold algorithm, the number of feature points changes very little, indicating that the algorithm can stably identify features. In low-light scenes with insufficient light, the number of feature points increases significantly, which shows that the algorithm effectively enhances the feature extraction capability under challenging conditions. In this way, the feature extraction algorithm can provide more reliable and rich feature information under various lighting conditions, laying a good foundation for subsequent image processing and analysis.
[0075] Step S506: performing nonlinear mapping.
[0076] The extracted feature data is nonlinearly mapped using a deep neural network to enhance the feature expression capability. First, a suitable deep neural network architecture is selected, such as a convolutional neural network (CNN), and the layers and nodes of the network are designed according to the nature of the feature data and the requirements of the target task. Next, the feature data extracted in step S504 is used as the input of the neural network, and it is ensured that the data is properly standardized or normalized to improve training efficiency and model performance.
[0077] In the convolutional layer of the network, the input features are processed by multiple convolution kernels, each of which extracts a specific feature pattern to form a new feature map. In order to maintain the spatial dimension of the feature map, a "same" padding strategy is adopted. After each convolutional layer, the features are mapped using a nonlinear activation function (such as ReLU, Leaky ReLU, or PReLU) to enhance the nonlinear representation ability of the model, avoid the dead neuron problem, and improve the expressiveness of the features. Subsequently, the feature map obtained after convolution is downsampled through a maximum pooling layer to reduce the spatial dimension of the feature map while retaining significant feature information.
[0078] After feature extraction and pooling, a fully connected layer is connected to further process the features. The output of this layer will serve as the basis for subsequent mapping results, providing a more abstract and high-level feature representation. Finally, the output layer will generate mapping results from the feature data after nonlinear mapping, which will be used for subsequent image processing tasks.
[0079] Step S508, removing noise interference.
[0080] First, according to the characteristics of the noise and the distribution of the feature data, a denoising technique is selected, such as Gaussian filtering, wavelet transform, mean filtering or median filtering. Next, a denoising algorithm is applied to the mapping result obtained in step S506. For example, using Gaussian filtering, a Gaussian kernel is constructed and a convolution operation is performed on the mapping result to smooth the feature data and remove high-frequency noise.
[0081] During the denoising process, the denoising threshold is dynamically adjusted according to the statistical characteristics of the mapping data (such as mean and standard deviation) to ensure that the noise can be effectively removed while retaining important feature information as much as possible. Subsequently, the feature data before and after denoising are compared to evaluate the denoising effect. Image quality assessment indicators (such as PSNR, SSIM, etc.) can be used to quantify the success rate of denoising. Finally, the feature data after removing the noise interference is generated and output for subsequent image processing and analysis steps. These clear feature data will provide a more reliable basis for subsequent image correction and other tasks. Through these two steps, the feature data in the image correction process will be more accurate and effective, enhancing the stability and robustness of subsequent processing.
[0082] The present application also provides an image correction device based on a neural network, such as Figure 6 As shown, it includes: a preprocessing module 62, which is configured to obtain an image to be processed, preprocess the image to be processed, and obtain a preprocessed image; a mapping module 64, which is configured to use the convolution layer of the neural network to perform layer-by-layer feature extraction on the preprocessed image to obtain feature data, and apply a nonlinear activation function to perform nonlinear mapping on the feature data to obtain mapped data; a correction module 66, which is configured to use weighted averaging and feature selection methods to fuse the feature data and the mapped data to obtain noise interference, remove the noise interference from the image to be processed, and obtain a corrected image.
[0083] It should be noted that: the image correction device based on a neural network provided in the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the image correction device based on a neural network provided in the above embodiment and the image correction method embodiment based on a neural network belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0084] Figure 7 FIG. 1 shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. It should be noted that: Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0085] like Figure 7 As shown, the electronic device includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0086] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0087] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, various functions defined in the method and apparatus of the present application are executed. In some embodiments, the electronic device may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0088] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A neural network-based image correction method, characterized in that: include: Acquire an image to be processed, and preprocess the image to be processed to obtain a preprocessed image; Using the convolution layer of the neural network to extract features layer by layer on the preprocessed image to obtain feature data, and applying a nonlinear activation function to perform nonlinear mapping on the feature data to obtain mapped data; The feature data and the mapped data are fused by using a weighted average and feature selection method to obtain noise interference, and the noise interference is removed from the image to be processed to obtain a corrected image.
2. The method according to claim 1, characterized in that The feature data and the mapped data are fused by using weighted average and feature selection methods to obtain noise interference, including: Dynamically adjusting the weight values of the feature data and the mapped data based on the noise distribution of the local area of the image to be processed; According to the weight value, weighted averaging is performed on the feature data and the mapped data to obtain weighted data; Feature selection is performed on the weighted data to screen out feature data related to noise features, thereby obtaining the noise interference used to characterize the noise interference layer.
3. The method according to claim 2, characterized in that Dynamically adjusting the weight values of the feature data and the mapped data based on the noise distribution of the local area of the image to be processed includes: Calculating the noise distribution in the local area of the image to be processed, and determining the noise intensity based on the noise distribution; The weight values of the feature data and the mapped data are proportionally adjusted according to the noise intensity to enhance the features of the area with less noise impact.
4. The method according to claim 2, characterized in that: According to the weight value, the feature data and the mapped data are weighted averaged to obtain weighted data, including: Multiplying the feature data and the mapped data element by element according to the weight value to obtain a weighted result; The weighted results are summed to obtain comprehensive feature information, and the comprehensive feature information is standardized to obtain the weighted data.
5. The method according to claim 2, characterized in that: Performing feature selection on the weighted data to screen out feature data related to noise features to obtain the noise interference used to characterize the noise interference layer includes: Calculating the contribution of each feature in the weighted data; According to the comparison result between the contribution degree and the set threshold, the features whose contribution degree is higher than the set threshold are screened out to obtain a valid feature set; The effective feature sets are integrated to form a feature layer for representing the noise interference.
6. The method according to claim 1, characterized in that Applying a nonlinear activation function to perform nonlinear mapping on the feature data includes: Down-sampling the feature data by using maximum pooling to obtain feature data after dimension reduction; A nonlinear activation function is applied to the feature data after dimensionality reduction to perform nonlinear mapping, and a deconvolution layer is used to upsample the feature data after nonlinear mapping to obtain the mapped data.
7. An image correction device based on a neural network, characterized in that: include: A preprocessing module is configured to obtain an image to be processed, preprocess the image to be processed, and obtain a preprocessed image; A mapping module is configured to use a convolutional layer of a neural network to perform layer-by-layer feature extraction on the preprocessed image to obtain feature data, and apply a nonlinear activation function to perform nonlinear mapping on the feature data to obtain mapped data; The correction module is configured to adopt weighted average and feature selection method to fuse the feature data and the mapped data to obtain noise interference, remove the noise interference from the image to be processed, and obtain a corrected image.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor is enabled to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
