Video denoising model processing method and apparatus, computer device, and storage medium

By extracting image details and fusion features in the video denoising model, and adjusting model parameters, the problem of poor video denoising effect in the existing technology is solved, and better denoising effect and efficiency are achieved.

WO2024217164A1PCT designated stage expired Publication Date: 2024-10-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/079883
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-18
Filing Date
2024-03-04
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

Existing video denoising models based on single frames and multi-frames are not effective when considering the correlation and continuity of the video temporal dimension, and cannot extract better features when computing resources are limited, resulting in poor denoising effects.

Method used

By extracting the image detail features of the target video frame in the first branch of the video denoising model, and performing feature extraction on the downsampled video frame sequence, image fusion features are generated. Based on these features, predicted video frames are generated, and based on the predicted video frames and reference The loss value between video frames adjusts the model parameters and optimizes the video denoising model.

Benefits of technology

It improves the video denoising effect, fully considers the correlation and continuity of the video in the time dimension, reduces the amount of calculation, improves the operating efficiency of the model, and is suitable for environments with limited computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079883_24102024_PF_FP_ABST
    Figure CN2024079883_24102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a video denoising model processing method and apparatus, a computer device, a storage medium, and a computer program product. The method can be applied to the field of artificial intelligence, and comprises: obtaining a target video frame in a video frame sequence of a sample video, and obtaining a reference video corresponding to the sample video (S202); extracting an image detail feature of the target video frame by means of a first branch of a video denoising model (S204); performing feature extraction on a down-sampled video frame sequence by means of a second branch of the video denoising model to obtain an image fusion feature (S206); generating a prediction video frame on the basis of the image fusion feature and the image detail feature (S208); and according to a loss value between the prediction video frame and a video frame corresponding to the target video frame in the reference video, adjusting parameters in the video denoising model to obtain a target video denoising model (S210). By using the method, the denoising effect of the target video denoising model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Processing method, device, computer equipment and storage medium for video denoising model

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 2023104577981, filed on April 18, 2023, entitled “Processing method, device, computer equipment and storage medium for video denoising model”, the entire text of which is hereby incorporated by reference. Technical Field

[0003] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for processing a video denoising model. Background Art

[0004] With the development of computer vision technology, video denoising has gradually become a research hotspot in the field of improving video quality. Among them, video denoising models based on deep learning have obvious advantages in denoising effect and speed, and have broad application prospects.

[0005] However, the existing single-frame based video denoising model cannot fully consider the correlation and continuity of the video in the temporal dimension, and cannot extract better features. The multi-frame based video denoising model is also unable to extract better features under the condition of limited computing resources, resulting in poor denoising effect of the existing video denoising model on the video.

[0006] Summary of the Invention

[0007] According to various embodiments provided in the present application, a method, apparatus, computer device, computer-readable storage medium, and computer program product for processing a video denoising model capable of improving video denoising effects are provided.

[0008] In a first aspect, the present application provides a method for processing a video denoising model, which is executed by a computer device, and the method includes:

[0009] Obtaining a target video frame from a video frame sequence of a sample video, and obtaining a reference video corresponding to the sample video;

[0010] Extracting image detail features of the target video frame through a first branch of a video denoising model;

[0011] Downsampling the video frame sequence to obtain a downsampled video frame sequence, and extracting features from the downsampled video frame sequence using the second branch of the video denoising model to obtain image fusion features;

[0012] generating a predicted video frame based on the image fusion feature and the image detail feature;

[0013] According to the loss value between the predicted video frame and the reference video frame, the parameters in the video denoising model are adjusted to obtain a target video denoising model; the reference video frame is a video frame in the reference video corresponding to the target video frame; the target video denoising model is used to denoise the video to be denoised.

[0014] In a second aspect, the present application also provides a device for processing a video denoising model. The device comprises:

[0015] A video frame acquisition module, configured to acquire a target video frame from a video frame sequence of a sample video, and to acquire a reference video corresponding to the sample video;

[0016] A detail feature extraction module, configured to extract image detail features of the target video frame through a first branch of a video denoising model;

[0017] a fusion feature extraction module, configured to downsample the video frame sequence to obtain a downsampled video frame sequence, and extract features from the downsampled video frame sequence using the second branch of the video denoising model to obtain an image fusion feature;

[0018] A prediction module, configured to generate a predicted video frame based on the image fusion feature and the image detail feature;

[0019] A parameter adjustment module is used to adjust the parameters in the video denoising model according to the loss value between the predicted video frame and the reference video frame to obtain a target video denoising model; the reference video frame is a video frame in the reference video corresponding to the target video frame; the target video denoising model is used to denoise the video to be denoised.

[0020] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the video denoising model processing method when executing the computer-readable instructions.

[0021] In a fourth aspect, the present application further provides a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the processing method of the video denoising model.

[0022] In a fifth aspect, the present application further provides a computer program product, comprising computer-readable instructions, which, when executed by a processor, implement the steps of the processing method of the video denoising model.

[0023] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.

[0025] FIG1 is a diagram illustrating an application environment of a method for processing a video denoising model according to an embodiment;

[0026] FIG2 a is a schematic flow chart of a method for processing a video denoising model in one embodiment;

[0027] FIG2 b is a flow chart of a method for processing a video denoising model in another embodiment;

[0028] FIG3 is a schematic diagram of denoising a noisy video frame according to an embodiment;

[0029] FIG4 is a schematic diagram of adding noise to a video frame in one embodiment;

[0030] FIG5 is a schematic diagram of a real noise image in one embodiment;

[0031] FIG6 is a flow chart of an image fusion feature extraction step in one embodiment;

[0032] FIG7 is a schematic flow chart of a video denoising step in one embodiment;

[0033] FIG8 is a flow chart of a method for processing a video denoising model in another embodiment;

[0034] FIG9 is a schematic diagram of sample data processing in one embodiment;

[0035] FIG10 is a schematic diagram of the structure of a video denoising model in one embodiment;

[0036] FIG11 is a schematic diagram of a noisy video frame according to another embodiment;

[0037] FIG12 is a schematic diagram of a denoised video frame according to an embodiment;

[0038] FIG13 is a structural block diagram of a processing device for a video denoising model according to one embodiment;

[0039] FIG14 is a structural block diagram of a processing device for a video denoising model according to another embodiment;

[0040] FIG15 is a diagram showing the internal structure of a computer device according to one embodiment;

[0041] FIG16 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0043] It should be noted that in the following description, the terms "first, second and third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first, second and third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0044] The processing method of the video denoising model provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. In this embodiment, the terminal 102 communicates with the server 104 via a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated with the server 104, or it can be placed on the cloud or other servers. The processing method of the video denoising model can be executed by the terminal 102 or the server 104 alone, or by the terminal 102 and the server 104 in collaboration. In some embodiments, the processing method of the video denoising model is executed by terminal 102, which obtains a target video frame in a video frame sequence of a sample video, and obtains a reference video corresponding to the sample video; extracts image detail features of the target video frame through the first branch of the video denoising model; downsamples the video frame sequence to obtain a downsampled video frame sequence, and extracts features of the downsampled video frame sequence through the second branch of the video denoising model to obtain image fusion features; generates a predicted video frame based on the image fusion features and the image detail features; adjusts the parameters in the video denoising model according to the loss value between the predicted video frame and the reference video frame to obtain a target video denoising model; wherein the reference video frame is a video frame in the reference video corresponding to the target video frame, and the target video denoising model is used to perform denoising processing on the video to be denoised.

[0045] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected through wired or wireless communication, and this application does not impose any restrictions on this.

[0046] In one embodiment, as shown in FIG. 2a and FIG. 2b , a method for processing a video denoising model is provided. The method is described by taking the computer device (terminal 102 or server 104) in FIG. 1 as an example, and includes the following steps:

[0047] S202: Acquire a target video frame in a video frame sequence of a sample video, and acquire a reference video corresponding to the sample video.

[0048] Sample videos are video data used to train machine learning models. They typically consist of multiple frames, each containing information about the video content, such as color, shape, and motion. Sample videos can come from a variety of sources, such as real-life recordings, simulated videos, and videos from the internet. Sample videos are noisy videos, while reference videos are noise-free or have extremely low noise levels, corresponding to the sample videos. They are typically used as the "real" or "ideal" state in video denoising tasks. During the training and evaluation of video denoising models, reference videos provide a target standard for evaluating denoising effects and model performance.

[0049] It should be noted that the sample videos in the embodiments of the present application include static videos with real noise and noisy dynamic videos. Static video refers to the video data generated when the camera is fixed and the subject is not moving. Since the camera is not moving, the real noise in the static video is usually caused by factors such as the noise of the camera itself, uneven lighting, and sensor noise. Therefore, static videos with real noise can better reflect the video noise situation in actual applications; dynamic video refers to the video data generated when the camera or the subject is moving. Noisy dynamic video refers to the original video data. By adding noise to the video data, the noise situation in the actual application scenario is simulated. The noisy dynamic video can better test and evaluate the robustness and performance of the video denoising algorithm or model. The reference video in the embodiments of the present application includes a clear static video obtained by smoothing the static video and a clear dynamic video without noise.

[0050] Specifically, the terminal extracts a sequence of video frames from the sample video at regular intervals and obtains the target video frame to be processed from the extracted sequence of video frames. For example, if the sequence of video frames extracted from the sample video contains 10 video frames and the target video frame to be processed is the second frame, the terminal obtains the second frame from the sequence of video frames.

[0051] S204: extracting image detail features of the target video frame through the first branch of the video denoising model.

[0052] Video denoising models refer to computer vision models or algorithms used to remove noise from videos. Video noise is often caused by factors such as imperfections in acquisition equipment, interference in signal transmission, and compression algorithms. Therefore, denoising is a crucial preprocessing step in many video applications, such as video conferencing and video encoding. The task of a video denoising model is to recover the clearest, most noise-free video possible from a noisy input video, while preserving as much detail and quality as possible.

