Model training method, image denoising method, electronic device and computer storage medium
Through wavelet frequency domain analysis and pixel value zeroing processing, high-quality reconstruction images are generated as training labels, which solves the problem of striped noise in line array infrared detection devices and improves the denoising effect of the denoising network model.
Patent Information
- Application Number
- CN202410984662.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-07-22
AI Technical Summary
During the training process, existing neural network models cannot effectively remove severe fringe noise in line array infrared detection devices, resulting in poor image denoising effect.
Wavelet frequency domain analysis is used to decompose the original image, and by judging the pixel value difference of the detailed component image, identifying and eliminating stripe noise, generating high-quality reconstructed images as training labels, and training the denoising network model.
It improves the noise removal effect of the denoising network model, can more effectively remove fringe noise and improve image quality.
Smart Images

Figure CN118570096B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a model training method, an image denoising method, an electronic device, and a computer storage medium. Background Art
[0002] Infrared detection systems play an important role in the field of remote sensing. Infrared detection devices are the core of infrared detection systems. Compared with traditional unit detection devices, linear array infrared detectors (composed of multiple linearly arranged sensitive elements) have shown increasingly greater advantages in imaging range and have gradually become the mainstream of infrared detection device development.
[0003] Due to manufacturing processes, linear array infrared detectors inevitably experience inconsistencies in responsivity and spectral response between different sensitive elements. This is known as detector non-uniformity. This lack of uniformity can cause streak noise in infrared images during scanning, impacting image quality.
[0004] In related technologies, neural network models can be used for image denoising. However, due to the limitations of existing training methods, when stripe noise is severe, the denoising effect of the trained neural network model will be poor. Summary of the Invention
[0005] In view of this, embodiments of the present application provide a model training method, an image denoising method, an electronic device, and a computer storage medium to solve some or all of the above problems.
[0006] According to a first aspect of an embodiment of the present application, a model training method is provided, comprising:
[0007] Acquire an original image, wherein the original image contains stripe noise along a preset direction;
[0008] Performing wavelet decomposition on the original image to obtain a target detail component image in the preset direction; the pixel value difference of the target detail component image is less than a preset difference threshold; the pixel value difference represents the degree of difference between pixel values in different areas of the target detail component image;
[0009] performing pixel value zeroing processing on the target detail component image to obtain a processed image;
[0010] Performing wavelet reconstruction based on the processed image to obtain a reconstructed image corresponding to the original image;
[0011] The original image is used as an input sample and the reconstructed image is used as a label to train a denoising network model to obtain a trained denoising network model.
[0012] According to a second aspect of an embodiment of the present application, there is provided an image denoising method, comprising:
[0013] Obtaining an image to be processed containing stripe noise;
[0014] Inputting the image to be processed into a pre-trained denoising network model, performing denoising on the image to be processed by the denoising network model to obtain a denoised target image;
[0015] Wherein, the denoising network model is trained using the method described in the first aspect above.
[0016] According to the third aspect of the embodiments of the present application, an electronic device is provided, including: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the method of the first aspect or the second aspect.
[0017] According to a fourth aspect of the embodiments of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method of the first aspect or the second aspect is implemented.
[0018] According to the model training scheme provided in the embodiment of the present application, after obtaining the original image containing stripe noise, in order to obtain the label image for denoising network model training, the wavelet decomposition method is introduced to determine the target detail component image with smaller pixel value difference in the direction of the stripe noise; and by clearing the pixel values of the above-mentioned target detail component image and performing wavelet reconstruction operation based on the cleared image, the stripe noise in the original image is suppressed, thereby obtaining a reconstructed image with better denoising effect as the label image for model training, and then performing model training based on the label image with better denoising effect, which can effectively improve the denoising effect of the trained denoising network model.
[0019] In an embodiment of the present application, on the one hand, when generating a label image for model training, a wavelet frequency domain analysis method is introduced to suppress the stripe noise in the original image, that is, the frequency domain analysis method is applied to the denoising network model training process, and a reconstructed image with better denoising effect is obtained from the frequency domain perspective as a training label. Therefore, the denoising effect of the trained denoising network model can be effectively improved; on the other hand, in the wavelet frequency domain analysis process, from the perspective of the degree of difference in pixel values in different areas of the decomposed detail component image, if the difference is less than a preset difference threshold, it is determined that the information presented in the detail component image is stripe noise information, and then by setting the pixel value of the detail component image to zero and performing an image reconstruction operation, the denoising effect of the reconstructed image as the training label can be further improved, and thus, the denoising effect of the trained denoising network model can also be further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0021] Figure 1 Schematic diagram of an image containing stripe noise;
[0022] Figure 2 This is a flowchart of the steps of a model training method according to the first embodiment of the present application;
[0023] Figure 3 is a schematic diagram of a reconstructed image obtained according to an embodiment of the present application;
[0024] Figure 4 This is a flowchart of the steps of an image denoising method according to the second embodiment of the present application;
[0025] Figure 5 This is a structural block diagram of a model training device according to the third embodiment of the present application;
[0026] Figure 6 4 is a structural block diagram of an image denoising device according to the fourth embodiment of the present application;
[0027] Figure 7 This is a structural diagram of an electronic device provided according to Example 5 of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below 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 embodiments of the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.
[0029] General overview of the embodiments of the present application
[0030] Linear array infrared detectors are typically composed of multiple linearly arranged unit detector elements (also called sensitive elements). Due to their wide imaging range, linear array infrared detectors have gradually become the mainstream of infrared detection device development. However, due to semiconductor processing issues, there are inevitable inconsistencies in the responsivity and spectral response between the different sensitive elements in a linear array infrared detector, namely, the non-uniformity of the linear array infrared detector. This lack of uniformity in the linear array infrared detector will cause stripe noise in the infrared image during scanning imaging, and the stripe noise is perpendicular to the direction of the linear array detector. See Figure 1 , Figure 1 Schematic diagram of an infrared image generated by a linear array infrared detector. The image contains horizontal stripe noise, which affects the image quality to a certain extent.
[0031] To remove this streak noise, researchers have proposed numerous non-uniformity correction algorithms. These can be broadly categorized into blackbody-based and scene-based correction. The blackbody-based correction method utilizes the responses of high and low-temperature blackbodies to calculate the response coefficients and intercepts of different sensitive elements. This is then used to convert the detector output to the same incident intensity, thereby eliminating streak noise in the image. Scene-based non-uniformity correction methods typically utilize neural network models to achieve image denoising.
[0032] Denoising algorithms implemented using neural network models primarily generate label images by fusing the spatial pixel values of each pixel in the original image. In other words, conventional techniques for generating label images for model training typically perform image correction from a spatial perspective. When stripe noise is severe, the resulting label images produced using these methods exhibit poor denoising effects, which in turn leads to poor denoising performance for the trained neural network model.
[0033] In response to the above problems, the embodiment of the present application provides a new denoising model training scheme. Specifically, on the one hand, when generating the label image, the wavelet frequency domain analysis method is introduced to suppress the stripe noise in the original image, that is: the frequency domain analysis method is applied to the denoising network model training process, and a reconstructed image with better denoising effect is obtained from the frequency domain perspective as a training label. Therefore, the denoising effect of the trained denoising network model can be effectively improved; on the other hand, in the wavelet frequency domain analysis process, from the perspective of the difference in the value of each pixel point in the decomposed detail component image, if the difference is less than the preset difference threshold, it is determined that the information presented in the detail component image is stripe noise information, and then by setting the pixel value of the detail component image to zero and performing the image reconstruction operation, the denoising effect of the reconstructed image as the training label can be further improved, and thus, the denoising effect of the trained denoising network model can also be further improved.
[0034] Detailed implementation process of the embodiment of this application
[0035] Example 1
[0036] Reference Figure 2 , Figure 2 The following is a flowchart of a model training method according to the first embodiment of the present application. The model training method provided in the embodiment of the present application includes the following steps:
[0037] Step 202: Acquire an original image, where the original image contains stripe noise along a preset direction.
[0038] Specifically, the original image obtained in this step can be an image with stripe noise detected and generated by a linear array infrared detector. In the embodiment of the present application, there is no limitation on the direction of the stripe noise in the original image. For example, the stripe noise in the original image can be along the horizontal direction, such as Figure 1 As shown; it can also be in the vertical direction.
[0039] Furthermore, in the embodiments of the present application, there are no limitations on the representation of the direction of the stripe noise, that is, the manner in which the image coordinate system of the original image is set. For example, the direction in which the stripe noise extends can be set as a first direction (e.g., the x-axis), and the direction perpendicular to the first direction can be set as a second direction (e.g., the y-axis), thereby forming an image coordinate system defined by the first and second directions. Alternatively, the direction perpendicular to the stripe noise can be set as the first direction (e.g., the x-axis), and the direction along the stripe noise can be set as the second direction, and so on.
[0040] Step 204: perform wavelet decomposition on the original image to obtain a target detail component image in a preset direction.
[0041] The pixel value difference of the target detail component image is less than a preset difference threshold; the pixel value difference represents the degree of difference in pixel values in different areas of the target detail component image.
[0042] The process of performing wavelet decomposition on the original image mainly uses the mathematical tool of wavelet transform to analyze the image data of the original image from the frequency domain level.
[0043] In wavelet decomposition algorithms, the decomposition results typically include two components: approximate component images representing the primary structural information of the image at different frequency domains (resolutions), and detail component images representing variations or details in the image at different frequency domains (resolutions) (e.g., horizontally, vertically, and diagonally). In this step, after decomposing the original image using wavelet frequency domain analysis to obtain the decomposition results, the location of the stripe noise in the original image is determined by analyzing the pixel value differences of the detail component images in the decomposition results that are in the same direction as the stripe noise. For example, if the stripe noise in the original image extends horizontally, in this step, a detail component image along the horizontal direction can be obtained through wavelet decomposition. The pixel value differences in this detail component image are then determined to be small (less than a preset difference threshold). If so, the information presented in this detail component image is considered stripe noise.
[0044] For an image, pixel value differences are typically caused by non-noise information contained within the image, while noise typically has a relatively small impact on pixel values. Therefore, the present embodiment utilizes the aforementioned theory. When the pixel value differences of the decomposed detail component image along the direction of the stripe noise are small, it is inferred that the information contained in the detail component image is primarily noise. In this case, by performing a zeroing operation on the pixel values in the detail component image, the noise information can be effectively eliminated. Furthermore, image reconstruction based on the zeroed image can achieve a good denoising effect.
[0045] In the embodiment of the present application, after obtaining the detail component image through wavelet decomposition, the pixel value difference of the image can be calculated in any suitable manner, and the specific calculation method of the pixel value difference is not limited here. For example, the root mean square of the pixel values of all pixels in the image can be calculated as the pixel value difference of the detail component image; or, the pixel values of some pixels in the image can be randomly selected, and the root mean square between these pixel values can be calculated as the pixel value difference of the image, and so on. Similarly, in the embodiment of the present application, there is no limitation on the setting method of the preset difference threshold, and it can be customized according to actual conditions or historical experience.
[0046] The purpose of using a wavelet decomposition algorithm in the embodiments of this application is to locate the location of streak noise in the original image so that the noise can be eliminated through a zeroing operation and then reconstructed. Therefore, to further ensure the consistency of the reconstructed image with the original image in terms of information other than streak noise, the embodiments of this application can use the DB9 / 7 wavelet (Daubechies 9th-order wavelet with 7 vanishing moments) to decompose the original image.
[0047] Step 206 : performing pixel value zeroing processing on the target detail component image to obtain a processed image.
[0048] Specifically, in this step, the pixel value of each pixel in the target detail component image obtained in step 204 may be set to zero. Furthermore, for ease of description, the image obtained in this step may be referred to as a processed image.
[0049] Step 208: Perform wavelet reconstruction based on the processed image to obtain a reconstructed image corresponding to the original image.
[0050] Specifically, after zeroing the pixel values of the target detail component image obtained through wavelet decomposition, wavelet reconstruction (also known as inverse wavelet transform) can be performed on this processed image (also known as the zeroed image) to obtain a reconstructed image. Compared to the original image, the reconstructed image obtained through this step has stripe noise removed.
[0051] See also Figure 3 , Figure 3 This is a schematic diagram of a reconstructed image obtained according to an embodiment of the present application. Figure 1 The reconstructed image is obtained after executing the above steps 204 to 208 for the image in . Figure 3 It can be seen that Figure 1 The stripe noise originally contained in has been effectively removed. Figure 1 , Figure 3 The reconstructed image in has higher image quality.
[0052] Step 210 , using the original image as an input sample and the reconstructed image as a label, performs denoising network model training to obtain a trained denoising network model.
[0053] Specifically, after performing analysis from the frequency domain level through the above steps 204-208 to obtain a higher quality denoised image (i.e., a reconstructed image), in an embodiment of the present application, the obtained denoised image can be used as a label in the denoising network model training process, thereby obtaining a denoising network model with better denoising effect.
[0054] In the embodiment of the present application, the specific structure and model parameters of the denoising network model are not limited, and can be customized according to actual conditions. In addition, the embodiment of the present application also does not limit the specific model training process, and can be customized according to needs.
[0055] The following will take a network model containing a single neuron node as an example to explain the model training process:
[0056] For a network model containing a single neuron node, the structure of the node, that is, its input and output, satisfies the following formula 1:
[0057]
[0058] in, is the model output, is the model input, and is the non-uniformity correction coefficient, that is, the model parameter to be trained.
[0059] During training, you can use the above formula to correct and Iterative calculation of :
[0060]
[0061]
[0062] in, and All are correction amounts; is obtained for the Kth iteration The value of is obtained for the Kth iteration value.
[0063] After that, the correction amount can be calculated by the following formula: and :
[0064]
[0065]
[0066] in, is the model output obtained in the kth iteration process; y is the model sample.
[0067] Repeat the above calculation process until the preset training stop condition is reached, thus obtaining and In the embodiment of the present application, the specific content of the training stop condition is not limited.
[0068] Furthermore, in some embodiments, after the above step 210, the following steps may be further included:
[0069] Obtaining an image to be processed containing stripe noise;
[0070] The image to be processed is input into the trained denoising network model, and the denoising network model is used to perform denoising on the image to be processed to obtain a denoised target image.
[0071] According to the model training method provided in the embodiment of the present application, after obtaining the original image containing stripe noise, in order to obtain the label image for denoising network model training, the wavelet decomposition method is introduced to determine the target detail component image with smaller pixel value difference in the direction of the stripe noise; and by clearing the pixel values of the above-mentioned target detail component image and performing wavelet reconstruction operation based on the cleared image, the stripe noise in the original image is suppressed, thereby obtaining a reconstructed image with better denoising effect as the label image for model training, and then performing model training based on the label image with better denoising effect, which can effectively improve the denoising effect of the trained denoising network model.
[0072] In an embodiment of the present application, on the one hand, when generating a label image for model training, a wavelet frequency domain analysis method is introduced to suppress the stripe noise in the original image, that is, the frequency domain analysis method is applied to the denoising network model training process, and a reconstructed image with better denoising effect is obtained from the frequency domain perspective as a training label. Therefore, the denoising effect of the trained denoising network model can be effectively improved; on the other hand, in the wavelet frequency domain analysis process, from the perspective of the degree of difference in the values of each pixel point in the decomposed detail component image, if the difference is less than the preset difference threshold, it is determined that the information presented in the detail component image is stripe noise information, and then by setting the pixel value of the detail component image to zero and performing an image reconstruction operation, the denoising effect of the reconstructed image as the training label can be further improved, and thus, the denoising effect of the trained denoising network model can also be further improved.
[0073] Optionally, in some embodiments, the step of performing wavelet decomposition on the original image to obtain a target detail component image in a preset direction may include:
[0074] Perform wavelet decomposition on the original image to obtain the decomposition result; the decomposition result includes: detail component image;
[0075] determining a plurality of sub-regions from the detail component image;
[0076] determining whether a plurality of sub-regions in the detail component image meet a preset condition;
[0077] If satisfied, the detail component image is determined as the target detail component image;
[0078] The preconditions include:
[0079]
[0080] is the total number of multiple sub-regions; For the The root mean square of the pixel values of each pixel in the sub-region; for The expected value of the root mean square of the sub-regions; is the preset difference threshold; That is, it can represent the difference in pixel values of detail component images.
[0081] In combination with the above-mentioned preset conditions, the above-mentioned step of "determining whether the multiple sub-regions in the detail component image meet the preset conditions; if so, determining the detail component image as the target detail component image" can be specifically described as follows:
[0082] Calculate the root mean square of the pixel values in each sub-area ; Calculate the expected value of the root mean square of n sub-regions ; Calculate each With the above expectations The absolute value of the difference between ; Calculate the 1.12 power of each of the above absolute values, that is: ; Determine the maximum value from the above power operation results ; Compare the above maximum value with the preset difference threshold If the maximum value is less than the preset difference threshold, , then the detail component image is determined to be the target detail component image.
[0083] Analyzing the above preconditions, we can know that: When the 1.12 power operation is performed on it, the result will be smaller than the original number That is to say, when , that is: when the difference in pixel values between the sub-regions is small, the difference is reduced, and then it is determined whether the reduction processing result is less than the preset difference threshold. In other words, when the difference in pixel values between the sub-regions is small, the requirement for the difference in pixel values of the detail component image (pixel value uniformity) is reduced through reduction processing; when When the 1.12 power operation is performed on it, the result will be greater than , that is, when That is, when the pixel value difference between each sub-region is large, the difference is amplified, and then it is determined whether the amplification result is less than the preset difference threshold. In other words, when the pixel value difference between each sub-region is large, the requirement for the pixel value difference (pixel value uniformity) of the detail component image is improved through amplification.
[0084] In summary, by determining the target detail component image according to the above preset conditions, the pixel value distribution of the target detail component image finally determined can be made more uniform, thereby improving the denoising effect of the subsequent reconstructed image and the denoising effect of the trained denoising network model.
[0085] Optionally, in some embodiments, the step of determining a plurality of sub-regions from the detail component image may specifically include:
[0086] Perform key point position detection on the detail component image to obtain the position information of the key points, the key points including: the image vertices and the geometric center of the detail component image;
[0087] Based on the position information of the key points, a plurality of sub-regions are determined from the detail component image; the total number of the sub-regions is equal to the total number of the key points, and one sub-region contains one key point.
[0088] Specifically, in the above embodiment of the present application, the positions of the image vertices and the image geometric center points in the detail component image are first obtained through key point detection; then, based on the positions of the above key points, multiple sub-regions that are more critical in spatial distribution are determined from the detail component image: the sub-regions located at the positions of each vertex of the image, and the sub-region located at the geometric center of the image; and, the sum of the differences between the root mean square of the pixel values of each sub-region and the expected value is used to characterize the pixel value difference of the entire detail component image, and 5% of the above expected value is used as the preset difference threshold to construct a judgment condition for determining the target detail component image.
[0089] Because image vertices and the geometric center of the image have a relatively uniform spatial distribution within the image, the multiple subregions determined based on these points are also evenly distributed within the detail component image. Thus, by analyzing the pixel value differences of these multiple subregions, the resulting analysis results can more accurately reflect the pixel value differences of the entire detail component image. Furthermore, because the above process only involves calculating the degree of pixel value differences in a few local regions within the detail component image, rather than comprehensively considering all pixels in the detail component image, this approach improves computational efficiency while maintaining the accuracy of the calculation results, thereby enhancing the accuracy of determining the target detail component image.
[0090] In addition, the sum of the differences between the RMS values of the pixel values in each subregion and the expected value is used to represent the degree of pixel value dissimilarity in the entire detail component image. A preset difference threshold of 5% of this expected value is used to establish the criteria for determining the target detail component image. The RMS values of the pixel values in each subregion can more accurately represent the degree of pixel value dissimilarity in each subregion. Simultaneously, the sum of the differences between the RMS values of the pixel values in each subregion and the expected value can also more accurately represent the degree of pixel value dissimilarity between all subregions. Therefore, using these criteria, target detail component images with minimal pixel value dissimilarity can be more accurately identified.
[0091] The above embodiment further refines the criteria for determining the target detail component image and explains that when the decomposed detail component image meets the criteria, it is determined to be the target detail component image. The following describes the situation when the decomposed detail component image is determined not to meet the criteria:
[0092] Optionally, in some embodiments, after determining whether the plurality of sub-regions in the detail component image meet a preset condition, the method may further include:
[0093] If multiple sub-regions in the detail component image do not meet the preset conditions, the approximate component image is subjected to wavelet decomposition to update the decomposition result;
[0094] Based on the updated decomposition result, determining multiple sub-regions from the detail component image, and judging whether the multiple sub-regions of the detail component image meet preset conditions;
[0095] If yes, the detail component image in the updated decomposition result is determined as the target detail component image;
[0096] If not, the process returns to the step of performing wavelet decomposition on the approximate component image until the target detail component image is determined.
[0097] Specifically, the wavelet decomposition algorithm can be used to decompose the original image at multiple levels. As described above, each decomposition result can contain two parts: an approximate component image and detail component images in different directions. In the embodiment of the present application, when determining the target detail component image, the decomposition can be performed layer by layer and the judgment can be made layer by layer.
[0098] According to the above embodiment of the present application, the original image can be first subjected to the first layer of wavelet decomposition to obtain a decomposition result including an approximate component image and a detail component image; then, through the above judgment conditions, it is judged whether the detail component image in the decomposition result meets the judgment conditions. If not, the approximate component image in the above decomposition result is subjected to wavelet decomposition again, that is, a second layer of wavelet decomposition is performed, thereby obtaining a new decomposition result including an approximate component image and a detail component image, so as to update the original decomposition result; then, for the detail component image in the updated decomposition result, a target detail component image judgment operation is performed, and so on, the wavelet decomposition and the target detail component image judgment operation are performed layer by layer until a target detail component image with a sign condition is obtained.
[0099] Optionally, in some embodiments, the multiple sub-regions are all square regions, and within a single sub-region, the total number of pixels included along the side length direction is equal to the total number of detectors, or the total number of pixels included along the side length direction is equal to an integer multiple (such as 2 times, 3 times, etc.) of the total number of detectors, where the total number of detectors is the total number of unit detectors included in the linear array detection device that generates the original image.
[0100] Specifically, for a square area, the total number of pixels included along the side length direction is the total number of pixels included in each row, or the total number of pixels included in each column.
[0101] Assuming that the number of unit detectors contained in the linear array infrared detector is N, according to the imaging principle of the linear array infrared detector, for any rectangular sub-region in the original image, the N consecutive pixels located in the same row (or the same column) correspond to different unit detectors. In other words, the above N consecutive pixels are generated by scanning through different unit detectors.
[0102] Based on the above reasons, in the above embodiment of the present application, when determining the sub-region, the number of pixels contained in each row (column) in the sub-region is set to an integer multiple of the total number of unit detectors contained in the linear array infrared detector. In this way, it can be effectively ensured that the pixels formed by each unit detector are balanced in the sub-region, that is, the balance in the number of pixels collected by different unit detectors is ensured, so that the calculated root mean square of the pixel value of each sub-region can more accurately represent the degree of difference in the pixel value of the sub-region, and ultimately improve the denoising effect of the reconstructed image.
[0103] Optionally, in some of the embodiments, before determining the plurality of sub-regions from the detail component image, the method further comprises:
[0104] Determine whether the total number of pixels included in the detail component image along the detector direction is greater than the total number of detectors;
[0105] If yes, then executing the step of determining whether the plurality of sub-regions in the detail component image meet a preset condition;
[0106] If not, the preset difference threshold is amplified by a preset multiple to update the preset condition, and a target detail component image is determined from the multiple decomposed detail component images according to the updated preset condition.
[0107] Specifically, according to the description of the above embodiment, when determining the target detail component image, multiple sub-regions of the same size (the total number of pixels along the detector direction equals the total number of detectors) are selected from the detail component image, and the final determination is then made based on the calculated pixel values of these sub-regions. Analysis shows that the basic premise of this determination method should be that the size of the detail component image is larger than the size of the individual sub-regions, that is, for the detail component image, the total number of pixels along the detector direction should be at least equal to the total number of detectors. If the size of the detail component image is smaller than the size of the individual sub-regions, that is, the total number of pixels along the length of the detail component image is less than the total number of detectors, the subsequent determination process cannot be performed, and the target detail component image cannot be determined, and training labels cannot be generated, ultimately resulting in the inability to perform model training.
[0108] In view of the above reasons, in order to further improve the robustness of model training, in an embodiment of the present application, before determining the sub-region from the detail component image, the size of the detail component image is first judged. If the size does not meet the requirements, that is, the size of the detail component image is smaller than the size of a single sub-region, the preset conditions are updated and relaxed by amplifying the preset difference threshold, and then the target detail component image is determined in the multiple detail component images obtained according to the updated preset conditions.
[0109] Furthermore, when it is impossible to determine a target detail component image that meets the requirements from the obtained detail component images based on the updated preset conditions, the process can return to the step of amplifying the preset difference threshold by a preset multiple to update the preset conditions, and determining the target detail component image from the multiple detail component images obtained by decomposition according to the updated preset conditions, until the target detail component image is determined.
[0110] In the above-described embodiment of the present application, when the target detail component image cannot be determined because the size of the detail component image is smaller than the size of a single subregion, the preset conditions are iteratively updated to thereby determine the target detail component image from the multiple decomposed detail component images according to the updated preset conditions. Therefore, the above-described embodiment of the present application can ensure that the determined target detail component image contains only stripe noise signals, while ensuring that the target detail component image can be determined.
[0111] Optionally, in some embodiments, after obtaining the reconstructed image, the model training method may further include:
[0112] Correcting the pixel value of each pixel in the reconstructed image according to a preset correction equation to obtain a corrected image;
[0113] Correspondingly, the above step 210 uses the original image as an input sample and the reconstructed image as a label to perform denoising network model training to obtain a trained denoising network model, which may include:
[0114] The original image is used as the input sample and the corrected image is used as the label to train the denoising network model to obtain the trained denoising network model;
[0115] Among them, the preset correction equation is:
[0116]
[0117]
[0118] in, The coordinates in the reconstructed image are The pixel value of the pixel point; To correct the coordinates in the image The pixel value of the pixel.
[0119] Specifically, in the above embodiment of the present application, after suppressing the stripe noise in the original image through wavelet frequency domain analysis to obtain a reconstructed image, the pixel values of each pixel in the reconstructed image are spatially fused from the perspective of the image spatial domain, thereby obtaining a further corrected image as a training label. In other words, the above embodiment of the present application improves the denoising effect of the label image through a combined frequency domain and spatial domain approach, thereby also improving the effect of model training.
[0120] In addition, for the original image with stripe noise along the horizontal direction, the coordinates are When performing spatial fusion processing on pixel values of a pixel point, the weight value corresponding to the pixel points located in the same column (on the same vertical line) as the pixel point is increased, while the weight values corresponding to other pixel points are appropriately reduced (specifically, in the above correction equation, the weight value corresponding to the pixel points located in the same column as the pixel point is set to 4, while the weight values of the others are set to 1 or 2). The above method fully considers the non-uniformity of scanning imaging of different unit detectors of the linear array detection device. By increasing the weights of the pixel values corresponding to the pixel points of different unit detectors, the above non-uniformity is improved as much as possible, thereby improving the uniformity of the spatial distribution of the pixel values of the reconstructed image.
[0121] Example 2
[0122] Reference Figure 4 , Figure 4 The following is a flowchart of a method for image denoising according to the second embodiment of the present application. The method for image denoising provided in the embodiment of the present application includes the following steps:
[0123] Step 402: Acquire an image to be processed containing stripe noise.
[0124] Specifically, in the embodiment of the present application, there is no limitation on the specific content of the image to be processed, and it can be any image containing stripe noise.
[0125] In step 404, the image to be processed is input into a pre-trained denoising network model, and the denoising network model is used to perform denoising on the image to be processed to obtain a denoised target image.
[0126] The denoising network model used in this step can be trained using any of the above-mentioned model training methods.
[0127] According to the image denoising method provided in the embodiment of the present application, after obtaining the image to be processed containing stripe noise, denoising processing is performed through a pre-trained denoising network model, thereby obtaining a denoised target image.
[0128] Because in the denoising network model training stage, on the one hand, when generating the label image, the wavelet frequency domain analysis method is introduced to suppress the stripe noise in the original image, that is, the frequency domain analysis method is applied to the denoising network model training process, and a reconstructed image with better denoising effect is obtained from the frequency domain perspective as a training label. Therefore, the denoising effect of the trained denoising network model can be effectively improved; on the other hand, in the wavelet frequency domain analysis process, from the perspective of the degree of difference in the values of each pixel point in the decomposed detail component image, if the difference is less than the preset difference threshold, it is determined that the information presented in the detail component image is stripe noise information, and then by setting the pixel value of the detail component image to zero and performing the image reconstruction operation, the denoising effect of the reconstructed image as the training label can be further improved, and thus, the denoising effect of the trained denoising network model can also be further improved.
[0129] Therefore, using the above denoising network model to denoise the image to be processed can achieve better denoising effect.
[0130] Example 3
[0131] Figure 5 This is a structural block diagram of a model training device according to the third embodiment of the present application. The model training device provided in the embodiment of the present application may include:
[0132] An image acquisition module 502 is configured to acquire an original image, wherein the original image contains stripe noise along a preset direction;
[0133] The time domain decomposition module 504 is configured to perform wavelet decomposition on the original image to obtain a target detail component image in a preset direction; the pixel value difference of the target detail component image is less than a preset difference threshold; the pixel value difference represents the degree of difference in pixel values in different regions of the target detail component image;
[0134] An image processing module 506 is configured to perform pixel value zeroing processing on the target detail component image to obtain a processed image;
[0135] A reconstruction module 508 is used to perform wavelet reconstruction based on the processed image to obtain a reconstructed image corresponding to the original image;
[0136] The model training module 510 is used to train the denoising network model using the original image as an input sample and the reconstructed image as a label to obtain a trained denoising network model.
[0137] Optionally, in some embodiments, the time domain decomposition module 504 is specifically configured to:
[0138] Perform wavelet decomposition on the original image to obtain the decomposition result; the decomposition result includes: detail component image;
[0139] determining a plurality of sub-regions from the detail component image;
[0140] determining whether a plurality of sub-regions in the detail component image meet a preset condition;
[0141] If satisfied, the detail component image is determined as the target detail component image;
[0142] The preconditions include:
[0143]
[0144] is the total number of the multiple sub-regions; For the The root mean square of the pixel values of each pixel in the sub-region; for The expected value of the root mean square of the sub-regions; is the preset difference threshold.
[0145] Optionally, in some embodiments, the time domain decomposition module 504, when performing the step of determining a plurality of sub-regions from the detail component image, is specifically configured to:
[0146] Perform key point position detection on the detail component image to obtain the position information of the key points, the key points including: the image vertices and the geometric center of the detail component image;
[0147] Based on the position information of the key points, a plurality of sub-regions are determined from the detail component image; the total number of the sub-regions is equal to the total number of the key points, and one sub-region contains one key point.
[0148] Optionally, in some of these embodiments, the decomposition result further includes: an approximate component image;
[0149] The time domain decomposition module 504, after executing the step of determining whether the multiple sub-regions in the detail component image meet the preset conditions, is further configured to:
[0150] If multiple sub-regions in the detail component image do not meet the preset conditions, the approximate component image is subjected to wavelet decomposition to update the decomposition result;
[0151] Based on the updated decomposition result, determining multiple sub-regions from the detail component image, and judging whether the multiple sub-regions of the detail component image meet preset conditions;
[0152] If yes, the detail component image in the updated decomposition result is determined as the target detail component image;
[0153] If not, the process returns to the step of performing wavelet decomposition on the approximate component image until the target detail component image is determined.
[0154] Optionally, in some embodiments, the multiple sub-regions are all square regions, and within a single sub-region, the total number of pixels included along the side length direction is equal to an integer multiple of the total number of detectors, and the total number of detectors is the total number of unit detectors included in the linear array detection device that generates the original image.
[0155] Optionally, in some embodiments, the time domain decomposition module 504, before performing the step of determining a plurality of sub-regions from the detail component image, is further configured to:
[0156] Determining whether the total number of pixel points included in the detail component image along the detector direction is greater than the total number of detectors; the detector direction is perpendicular to the preset direction;
[0157] If yes, then executing the step of determining whether the plurality of sub-regions in the detail component image meet a preset condition;
[0158] If not, the preset difference threshold is amplified by a preset multiple to update the preset condition, and a target detail component image is determined from the multiple decomposed detail component images according to the updated preset condition.
[0159] Optionally, in some embodiments, the model training device further comprises:
[0160] A correction module is used to correct the pixel value of each pixel in the reconstructed image according to a preset correction equation after obtaining the reconstructed image to obtain a corrected image;
[0161] Correspondingly, the model training module 510 is specifically configured to:
[0162] The original image is used as the input sample and the corrected image is used as the label to train the denoising network model to obtain the trained denoising network model;
[0163] Among them, the preset correction equation is:
[0164]
[0165]
[0166] in, The coordinates in the reconstructed image are The pixel value of the pixel point; To correct the coordinates in the image The pixel value of the pixel.
[0167] The model training device of this embodiment is used to implement the corresponding model training method of the aforementioned embodiment 1 and has the beneficial effects of the corresponding method embodiment, which will not be repeated here. In addition, the functional implementation of each module in the model training device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiment, which will not be repeated here.
[0168] Example 4
[0169] Figure 6 This is a structural block diagram of an image denoising device according to the fourth embodiment of the present application. The image denoising device provided in the embodiment of the present application may include:
[0170] The image to be processed acquisition module 602 is used to acquire the image to be processed containing stripe noise;
[0171] Denoising module 604, configured to input the image to be processed into a pre-trained denoising network model, perform denoising on the image to be processed through the denoising network model, and obtain a denoised target image;
[0172] The denoising network model is obtained by training using the model training method of any of the above embodiments.
[0173] The image denoising device of this embodiment is used to implement the corresponding image denoising method of the aforementioned second embodiment and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here. In addition, the functional implementation of each module in the image denoising device of this embodiment can refer to the corresponding description of the aforementioned method embodiment and will not be described in detail here.
[0174] Example 5
[0175] Reference Figure 7 , shows a structural diagram of an electronic device according to the fifth embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.
[0176] like Figure 7 As shown, the electronic device may include: a processor (processor) 702 , a communication interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .
[0177] in:
[0178] The processor 702 , the communication interface 704 , and the memory 706 communicate with each other via a communication bus 708 .
[0179] The communication interface 704 is used to communicate with other electronic devices.
[0180] The processor 702 is configured to execute the program 710 , and specifically may execute the relevant steps in the above method embodiment.
[0181] Specifically, the program 710 may include program codes, which include computer operation instructions.
[0182] Processor 702 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.
[0183] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0184] The program 710 may include multiple computer instructions. Specifically, the program 710 may enable the processor 702 to execute operations corresponding to any one of the aforementioned method embodiments through the multiple computer instructions.
[0185] The specific implementation of each step in program 710 can refer to the corresponding description of the corresponding steps and units in the above-mentioned method embodiment, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working process of the above-mentioned devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, and will not be repeated here.
[0186] The present application also provides a computer storage medium storing a computer program that, when executed by a processor, implements the method described in any of the aforementioned method embodiments. The computer storage medium includes, but is not limited to, a compact disc read-only memory (CD-ROM), random access memory (RAM), a floppy disk, a hard disk, or a magneto-optical disk.
[0187] An embodiment of the present application further provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to the methods in the above-mentioned multiple method embodiments.
[0188] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0189] The methods according to the embodiments of the present application described above can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored in a remote recording medium or non-transitory machine-readable medium downloaded via a network and then stored in a local recording medium. Thus, the methods described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA)). It will be understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., random access memory (RAM), read-only memory (ROM), flash memory, etc.) that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods described herein are implemented. Furthermore, when a general-purpose computer accesses the code for implementing the methods described herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods described herein.
[0190] Those skilled in the art will appreciate that the units and method 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 the embodiments of this application.
[0191] The above implementation methods are only used to illustrate the embodiments of the present application, and are not intended to limit the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.
Claims
1. A model training method, characterized in that: include: Acquire an original image, wherein the original image contains stripe noise along a preset direction; Performing wavelet decomposition on the original image to obtain a target detail component image in the preset direction; the pixel value difference of the target detail component image is less than a preset difference threshold; the pixel value difference represents the degree of difference between pixel values in different areas of the target detail component image; performing pixel value zeroing processing on the target detail component image to obtain a processed image; Performing wavelet reconstruction based on the processed image to obtain a reconstructed image corresponding to the original image; Using the original image as an input sample and the reconstructed image as a label, a denoising network model is trained to obtain a trained denoising network model; The performing wavelet decomposition on the original image to obtain the target detail component image in the preset direction includes: Performing wavelet decomposition on the original image to obtain a decomposition result; the decomposition result includes: a detail component image; determining a plurality of sub-regions from the detail component image; Determining whether the plurality of sub-regions in the detail component image meet a preset condition; If satisfied, the detail component image is determined as a target detail component image; The preset conditions include: Max[(abs(std i -Estd)) 1.12 |i=1,2,…,n]<5%*Estd n is the total number of the multiple sub-regions; std i is the root mean square value of the pixel points in the i-th sub-region; Estd is the expected value of the root mean square value of n sub-regions; 5%*Estd is the preset difference threshold.
2. The method according to claim 1, characterized in that The determining of a plurality of sub-regions from the detail component image comprises: Performing key point position detection on the detail component image to obtain position information of the key points, wherein the key points include: image vertices and image geometric center points of the detail component image; Based on the position information of the key points, a plurality of sub-regions are determined from the detail component image; the total number of the sub-regions is equal to the total number of the key points, and one sub-region contains one key point.
3. The method according to claim 1, characterized in that The decomposition result also includes: an approximate component image; After determining whether the plurality of sub-regions in the detail component image meet a preset condition, the method further includes: If the multiple sub-regions in the detail component image do not meet the preset condition, performing wavelet decomposition on the approximate component image to update the decomposition result; determining a plurality of sub-regions from the detail component image based on the updated decomposition result, and determining whether the plurality of sub-regions of the detail component image meet the preset conditions; If yes, determining the detail component image in the updated decomposition result as the target detail component image; If not, the process returns to the step of performing wavelet decomposition on the approximate component image until the target detail component image is determined.
4. The method according to any one of claims 1 to 3, characterized in that The multiple sub-regions are all square regions, and within a single sub-region, the total number of pixel points included along the side length direction is equal to an integer multiple of the total number of detectors, where the total number of detectors is the total number of unit detectors included in the linear array detection device that generates the original image.
5. The method according to claim 4, characterized in that Before determining a plurality of sub-regions from the detail component image, the method further comprises: Determining whether the total number of pixel points included in the detail component image along the detector direction is greater than the total number of the detectors; the detector direction is perpendicular to the preset direction; If yes, executing the step of determining whether the plurality of sub-regions in the detail component image meet a preset condition; If not, the preset difference threshold is amplified by a preset multiple to update the preset condition, and a target detail component image is determined from the multiple detail component images obtained by decomposition according to the updated preset condition.
6. The method according to claim 1, characterized in that After obtaining the reconstructed image, the method further includes: Correcting the pixel value of each pixel in the reconstructed image according to a preset correction equation to obtain a corrected image; The denoising network model is trained using the original image as an input sample and the reconstructed image as a label to obtain a trained denoising network model, including: Using the original image as an input sample and the corrected image as a label, a denoising network model is trained to obtain a trained denoising network model; Wherein, the preset correction equation is: in, is the pixel value of the pixel point with coordinates (i0+i, j0+j) in the reconstructed image; y(i0, j0) is the pixel value of the pixel point with coordinates (i0, j0) in the corrected image.
7. An image denoising method, characterized in that: include: Obtaining an image to be processed containing stripe noise; Inputting the image to be processed into a pre-trained denoising network model, performing denoising on the image to be processed by the denoising network model to obtain a denoised target image; The denoising network model is trained using the method according to any one of claims 1 to 6.
8. An electronic device comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, where the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1 to 7.
9. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for generating image denoising model
CN110288547A
Target application classification method and device and electronic equipment
CN114913384A