Method, device, medium and program product for model construction and image reconstruction

By fusing the parameters of the convolutional layer and the normalization layer in the convolutional neural network and freezing the normalization layer, the problem of artifacts in the image super-resolution reconstruction model is solved, and the stability and efficiency of the model are improved.

CN118898542APending Publication Date: 2024-11-05CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410915363.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In image super-resolution reconstruction models, the gap between the parameters of the normalized layer in the training and testing stages leads to the generation of artifacts, which is difficult to effectively eliminate in the prior art.

Method used

In the final stage of convolutional neural network training, the parameters of the convolutional layer are fused with the parameters of the normalization layer, and the normalization layer is frozen to ensure that the forward propagation and backpropagation process do not pass through the normalization layer, so as to Reduce the parameter gap.

Benefits of technology

Through this method, the convergence process of the convolutional neural network can be accelerated, the artifact generation can be reduced, and the quality of the image super-resolution reconstruction model can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898542A_ABST
    Figure CN118898542A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and device for model construction and image reconstruction, a medium and a program product. The method for constructing the model comprises the following steps: acquiring a sample image; training the convolutional neural network by using the sample image until a first preset iteration round is reached; obtaining a moving average mean value and a moving average variance from the normalization layer, and obtaining a weight and an offset from the convolution layer; adjusting the weight and the offset based on a moving average mean value and a moving average variance; on the basis of the sample image, a forward propagation process and a reverse propagation process are alternately carried out on a specified layer of the convolutional neural network until a preset stop condition is reached, and an image super-resolution reconstruction model is obtained; the specified layer comprises other layers except the normalization layer. The method is used for reducing a difference value of a normalization layer in a training process and after training so as to achieve an effect of reducing artifacts in a reconstructed image of an image super-resolution reconstruction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of model building, and in particular to a method, device, medium, and program product for building a model and reconstructing an image. Background Art

[0002] SR (Super-Resolution) is an image processing technology used to restore high-resolution images from low-resolution images to improve image details and clarity and image quality. It has important application value in the fields of medical treatment, video surveillance, remote sensing satellite imaging, etc.

[0003] In order to improve the stability and efficiency of the SR model during training, a BN (Batch Normalization) layer can be added to the SR model to form an image super-resolution reconstruction model. However, when the image is reconstructed using the image super-resolution reconstruction model, artifacts are present in the super-resolution image obtained. Summary of the invention

[0004] The embodiments of the present application provide methods, devices, media, and program products for constructing models and reconstructing images, so as to achieve the effect of partially eliminating artifacts.

[0005] In a first aspect, an embodiment of the present application provides a method for constructing a model, comprising:

[0006] Get a sample image;

[0007] The convolutional neural network is trained using the sample image until a first preset iteration round is reached; the convolutional neural network includes at least a normalization layer and a convolution layer;

[0008] Obtaining a moving average mean and a moving average variance from the normalization layer, and obtaining a weight and a bias from the convolutional layer;

[0009] Adjusting the weight and the bias based on the moving average mean and the moving average variance;

[0010] Based on the sample image, a forward propagation process and a back propagation process are alternately performed in a specified layer of the convolutional neural network until a preset stop condition is reached, thereby obtaining an image super-resolution reconstruction model; the specified layer includes other layers except the normalization layer.

[0011] Optionally, in the method described above, adjusting the weight and the bias based on the moving average mean and the moving average variance includes:

[0012] Adjusting the weight based on the moving average variance so that the weight is negatively correlated with the moving average variance;

[0013] The bias is adjusted based on the moving average variance and the moving average mean, so that the bias is negatively correlated with the moving average mean and negatively correlated with the moving average variance.

[0014] Optionally, the method as described above, after adjusting the weight and the bias based on the moving average mean and the moving average variance, further includes:

[0015] Obtaining affine parameters from the normalization layer;

[0016] The adjusted weight and the adjusted bias are corrected by using the affine parameter, so that the adjusted weight and the adjusted bias are both positively correlated with the affine parameter.