[0053] The first branch of the video denoising model can specifically be a high-resolution branch, which is used to process the target video frame of the original resolution. It can be understood that the original resolution of the target video frame is high resolution. High resolution means that the resolution of the image reaches a specific resolution threshold. The resolution threshold can be set according to needs. The target video frame with high resolution usually carries more noise and richer detail information. By performing feature processing on the target video frame through the first branch of the video denoising model, richer image detail features can be obtained.

[0054] Image detail features refer to the features of the detailed parts of the image, such as texture, edges, corners, etc. By extracting image detail features, noise and signals can be distinguished more accurately, and more detail information can be restored, thereby improving the quality and clarity of the image.

[0055] Specifically, after obtaining the target video frame, the terminal inputs the target video frame into the first branch of the video denoising model, processes the target video frame through each network layer of the first branch, and obtains image detail features of the target video frame.

[0056] S206 , downsampling the video frame sequence to obtain a downsampled video frame sequence, and extracting features from the downsampled video frame sequence using the second branch of the video denoising model to obtain image fusion features.

[0057] Among them, the downsampled video frame sequence refers to the video frame sequence obtained by downsampling the video frame sequence of the sample video. In image processing, downsampling refers to reducing the resolution of the image, thereby reducing the size of the image and reducing the detail information in the image. It is usually used to reduce the amount of calculation and memory usage, while accelerating the training and inference process of the model.

[0058] The second branch of the video denoising model can specifically be a low-resolution branch, which is used to process the downsampled video frame sequence. It can be understood that the resolution of each downsampled video frame in the downsampled video frame sequence is low resolution. Low resolution means that the resolution of the image does not reach a specific resolution threshold. The resolution threshold can be set according to demand. The size of each downsampled video frame in the low-resolution downsampled video frame sequence is reduced or the detail information is reduced. Processing the downsampled video frame sequence through the second branch of the video denoising model can effectively reduce the amount of calculation and improve the operating efficiency of the model. At the same time, it can also enhance the generalization ability of the model, making it more suitable for processing videos of different resolutions.

[0059] Image fusion features are feature representations obtained by fusing the features of at least two downsampled video frames in a downsampled video frame sequence. It is understandable that for video data with noise, it is often difficult to obtain a good denoising effect by using only one frame of image for denoising, because a single frame image may have too much noise and distortion and cannot provide enough information. By fusing the features of multiple downsampled video frames, the expressiveness of the features can be improved, thereby improving the denoising effect of the model. In addition, the feature representations obtained after feature extraction of each downsampled video frame in the downsampled video frame sequence may have information loss. Fusing the features of multiple downsampled video frames can improve the expressiveness of the features, thereby improving the denoising effect of the model.

[0060] Specifically, after obtaining the video frame sequence, the terminal downsamples each video frame in the video frame sequence to obtain a downsampled video frame sequence, and inputs the downsampled video frame sequence into the second branch of the video denoising model. Each downsampled video frame in the downsampled video frame sequence is processed by each sub-branch of the second branch to obtain image fusion features.

[0061] S208 : Generate a predicted video frame based on the image fusion feature and the image detail feature.

[0062] The predicted video frame refers to the video frame generated by denoising the input video in the video denoising model.

[0063] Specifically, after obtaining the image fusion feature and the image detail feature, the terminal fuses the image fusion feature and the image detail feature to obtain the global image feature, and generates a predicted video frame based on the global image feature.

[0064] S210 , adjusting parameters in a video denoising model according to a loss value of a reference video frame of a predicted video frame to obtain a target video denoising model.

[0065] Among them, the reference video frame is the video frame in the reference video corresponding to the target video frame, and the loss value is used to evaluate the degree of difference between the predicted video frame obtained by the video denoising model after denoising the input video and the corresponding video frame in the reference video. Generally, the smaller the loss value, the smaller the difference between the model's predicted result and the actual result, and the better the model's prediction accuracy and effect.

[0066] The target video denoising model is a trained machine learning model used to denoise the target video.

[0067] In one embodiment, after obtaining the predicted video frame, the terminal obtains a video frame corresponding to the target video frame from the reference video, which can also be called a reference video frame. The loss value is determined based on the predicted video frame and the corresponding reference video frame, and the parameters in the video denoising model are adjusted based on the determined loss value. The training is stopped until the convergence condition is met to obtain the target video denoising model.

[0068] Convergence means that the training process of the video denoising model has become stable, that is, the video denoising model has learned the characteristics of the data and no longer has significant improvement. The convergence conditions include a fixed number of training rounds, a fixed threshold of the loss function, etc. When the model reaches this condition, training is stopped to avoid overfitting.

[0069] Specifically, after obtaining the loss value, the terminal adjusts the values ​​of the weight parameters and bias parameters in the video denoising model based on the loss value to obtain the adjusted video denoising model, and re-executes step S202 until the training meets the convergence condition and stops training to obtain the target video denoising model.

[0070] In one embodiment, the terminal may determine based on the following formula:

[0071] Among them, L represents the loss value, I LQ represents the video frame sequence in the sample video, T represents the number of video frames in the video frame sequence, F(I LQ ) i Represents the predicted video frame corresponding to the i-th video frame (target video frame) in the video frame sequence, represents the i-th video frame in the reference video, that is, the reference video frame corresponding to the target video frame.

[0072] In the above embodiment, after the terminal obtains the target video frame in the video frame sequence of the sample video, the terminal extracts the image detail features of the target video frame through the first branch of the video denoising model. After obtaining the downsampled video frame sequence corresponding to the video frame sequence, the terminal extracts features of the downsampled video frame sequence through the second branch of the video denoising model to obtain image fusion features, and generates predicted video frames based on the image fusion features and image detail features. This not only fully considers the correlation and continuity of the video in the time dimension, but also can effectively reduce the amount of calculation and improve the operating efficiency of the model. Therefore, when computing resources are limited, the parameters in the video denoising model can be adjusted according to the loss value between the predicted video frame and the video frame corresponding to the target video frame in the reference video to obtain a target video denoising model with better denoising effect.

[0073] In one embodiment, the sample video includes a static video with real noise and a noisy dynamic video; the reference video includes a clear static video obtained by smoothing the static video and a non-noise dynamic video. By using the static video containing real noise and the noisy dynamic video obtained by smoothing the static video as sample videos, and using the clear static video and the non-noise dynamic video obtained by smoothing the static video as references, the noise situation in the real scene can be better simulated, and the denoising effect of the target video denoising model is further improved.

[0074] In one embodiment, the static video also carries added noise, and the processing method of the above-mentioned video denoising model further includes the following steps: capturing a video of a static object to obtain an original static video carrying real noise; performing noise addition processing on the original static video to obtain a static video; the static video carries added noise and real noise; and smoothing the original static video to obtain a clear static video.

[0075] Noise is artificially added to a video, and includes Gaussian noise, salt and pepper noise, and pseudo-random noise. Static objects are those that remain motionless. Smoothing is an image processing method whose primary purpose is to reduce image noise. In video processing, smoothing can be applied to every frame of a video. By smoothing each frame, the video can be smoother and more natural, while reducing noise. Smoothing typically needs to be applied to every frame, so for videos, smoothing can also be called temporal filtering.

[0076] Specifically, the terminal keeps the video acquisition device still and shoots a static object to obtain a static video. The static video is the original static video carrying real noise. On the one hand, a preset noise addition algorithm is used to add noise to the original static video to obtain a static video. The static video carries added noise and real noise. On the other hand, a preset smoothing algorithm is used to smooth the original static video to obtain a clear static video.

[0077] Among them, the smoothing processing algorithms include Gaussian blur, median filtering, mean filtering, etc. Gaussian blur can reduce image noise by performing weighted averaging of the pixels surrounding each pixel. Median filtering and mean filtering reduce image noise by calculating the median or average of the pixels surrounding each pixel.

[0078] It is understandable that the noise level of the clear static video is significantly lower than that of the original static video. Therefore, the clear static video can also be approximated as a noise-free video so that it can be used as a noise-free reference video during model training.

[0079] In one embodiment, the terminal uses a preset smoothing algorithm to smooth the original static video, and the process of obtaining a clear static video specifically includes the following steps: determining the frame difference between adjacent original static video frames in the original static video, determining the area where the frame difference reaches the frame difference threshold as the noise area in the corresponding original static video frame, and smoothing the noise area in each original static video frame to obtain a clear static video.

[0080] It should be noted that although the original static video with real noise is obtained by capturing a static object, the acquisition device may not be absolutely stable during video capture. There may be some very small jitters, and the flow of gas in the environment may cause slight movement of the static object, etc., resulting in the original static video being not absolutely static, but relatively static. For an absolutely static static video, if there is no noise between adjacent video frames, the frame difference between adjacent video frames should be 0.

[0081] Referring to Figure 3, (b) in Figure 3 shows three adjacent noisy video frames, (a) in Figure 3 is a schematic diagram of the frame difference between two adjacent noisy video frames, and after smoothing the three noisy video frames, a clear video frame as shown in (c) in Figure 3 is obtained, and (d) in Figure 3 is a schematic diagram of the frame difference between two adjacent clear video frames. It can be seen from Figure 3 that there is no obvious noise in the original static video from a single noisy video frame, but the frame difference between two adjacent noisy video frames is relatively large. The corresponding original static video will have obvious flicker noise when playing, and the flicker noise is inter-frame noise. After the original static video is time-domain smoothed, the frame difference between two adjacent clear video frames is significantly reduced, indicating that the inter-frame noise is greatly reduced.

[0082] In the above embodiment, the terminal obtains an original static video carrying real noise by capturing video of a static object, and performs noise processing on the original static video to obtain a static video. The static video carries added noise and real noise, and the original static video is smoothed to obtain a clear static video. Therefore, the static video containing real noise can be used as a sample video, and the clear static video can be used as a reference video to train the video denoising model, which can better simulate the noise situation in the real scene and improve the denoising effect of the target video denoising model.

