Image restoration method and apparatus, and electronic device
Abstract
An image restoration method and apparatus, and an electronic device. The method includes: inputting, into a target denoising network, an image to be processed, where the target denoising network includes a single-frame network and a recursive network, and the image to be processed is any frame in a video to be processed (S 101 ); removing, via the single-frame network, compression noise of the image to be processed, and outputting a first image (S 102 ); according to the content of the previous frame of image, removing, via the recursive network, compression noise of the image to be processed, and outputting a second image, where the previous frame of image is the previous frame of image of the image to be processed in the video to be processed (S 103 ); and performing weighted summation on the first image and the second image, and outputting a denoised image for the image to be processed (S 104 ).
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 12 · Forward citations: 0.
Claims (12 — 2 Independent, 10 Dependent)
- Claim 1Independent Claim
An image restoration method, comprising: inputting an image to be processed into a target denoising network, wherein the target denoising network comprises a single-frame network and a recursive network, and the image to be processed is any frame in a video to be processed; removing, via the single-frame network, compression noise of the image to be processed to output a first image; removing, according to a content of a previous frame image, compression noise of the image to be processed via the recursive network to output a second image, wherein the previous frame image is one previous frame of the image to be processed in the video to be processed; and performing weighted summation on the first image and the second image, and outputting a denoised image for the image to be processed; wherein the removing, according to the content of the previous frame image, the compression noise of the image to be processed via the recursive network to output the second image, comprises: removing the compression noise of the image to be processed via at least one first convolution layer, at least one first feature series layer and at least one first sampling layer cascaded in the recursive network, to output the second image; wherein the at least one first convolution layer in the recursive network comprises a first sub-convolution layer and a second sub-convolution layer, the at least one first feature series layer comprises a first sub-feature series layer and a second sub-feature series layer, and the at least one first sampling layer comprises first down-sampling layers and first up-sampling layers; wherein the removing the compression noise of the image to be processed via the at least one first convolution layer, the at least one first feature series layer and the at least one first sampling layer cascaded in the recursive network, to output the second image comprises: receiving, via the first sub-feature series layer, a first feature image of the image to be processed extracted by each of third sub-convolution layers in second convolution layers in the single-frame network; obtaining, via the first sub-feature series layer, a second feature image extracted from the previous frame image by the first sub-convolution layer corresponding to each of the third sub-convolution layers in the recursive network; obtaining a series feature image by performing, via the first sub-feature series layer, series operation on the first feature image and the second feature image; obtaining a compressed feature image by performing, via each of first sub-convolution layers, compression on the series feature image, wherein the compressed feature images are second feature images extracted from the image to be processed by the first sub-convolution layers; extracting, via the first down-sampling layers in the at least one first sampling layer, feature images with a plurality of spatial sizes from the compressed feature images; determining, via the first up-sampling layers, feature images with same spatial sizes as the plurality of spatial sizes; obtaining a first splicing feature image by splicing, via the second sub-feature series layer, the feature images with the same spatial sizes on feature dimension; and processing, via the second sub-convolution layer, the first splicing feature image, and outputting the second image.
- Claim 2Depends on #1
The method according to claim 1, wherein the single-frame network comprises at least one second convolution layer, at least one second sampling layer and at least one second feature series layer which are cascaded, the at least one second convolution layer comprises a third sub-convolution layer and a fourth sub-convolution layer, and the at least one second sampling layer comprises second down-sampling layers and second up-sampling layers; wherein the removing, via the single-frame network, the compression noise of the image to be processed to output the first image, comprises: extracting, via third sub-convolution layers, first feature images of the image to be processed; extracting, via the second down-sampling layers, feature images with a plurality of spatial sizes from the first feature images; determining, via the second up-sampling layers, feature images with the same spatial sizes as the plurality of spatial sizes; obtaining a second splicing feature image by splicing, via the second feature series layer, the feature images with the same spatial sizes on feature dimension; and processing, via the fourth sub-convolution layer, the second splicing feature image, and outputting the first image.
- Claim 3Depends on #2
The method according to claim 2, wherein before inputting the image to be processed into the target denoising network, the method further comprises: a training process of the target denoising network, wherein the training process comprises: obtaining a plurality of groups of image frame sequences, wherein each group of image frame sequences comprises a plurality of images; encoding the plurality of groups of image frame sequences into a true value video and a simulation video respectively, wherein each frame of simulation image in the simulation video comprises compression noise; inputting the each frame of simulation image in the simulation video into a denoising network to be trained; outputting a simulation denoised image of a corresponding frame; determining, according to a first prediction deviation between the simulation denoised image and a true value image of the corresponding frame in the true value video, a first loss function for the denoising network to be trained; and taking a corresponding network when the first loss function is lower than a first preset threshold as the target denoising network.
- Claim 4Depends on #1
The method according to claim 1, wherein before inputting the image to be processed into the target denoising network, the method further comprises: a training process of the target denoising network, wherein the training process comprises: obtaining a plurality of groups of image frame sequences, wherein each group of image frame sequences comprises a plurality of images; encoding the plurality of groups of image frame sequences into a true value video and a simulation video respectively, wherein each frame of simulation image in the simulation video comprises compression noise; inputting the each frame of simulation image in the simulation video into a denoising network to be trained; outputting a simulation denoised image of a corresponding frame; determining, according to a first prediction deviation between the simulation denoised image and a true value image of the corresponding frame in the true value video, a first loss function for the denoising network to be trained; and taking a corresponding network when the first loss function is lower than a first preset threshold as the target denoising network.
- Claim 5Depends on #4
The method according to claim 4, wherein the determining, according to the first prediction deviation between the simulation denoised image and the true value image of the corresponding frame in the true value video, the first loss function for the denoising network to be trained, comprises: adopting an L2 loss function when the first prediction deviation between the simulation denoised image and the true value image of the corresponding frame in the true value video is smaller than or equal to δ; and adopting an L1 loss function when the first prediction deviation between the simulation denoised image and the true value image of the corresponding frame in the true value video is greater than δ; wherein a formula corresponding to the L2 loss function is: L δ (y, f (x)) = 1 2 (y - f (x)) 2; and a formula corresponding to the L1 loss function is: L δ (y, f (x)) = δ. (❘ "\[LeftBracketingBar]"y - f (x) ❘ "\[RightBracketingBar]"- 1 2 δ) 2; wherein, f(x) represents the simulation denoised image, and y represents the true value image of the frame corresponding to the simulation denoised image in the true value video.
- Claim 6Depends on #4
The method according to claim 4, wherein after determining, according to the first prediction deviation between the simulation denoised image and the true value image of the corresponding frame in the true value video, the first loss function for the denoising network to be trained, the method further comprises: performing, when the first loss function is lower than the first preset threshold, sharpening processing on each frame of true value image in the true value video, and obtaining a true value video after edge enhancement; determining a second prediction deviation between the simulation denoised image and a corresponding frame image in the true value video after edge enhancement, and determining a second loss function for the denoising network to be trained; and taking a corresponding network when the second loss function is lower than a second preset threshold as the target denoising network.
- Claim 7Depends on #1
A computer-readable storage medium, storing computer instructions, wherein the stored computer instructions, when executed by a processor, implement the image restoration method according to claim 1.
- Claim 8Independent Claim
An electronic device for image restoration, comprising: a memory and a processor; wherein the memory is configured to store a program; and the processor is configured to execute the program in the memory, comprising: inputting an image to be processed into a target denoising network, wherein the target denoising network comprises a single-frame network and a recursive network, and the image to be processed is any frame in a video to be processed; removing, via the single-frame network, compression noise of the image to be processed to output a first image; removing, according to a content of a previous frame image, compression noise of the image to be processed via the recursive network to output a second image, wherein the previous frame image is one previous frame of the image to be processed in the video to be processed; and performing weighted summation on the first image and the second image, and outputting a denoised image for the image to be processed; wherein the processor is configured to execute: removing the compression noise of the image to be processed via at least one first convolution layer, at least one first feature series layer and at least one first sampling layer cascaded in the recursive network, to output the second image; wherein the at least one first convolution layer in the recursive network comprises a first sub-convolution layer and a second sub-convolution layer, the at least one first feature series layer comprises a first sub-feature series layer and a second sub-feature series layer, and the at least one first sampling layer comprises first down-sampling layers and first up-sampling layers; wherein the processor is configured to execute: receiving, via the first sub-feature series layer, a first feature image of the image to be processed extracted by each of third sub-convolution layers in second convolution layers in the single-frame network; obtaining, via the first sub-feature series layer, a second feature image extracted from the previous frame image by the first sub-convolution layer corresponding to each of the third sub-convolution layers in the recursive network; obtaining a series feature image by performing, via the first sub-feature series layer, series operation on the first feature image and the second feature image; obtaining a compressed feature image by performing, via each of first sub-convolution layers, compression on the series feature image, wherein the compressed feature images are second feature images extracted from the image to be processed by the first sub-convolution layers; extracting, via the first down-sampling layers in the at least one first sampling layer, feature images with a plurality of spatial sizes from the compressed feature images; determining, via the first up-sampling layers, feature images with same spatial sizes as the plurality of spatial sizes; obtaining a first splicing feature image by splicing, via the second sub-feature series layer, the feature images with the same spatial sizes on feature dimension; and processing, via the second sub-convolution layer, the first splicing feature image, and outputting the second image.
- Claim 9Depends on #8
The electronic device according to claim 8, wherein the single-frame network comprises at least one second convolution layer, at least one second sampling layer and at least one second feature series layer which are cascaded, the at least one second convolution layer comprises a third sub-convolution layer and a fourth sub-convolution layer, and the at least one second sampling layer comprises second down-sampling layers and second up-sampling layers; wherein the processor is configured to execute: extracting, via third sub-convolution layers, first feature images of the image to be processed; extracting, via the second down-sampling layers, feature images with a plurality of spatial sizes from the first feature images; determining, via the second up-sampling layers, feature images with the same spatial sizes as the plurality of spatial sizes; obtaining a second splicing feature image by splicing, via the second feature series layer, the feature images with the same spatial sizes on feature dimension; and processing, via the fourth sub-convolution layer, the second splicing feature image, and outputting the first image.
- Claim 10Depends on #8
The electronic device according to claim 8, wherein the processor is configured to execute: a training process of the target denoising network, wherein the training process comprises: obtaining a plurality of groups of image frame sequences, wherein each group of image frame sequences comprises a plurality of images; encoding the plurality of groups of image frame sequences into a true value video and a simulation video respectively, wherein each frame of simulation image in the simulation video comprises compression noise; inputting the each frame of simulation image in the simulation video into a denoising network to be trained; outputting a simulation denoised image of a corresponding frame; determining, according to a first prediction deviation between the simulation denoised image and a true value image of the corresponding frame in the true value video, a first loss function for the denoising network to be trained; and taking a corresponding network when the first loss function is lower than a first preset threshold as the target denoising network.
- Claim 11Depends on #10
The electronic device according to claim 10, wherein the processor is configured to execute: adopting an L2 loss function when the first prediction deviation between the simulation denoised image and the true value image of the corresponding frame in the true value video is smaller than or equal to δ; and adopting an L1 loss function when the first prediction deviation between the simulation denoised image and the true value image of the corresponding frame in the true value video is greater than δ; wherein a formula corresponding to the L2 loss function is: L δ (y, f (x)) = 1 2 (y - f (x)) 2; and a formula corresponding to the L1 loss function is: L δ (y, f (x)) = δ. (❘ "\[LeftBracketingBar]"y - f (x) ❘ "\[RightBracketingBar]"- 1 2 δ) 2; wherein, f(x) represents the simulation denoised image, and y represents the true value image of the frame corresponding to the simulation denoised image in the true value video.
- Claim 12Depends on #10
The electronic device according to claim 10, wherein the processor is configured to execute: performing, when the first loss function is lower than the first preset threshold, sharpening processing on each frame of true value image in the true value video, and obtaining a true value video after edge enhancement; determining a second prediction deviation between the simulation denoised image and a corresponding frame image in the true value video after edge enhancement, and determining a second loss function for the denoising network to be trained; and taking a corresponding network when the second loss function is lower than a second preset threshold as the target denoising network.
Technical Overview & Description
CROSS REFERENCE TO RELATED APPLICATIONS The present disclosure is a US National Stage of International Application No. PCT/CN2021/095778, filed on May 25, 2021, which claims priority to the Chinese Patent Application No. 202010574404.7, entitled “ IMAGE RESTORATION METHOD AND APPARATUS, AND ELECTRONIC DEVICE ” , filed to the China Patent Office on Jun. 22, 2020, the entire contents of which are incorporated herein by reference. FIELD The present disclosure relates to the technical field of image processing, in particular to an image restoration method and apparatus, and an electronic device. BACKGROUND In order to avoid occupying of a larger storage space by a video and increase a transmission speed, it is often necessary to compress the video. However, various noises are inevitably generated in a compression process, which will affect a display effect. SUMMARY In a first aspect, an embodiment of the present disclosure provides an image restoration method, including: inputting an image to be processed into a target denoising network, where the target denoising network includes a single-frame network and a recursive network, and the image to be processed is any frame in a video to be processed; removing, via the single-frame network, compression noise of the image to be processed to output a first image; removing, according to a content of a previous frame image, compression noise of the image to be processed via the recursive network to output a second image, where the previous frame image is one previous frame of the image to be processed in the video to be processed; and performing weighted summation on the first image and the second image, and outputting a denoised image for the image to be processed. In a possible implementation, the removing, according to the content of the previous frame image, the compression noise of the image to be processed via the recursive network to output the second image, includes: removing the compression noise of the image to be pro
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (12)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- S. Nah et al.,
- “
- AIM 2019 Challenge on Video Temporal Super-Resolution: Methods and Results,
- ”
- 2019 IEEE/CVF International Conference on Computer Vision Workshop (ICCVW), Seoul, Korea (South), 2019, pp. 3388-3398, doi: 10.1109/ICCVW.2019.00421 . Used for backward citation search (Year: 2019).
- G. Lu, X. Zhang, W. Ouyang, D. Xu, L. Chen and Z. Gao,
- “
- Deep Non-Local Kalman Network for Video Compression Artifact Reduction,
- ”
- in IEEE Transactions on Image Processing, vol. 29, pp. 1725-1737, 2020, doi: 10.1109/TIP.2019.2943214 (Year: 2019).