[0017] Optionally, in the above method, obtaining the moving average mean and the moving average variance from the normalization layer includes:

[0018] If the convolution layer includes multiple convolution kernels, the moving average mean and the moving average variance corresponding to each of the convolution kernels are obtained from the normalization layer.

[0019] Optionally, the method as described above, after obtaining the image super-resolution reconstruction model, further comprises:

[0020] A reparameterization operation is performed on the image super-resolution reconstruction model.

[0021] Optionally, the method as described above, obtaining a sample image, includes:

[0022] Get multiple high-resolution images from a preset dataset;

[0023] Performing preprocessing operations on the high-resolution images to obtain low-resolution images corresponding to the high-resolution images;

[0024] The high-resolution image and the low-resolution image corresponding thereto are used as sample images.

[0025] In a second aspect, an embodiment of the present application provides a method for image reconstruction, comprising:

[0026] Acquire an image to be reconstructed;

[0027] The image to be reconstructed is input into an image super-resolution reconstruction model to obtain a super-resolution image; the image super-resolution reconstruction model is obtained according to the above first aspect and / or various possible implementations of the first aspect.

[0028] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0029] The memory stores computer-executable instructions;

[0030] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0032] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0033] The method, device, medium, and program product for constructing a model and reconstructing an image provided by the embodiments of the present application fuse the parameters of the convolutional layer with the parameters of the normalization layer in the final stage of convolutional neural network training; at the same time, the forward propagation process and the backward propagation process of the convolutional neural network are controlled not to pass through the normalization layer, that is, the normalization layer is frozen. By training the convolutional neural network in this way, not only can the parameters of the normalization layer be used to accelerate the convergence process of the convolutional neural network, but also the difference between the parameters of the normalization layer in the convolutional neural network testing stage and the convolutional neural network training stage can be reduced, so as to achieve the effect of partially eliminating the artifacts of the super-resolution image. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0035] Figure 1 A schematic diagram of the architecture of a convolutional neural network provided in an embodiment of the present application;

[0036] Figure 2 A flowchart of a method for constructing a model provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of the network architecture of the image super-resolution reconstruction model provided in the embodiment of the present application;

[0038] Figure 4 A schematic diagram of a flow chart of a method for image reconstruction provided in an embodiment of the present application;

[0039] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0040] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0042] It should be noted that the information and data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0043] SR is an image processing technology used to restore high-resolution images from low-resolution images to enhance image details and clarity and improve image quality. It has important application value in the fields of medical treatment, video surveillance, remote sensing satellite imaging, etc.

[0044] Convolutional neural networks play a key role in the image super-resolution (SR) task. The goal of image super-resolution reconstruction is to generate high-resolution images from low-resolution images, and convolutional neural networks have become the main tool to achieve this goal due to their powerful feature extraction and representation capabilities.

[0045] In order to improve the stability and efficiency of convolutional neural networks during training, convolutional neural networks can be combined with normalization layers to form an image super-resolution reconstruction model. For example, the RepSR (VGG-style Super-Resolution Networks with Structural Re-Parameterization and Batch Normalization) model. However, there are artifacts in the super-resolution images reconstructed using the image super-resolution reconstruction model.

[0046] According to research, the existence of artifacts in super-resolution images is mainly based on the normalization layer. During the training process of the image super-resolution reconstruction model, the parameters of the normalization layer are constantly changing, while during the testing process of the image super-resolution reconstruction model, the parameters of the normalization layer are statistical information during the training process of the image super-resolution reconstruction model. Therefore, there is a gap between the parameters of the normalization layer in the testing phase of the image super-resolution reconstruction model and the training phase of the image super-resolution reconstruction model. This gap is the main reason for the generation of artifacts. To eliminate artifacts, it is necessary to reduce the gap between the parameters of the normalization layer in the testing phase of the image super-resolution reconstruction model and the training phase of the image super-resolution reconstruction model.