[0083] In one embodiment, the terminal performs noise processing on the original static video, and the process of obtaining the static video specifically includes the following steps: obtaining partial pixels from each noisy video frame of the original static video; generating corresponding first pixel images based on the partial pixels of each noisy video frame; generating first initial noise images corresponding to each noisy video frame; fusing the first initial noise images with the first pixel images to obtain first noise images corresponding to each noisy video frame; and fusing each first noise image into the corresponding noisy video frame to obtain a static video.

[0084] Among them, some pixels refer to some pixel points in the noisy video frame, which can be randomly selected from the noisy video frame. The first pixel image is used to describe the distribution of some pixel points. Specifically, the grayscale value at the position corresponding to some pixel points in the first pixel image is 1, and 1 indicates that noise is added at the position corresponding to this pixel point. The grayscale value at other positions other than some pixel points is 0, and 0 indicates that no noise is added at the position corresponding to this pixel point.

[0085] Specifically, after obtaining the original static video, the terminal obtains each noisy video frame from the original static video, and for any noisy video frame, randomly selects some pixels from the noisy video frame, and generates a first pixel image with the same size as the noisy video frame based on the selected some pixels, wherein the grayscale values ​​at the corresponding positions of some pixels in the first pixel image can be 1, and the grayscale values ​​at other positions outside the some pixels can be 0, and a preset noise generation algorithm is used to generate a first initial noise image, and the first pixel image is dot-multiplied by the first initial noise image to obtain a first noise image, and the first noise image is fused into the noisy video frame to obtain the corresponding noisy static video frame. It can be understood that the above noise addition processing is performed on each noisy video frame in the original static video to obtain a noisy static video.

[0086] The preset noise generation algorithm may be a random distribution algorithm, such as a Gaussian distribution algorithm, and the Gaussian distribution algorithm is used to process the corresponding noisy video frame to obtain a first initial noise image.

[0087] In one embodiment, the terminal fuses the first noisy image into the corresponding noisy video frame. Specifically, image fusion can be achieved by pixel-by-pixel weighted averaging, which includes the following steps: obtaining a first weight corresponding to the first noisy image and a second weight corresponding to the noisy video frame; determining a weighted pixel value corresponding to each target pixel based on the first weight and the pixel value of each pixel in the first noisy image, and the second weight and the pixel value of each pixel in the noisy video frame; and generating a noisy static video frame based on the weighted pixel value of each target pixel. The target pixel refers to a pixel in the noisy static video frame.

[0088] Referring to Figure 4, the first row in Figure 4 shows a traditional noise addition method. Specifically, the noise addition method is to first randomly generate a noise image, and then directly fuse the noise image into the image to be noised (clean image) to obtain a corresponding noise image. It can be seen from the noise image that the noise is evenly added to the clean image. However, as shown in Figure 5, in a real image, the noise (the dots in the figure represent noise) is not evenly distributed at each pixel position; the noise addition method used in the embodiment of the present application is shown in the second or third row in Figure 4. First, some pixels are randomly selected from the image to be noised (clean image), and an image is generated based on the selected pixels. 4. The pixel image is fused with the corresponding noise image to obtain a noisy image after noisy addition, wherein the pixel image is a matrix composed only of 0 and 1 with the same length and width as the image to be noisy added, 0 indicates that no noise is added to this pixel position, and 1 indicates that noise is added to this pixel position. The images to be noisy (clean images) in the second and third rows of Figure 4 are the same, and the randomly generated noise images are also the same, but the pixel images generated respectively are different, and the noise coefficients used in the noise addition are also different, so that the noise images obtained are also different, wherein the noise coefficient can be specifically determined based on the weight corresponding to the noise image and the weight corresponding to the clean image.

[0089] In the above embodiment, the terminal obtains partial pixels from each noisy video frame of the original static video; generates corresponding first pixel images based on the partial pixels of each noisy video frame; generates first initial noise images corresponding to each noisy video frame; fuses the first initial noise images with the first pixel images to obtain first noise images corresponding to each noisy video frame; and fuses each first noise image into the corresponding noisy video frame to obtain a static video, so that the obtained static video can more accurately simulate the distribution of noise in the actual image, and also increase the diversity of noise. Using the static video to train the video denoising model can further improve the denoising effect of the video denoising model.

[0090] In one embodiment, the processing method of the video denoising model further includes the following steps: obtaining a non-noised dynamic video from a video database; and performing noise processing on the non-noised dynamic video to obtain a noisy dynamic video.

[0091] Among them, dynamic videos contain content that moves and changes, such as people walking, vehicles driving, etc. Such videos can show the movement and changes of dynamic objects from multiple angles. The video database can be a public video dataset, and the public video dataset can specifically be the clear video dataset REDS and DAVIS. The video database can also be a clear video library obtained by denoising the video obtained by self-video acquisition. It should be noted that clarity in the embodiments of the present application can be approximated as noise-free, that is, clear video refers to noise-free video.

[0092] Specifically, the terminal can directly obtain a clear dynamic video from the video database, which is a dynamic video without noise, and use a preset noise adding algorithm to perform noise adding processing on the obtained dynamic video to obtain a noisy dynamic video.

[0093] In the above embodiment, the terminal obtains unnoised dynamic video from the video database, performs noise processing on the unnoised dynamic video, and obtains noisy dynamic video. The noisy dynamic video can then be used as a sample video, and the unnoised dynamic video can be used as a reference video to train the video denoising model, which can better simulate the noise conditions in real scenes, thereby improving the denoising effect of the target video denoising model.

[0094] In one embodiment, the video frames in the unnoised dynamic video are clear video frames, and the terminal performs noise processing on the unnoised dynamic video to obtain a noisy dynamic video. The process includes the following steps: selecting a portion of pixels from each clear video frame; generating a corresponding second pixel image based on the portion of pixels of each clear video frame; generating a second initial noise image corresponding to each clear video frame; fusing each second initial noise image with the corresponding second pixel image to obtain a second noise image corresponding to each clear video frame; and fusing each second noise image into the corresponding clear video frame to obtain a noisy dynamic video.

[0095] Among them, some pixels refer to some pixel points in a clear video frame, which can be randomly selected from the clear video frame. The second pixel image is used to describe the distribution of some pixel points. Specifically, the grayscale value at the position corresponding to some pixel points in the second pixel image is 1, and 1 means that noise is added at the position corresponding to this pixel point. The grayscale value at other positions other than some pixel points is 0, and 0 means that no noise is added at the position corresponding to this pixel point.

[0096] Specifically, after obtaining the unnoised dynamic video, the terminal obtains each clear video frame from the unnoised dynamic video, and for any clear video frame, randomly selects some pixels from the clear video frame, and generates a second pixel image of the same size as the pre-clear video frame based on the selected some pixels, wherein the grayscale values ​​at the corresponding positions of some pixels in the second pixel image can be 1, and the grayscale values ​​at other positions outside the some pixels can be 0, and a preset noise generation algorithm is used to generate a second initial noise image, and the second pixel image is dot-multiplied by the second initial noise image to obtain a second noise image, and the second noise image is fused into the clear video frame to obtain the noisy dynamic video frame. It can be understood that the above noise addition processing is performed on each clear video frame in the unnoised dynamic video to obtain the noisy dynamic video.

[0097] The preset noise generation algorithm may be a random distribution algorithm, such as a Gaussian distribution algorithm, etc. For example, the Gaussian distribution algorithm is used to process the corresponding clear video frame to obtain a second initial noise image.

[0098] In one embodiment, the terminal fuses the second noisy image into the corresponding clear video frame. Specifically, image fusion can be achieved by pixel-by-pixel weighted averaging, which includes the following steps: obtaining a third weight corresponding to the second noisy image and a fourth weight corresponding to the clear video frame; determining a weighted pixel value corresponding to each target pixel based on the third weight and the pixel value of each pixel in the second noisy image, and the fourth weight and the pixel value of each pixel in the clear video frame; and generating a noisy dynamic video frame based on the weighted pixel value of each target pixel. The target pixel refers to a pixel in the noisy dynamic video frame.

[0099] In the above embodiment, the terminal selects part of the pixels from each clear video frame; generates a corresponding second pixel image according to the part of the pixels of each clear video frame; generates a second initial noise image corresponding to each clear video frame; fuses each second initial noise image with the corresponding second pixel image to obtain a second noise image corresponding to each clear video frame; and fuses each second noise image into the corresponding clear video frame to obtain a noisy dynamic video, so that the obtained noisy dynamic video can more accurately simulate the distribution of noise in the actual image, and also increase the diversity of noise. The use of the noisy dynamic video to train the video denoising model can further improve the denoising effect of the video denoising model.

[0100] In one embodiment, the second branch includes an optical flow network, a target frame sub-branch, and other frame sub-branches. As shown in FIG6 , the terminal extracts features from the downsampled video frame sequence through the second branch of the video denoising model. The process of obtaining image fusion features specifically includes the following steps:

[0101] S602 : Determine optical flow information between a downsampled target video frame and corresponding adjacent downsampled video frames in a downsampled video frame sequence through an optical flow network.

[0102] Among them, the optical flow network is a neural network model used to estimate optical flow information, which can be specifically the optical flow network SpyNet; optical flow information refers to the information about the changes in pixel positions between adjacent video frames. It can be understood that in a video, there may be movement of objects or cameras between adjacent video frames. These movements cause the pixel positions between adjacent frames to be different, and the optical flow information is the information used to describe the changes in pixel positions between adjacent frames.

[0103] In the embodiments of the present application, the optical flow information may include optical flow information between a downsampled target video frame and a corresponding adjacent downsampled video frame in a downsampled video frame sequence, or may include optical flow information between any two adjacent downsampled video frames in the downsampled video frame sequence. Optical flow information may also be referred to as an optical flow vector, which represents the pixel displacement between adjacent video frames and can be used for subsequent frame alignment and feature fusion.

