Method and device for optimizing motion blurred image
By constructing a generative adversarial network and training a joint loss function, the problem of processing motion-blurred images acquired by UAVs was solved, achieving efficient and accurate image deblurring results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies struggle to effectively handle motion-blurred images captured by drones, especially those caused by rotational motion, which results in motion blur and local blur. Furthermore, existing methods are time-consuming to compute or prone to information loss, affecting image restoration performance.
A generative adversarial network is constructed to synthesize a set of blurred images by randomly generating motion trajectory vectors. Adversarial learning is then performed using the generative and discriminative networks to optimize the generation of unblurred images. Image features are reconstructed using a deconvolutional network, and the network is trained using a joint loss function.
Robust deblurring of motion-blurred images is achieved, improving the accuracy and efficiency of image restoration while reducing computation time and information loss.
Smart Images

Figure CN121767231A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing technology, and in particular to a method and apparatus for optimizing motion-blurred images. Background Technology
[0002] Image-based detection technologies are widely used in environmental monitoring, agricultural monitoring, road condition assessment, civil engineering construction monitoring, and structural health monitoring. Using mobile measurement platforms such as drones to collect image data of the targets offers significant flexibility and efficiency advantages. However, the accuracy of the measurement largely depends on the quality of the images acquired by the drone. If the image is not clear enough or some parts are blurry, it will affect the accuracy of the final result. In practice, drones are easily affected by external environmental factors, resulting in motion blur in the acquired image data.
[0003] Most existing deblurring methods are based on classic convolutional models and generally employ iterative computation, using an image pyramid to calculate the blur kernel and remove blur from top to bottom, but this consumes a significant amount of computation time. Furthermore, these convolutional model-based methods are designed for blur that is uniform across the entire image scale. For non-uniform blur, such as motion blur caused by drone rotation, it is difficult to describe using a single blur kernel, and they are even less effective at handling local blur caused by object motion within a scene.
[0004] Some existing adaptive restoration methods for non-uniform motion-blurred images employ conditional generative adversarial networks (GANs) with attention mechanisms. The generative network uses an encoder-decoder structure, and the encoding stage utilizes a densely connected network to extract features, improving feature utilization and enhancing feature propagation. A visual attention mechanism is also incorporated, enabling the network to adaptively adjust its parameters for different input images, dynamically removing image blur. This method assigns appropriate weights to regions with different degrees of blur, improving the deblurring effect compared to previous restoration methods. However, its input is a single image, meaning the image information is obtained from a single source. During the deblurring process, information is easily lost, leading to irreversible effects and impacting the final restoration result.
[0005] In some existing methods for super-resolution image restoration with non-uniform motion blur, a preprocessed dataset is input into a generator to obtain a preliminary restored image. A discriminator (using a Markov discriminant network) then distinguishes the preliminary restored image from the real image to obtain a discrimination result. Finally, a loss function is used to optimize a generative adversarial network (GAN) to obtain the best-performing network result, resulting in the optimal restored image. This GAN comprises both a generator and a discriminator. This method increases the amount of image information acquired through rotation, thereby improving the clarity of the final restoration. However, this method requires high accuracy from the generator during training; insufficient clarity in the preprocessed preliminary restored image will negatively impact the training performance of subsequent models.
[0006] Therefore, there is an urgent need for an optimization method for motion-blurred images to solve the above problems. Summary of the Invention
[0007] The purpose of this invention is to address the problems existing in current structural inspection and data storage methods by providing a method and apparatus for optimizing motion-blurred images. The image optimization method of this invention is simple to operate and can stably optimize and restore motion-blurred images.
[0008] The objective of this invention is achieved through the following technical solution: The first aspect of this invention provides a method for optimizing motion-blurred images, comprising the following steps: (1) Based on the randomly generated motion trajectory vector and the set of clear sample images, synthesize the corresponding set of motion-blurred images, and combine the set of clear sample images and the set of motion-blurred images corresponding to them into a training set; (2) Construct a generative adversarial network and train the generative adversarial network using a training set. By performing adversarial learning on motion-blurred images and real clear sample images, a well-trained image optimization model for generating unblurred images is obtained. (3) Input the motion-blurred image into the image optimization model and output the corresponding real unblurred image.
[0009] Furthermore, the step of synthesizing a corresponding motion-blurred image set based on randomly generated motion trajectory vectors and a set of clear sample images specifically includes: First, a motion trajectory vector is randomly generated, which corresponds to the position of the object after random movement on a two-dimensional plane. Then, these two-dimensional plane motion trajectories are sampled to generate a blur kernel. Public images collected from the Internet are used as clear sample images, and the blurred images are then blurred using the sampled blur kernel to obtain the corresponding motion-blurred images, thus obtaining a set of motion-blurred images.
[0010] Furthermore, the generative adversarial network includes a generator network and a discriminator network. The generator network receives the input motion-blurred image, extracts image features through a feature extraction path, and then reconstructs the corresponding deblurred image using a deconvolutional network. The discriminator network is used to determine whether the reconstructed deblurred image is real or fake compared to a real clear sample image, and obtains a binary classification probability that the input image is a deblurred image or a real clear sample image.
[0011] Furthermore, the generating network includes a three-channel blurred image feature extractor, a convolutional layer, a batch normalization layer, and a ReLU layer.
[0012] Furthermore, the generative network specifically includes: In the first layer of the generative network, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 5x5, with a stride of 1 and an output dimension of 32. In the second layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 64. In the third layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 128. In the fourth layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 256. The fifth layer of the generative network consists of a deconvolutional layer, a batch normalization layer, and a ReLU layer, with the deconvolutional layer having a 3x3 kernel, a stride of 2, and an output dimension of 128. The sixth layer of the generative network consists of a deconvolutional layer, a batch normalization layer, and a ReLU layer, with the deconvolutional layer having a 3x3 kernel, a stride of 2, and an output dimension of 64. The seventh layer of the generative network consists of a deconvolutional layer, a batch normalization layer, and a ReLU layer, with the deconvolutional layer having a 3x3 kernel, a stride of 2, and an output dimension of 32. The eighth layer of the generative network consists of a convolutional layer, a batch normalization layer, and a ReLU layer, with the convolutional layer having a 5x5 kernel, a stride of 1, and an output dimension of 3.
[0013] Furthermore, the discriminant network includes a discriminator, which is composed of multiple sets of convolutional and fully connected layers.
[0014] Furthermore, the discriminative network specifically includes: In the first layer of the discriminant network, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 5x5, with a stride of 2 and an output dimension of 32. In the second layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 64. In the third layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 128. In the fourth layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 256. In the fifth layer, a fully connected layer and a ReLU layer are passed, with an output dimension of 1 and a length of 512. In the sixth layer, a fully connected layer and a sigmoid activation layer are passed sequentially, with an output dimension of 1 and a length of 2.
[0015] Furthermore, training the generative adversarial network using the training set specifically includes: The motion-blurred images in the training set are fed into the generator network to obtain the corresponding deblurred images; the deblurred images are then fed into the discriminator network to obtain the binary classification probabilities. The mean squared error between the deblurred image and its corresponding real clear sample image is calculated as the loss of the generator network, and the cross-entropy between the binary classification probability output by the discriminator network and the source label of its input image is calculated as the loss of the discriminator network; the joint loss function is calculated based on the generator network loss and the discriminator network loss. First, freeze the discriminator network and train the generator network for 3 epochs. During training, the parameters of the generator network are adjusted with the goal of minimizing the joint loss function. Then, freeze the generator network and train the discriminator network for 1 epoch. During training, the parameters of the discriminator network are adjusted with the goal of minimizing the joint loss function. Repeat the current steps until the generator network loss is minimized and the discriminator network loss is maximized. Finally, a well-trained generative adversarial network is obtained, and the trained generative network is selected as the image optimization model to generate unblurred images.
[0016] A second aspect of the present invention provides an optimization apparatus for motion-blurred images, comprising one or more processors and a memory, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-described optimization method for motion-blurred images.
[0017] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, is used to implement the above-described method for optimizing motion-blurred images.
[0018] The beneficial effects of this invention are as follows: This invention can perform deconvolution denoising on blurred images. Based on a trainable generative adversarial network, this invention can break the limitations of traditional convolutional models, guide generative models to have robust deblurring capabilities, and effectively optimize images with motion blur. Attached Figure Description
[0019] Figure 1 This is a flowchart of the motion-blurred image optimization method of the present invention; Figure 2 This is a schematic diagram of the structure of the generative network of the present invention; Figure 3 This is a schematic diagram of the discriminant network of the present invention; Figure 4 These are example images of the present invention before and after motion blur removal; Figure 5 This is a schematic diagram of a structure of the motion blur image optimization device of the present invention. Detailed Implementation
[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0022] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0023] The present invention will now be described in detail with reference to the accompanying drawings. Unless otherwise specified, the features of the following embodiments and implementations can be combined with each other.
[0024] See Figure 1 The method for optimizing motion-blurred images according to the present invention specifically includes the following steps: (1) Based on the randomly generated motion trajectory vector and the set of clear sample images, synthesize the corresponding set of motion-blurred images, and combine the set of clear sample images and the set of motion-blurred images corresponding to them into a training set.
[0025] Furthermore, based on the randomly generated motion trajectory vectors and the set of clear sample images, a corresponding motion-blurred image set is synthesized. Specifically, this includes: first, randomly generating motion trajectory vectors, which correspond to the positions of objects after random movement on a two-dimensional plane; then, sampling these two-dimensional plane motion trajectories to generate blur kernels; using publicly available images collected from the Internet as clear sample images, and then using the sampled blur kernels to perform blur operations on the clear sample images to obtain the corresponding motion-blurred images, i.e., images with motion-blurred characteristics, in order to obtain a set of motion-blurred images, thereby improving the image quality of the training set.
[0026] Furthermore, a training set is formed by combining the set of clear sample images and their corresponding set of motion-blurred images for subsequent model training. Alternatively, the synthesized dataset can be randomly split into training and validation sets in an 8:2 ratio.
[0027] (2) Construct a generative adversarial network and train the generative adversarial network using a training set. By performing adversarial learning on motion-blurred images and real clear sample images, a well-trained image optimization model for generating unblurred images is obtained.
[0028] In this embodiment, the generative adversarial network includes a generator network and a discriminator network. The generator network receives the input motion-blurred image, extracts image features through a feature extraction path, and then uses a deconvolutional network to reconstruct and generate the corresponding deblurred image. The discriminator network is used to determine whether the reconstructed deblurred image (i.e., the unblurred image generated by the generator network) is real or fake compared with a real clear sample image, and obtains a binary classification probability that the input image is a deblurred image or a real clear sample image, thereby guiding the generator network to output a more realistic unblurred image.
[0029] Furthermore, the generative network includes a three-channel blurred image feature extractor, convolutional layers, batch normalization layers, and ReLU layers. The specific structure of the generative network is as follows: Figure 2 As shown, it specifically includes the following structure: In the first layer of the generative network, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 5x5, with a stride of 1 and an output dimension of 32. In the second layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 64. In the third layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 128. In the fourth layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 256. The fifth layer of the generative network consists of a deconvolutional layer, a batch normalization layer, and a ReLU layer, with the deconvolutional layer having a 3x3 kernel, a stride of 2, and an output dimension of 128. The sixth layer of the generative network consists of a deconvolutional layer, a batch normalization layer, and a ReLU layer, with the deconvolutional layer having a 3x3 kernel, a stride of 2, and an output dimension of 64. The seventh layer of the generative network consists of a deconvolutional layer, a batch normalization layer, and a ReLU layer, with the deconvolutional layer having a 3x3 kernel, a stride of 2, and an output dimension of 32. The eighth layer of the generative network consists of a convolutional layer, a batch normalization layer, and a ReLU layer, with the convolutional layer having a 5x5 kernel, a stride of 1, and an output dimension of 3.
[0030] Furthermore, the discriminant network includes a discriminator, which consists of multiple sets of convolutional and fully connected layers. The specific structure of the discriminant network is as follows: Figure 3 As shown, it specifically includes the following structure: In the first layer of the discriminant network, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 5x5, with a stride of 2 and an output dimension of 32. In the second layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 64. In the third layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 128. In the fourth layer, convolutional layers, batch normalization layers, and ReLU layers are passed sequentially. The convolutional kernels in the convolutional layers are 3x3, with a stride of 2 and an output dimension of 256. In the fifth layer, a fully connected layer and a ReLU layer are passed, with an output dimension of 1 and a length of 512. In the sixth layer, a fully connected layer and a sigmoid activation layer are passed sequentially, with an output dimension of 1 and a length of 2.
[0031] In this embodiment, a training set is used to train the generative adversarial network (GAN). Specifically, this includes: feeding motion-blurred images from the training set into the generative network to obtain corresponding deblurred images; feeding the deblurred images into the discriminative network to obtain binary classification probabilities. The mean squared error between the deblurred image and its corresponding real clear sample image is calculated as the loss of the generative network, and the cross-entropy between the binary classification probability output by the discriminative network and the source label of its input image is calculated as the loss of the discriminative network. A joint loss function is calculated based on the generative and discriminative network losses. First, the discriminative network is frozen, and the generative network is trained for three epochs. During training, the parameters of the generative network are adjusted to minimize the joint loss function, thereby minimizing the generative network loss. Then, the generative network is frozen, and the discriminative network is trained for one epoch. During training, the parameters of the discriminative network are adjusted to minimize the joint loss function, thereby maximizing the discriminative network loss. This process is repeated until the generative network loss is minimized and the discriminative network loss is maximized. Finally, a trained GAN is obtained, and this trained generative network is selected as the image optimization model for generating unblurred images.
[0032] It should be understood that during training, by training and optimizing the joint loss function (including the generator network loss and the discriminator network loss) separately, it is possible to ensure that the generator network and the discriminator network reach an equilibrium state. Considering both losses simultaneously allows the discriminator network to determine whether the deblurred image output by the generator network is real or fake, further promoting a more realistic deblurred image output by the generator network.
[0033] It should be noted that during training, stochastic gradient descent is used as the optimizer to update network parameters, with a weight decay factor of 0.0005 and a momentum of 0.9. The initial learning rate is set to 0.001, decreasing to 0.95 times the initial value after each epoch, and the batch size is 12. The training process iterates, tracking the changes in the two loss values during training to ensure that the losses of both networks converge.
[0034] During model validation, the generator network is used to deblur the motion-blurred image and output the deblurred image. The peak signal-to-noise ratio and structural similarity are then calculated between the output image and the real clear sample image.
[0035] By comparing the results with the set peak signal-to-noise ratio threshold of 25 and structural similarity threshold of 0.8, if the model validation results are both greater than the two thresholds, the generator network is judged to have good generalization ability in the deblurring task; otherwise, iterative training is continued until the validation results are qualified.
[0036] (3) Input the motion-blurred image into the image optimization model and output the corresponding real unblurred image. For example... Figure 4As shown, the left image is the input motion-blurred image, and the right image is the output unblurred image.
[0037] In summary, this invention differs from traditional methods by performing deconvolution denoising on blurred images when the blur kernel is known, thereby obtaining a high-quality training set. At the same time, it uses separate network training and optimization of the joint loss function to train a pre-constructed generative adversarial network, guiding the final image optimization model to have robust deblurring capabilities.
[0038] Corresponding to the embodiments of the aforementioned methods for optimizing motion-blurred images, the present invention also provides embodiments of an apparatus for optimizing motion-blurred images.
[0039] See Figure 5 The present invention provides an optimization device for motion-blurred images, comprising one or more processors and a memory, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the motion-blurred image optimization method in the above embodiments.
[0040] Embodiments of the motion-blurred image optimization device of the present invention can be applied to any device with data processing capabilities, such as a computer. The device embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data-processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 5 The diagram shown is a hardware structure diagram of any device with data processing capabilities, including the motion blur image optimization device of the present invention. (Except for...) Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0041] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0042] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0043] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the motion-blurred image optimization method described in the above embodiments.
[0044] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0045] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An optimization method of a motion-blurred image, characterized by, The method comprises the following steps: (1) synthesizing a corresponding motion blur image set according to a randomly generated motion trajectory vector and a clear sample image set, and forming the clear sample image set and the corresponding motion blur image set into a training set; (2) constructing a generative adversarial network, and training the generative adversarial network using the training set, and acquiring a trained image optimization model for generating a non-blurred image by performing adversarial learning on the motion blur image and the real clear sample image; (3) inputting the motion blur image into the image optimization model, and outputting a corresponding real non-blurred image.
2. The method of claim 1, wherein, The synthesizing of the corresponding motion blur image set according to the randomly generated motion trajectory vector and the clear sample image set specifically comprises: first, randomly generating a motion trajectory vector corresponding to the position of an object after random motion in a two-dimensional plane; then, sampling the two-dimensional plane motion trajectory to generate a blur kernel; collecting public images from the Internet as clear sample images, and then performing blur operation on the clear sample images using the sampled blur kernel to obtain corresponding motion blur images, so as to obtain a motion blur image set.
3. The method of claim 1, wherein, The generative adversarial network comprises a generative network and a discriminative network, wherein the generative network is used to receive an input motion blur image, extract image features through a feature extraction path, and then reconstruct a corresponding de-blurring image using a de-convolution network; the discriminative network is used to determine whether the reconstructed de-blurring image is real or not, and obtain a binary classification probability of the input image being a de-blurring image or a real clear sample image.
4. The method of claim 3, wherein, The generative network comprises a three-channel blur image feature extractor, a convolution layer, a batch normalization layer and a ReLU layer.
5. The method of claim 4, wherein, The generative network specifically comprises: In the first layer of the generation network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 5*5, the step is 1, and the output dimension is 32; in the second layer of the generation network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 3*3, the step is 2, and the output dimension is 64; in the third layer of the generation network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 3*3, the step is 2, and the output dimension is 128; in the fourth layer of the generation network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 3*3, the step is 2, and the output dimension is 256; in the fifth layer of the generation network, a deconvolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the deconvolution layer is 3*3, the step is 2, and the output dimension is 128; in the sixth layer of the generation network, a deconvolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the deconvolution layer is 3*3, the step is 2, and the output dimension is 64; in the seventh layer of the generation network, a deconvolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the deconvolution layer is 3*3, the step is 2, and the output dimension is 32; in the eighth layer of the generation network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 5*5, the step is 1, and the output dimension is 3.
6. The method of claim 3, wherein, The discriminator network comprises a discriminator composed of multiple groups of convolution and fully connected layers.
7. The method of claim 6, wherein, The discriminator network specifically comprises: In the first layer of the discriminator network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 5*5, the step is 2, and the output dimension is 32; in the second layer of the discriminator network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 3*3, the step is 2, and the output dimension is 64; in the third layer of the discriminator network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 3*3, the step is 2, and the output dimension is 128; in the fourth layer of the discriminator network, a convolution layer, a batch normalization layer and a ReLU layer are sequentially passed, wherein the convolution kernel of the convolution layer is 3*3, the step is 2, and the output dimension is 256; in the fifth layer of the discriminator network, a fully connected layer and a ReLU layer are sequentially passed, and the output dimension is 1 and the length is 512; in the sixth layer of the discriminator network, a fully connected layer and a sigmoid activation layer are sequentially passed, and the output dimension is 1 and the length is 2.
8. The method of claim 1, wherein, The training of the generative adversarial network using the training set specifically comprises: sending the motion blur images in the training set into the generation network to obtain corresponding deblurring images; sending the deblurring images into the discriminator network to obtain binary classification probabilities; calculating the mean square error between the deblurring images and their corresponding real clear sample images as the generation network loss, calculating the cross entropy between the binary classification probabilities output by the discriminator network and the source labels of the input images as the discriminator network loss, and calculating a joint loss function according to the generation network loss and the discriminator network loss; Freeze the discriminant network first, train the generation network for 3 cycles, and adjust the parameters of the generation network in the training process to minimize the joint loss function as the optimization target; freeze the generation network again, train the discriminant network for 1 cycle, and adjust the parameters of the discriminant network in the training process to minimize the joint loss function as the optimization target; repeat the current step until the generation network loss is minimized and the discriminant network loss is maximized; Finally, the trained generative adversarial network is obtained, and the trained generation network is selected as an image optimization model to generate a non-blurred image.
9. An apparatus for optimizing a motion-blurred image, comprising one or more processors and memory, wherein, The memory is coupled with the processor; wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the motion blur image optimization method in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, A program is stored thereon, and when the program is executed by a processor, the program is used to implement the motion blur image optimization method in any one of claims 1-8.