[0047] Therefore, the embodiment of the present application provides a method for training a model, by fusing the parameters of the convolutional layer with the parameters of the normalization layer in the final stage of convolutional neural network training; at the same time, the forward propagation process and the backward propagation process of the convolutional neural network are controlled not to pass through the normalization layer, that is, the normalization layer is frozen. By training the convolutional neural network in this way, not only can the parameters of the normalization layer be used to accelerate the convergence process of the convolutional neural network, but also the difference between the parameters of the normalization layer in the convolutional neural network testing stage and the convolutional neural network training stage can be reduced, so as to achieve the effect of partially eliminating the artifacts of the super-resolution image.

[0048] Among them, the parameters of the normalization layer include at least the moving average mean and the moving average variance. The main operation of the normalization layer is to calculate and use the mean and variance of each small batch of sample images to perform feature normalization during the training process, so that the input of each layer of the network maintains certain statistical characteristics and alleviates the problem of internal covariate shift. The moving average mean is the global mean obtained by iteratively updating the mean of the sample images of each batch. The moving average variance is the global variance obtained by iteratively updating the variance of the sample images of each batch.

[0049] For example, Figure 1 The schematic diagram of the architecture of the convolutional neural network provided in this embodiment. Figure 1As shown, the convolutional neural network 100 includes an input layer 101, a convolutional layer 102, a normalization layer 103, a reparameterization layer 104 and an output layer 105. Among them. The input layer 101 is connected to the convolutional layer 102, the convolutional layer 102 is connected to the normalization layer 103, the normalization layer 103 is connected to the output layer 105, and the reparameterization layer 104 is connected to the convolutional layer 102. The input layer is used to receive an image, which includes but is not limited to a sample image and a test image. The convolutional layer is used to extract features from the image. The reparameterization layer is used to change the network structure to reduce the memory usage of the model. Based on the existence of the reparameterization layer, the convolutional layer can include multiple convolution kernels. By training multiple convolution kernels, the capacity and training quality of the final image super-resolution reconstruction model can be improved. At the same time, after the convolutional neural network training is completed, the convolutional layer including multiple convolution kernels can be simplified into one convolution kernel through the reparameterization layer, thereby improving the performance of the image super-resolution reconstruction model without introducing any inference time cost. The normalization layer is used to perform a feature operation on the feature map output by the convolution layer. For example, after the feature map X is normalized by the normalization layer, a feature map Y is obtained. The relationship between the feature map Y and the feature map X satisfies the formula: Among them, μ is the mean of the feature map X in the batch dimension. σ is the variance of the feature map X in the batch dimension. ∈ is a very small constant used to prevent the denominator of the formula from being 0, for example, ∈ is 1e-9.

[0050] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0051] Figure 2 This is a flow chart of the method for building a model provided in this application. The implementation scenario of this solution can be, for example, the above Figure 1 Implementation scenarios. Figure 2 As shown, the method includes:

[0052] Step S201, obtaining a sample image.

[0053] The sample image is an image used to input the convolutional neural network to train the convolutional neural network. The sample image includes multiple sample images.

[0054] Specifically, obtaining a sample image includes: obtaining a plurality of high-resolution images from a preset data set, performing preprocessing operations on each high-resolution image, obtaining low-resolution images corresponding to each high-resolution image, and using the high-resolution image and the low-resolution image corresponding thereto as sample images. The data set is used to store images with a resolution higher than a set threshold.

[0055] Exemplarily, the preprocessing operation performed on the high-resolution image includes: reducing the high-resolution image to a target low resolution using bilinear interpolation or bicubic interpolation.

[0056] Step S202: training the convolutional neural network using sample images until a first preset iteration round is reached.

[0057] The minimum value of the first preset iteration round is equal to 10% of the second preset iteration round, and the maximum value of the first preset iteration round is equal to 20% of the second preset iteration round. The second preset iteration round is the maximum number of iterations for training the convolutional neural network, that is, the stop training condition of the convolutional neural network.

[0058] Exemplarily, if the training round of the convolutional neural network reaches a second preset iteration round, the training of the convolutional neural network is stopped.