[0104] A downsampled video frame sequence refers to a video frame sequence obtained after downsampling each video frame in a video frame sequence, and may specifically include a downsampled target video frame and downsampled continuous video frames, wherein the downsampled continuous video frames include at least one of a downsampled preceding video frame and a downsampled subsequent video frame. For example, the downsampled video frame sequence includes 5 downsampled video frames. If the downsampled target video frame is the 3rd frame in the downsampled video frame sequence, then the other downsampled video frames except the 3rd frame in the downsampled video frame sequence are downsampled continuous video frames, wherein the 1st and 2nd frames are the downsampled preceding video frames, and the 4th and 5th frames are the downsampled subsequent video frames; if the downsampled target video frame is the 1st frame in the downsampled video frame sequence, then the 2nd to 5th frames in the downsampled video frame sequence are the downsampled subsequent video frames of the downsampled target video frame; if the downsampled target video frame is the 5th frame in the downsampled video frame sequence, then the 1st to 4th frames in the downsampled video frame sequence are the downsampled preceding video frames of the downsampled target video frame.

[0105] Specifically, after obtaining the downsampled video frame sequence, the terminal inputs each downsampled video frame in the downsampled video frame sequence into the optical flow network, and determines the optical flow information between any two adjacent downsampled video frames in the downsampled video frame sequence through the optical flow network, thereby obtaining the optical flow information between the downsampled target video frame and the corresponding adjacent downsampled video frames.

[0106] In one embodiment, the adjacent downsampled video frames include at least one of a downsampled preceding video frame and a downsampled subsequent video frame; the optical flow information includes at least one of first optical flow information and second optical flow information; when the downsampled continuous video frames include the downsampled preceding video frame, the terminal determines the first optical flow information between the adjacent first downsampled video frames through the optical flow network; when the downsampled continuous video frames include the downsampled subsequent video frame, the terminal determines the second optical flow information between the adjacent second downsampled video frames through the optical flow network;

[0107] Among them, the first optical flow information is the information between adjacent first downsampled video frames, the second optical flow information is the information between the second downsampled video frames, the first downsampled video frame is the downsampled video frame between the downsampled target video frame and the downsampled preceding video frame, and the second downsampled video frame is the downsampled video frame between the downsampled target video frame and the downsampled subsequent video frame. For example, the downsampled video frame sequence contains 5 downsampled video frames. If the downsampled target video frame is the 3rd frame in the downsampled video frame sequence, then the 3rd frame in the downsampled video frame sequence is Frame 1 and frame 2 are down-sampled pre-order video frames, frame 4 and frame 5 are down-sampled post-order video frames, the first down-sampled video frame is the down-sampled video frame in the 1st, 2nd and 3rd frames in the sampling video frame sequence, the first optical flow information includes the optical flow information from the 1st frame to the 2nd frame, and the optical flow information from the 2nd frame to the 3rd frame, the second down-sampled video frame is the down-sampled video frame in the 3rd, 4th and 5th frames in the sampling video frame sequence, and the second optical flow information includes the optical flow information from the 5th frame to the 4th frame, and the optical flow information from the 4th frame to the 3rd frame.

[0108] Specifically, when the downsampled continuous video frames include downsampled preceding video frames, the terminal inputs each downsampled preceding video frame and the downsampled target video frame in the downsampled video frame sequence into the optical flow network, and determines the optical flow information between any two adjacent downsampled video frames in the downsampled preceding video frame and the downsampled target video frame through the optical flow network, that is, determines the optical flow information between adjacent first downsampled video frames, and determines the optical flow information as the first optical flow information between the downsampled target video frame and the corresponding adjacent downsampled video frame; when the downsampled continuous video frames include downsampled subsequent video frames, the terminal inputs each downsampled subsequent video frame and the downsampled target video frame in the downsampled video frame sequence into the optical flow network, and determines the optical flow information between any two adjacent downsampled video frames in the downsampled subsequent video frame and the downsampled target video frame through the optical flow network, that is, determines the optical flow information between adjacent second downsampled video frames, and determines the optical flow information as the second optical flow information between the downsampled target video frame and the corresponding adjacent downsampled video frame, so as to better understand the motion and changes in the video, thereby more accurately aligning the video frames and extracting features.

[0109] S604 , performing feature extraction on the downsampled video frame sequence through other frame sub-branches to obtain continuous video frame features corresponding to the downsampled target video frame.

[0110] Among them, the other frame sub-branches are used to perform feature extraction on the downsampled video frames other than the downsampled target video frames in the downsampled video frame sequence to obtain continuous video frame features corresponding to the downsampled target video frames. The other frame sub-branches include at least one of the preceding frame sub-branch and the succeeding frame sub-branch. The preceding frame sub-branch is used to perform feature extraction on the downsampled preceding video frames to obtain preceding video frame features, and the succeeding frame sub-branch is used to perform feature extraction on the downsampled succeeding video frames to obtain succeeding video frame features.

[0111] Specifically, after obtaining the downsampled video frame sequence, the terminal inputs the downsampled continuous video frames in the downsampled video frame sequence into other frame sub-branches, performs feature extraction on the input sampled continuous video frames through other frame sub-branches, and obtains continuous video frame features corresponding to the downsampled target video frames.

[0112] In one embodiment, adjacent downsampled video frames include at least one of downsampled preceding video frames and downsampled subsequent video frames; continuous video frame features include at least one of preceding video frame features and subsequent video frame features; when the downsampled continuous video frames include the downsampled preceding video frames, the terminal performs feature extraction on the downsampled preceding video frames through the forward network layer of the preceding frame sub-branch to obtain the preceding video frame features; when the downsampled continuous video frames include the downsampled subsequent video frames, the terminal performs feature extraction on the downsampled subsequent video frames through the backward network layer of the subsequent frame sub-branch to obtain the subsequent video frame features.

[0113] Among them, the forward network layer refers to the forward U-type network, and the backward network layer refers to the backward U-type network. The forward U-type network is a U-type network used to extract features from the downsampled preceding video frames, and the backward U-type network is a U-type network used to extract features from the downsampled subsequent video frames. The U-type network is a convolutional neural network structure used for image processing tasks. It consists of a downsampling module and an upsampling module, and usually there are some convolutional layers and pooling layers in the middle.

[0114] Specifically, when the downsampled continuous video frames include downsampled preceding video frames, the terminal inputs each downsampled preceding video frame in the downsampled video frame sequence into the preceding frame sub-branch, and extracts features of each downsampled preceding video frame through the forward network layer of the preceding frame sub-branch to obtain the features of the preceding video frame; when the downsampled continuous video frames include downsampled subsequent video frames, the terminal inputs each downsampled subsequent video frame in the downsampled video frame sequence into the subsequent frame sub-branch, and extracts features of each downsampled subsequent video frame through the backward network layer of the subsequent frame sub-branch to obtain the features of the subsequent video frame. In the video frame sequence, there is usually a correlation between the previous and next frames. By utilizing the information of the preceding and subsequent video frames, the spatiotemporal features in the video sequence can be better captured, thereby more accurately extracting the video frame features.

[0115] For example, the downsampled video frame sequence contains 5 downsampled video frames, and the downsampled target video frame is the 3rd frame in the downsampled video frame sequence. The preceding frame sub-branch 1 is used to perform feature extraction on the 1st downsampled video frame in the downsampled video frame sequence, the preceding frame sub-branch 2 is used to perform feature extraction on the 2nd downsampled video frame in the downsampled video frame sequence, the subsequent frame sub-branch 3 is used to perform feature extraction on the 4th downsampled video frame in the downsampled video frame sequence, and the subsequent frame sub-branch 4 is used to perform feature extraction on the 5th downsampled video frame in the downsampled video frame sequence.

[0116] S606 , aligning the continuous video frame features with the downsampled target video frame based on the optical flow information to obtain aligned video frame features.

[0117] Among them, alignment refers to matching the features of continuous video frames with the content of the downsampled target video frames. It can be understood that in a video frame sequence, there is a certain motion relationship between adjacent video frames. Through optical flow information, the downsampled target video frames can be aligned with the corresponding continuous video frame features. In this way, in subsequent processing, they can be regarded as video frames and video frame features at the same moment, thereby improving the accuracy of the model.

[0118] In one embodiment, adjacent downsampled video frames include at least one of a downsampled preceding video frame and a downsampled succeeding video frame; the optical flow information includes at least one of first optical flow information and second optical flow information; the continuous video frame features include at least one of the preceding video frame features and the succeeding video frame features; the aligned video frame features include at least one of the preceding aligned video frame features and the succeeding aligned video frame features; when the downsampled continuous video frames include the downsampled preceding video frames, the terminal aligns the preceding video frame features with the downsampled target video frames based on the first optical flow information to obtain the preceding aligned video frame features; when the downsampled continuous video frames include the downsampled succeeding video frames, the terminal aligns the succeeding video frame features with the downsampled target video frames based on the second optical flow information to obtain the succeeding aligned video frame features.

[0119] Specifically, when the downsampled continuous video frames include a downsampled preceding video frame, the terminal extracts a feature vector of a preset position from the preceding video frame features, determines the target position corresponding to the preset position in the downsampled target video frame based on the first optical flow information and the extracted feature vector, and aligns the preceding video frame features with the features of the downsampled target video frame based on the feature vector of the preset position and the corresponding target position in the downsampled target video frame using an interpolation method to obtain the pre-aligned video frame features; when the downsampled continuous video frames include a downsampled subsequent video frame, the terminal extracts a feature vector of a preset position from the subsequent video frame features, determines the target position corresponding to the preset position in the downsampled target video frame based on the second optical flow information and the extracted feature vector, and aligns the subsequent video frame features with the features of the downsampled target video frame based on the feature vector of the preset position and the corresponding target position in the downsampled target video frame using an interpolation method to obtain the post-aligned video frame features. The preset position can be a randomly selected position or a pre-specified position.

[0120] It can be understood that by aligning the features of the preceding video frame and the features of the succeeding video frame, more information can be obtained in the feature extraction of the downsampled target video frame, thereby improving the feature extraction effect of the target video frame, thereby contributing to better denoising. At the same time, by utilizing the optical flow information in the forward and backward directions, the feature extraction quality of the video frame can be further improved, so that the video denoising model can accurately estimate the noise in the aligned video frame features, thereby improving the denoising effect of the video denoising model.