[0059] Specifically, the convolutional neural network is trained using the sample image until a first preset iteration round is reached, including: based on the sample image, alternatingly performing a forward propagation process and a backward propagation process in the convolutional neural network until a first preset iteration round is reached.

[0060] Among them, the forward propagation process in the convolutional neural network refers to the process in which the sample image passes through the input layer, flows to the convolution layer and the normalization layer, and finally flows to the output layer.

[0061] The backpropagation process in a convolutional neural network refers to the process of updating the gradients of each layer of the convolutional neural network in sequence according to the gap between the calculation results of the output layer and the preset loss function.

[0062] Step S203, obtaining the moving average mean and the moving average variance from the normalization layer, and obtaining the weight and bias from the convolution layer.

[0063] When the number of iterations of the convolutional neural network reaches the first preset number of iterations, the moving average mean and the moving average variance are obtained from the normalization layer. The moving average mean and the moving average variance at this time are gradually updated after training for the first preset number of iterations. At the same time, the weights and biases of the convolutional layer obtained at this time are also gradually updated after training for the first preset number of iterations.

[0064] Step S204: adjusting the weight and bias of the convolutional layer based on the moving average mean and the moving average variance.

[0065] Specifically, the weight is adjusted based on the moving average variance so that the weight is negatively correlated with the moving average variance; the bias is adjusted based on the moving average variance and the moving average mean so that the bias is negatively correlated with the moving average mean and the moving average variance. In this way, after the first preset iteration round, the moving average mean and the moving average variance can be fused with the parameters of the convolution layer, so that in the training process of the convolution layer, the technical effect of fusion training of the moving average mean and the moving average variance can be achieved, and the number of parameters in the training process of the convolutional neural network can be reduced.

[0066] Step S205, obtaining affine parameters from the normalization layer.

[0067] Step S206: using the affine parameter to correct the adjusted weight and the adjusted bias, so that the adjusted weight and the adjusted bias are both positively correlated with the affine parameter.

[0068] The affine parameters mainly include the scaling parameter γ and the offset parameter β. The scaling parameter γ is used to scale the normalized data to adjust the distribution range of the data. The offset parameter β is used to translate the normalized data to adjust the mean of the data.

[0069] Exemplarily, the relationship between the affine parameter, the moving average variance and the weight satisfies the formula: Among them, W new It is the new weight obtained after adjusting the weight using the affine parameter and the moving average variance. old is the weight obtained from the convolutional layer when the training round of the convolutional neural network reaches the first preset iteration round. mean is the moving average variance.

[0070] The relationship between the affine parameter, moving average variance, moving average mean and bias satisfies the formula: Among them, b new The new bias is obtained after adjusting the bias using the affine parameter, moving average variance, and moving average mean. old It is the bias obtained from the convolutional layer when the training round of the convolutional neural network reaches the first preset iteration round. mean is the moving average. In this way, during the training of the convolutional layer, the effect of training the affine parameters can also be achieved. During the back propagation process, there is no need to record the gradient of the affine parameters, which reduces the occupation of the video memory.

[0071] Step S207, based on the sample image, alternately perform the forward propagation process and the back propagation process in the designated layer of the convolutional neural network until a preset stop condition is reached to obtain an image super-resolution reconstruction model.

[0072] The specified layer includes other layers except the normalization layer. Since the specified layer does not include the normalization layer, the forward propagation process and the backward propagation process in the specified layer do not pass through the normalization layer. At this time, the normal propagation process is performed in the specified layer, that is, the feature map does not need to be normalized through the normalization layer, which reduces the amount of calculation. The feature map is the image obtained after the sample image passes through the convolution layer.

[0073] The method for constructing a model provided by the embodiment of the present disclosure is adopted. By fusing the parameters of the convolution layer with the parameters of the normalization layer in the final stage of the convolutional neural network training, the forward propagation process and the backward propagation process of the convolutional neural network are controlled not to pass through the normalization layer, that is, the normalization layer is frozen. By training the convolutional neural network in this way, not only can the parameters of the normalization layer be used to accelerate the convergence process of the convolutional neural network, but also the gap between the parameters of the normalization layer in the convolutional neural network testing phase and the convolutional neural network training phase can be reduced, so as to achieve the effect of partially eliminating the artifacts of the super-resolution image. In addition, by fusing the parameters of the convolution layer with the parameters of the normalization layer, after the first preset training round, there is no need to back propagate through the normalization layer, and thus there is no need to perform gradient update on the normalization layer, thereby achieving the effect of reducing the number of parameters and the amount of calculation of the convolutional neural network during the training process.

[0074] Specifically, if the convolution layer includes multiple convolution kernels, after the sample image is input into the convolution layer, each convolution kernel performs feature extraction operations on the sample image to generate a corresponding feature map. Multiple feature maps are stacked in depth to form feature channels of the convolution layer. The number of feature channels of the convolution layer is equal to the number of convolution kernels. Therefore, obtaining weights and biases from the convolution layer in step S203 can be replaced by obtaining weights and biases corresponding to each convolution kernel.

[0075] In addition, if the number of feature channels of the convolution layer is multiple, the normalization layer will perform normalization processing on each feature channel to form a moving average mean and a moving average variance corresponding to each feature channel. That is, each convolution kernel corresponds to a moving average mean and a moving average variance. Therefore, obtaining the moving average mean and the moving average variance from the normalization layer in step S203 can be replaced by obtaining the moving average mean and the moving average variance corresponding to each convolution kernel.

[0076] Among them, the weights of the convolution kernel are used to form the convolution kernel. The convolution kernel is a matrix composed of a set of weight parameters. In the early days of convolutional neural networks, the weights of the convolution kernel are usually obtained by random initialization. As the convolutional neural network is trained, the weights of the convolution kernel will be updated according to the back propagation process. The bias of the convolution kernel is used to adjust the output of the convolution kernel to enhance the robustness of the convolution kernel. For example, if the values ​​of the input sample images are all 0, then in the absence of a bias, the output of the convolution kernel is also 0. Therefore, the existence of a bias can make the output of the convolution kernel non-zero. The bias of the convolution kernel can be set by the user, or it can be updated according to the back propagation process as the convolutional neural network is trained.

[0077] Furthermore, after step S207, the method further includes: performing a re-parameterization operation on the image super-resolution reconstruction model.

[0078] Specifically, multiple convolution kernels of the convolution layer in the image super-resolution model are re-parameterized into one convolution kernel, and the size of the convolution kernel is the same as the size of the largest convolution kernel in the convolution layer.

[0079] The role of the reparameterization operation is to allow the gradient to propagate through the random variables, so that the model can be trained by the gradient descent method. In the embodiment of the present application, the image super-resolution model is reparameterized to merge the convolutional layers of the image super-resolution model into an equivalent large convolutional kernel, to achieve the deformation of the convolutional layers in the image super-resolution model, thereby reducing the number of parameters of the convolutional kernel in the image super-resolution model, and thus reducing the complexity of the image super-resolution model.

[0080] For example, if the weights of each convolution kernel in the convolution layer are W 1 , W 2 , ..., Wn, the re-parameterized convolution kernel weight is W, then W and W 1 , W 2 , ..., Wn satisfy the formula W = padding (W 1 )+padding(W 2 )+...+padding(Wn), where padding(Wn) means padding with zero values ​​around the convolution kernel with weight Wn until the size of the convolution kernel is equal to the maximum convolution kernel.

[0081] Furthermore, combined with Figure 3 As shown, Figure 3A schematic diagram of the network architecture of the image super-resolution reconstruction model provided for this embodiment. The network architecture 300 of the image super-resolution reconstruction model includes: 5 parallel convolution branches, a reparameterization layer 303 and an output layer 304, each convolution branch includes a convolution kernel and a BN module connected to the convolution kernel. The sizes of the convolution kernels are 9×9, 7×7, 5×5, 3×3 and 1×1 respectively. The 5 convolution kernels together constitute the convolution layer 301. The BN modules corresponding to each convolution kernel constitute the normalization layer 302. During the training process of the image super-resolution reconstruction model, each convolution branch is calculated in parallel and then added, and the addition result is transmitted to the output layer. After the training of the image super-resolution reconstruction model is completed, the convolution layer of the image super-resolution reconstruction model is reparameterized into an equivalent convolution kernel using the reparameterization layer, and the size of the equivalent convolution kernel is 9×9.