[0121] S608: Process the aligned video frame features through the target sub-branch to obtain image fusion features.

[0122] The target sub-branch is used to perform feature processing on the downsampled target video frame in the downsampled video frame sequence to obtain image fusion features corresponding to the downsampled target video frame.

[0123] Specifically, after obtaining the aligned video frame features corresponding to the downsampled target video frame, the terminal inputs the aligned video frame features into the target sub-branch, performs feature processing on the aligned video frame features through the target sub-branch, and obtains image fusion features.

[0124] In one embodiment, when the downsampled continuous video frames include downsampled previous video frames, the terminal processes the features of the previous aligned video frames through the forward network layer of the target sub-branch to obtain the previous image fusion features; when the downsampled continuous video frames include downsampled subsequent video frames, the terminal processes the features of the subsequent aligned video frames through the backward network layer of the target sub-branch to obtain the subsequent image fusion features; and determines the image fusion features based on at least one of the previous image fusion features and the subsequent image fusion features.

[0125] Among them, the forward network layer refers to the forward U-type network, the backward network layer refers to the backward U-type network, the forward U-type network of the target sub-branch is a U-type network for feature processing of the video frame features after the pre-order alignment, and the backward U-type network of the target sub-branch is a U-type network for feature processing of the video frames after the post-order alignment. The U-type network is a convolutional neural network structure for image processing tasks, which consists of a downsampling module and an upsampling module, and usually there are some convolution layers and pooling layers in the middle.

[0126] Specifically, when the downsampled continuous video frames include the downsampled preceding video frames, the terminal inputs the features of the preceding aligned video frames into the forward network layer of the target sub-branch, and performs feature processing on the features of the preceding aligned video frames through the forward network layer of the target sub-branch to obtain the preceding image fusion features; when the downsampled continuous video frames include the downsampled subsequent video frames, the terminal inputs the features of the subsequent aligned video frames into the forward network layer of the target sub-branch, and performs feature processing on the features of the subsequent aligned video frames through the forward network layer of the target sub-branch to obtain the subsequent image fusion features; when the downsampled continuous video frames only include the downsampled preceding video frames, the preceding image fusion features are directly determined as the image fusion features; when the downsampled continuous video frames only include the downsampled subsequent video frames, the subsequent image fusion features are directly determined as the image fusion features; when the downsampled continuous video frames include the downsampled preceding video frames and the downsampled subsequent video frames, the image fusion features are determined based on the preceding image fusion features and the subsequent image fusion features.

[0127] In the above embodiment, the terminal determines the optical flow information between the downsampled target video frame and the corresponding adjacent downsampled video frame in the downsampled video frame sequence through the optical flow network of the second branch, and performs feature processing on the downsampled video frame sequence through other frame sub-branches of the second branch to obtain continuous video frame features corresponding to the downsampled target video frame, so that the continuous frame information and optical flow information in the video sequence can be used to better understand the movement and changes in the video, thereby obtaining accurate video feature representation. At the same time, by processing the aligned video frame features through the target sub-branch of the second branch, more accurate image fusion features can be obtained, and then based on the image fusion features, subsequent image reconstruction can be made more accurate, thereby improving the denoising effect of the target video denoising model.

[0128] In one embodiment, when downsampling continuous video frames includes downsampling preceding video frames and downsampling succeeding video frames, the process of the terminal determining the image fusion features based on the preceding image fusion features and the succeeding image fusion features specifically includes the following steps: splicing the preceding image fusion features and the succeeding image fusion features to obtain spliced ​​image features, and performing convolution processing on the spliced ​​image features to obtain image fusion features.

[0129] Specifically, after obtaining the preceding image fusion features and the succeeding image fusion features, the terminal splices the preceding image fusion features and the succeeding image fusion features to obtain spliced ​​image features, and inputs the spliced ​​image features into the convolution layer of the target sub-branch. The spliced ​​image features are convolved through the convolution layer to obtain more advanced feature information, which is the image fusion feature.

[0130] In the above embodiment, the terminal can effectively fuse the information of the previous and subsequent video frames by splicing the previous image fusion features and the subsequent image fusion features, and make full use of the correlation between consecutive frames in the previous and subsequent video frames, so as to obtain accurate video feature representation. At the same time, convolution processing is performed on the spliced ​​image features to further extract and enhance the features, so as to obtain more accurate image fusion features, and then based on the image fusion features, subsequent image reconstruction can be made more accurate, thereby improving the denoising effect of the target video denoising model.

[0131] In one embodiment, the process of the terminal generating a predicted video frame based on image fusion features and image detail features specifically includes the following steps: fusing the image fusion features with the image detail features to obtain global image features; reconstructing the image based on the global image features to obtain a predicted video frame.

[0132] Specifically, after obtaining the image fusion feature and the image detail feature, the terminal obtains the first fusion coefficient corresponding to the image fusion feature and the second fusion coefficient corresponding to the image detail feature, and fuses the image fusion feature and the image detail feature based on the first fusion coefficient and the second fusion coefficient to obtain the global image feature, and performs a deconvolution operation on the global image feature to obtain a predicted video frame of the same size as the target video frame.

[0133] Among them, the deconvolution operation is used to gradually enlarge the global image features to the original size to obtain a predicted video frame of the same size as the target video frame.

[0134] In the above embodiment, the terminal obtains global image features by fusing image fusion features with image detail features. It can comprehensively utilize the information of both image fusion features and image detail features to more comprehensively describe the image content of the target video frame, thereby reconstructing the image based on the global image features to obtain a predicted video frame, and can also have a better denoising effect, thereby improving the denoising effect of the target video denoising model.

[0135] In one embodiment, the terminal fuses the image fusion feature with the image detail feature to obtain the global image feature, and the process specifically includes the following steps: upsampling the image fusion feature to obtain the upsampled image fusion feature; fusing the upsampled image fusion feature with the image detail feature to obtain the global image feature.

[0136] Specifically, after obtaining the image fusion feature, the terminal performs a deconvolution operation on the image fusion feature to obtain an upsampled image fusion feature, obtains a first fusion coefficient corresponding to the upsampled image fusion feature and a second fusion coefficient corresponding to the image detail feature, and fuses the upsampled image fusion feature with the image detail feature based on the first fusion coefficient and the second fusion coefficient to obtain a global image feature. Specifically, the upsampled image fusion feature and the image detail feature can be weightedly fused based on the first fusion coefficient and the second fusion coefficient.

[0137] In the above embodiment, the terminal upsamples the image fusion features to obtain upsampled image fusion features with the same resolution as the target video frame, and fuses the upsampled image fusion features with the image detail features to obtain global image features. The terminal can fully utilize the respective advantages of the two features, further improve the expression ability of the global image features, and thus improve the denoising effect of the target video denoising model.

[0138] In one embodiment, after obtaining the target video denoising model, the terminal may further use the target video denoising model to perform denoising on the denoised video. As shown in FIG7 , the process specifically includes the following steps:

[0139] S702: Determine a current video frame to be denoised in a sequence of video frames to be denoised of the video to be denoised.

[0140] Specifically, the terminal obtains the video to be denoised, extracts a sequence of video frames to be denoised from the video to be denoised, and determines the current video frame to be denoised from the sequence of video frames to be denoised. For example, if the sequence of video frames to be denoised extracted by the terminal from the video to be denoised includes 10 video frames, and the current video frame to be denoised is the second frame, the second frame is obtained from the sequence of video frames to be denoised.

[0141] S704 , extracting image detail features of the to-be-denoised video frame through the first branch of the target video denoising model.

[0142] The target video denoising model refers to a trained video denoising model obtained by training the video denoising model. The first branch of the target video denoising model may be a high-resolution branch, which is used to process the current video frame to be denoised at the original resolution.

[0143] Specifically, after obtaining the current video frame to be denoised of the video to be denoised, the terminal inputs the current video frame to be denoised into the first branch of the target video denoising model, processes the current video frame to be denoised through each network layer of the first branch, and obtains the image detail features to be denoised of the video frame to be denoised.

[0144] S706 , downsampling the video frame sequence to be denoised to obtain a downsampled video frame sequence to be denoised, and extracting features from the downsampled video frame sequence to be denoised using the second branch of the target video denoising model to obtain fusion features of the image to be denoised.

[0145] Among them, the downsampled video frame sequence to be denoised refers to the video frame sequence obtained by downsampling the video sequence to be denoised. In image processing, downsampling refers to reducing the resolution of the image, thereby reducing the size of the image and reducing the detail information in the image. It is usually used to reduce the amount of calculation and memory usage, while accelerating the prediction process of the model.

[0146] The second branch of the target video denoising model can specifically be a low-resolution branch, which is used to process the downsampled video frame sequence to be denoised. It can be understood that the resolution of each downsampled video frame to be denoised in the downsampled video frame sequence to be denoised is low resolution, and the size of each downsampled video frame to be denoised in the low-resolution downsampled video frame sequence to be denoised is reduced or the detail information is reduced. By processing the downsampled video frame sequence to be denoised through the second branch of the target video denoising model, the amount of calculation can be effectively reduced, the operating efficiency of the model can be improved, and the generalization ability of the model can be enhanced, making it more suitable for processing videos of different resolutions.

[0147] The fused features of the image to be denoised refer to the feature representation obtained by fusing the features of at least two downsampled video frames to be denoised in a downsampled video frame sequence. It is understandable that for video data with noise, it is often difficult to obtain a good denoising effect by using only one frame of image for denoising, because a single frame image may have too much noise and distortion and cannot provide enough information. By fusing the features of multiple downsampled video frames to be denoised, the expressive ability of the features can be improved, thereby improving the denoising effect of the target video denoising model. In addition, the feature representation obtained after feature extraction of each downsampled video frame to be denoised in the downsampled video frame sequence may have information loss. Fusion of the features of multiple downsampled video frames to be denoised can improve the expressive ability of the features, thereby improving the denoising effect of the target video denoising model.