[0082] Figure 4 FIG. 1 is a flow chart of a method for image reconstruction provided by an embodiment of the present application. Figure 4 As shown, the method for image reconstruction may include the following steps:

[0083] Step S401, obtaining an image to be reconstructed.

[0084] Step S402: input the image to be reconstructed into an image super-resolution reconstruction model to obtain a super-resolution image. The image super-resolution reconstruction model is constructed according to the method provided in the above-mentioned embodiment 2 and / or embodiment 3, and this embodiment will not be described in detail here.

[0085] The method for image reconstruction provided by the embodiments of the present disclosure obtains an image to be reconstructed, and then inputs the image to be reconstructed into an image super-resolution reconstruction model constructed according to the method provided in the above embodiments 2 and / or 3 to perform image reconstruction. Since the image super-resolution reconstruction model constructed by the method provided in the above embodiments 2 and / or 3 reduces the difference in the parameters of the normalization layer in the image super-resolution reconstruction model and the image super-resolution reconstruction model, it is possible to reduce artifacts in the super-resolution image.

[0086] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 500 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus.

[0087] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.

[0088] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0089] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0090] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0091] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0092] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0093] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0094] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0095] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0096] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0098] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0099] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0100] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0101] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for constructing a model, characterized in that include: Get a sample image; Using the sample image to train a preset convolutional neural network until a first preset iteration round is reached, the convolutional neural network comprising at least a normalization layer and a convolution layer; Obtaining a moving average mean and a moving average variance from the normalization layer, and obtaining a weight and a bias from the convolutional layer; Adjusting the weight and the bias based on the moving average mean and the moving average variance; Based on the sample image, a forward propagation process and a back propagation process are alternately performed in a specified layer of the convolutional neural network until a preset stop condition is reached to obtain an image super-resolution reconstruction model; the specified layer includes other levels except the normalization layer.

2. The method according to claim 1, characterized in that: The weight and the bias are adjusted based on the moving average mean and the moving average variance, including: Adjusting the weight based on the moving average variance so that the weight is negatively correlated with the moving average variance; The bias is adjusted based on the moving average variance and the moving average mean, so that the bias is negatively correlated with the moving average variance and negatively correlated with the moving average variance.

3. The method according to claim 1, characterized in that After adjusting the weight and the bias based on the moving average mean and the moving average variance, the method further includes: Obtaining affine parameters from the normalization layer; The adjusted weight and the adjusted bias are corrected by using the affine parameter, so that the adjusted weight and the adjusted bias are both positively correlated with the affine parameter.

4. The method according to claim 1, characterized in that: Obtaining the moving average mean and moving average variance from the normalization layer includes: If the convolution layer includes multiple convolution kernels, the moving average mean and the moving average variance corresponding to each of the convolution kernels are obtained from the normalization layer.

5. The method according to any one of claims 1 to 4, characterized in that: After obtaining the image super-resolution reconstruction model, it also includes: A reparameterization operation is performed on the image super-resolution reconstruction model.

6. The method according to any one of claims 1 to 4, characterized in that: Get sample images, including: Get multiple high-resolution images from a preset dataset; Performing preprocessing operations on the high-resolution images to obtain low-resolution images corresponding to the high-resolution images; The high-resolution image and the low-resolution image corresponding thereto are used as sample images.

7. A method for image reconstruction, characterized in that include: Acquire an image to be reconstructed; The image to be reconstructed is input into an image super-resolution reconstruction model to obtain a super-resolution image; the image super-resolution reconstruction model is constructed according to the method for constructing a model according to any one of claims 1-6.

8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.