[0148] Specifically, after obtaining the video frame sequence to be denoised, the terminal downsamples each of the video frames to be denoised in the video frame sequence to be denoised to obtain a downsampled video frame sequence to be denoised, and inputs the downsampled video frame sequence to be denoised into the second branch of the target video denoising model. Through each sub-branch of the second branch, each downsampled video frame to be denoised in the downsampled video frame sequence to be denoised is processed respectively to obtain the image fusion features to be denoised.

[0149] In one embodiment, the second branch includes an optical flow network, a target frame sub-branch and other frame sub-branches, and S706 specifically includes the following steps: determining the optical flow information between the current downsampled video frame to be denoised and the corresponding adjacent downsampled video frame to be denoised in the downsampled video frame sequence to be denoised through the optical flow network; performing feature extraction on the downsampled video frame sequence to be denoised through other frame sub-branches to obtain features of the continuous video frames to be denoised corresponding to the current downsampled video frame to be denoised; aligning the features of the continuous video frames to be denoised with the current downsampled video frame to be denoised based on the optical flow information to obtain features of the aligned video frames to be denoised; processing the features of the aligned video frames to be denoised through the target sub-branch to obtain fusion features of the image to be denoised.

[0150] In one embodiment, the downsampled video frame sequence to be denoised includes the current downsampled video frame to be denoised and the downsampled continuous video frame to be denoised, the downsampled continuous video frame to be denoised includes at least one of the downsampled preceding video frame to be denoised and the downsampled subsequent video frame to be denoised, the other frame sub-branches include at least one of the preceding frame sub-branches and the subsequent frame sub-branches, the features of the continuous video frames to be denoised include at least one of the features of the preceding video frame to be denoised and the features of the subsequent video frame to be denoised, and the features of the aligned video frame to be denoised include the features of the aligned preceding video frame to be denoised and the features of the aligned subsequent video frame to be denoised. The terminal determines, through the optical flow network, the optical flow information between the current downsampled video frame to be denoised and the corresponding adjacent downsampled video frames in the downsampled video frame sequence to be denoised, and the process specifically includes the following steps: determining, through the optical flow network, the third optical flow information between the current downsampled video frame to be denoised and the adjacent downsampled video frames in the downsampled previous video frames to be denoised; and determining, through the optical flow network, the fourth optical flow information between the current downsampled video frame to be denoised and the adjacent downsampled video frames in the downsampled subsequent video frames to be denoised.

[0151] In one embodiment, the terminal performs feature extraction on the downsampled video frame sequence to be denoised through other frame sub-branches to obtain the features of the continuous video frame to be denoised corresponding to the current downsampled video frame to be denoised. The process includes the following steps: performing feature extraction on the downsampled preceding video frame to be denoised through the forward network layer of the preceding frame sub-branch to obtain the features of the preceding video frame to be denoised; performing feature extraction on the downsampled subsequent video frame to be denoised through the backward network layer of the subsequent frame sub-branch to obtain the features of the subsequent video frame to be denoised.

[0152] In one embodiment, the terminal aligns the features of the continuous video frames to be denoised with the current downsampled video frame to be denoised based on the optical flow information to obtain the features of the aligned video frames to be denoised, and the process includes the following steps: aligning the features of the preceding video frames to be denoised with the current downsampled video frame to be denoised based on the third optical flow information to obtain the features of the preceding aligned video frames to be denoised; aligning the features of the subsequent video frames to be denoised with the current downsampled video frame to be denoised based on the fourth optical flow information to obtain the features of the subsequent aligned video frames to be denoised;

[0153] In one embodiment, the terminal processes the features of the video frame after denoising and alignment through the target sub-branch to obtain the image fusion features, which includes the following steps: processing the features of the pre-order aligned video frame to be denoised through the forward network layer of the target sub-branch to obtain the fusion features of the pre-order image to be denoised; processing the features of the post-order aligned video frame to be denoised through the backward network layer of the target sub-branch to obtain the fusion features of the post-order image to be denoised; and determining the fusion features of the image to be denoised based on at least one of the fusion features of the pre-order image to be denoised and the fusion features of the post-order image to be denoised.

[0154] In one embodiment, the terminal determines the fusion feature of the image to be denoised based on at least one of the fusion feature of the preceding image to be denoised and the fusion feature of the subsequent image to be denoised, which specifically includes the following steps: when the downsampled continuous video frames to be denoised only include the downsampled preceding video frames to be denoised, directly determining the fusion feature of the preceding image to be denoised as the fusion feature of the image to be denoised; when the downsampled continuous video frames to be denoised only include the downsampled subsequent video frames to be denoised, directly determining the fusion feature of the subsequent image to be denoised as the fusion feature of the image to be denoised; when the downsampled continuous video frames to be denoised include the downsampled preceding video frames to be denoised and the downsampled subsequent video frames to be denoised, splicing the fusion feature of the preceding image to be denoised and the fusion feature of the subsequent image to be denoised to obtain the feature of the spliced ​​image to be denoised; and performing convolution processing on the feature of the spliced ​​image to be denoised to obtain the fusion feature of the image to be denoised.

[0155] S708 : Generate a denoised video frame corresponding to the video frame to be denoised based on the detail features of the image to be denoised and the fusion features of the image to be denoised.

[0156] Specifically, after obtaining the fusion features of the image to be denoised and the detail features of the image to be denoised, the terminal fuses the fusion features of the image to be denoised and the detail features of the image to be denoised to obtain the global image features to be denoised, and generates a predicted video frame based on the global image features to be denoised.

[0157] In the above embodiment, the terminal determines the current video frame to be denoised in the video frame sequence to be denoised of the video to be denoised; extracts the image detail features to be denoised of the video frame to be denoised through the first branch of the target video denoising model; after obtaining the downsampled video frame sequence to be denoised corresponding to the video frame sequence to be denoised, the second branch of the target video denoising model performs feature extraction on the downsampled video frame sequence to be denoised to obtain the image fusion features to be denoised; based on the image detail features to be denoised and the image fusion features to be denoised, a denoised video frame corresponding to the video frame to be denoised is generated, which fully considers the correlation and continuity of the video in the time dimension, and can effectively reduce the amount of calculation and improve the operation efficiency of the model. Therefore, even when computing resources are limited, the features of the video frame to be denoised can be better extracted, thereby improving the denoising effect of the target video denoising model.

[0158] In one embodiment, as shown in FIG8 , a method for processing a video denoising model is provided. The method is described by taking the computer device in FIG1 as an example, and includes the following steps:

[0159] S802, capturing a video of a static object to obtain an original static video with real noise; performing noise addition processing on the original static video to obtain a static video; the static video carries the added noise and the real noise; and performing smoothing processing on the original static video to obtain a clear static video.

[0160] S804, obtaining a non-noised dynamic video from a video database; performing noise processing on the non-noised dynamic video to obtain a noisy dynamic video.

[0161] S806 , determining the static video with added noise and real noise, and the noisy dynamic video as sample videos, and determining the clear static video and the non-noised dynamic video as reference videos.

[0162] S808 , obtaining a target video frame from a video frame sequence of the sample video.

[0163] S810: Extract image detail features of the target video frame through the first branch of the video denoising model.

[0164] S812, downsampling the video frame sequence to obtain a downsampled video frame sequence, and determining optical flow information between a downsampled target video frame and a corresponding adjacent downsampled video frame in the downsampled video frame sequence through the optical flow network of the second branch of the video denoising model.

[0165] S814 , performing feature extraction on the downsampled video frame sequence through other frame sub-branches of the second branch to obtain continuous video frame features corresponding to the downsampled target video frame.

[0166] S816: Align the continuous video frame features with the downsampled target video frame based on the optical flow information to obtain aligned video frame features.

[0167] S818: Process the aligned video frame features through the target sub-branch of the second branch to obtain image fusion features.

[0168] S820: Perform upsampling processing on the image fusion feature to obtain an upsampled image fusion feature.

[0169] S822: Fuse the upsampled image fusion features with the image detail features to obtain global image features.

[0170] S824: Reconstruct the image based on the global image features to obtain a predicted video frame.

[0171] S826 , adjusting parameters in the video denoising model according to the loss value between the predicted video frame and the reference video frame to obtain a target video denoising model.

[0172] The reference video frame is a video frame in the reference video corresponding to the target video frame; the target video denoising model is used to denoise the denoised video, and the reference video includes a clear static video obtained by smoothing the static video and a dynamic video without noise.

[0173] The present application also provides an application scenario, which applies the processing method of the above-mentioned video denoising model, and the method includes the following steps:

[0174] 1. Training data preparation

[0175] Referring to the training data diagram shown in Figure 9, the training data comes from two parts. One part is an artificially collected still video with real noise, and the other part is a public clear video set. The video with real noise and the clear video are artificially denoised to obtain a low-quality noisy video (LQ). The video with real noise is time-domain smoothed, and the clear video is copied to obtain a high-quality clear video (GT). The low-quality noisy video (LQ) is used as a sample video, and the corresponding high-quality clear video (GT) is used as a reference video to construct a paired data set, and the constructed paired data set is used to train the video denoising model.

[0176] 2. Model training

[0177] Specifically, the network structure of the video denoising model is shown in Figure 10. The video denoising model includes a high-resolution branch and a low-resolution branch. The low-resolution branch includes an optical flow network and multiple sub-branches. Each sub-branch includes a forward U-type network and a backward U-type network. The terminal obtains the target video frame in the video frame sequence of the sample video, and extracts the image detail features of the target video frame through the high-resolution branch of the video denoising model. After downsampling the video frame sequence to obtain a downsampled video frame sequence, the downsampled video frame sequence is input into the low-resolution branch. The optical flow network of the second branch of the video denoising model is used to determine the optical flow information between adjacent downsampled video frames in the downsampled video frame sequence. The downsampled video frames corresponding to the target sub-branch in the low-resolution branch and the optical flow information are processed respectively. video frame, thereby obtaining continuous video frame features corresponding to the downsampled target video frame, and based on the downsampled target video frame and the optical flow information between it and the adjacent downsampled video frame, aligning the continuous video frame features with the downsampled target video frame to obtain aligned video frame features, processing the aligned video frame features through the target sub-branch of the resolution branch to obtain image fusion features, upsampling the image fusion features to obtain upsampled image fusion features, fusing the upsampled image fusion features with the image detail features to obtain global image features, reconstructing the image based on the global image features to obtain a predicted video frame, determining a loss value according to the predicted video frame and the video frame corresponding to the target video frame in the reference video, adjusting the parameters in the video denoising model based on the loss value to obtain a target video denoising model.

[0178] An example is given to illustrate the process of extracting features from a downsampled video frame sequence through the low-resolution branch of the video denoising model to obtain image fusion features. The video frame sequence contains 10 video frames and the target video frame is the i-th frame. After downsampling the 10 video frames of the video frame sequence to obtain 10 downsampled video frames, the 10 downsampled video frames are input into the low-resolution branch of the video denoising model. Each downsampled video frame corresponds to a sub-branch in the low-resolution branch. Taking the i+1th frame to the i-th frame and the i-1th frame to the i-th frame as examples, the pre-trained optical flow network SpyNet is first used to determine the first optical flow information from the i+1th frame to the i-th frame, and the second optical flow information from the i-1th frame to the i-th frame. The i+1th frame is feature extracted through the backward U-shaped network layer of the sub-branch corresponding to the i+1th frame. To the subsequent video frame features, the forward U-shaped network layer of the sub-branch corresponding to the i-1 frame is used to extract features of the i-1 frame to obtain the previous video frame features, and based on the first optical flow information and the second optical flow information, the previous video frame features and the subsequent video frame features are aligned with the i-th frame respectively to obtain the previous aligned video frame features and the subsequent aligned video frame features, the forward U-shaped network layer of the sub-branch corresponding to the i-th frame is used to feature process the previous aligned video frame features to obtain the previous image fusion features, the backward U-shaped network layer of the sub-branch corresponding to the i-th frame is used to feature process the subsequent aligned video frame features to obtain the subsequent image fusion features, the previous image fusion features and the subsequent image fusion features are spliced ​​to obtain the spliced ​​image features, and the spliced ​​image features are convolved by the convolution layer of the sub-branch corresponding to the i-th frame to obtain the image fusion features. Among them, the preceding video frame features corresponding to the i-1th frame can be specifically determined based on the image of the i-1th frame and the video frame features of the i-2th frame, and the subsequent video frame features corresponding to the i+1th frame can be specifically determined based on the image of the i+1th frame and the video frame features of the i+2th frame.

[0179] Referring to Figures 11 and 12, Figure 11 is a video frame to be denoised of the video to be denoised, which contains a lot of noise. Figure 12 is a clear video frame obtained after denoising the video frame to be denoised using the target video denoising model trained using the solution of the present application.

[0180] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0181] Based on the same inventive concept, the embodiments of the present application also provide a video denoising model processing device for implementing the video denoising model processing method involved above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of the one or more video denoising model processing device embodiments provided below can be found in the limitations of the video denoising model processing method above, and will not be repeated here.

[0182] In one embodiment, as shown in FIG13 , a processing device for a video denoising model is provided, comprising: a video frame acquisition module 1302 , a detail feature extraction module 1304 , a fusion feature extraction module 1306 , a prediction module 1308 , and a parameter adjustment module 1310 , wherein:

[0183] The video frame acquisition module 1302 is used to acquire a target video frame from a video frame sequence of a sample video;

[0184] A detail feature extraction module 1304 is configured to extract image detail features of a target video frame using a first branch of a video denoising model;

[0185] A fusion feature extraction module 1306 is configured to downsample the video frame sequence to obtain a downsampled video frame sequence, and extract features from the downsampled video frame sequence using the second branch of the video denoising model to obtain an image fusion feature.

[0186] A prediction module 1308, configured to generate a predicted video frame based on the image fusion features and the image detail features;

[0187] The parameter adjustment module 1310 is used to adjust the parameters in the video denoising model according to the loss value between the predicted video frame and the reference video frame to obtain a target video denoising model; the reference video frame is a video frame in the reference video corresponding to the target video frame; the target video denoising model is used to denoise the video to be denoised.

[0188] In the above embodiment, after obtaining a target video frame from a video frame sequence of a sample video, the first branch of the video denoising model extracts image detail features of the target video frame. After obtaining a downsampled video frame sequence corresponding to the video frame sequence, the second branch of the video denoising model performs feature extraction on the downsampled video frame sequence to obtain image fusion features. A predicted video frame is generated based on the image fusion features and the image detail features. This fully considers the correlation and continuity of the video in the temporal dimension, effectively reduces the amount of computation, and improves the operating efficiency of the model. Therefore, even when computing resources are limited, the parameters in the video denoising model can be adjusted based on the loss value between the predicted video frame and the video frame corresponding to the target video frame in the reference video to obtain a target video denoising model with better denoising effect. In addition, the sample videos include static videos with real noise and noisy dynamic videos. By using the static videos with real noise and the noisy dynamic videos as sample videos, and using the clear static videos and unnoised dynamic videos obtained by smoothing the static videos as references, the noise conditions in real scenes can be better simulated, further improving the denoising effect of the target video denoising model.

[0189] In one embodiment, the sample video includes a static video with real noise and a noisy dynamic video; the reference video includes a clear static video obtained by smoothing the static video and a non-noised dynamic video.

[0190] In one embodiment, as shown in FIG14 , the apparatus further includes a sample video acquisition module 1312 and a reference video acquisition module 1314, wherein: the sample video acquisition module 1312 is used to perform video capture of a static object to obtain an original static video carrying real noise; the original static video is subjected to noise addition processing to obtain a static video; the static video carries added noise and real noise; and the reference video acquisition module 1314 is used to perform smoothing processing on the original static video to obtain a clear static video.

[0191] In one embodiment, the sample video acquisition module 1312 is further used to obtain partial pixels from each noisy video frame of the original static video; generate corresponding first pixel images based on the partial pixels of each noisy video frame; generate first initial noise images corresponding to each noisy video frame; fuse the first initial noise images with the first pixel images to obtain first noise images corresponding to each noisy video frame; and fuse each first noise image into the corresponding noisy video frame to obtain a static video.

[0192] In one embodiment, the reference video acquisition module 1314 is further configured to acquire a non-noised dynamic video from a video database; and the sample video acquisition module 1312 is further configured to perform noise processing on the non-noised dynamic video to obtain a noisy dynamic video.

[0193] In one embodiment, the video frames in the unnoised dynamic video are clear video frames; the sample video acquisition module 1312 is further used to select a portion of pixels from each clear video frame; generate a corresponding second pixel image based on the portion of pixels of each clear video frame; generate a second initial noise image corresponding to each clear video frame; fuse each second initial noise image with the corresponding second pixel image to obtain a second noise image corresponding to each clear video frame; and fuse each second noise image into the corresponding clear video frame to obtain a noisy dynamic video.

[0194] In one embodiment, the second branch includes an optical flow network, a target frame sub-branch and other frame sub-branches; the fusion feature extraction module 1306 is also used to: determine the optical flow information between the downsampled target video frame and the corresponding adjacent downsampled video frame in the downsampled video frame sequence through the optical flow network; perform feature extraction on the downsampled video frame sequence through other frame sub-branches to obtain continuous video frame features corresponding to the downsampled target video frame; align the continuous video frame features with the downsampled target video frame based on the optical flow information to obtain aligned video frame features; process the aligned video frame features through the target sub-branch to obtain image fusion features.

[0195] In one embodiment, adjacent downsampled video frames include downsampled preceding video frames and downsampled subsequent video frames, and the fusion feature extraction module 1306, the optical flow information includes first optical flow information and second optical flow information; the continuous video frame features include preceding video frame features and subsequent video frame features; the aligned video frame features include preceding aligned video frame features and subsequent aligned video frame features; and is also used to: determine the first optical flow information between adjacent first downsampled video frames through an optical flow network; determine the second optical flow information between adjacent second downsampled video frames through an optical flow network; the first downsampled video frame is the downsampled video frame between the downsampled target video frame and the downsampled preceding video frame; the second downsampled video frame is the downsampled video frame between the downsampled target video frame and the downsampled subsequent video frame; downsampled video frames are obtained by the forward network layer of the preceding frame sub-branch. Feature extraction is performed on the previous video frame to obtain the feature of the previous video frame; feature extraction is performed on the downsampled subsequent video frame through the backward network layer of the subsequent frame sub-branch to obtain the feature of the subsequent video frame; the previous frame sub-branch and the subsequent frame sub-branch belong to other frame sub-branches; based on the first optical flow information in the optical flow information, the feature of the previous video frame is aligned with the downsampled target video frame to obtain the feature of the pre-aligned video frame; based on the second optical flow information in the optical flow information, the feature of the subsequent video frame is aligned with the downsampled target video frame to obtain the feature of the subsequent aligned video frame; the feature of the pre-aligned video frame is processed by the forward network layer of the target sub-branch to obtain the pre-image fusion feature; the feature of the subsequent aligned video frame is processed by the backward network layer of the target sub-branch to obtain the subsequent image fusion feature; based on the pre-image fusion feature and the post-image fusion feature, the image fusion feature is determined.

[0196] In one embodiment, the fusion feature extraction module 1306 is configured to: concatenate the fusion features of the preceding image and the fusion features of the succeeding image to obtain concatenated image features; and perform convolution processing on the concatenated image features to obtain image fusion features.

[0197] In one embodiment, the prediction module 1308 is further configured to: fuse the image fusion features with the image detail features to obtain global image features; and reconstruct the image based on the global image features to obtain a predicted video frame.

[0198] In one embodiment, the prediction module is further configured to: perform upsampling processing on the image fusion feature to obtain an upsampled image fusion feature; and fuse the upsampled image fusion feature with the image detail feature to obtain a global image feature.

[0199] In one embodiment, the video frame acquisition module 1302 is further used to determine the current video frame to be denoised in the video frame sequence to be denoised of the video to be denoised; the detail feature extraction module is further used to extract the detail features of the image to be denoised of the video frame to be denoised through the first branch of the target video denoising model; the fusion feature extraction module 1306 is further used to, after obtaining the downsampled video frame sequence to be denoised corresponding to the video frame sequence to be denoised, perform feature extraction on the downsampled video frame sequence to be denoised through the second branch of the target video denoising model to obtain the fusion features of the image to be denoised; the prediction module is further used to generate a denoised video frame corresponding to the video frame to be denoised based on the detail features of the image to be denoised and the fusion features of the image to be denoised.

[0200] Each module in the processing device of the video denoising model described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0201] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in Figure 15. The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer device is used to store video data. The I / O interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via a network connection. When the computer-readable instructions are executed by the processor, a method for processing a video denoising model is implemented.

[0202] In one embodiment, a computer device is provided, which may be a terminal. Its internal structure diagram may be as shown in Figure 16. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless communication, where the wireless communication may be achieved via Wi-Fi, a mobile cellular network, NFC (near-field communication), or other technologies. When executed by the processor, the computer-readable instructions implement a method for processing a video denoising model. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0203] Those skilled in the art will understand that the structure shown in Figure 15 or Figure 16 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0204] In one embodiment, a computer device is further provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps in the above-mentioned method embodiments when executing the computer-readable instructions.

[0205] In one embodiment, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0206] In one embodiment, a computer program product is provided, comprising computer-readable instructions, which implement the steps in the above-mentioned method embodiments when executed by a processor.

[0207] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application 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 the relevant laws, regulations and standards of relevant countries and regions.

[0208] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0209] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0210] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for processing a video denoising model, executed by a computer device, the method comprising: Acquire a target video frame in a video frame sequence of a sample video, and acquire a reference video corresponding to the sample video; Extracting image detail features of the target video frame through a first branch of a video denoising model; Downsampling the video frame sequence to obtain a downsampled video frame sequence, and extracting features from the downsampled video frame sequence through the second branch of the video denoising model to obtain image fusion features; Generate a predicted video frame based on the image fusion feature and the image detail feature; According to the loss value between the predicted video frame and the reference video frame, the parameters in the video denoising model are adjusted to obtain a target video denoising model; the reference video frame is a video frame in the reference video corresponding to the target video frame; the target video denoising model is used to denoise the video to be denoised.

2. According to the method of claim 1, the sample video includes a static video carrying real noise and a noisy dynamic video; the reference video includes a clear static video obtained by smoothing the static video and the dynamic video without noise.

3. The method according to claim 2, wherein the static video also carries noise; the method further comprising: Capture video of static objects to obtain original static videos with real noise; Performing noise processing on the original static video to obtain the static video; The static video carries the added noise and the real noise; The original static video is smoothed to obtain the clear static video.

4. The method according to claim 3, wherein the step of performing noise processing on the original static video to obtain the static video comprises: Acquire a portion of pixels from each noisy video frame of the original static video; Generate corresponding first pixel images respectively according to partial pixels of each noisy video frame; Generating a first initial noise image corresponding to each of the noisy video frames; Fusing the first initial noise image with the first pixel image respectively to obtain a first noise image corresponding to each of the noisy video frames; Each of the first noise images is fused into the corresponding noisy video frame to obtain the static video.

5. The method according to claim 1, further comprising: Obtaining non-noised dynamic videos from a video database; The non-noised dynamic video is subjected to noise adding processing to obtain a noisy dynamic video.

6. According to the method of claim 5, the video frame in the non-noised dynamic video is a clear video frame; The step of performing noise processing on the non-noised dynamic video to obtain the noisy dynamic video includes: Selecting a portion of pixels from each of the clear video frames; Generate corresponding second pixel images respectively according to partial pixels of each clear video frame; Generating a second initial noise image corresponding to each of the clear video frames; Fusing each of the second initial noise images with the corresponding second pixel images to obtain a second noise image corresponding to each of the clear video frames; Each of the second noise images is fused into the corresponding clear video frame to obtain a noisy dynamic video.

7. The method according to claim 1, wherein the second branch comprises an optical flow network, a target frame sub-branch and other frame sub-branches; and extracting features from the downsampled video frame sequence through the second branch of the video denoising model to obtain image fusion features comprises: Determining optical flow information between a downsampled target video frame and a corresponding adjacent downsampled video frame in the downsampled video frame sequence through the optical flow network; Performing feature extraction on the downsampled video frame sequence through the other frame sub-branches to obtain continuous video frame features corresponding to the downsampled target video frame; Aligning the continuous video frame features with the downsampled target video frame based on the optical flow information to obtain aligned video frame features; The aligned video frame features are processed by the target sub-branch to obtain image fusion features.

8. The method according to claim 7, wherein the adjacent downsampled video frames include downsampled preceding video frames and downsampled succeeding video frames; the optical flow information includes first optical flow information and second optical flow information; and the continuous video frame features include preceding video frame features and succeeding video frame features; The aligned video frame features include the pre-aligned video frame features and the post-aligned video frame features; Determining the optical flow information between the downsampled target video frame and the corresponding adjacent downsampled video frame in the downsampled video frame sequence through the optical flow network includes: Determine, by means of the optical flow network, first optical flow information between adjacent first downsampled video frames; determine, by means of the optical flow network, second optical flow information between adjacent second downsampled video frames; the first downsampled video frame is a downsampled video frame between the downsampled target video frame and the downsampled preceding video frame; the second downsampled video frame is a downsampled video frame between the downsampled target video frame and the downsampled succeeding video frame; The extracting features of the downsampled video frame sequence by using the other frame sub-branches to obtain continuous video frame features corresponding to the downsampled target video frame includes: Extracting features of the downsampled previous video frame through the forward network layer of the previous frame sub-branch to obtain features of the previous video frame; extracting features of the downsampled subsequent video frame through the backward network layer of the subsequent frame sub-branch to obtain features of the subsequent video frame; the previous frame sub-branch and the subsequent frame sub-branch belong to the other frame sub-branch; The step of aligning the continuous video frame features with the downsampled target video frame based on the optical flow information to obtain aligned video frame features includes: Aligning the preceding video frame feature with the downsampled target video frame based on the first optical flow information to obtain the preceding aligned video frame feature; aligning the subsequent video frame feature with the downsampled target video frame based on the second optical flow information to obtain the subsequent aligned video frame feature; The step of processing the aligned video frame features through the target sub-branch to obtain image fusion features includes: Processing the pre-order aligned video frame features through the forward network layer of the target sub-branch to obtain pre-order image fusion features; processing the post-order aligned video frame features through the backward network layer of the target sub-branch to obtain post-order image fusion features; An image fusion feature is determined based on the preceding image fusion feature and the succeeding image fusion feature.

9. The method according to claim 8, wherein determining the image fusion feature based on the preceding image fusion feature and the succeeding image fusion feature comprises: Splicing the preceding image fusion feature and the succeeding image fusion feature to obtain a spliced ​​image feature; The convolution process is performed on the spliced ​​image features to obtain image fusion features.

10. The method according to claim 1, wherein generating a predicted video frame based on the image fusion feature and the image detail feature comprises: Fusing the image fusion feature with the image detail feature to obtain a global image feature; Image reconstruction is performed based on the global image features to obtain a predicted video frame.

11. The method according to claim 10, wherein fusing the image fusion feature with the image detail feature to obtain a global image feature comprises: Performing upsampling processing on the image fusion feature to obtain an upsampled image fusion feature; The up-sampled image fusion feature is fused with the image detail feature to obtain a global image feature.

12. The method according to any one of claims 1 to 11, further comprising: Determining a current video frame to be denoised in a sequence of video frames to be denoised of the video to be denoised; Extracting the image detail features to be denoised of the video frame to be denoised through the first branch of the target video denoising model; Downsampling the to-be-denoised video frame sequence to obtain a downsampled to-be-denoised video frame sequence, and extracting features of the downsampled to-be-denoised video frame sequence through the second branch of the target video denoising model to obtain a fusion feature of the to-be-denoised image; Based on the detail features of the image to be denoised and the fusion features of the image to be denoised, a denoised video frame corresponding to the video frame to be denoised is generated.

13. A processing device for a video denoising model, the device comprising: A video frame acquisition module, used to acquire a target video frame in a video frame sequence of a sample video, and to acquire a reference video corresponding to the sample video; A detail feature extraction module, used to extract image detail features of the target video frame through a first branch of a video denoising model; A fusion feature extraction module, used for downsampling the video frame sequence to obtain a downsampled video frame sequence, and extracting features from the downsampled video frame sequence through the second branch of the video denoising model to obtain an image fusion feature; A prediction module, used for generating a predicted video frame based on the image fusion feature and the image detail feature; A parameter adjustment module is used to adjust the parameters in the video denoising model according to the loss value between the predicted video frame and the reference video frame to obtain a target video denoising model; the reference video frame is a video frame in the reference video corresponding to the target video frame; the target video denoising model is used to denoise the video to be denoised.

14. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method according to any one of claims 1 to 12 when executing the computer-readable instructions.

15. A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 12.

16. A computer program product comprising computer readable instructions, characterized in that: When the computer readable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Image restoration method and device, and electronic equipment

    CN111738952A

  • Video denoising method, device and equipment and storage medium

    CN112686828A

  • Model training method and device

    CN113011562A

  • Video denoising method and device, storage medium and electronic equipment

    CN113034401A

  • Video denoising model processing method and device, computer equipment and storage medium

    CN116977200A

Cited By

  • Video style migration method based on RAFT optical flow

    CN119991416A

  • Image acquisition and fusion method and device

    CN120075372A

  • Image sequence flicker elimination method and system based on clustering and multi-scale histogram matching

    CN121147028A