IP Library Granted Patent US 12,374,091
Granted Patent B2
US 12,374,091 · App. 17/572,923 · Granted Jul 29, 2025

Training a restoration model for balanced generation and reconstruction

Inventors: Yang Zhao (Bothell, WA); Yu-Chuan Su (Kirkland, WA); Chun-Te Chu (Bellevue, WA); Yandong Li (Orlando, FL); Marius Renn (Milpitas, CA); Yukun Zhu (Shoreline, WA); Xuhui Jia (Seattle, WA); Bradley Ray Green (Bellevue, WA)
Assignee: GOOGLE LLC
G06T5/00G06V40/168G06T2207/20081G06T2207/20084G06T2207/30201
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,374,091
App. No.
17/572,923
Granted
Jul 29, 2025
Kind
B2
Abstract

Systems and methods for training a restoration model can leverage training for two sub-tasks to train the restoration model to generate realistic and identity-preserved outputs. The systems and methods can balance the training of the generation task and the reconstruction task to ensure the generated outputs preserve the identity of the original subject while generating realistic outputs. The systems and methods can further leverage a feature quantization model and skip connections to improve the model output and overall training.

Claims (48)

1. A computing system for replacing corrupted features with stored high-quality features for image restoration, the system comprising:

one or more processors; and

one or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors, cause the computing system to perform operations, the operations comprising:

obtaining an input image, wherein the input image comprises one or more features;

processing the input image with a first model to generate a first output, wherein the first model comprises an encoder model;

processing the first output with a second model to generate a second output, wherein the second model comprises a feature quantization model, wherein the second output results from quantization of the first output by the feature quantization model, wherein the feature quantization model quantizes the one or more features to a code in a codebook and replaces the feature with a stored feature associated with the code, wherein the feature quantization model comprises the codebook, wherein the codebook comprises one or more learned feature codes, and wherein the feature quantization model replaces a corrupted feature with the stored feature of the codebook; and

processing the second output with a third model to generate a restoration output, wherein the third model comprises a decoder model, and wherein the restoration output comprises an output image.

2. The system of claim 1 , wherein the input image comprises a degraded facial image, and wherein the output image comprises one or more predicted pixels.

3. The system of claim 1 , wherein the feature quantization model generates a feature embedding based on an input, maps the input to a known feature map, and outputs the second output comprising a known feature of the known feature map.

4. The system of claim 1 , wherein the second output comprises latent encoding data, wherein the latent encoding data comprises a latent feature.

5. The system of claim 1 , wherein the input image is descriptive of one or more faces, wherein the one or more features are associated with one or more facial features descriptive of the one or more faces.

6. The system of claim 1 , further comprising a restoration model, wherein the restoration model comprises the first model, the second model, and the third model, and wherein the restoration model further comprises a plurality of skip connections that generate a plurality of skip connection outputs, wherein the plurality of skip connection outputs are processed by different decoder blocks of the decoder model to generate the restoration output.

7. The system of claim 1 , wherein the second output comprises a quantized feature determined based on an extracted feature from the first output.

8. The system of claim 1 , wherein processing the first output with the second model to generate the second output comprises:

processing the first output with a feature extractor to generate a feature vector, wherein the feature vector is a vector mapped to an embedding space;

determining a stored vector associated with an embedding space location of the feature vector, wherein the stored vector is obtained from a different image than the input image; and

outputting the second output, wherein the second output comprises the stored vector.

9. The system of claim 1 , wherein the third model comprises a linear gated feature fusion block.

10. A computer-implemented method for training an image restoration model that replaces corrupted features with stored high-quality features, the method comprising:

obtaining, by a computing system comprising one or more processors, a training image, wherein the training image comprises one or more features;

processing, by the computing system, the training image with a restoration model to generate a restoration output, wherein processing the training image with the restoration model comprises:

processing, by the computing system, the training image with an encoder model to generate encoding data;

processing, by the computing system, the encoding data with a feature quantization model to generate latent feature data, wherein the feature quantization model quantizes the one or more features to a code in a codebook and replaces the feature with a stored feature associated with the code, wherein the feature quantization model comprises the codebook, wherein the codebook comprises one or more learned feature codes, and wherein the feature quantization model replaces a corrupted feature with the stored feature of the codebook;

processing, by the computing system, the latent feature data with a decoder model to generate a restoration output;

evaluating, by the computing system, a loss function that evaluates a difference between the restoration output and the training image; and

adjusting, by the computing system, one or more parameters of the restoration model based at least in part on the loss function.

11. The method of claim 10 , wherein the feature quantization model comprises an embedding feature map, wherein the embedding feature map is associated with a feature quantization map descriptive of quantized features, and wherein processing the encoding data with the encoder model comprises:

generating, by the computing system, a feature embedding based on the encoding data, wherein the feature embedding is an embedding in an embedding space associated with the embedding feature map;

determining, by the computing system, an associated quantized embedding in the feature quantization map based on the feature embedding; and

outputting, by the computing system, the latent feature data, wherein the latent feature data comprises the associated quantized embedding.

12. The method of claim 10 , wherein the decoder model comprises a feature fusion block, wherein the feature fusion block is configured to fuse the latent feature data and decoder data.

13. One or more non-transitory computer-readable media that collectively store instructions for training an image restoration model that replaces corrupted features with stored high-quality features that, when executed by one or more computing devices, cause the one or more computing devices to perform operations, the operations comprising:

obtaining a training image, wherein the training image comprises one or more features;

processing the training image with a first model to generate a first output, wherein the first model comprises an encoder model;

processing the first output with a second model to generate a second output, wherein the second model comprises a feature quantization model, wherein the feature quantization model quantizes the one or more features to a code in a codebook and replaces the feature with a stored feature associated with the code, wherein the feature quantization model comprises the codebook, wherein the codebook comprises one or more learned feature codes, and wherein the feature quantization model replaces a corrupted feature with the stored feature of the codebook;

processing the second output with a third model to generate a restoration output, wherein the third model comprises a decoder model;

evaluating a loss function that evaluates a difference between the restoration output and the training image; and

adjusting one or more parameters of at least one of the first model, the second model, or the third model based at least in part on the loss function.

14. The one or more non-transitory computer-readable media of claim 13 , wherein the loss function comprises a realism loss and a reconstruction loss.

15. The one or more non-transitory computer-readable media of claim 14 , wherein the realism loss comprises a penalization term that encourages realistic output generation based on a determined realism based in part on a comparison with a real high-quality image.

16. The one or more non-transitory computer-readable media of claim 14 , wherein the reconstruction loss comprises a penalization term that penalizes divergence from the training image.

17. The one or more non-transitory computer-readable media of claim 13 , wherein the operations further comprise:

generating a low-quality image based in part on the training image; and

wherein the low-quality image is processed by the first model to generate the first output.

18. The one or more non-transitory computer-readable media of claim 13 , wherein the operations further comprise:

generating a noisy output based on the first output, wherein the noisy output comprises noise; and

wherein the noisy output is processed by the second model to generate the second output.

19. The one or more non-transitory computer-readable media of claim 13 , wherein the first output is generated based at least in part on a skip connection, wherein the training image is processed by one or more first blocks of the first model to generate the first output, and wherein the skip connection passes the first output from the one or more first blocks of the first model to the second model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 12, 2022
From: ZHAO, YANG; SU, YU-CHUAN; CHU, CHUN-TE; RENN, MARIUS; ZHU, YUKUN; JIA, XUHUI; GREEN, BRADLEY RAY; LI, YANDONG
To: GOOGLE LLC
Reel/Frame 059573/0009 →
Continuity (1)
Related Publication 20230222628A1 · Jul 13, 2023
References Cited (50)
US 20140314324A1 · Tian · 2014 [cited by examiner]
US 20200372686A1 · Wen · 2020 [cited by examiner]
US 20220392025A1 · Mironica · 2022 [cited by examiner]
US 20230044644A1 · Elbaz · 2023 [cited by examiner]
US 20230055204A1 · Ungureanu · 2023 [cited by examiner]
US 20230135021A1 · Fang · 2023 [cited by examiner]
Zhang, Xinyi, et al. “Gated fusion network for joint image deblurring and super-resolution.” arXiv preprint arXiv:1807.10806 (2018). (Year: 2018). [cited by examiner]
Abadi et al., “TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems”, arXiv:1603.04467v1, Preliminary White Paper, Nov. 9, 2015, 19 pages. [cited by applicant]
Brock et al., “Large Scale GAN Training for High Fidelity Natural Image Synthesis”, arXiv:1809.11096v2, Feb. 25, 2019, 25 pages. [cited by applicant]
Bulat et al., “Super-FAN: Integrated Facial Landmark Localization and Super-Resolution of Real-World Low Resolution Faces in Arbitrary Poses with GANs”, Proceedings of the IEEE Conference on Computer Vision and Pattern … [cited by applicant]
Chen et al., “Progressive Semantic-Aware Style Transformation for Blind Face Restoration”, arXiv:2009.08709v2, Mar. 21, 2021, 21 pages. [cited by applicant]
Choi et al., “StarGAN v2: Diverse Image Synthesis for Multiple Domains”, arXiv:1912.01865v2, Apr. 26, 2020, 14 pages. [cited by applicant]
Esser et al., “Taming Transformers for High-Resolution Image Synthesis”, arXiv:2012.09841v3, Jun. 23, 2021, 52 pages. [cited by applicant]
Gatys et al., “Image Style Transfer Using Convolutional Neural Networks”, 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 27-30, 2016, 10 pages. [cited by applicant]
Goodfellow et al., “Generative Adversarial Networks”, arXiv:1406.2661v1, Jun. 10, 2021, 9 pages. [cited by applicant]
Gu et al., “Image Processing Using Multi-Code GAN Prior”, arXiv:1912.07116v2, Mar. 31, 2020, 10 pages. [cited by applicant]
Guo et al., “Deep Wavelet Prediction for Image Super-resolution”, 2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Jul. 21-26, 2017, Honolulu, Hawaii, 10 pages. [cited by applicant]
Guo et al., “Toward Convolutional Blind Denoising of Real Photographs”, arXiv:1807.04686v2, Apr. 19, 2019, 11 pages. [cited by applicant]
Heusel et al., “GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium”, arXiv:1706.08500v6, Jan. 12, 2018, 38 pages. [cited by applicant]
Johnson et al., “Perceptual Losses for Real-Time Style Transfer and Super-Resolution”, arXiv:1603.08155v1, Mar. 27, 2016, 18 pages. [cited by applicant]
Karras et al., “A Style-Based Generator Architecture for Generative Adversarial Networks”, arXiv:1812.04948v3, Mar. 9, 2019, 12 pages. [cited by applicant]
Karras et al., “Analyzing and Improving the Image Quality of StyleGAN”, arXiv:1912.04958v2, Mar. 23, 2020, 21 pages. [cited by applicant]
Kingma et al., “Adam: A Method for Stochastic Optimization”, arXiv:1412.6980v9, Jan. 30, 2017, 15 pages. [cited by applicant]
Kupyn et al., “DeblurGAN-v2: Deblurring (Orders-of-Magnitude) Faster and Better”, arXiv:1908.03826v1, Aug. 10, 2019, 10 pages. [cited by applicant]
Kynkäänniemi et al., “Improved Precision and Recall Metric for Assessing Generative Models”, arXiv:1904.06991v3, Oct. 30, 2019, 16 pages. [cited by applicant]
Li et al., “Learning Warped Guidance for Blind Face Restoration”, arXiv:1804.04829v2, Apr. 16, 2018, 25 pages. [cited by applicant]
Li et al., “Blind Face Restoration via Deep Multi-scale Component Dictionaries”, arXiv:2008.00418v1, Aug. 2, 2020, 16 pages. [cited by applicant]
Ma et al., “Deep Face Super-Resolution with Iterative Collaboration between Attentive Recovery and Landmark Estimation”, arXiv:2003.13063v1, Mar. 29, 2020, 13 pages. [cited by applicant]
Menon et al., “PULSE: Self-Supervised Photo Upsampling via Latent Space Exploration of Generative Models”, arXiv:2003.03808v3, Jul. 20, 2020, 20 pages. [cited by applicant]
Van den Oord et al., “Neural Discrete Representation Learning”, arXiv:1711.00937v2, May 30, 2018, 11 pages. [cited by applicant]
Parmar et al., “On Aliased Resizing and Surprising Subtleties in GAN Evaluation”, arXiv:2104.11222v3, Jan. 21, 2022, 15 pages. [cited by applicant]
Ramesh et al., “Zero-Shot Text-to-Image Generation”, arXiv:2102.12092v2, Feb. 26, 2021, 20 pages. [cited by applicant]
Razavi et al., “Generating Diverse High-Fidelity Images with VQ-VAE-2”, arXiv:1906.00446v1, Jun. 2, 2019, 15 pages. [cited by applicant]
Richardson et al., “Encoding in Style: A StyleGAN Encoder for Image-to-Image Translation”, arXiv:2008.00951v2, Apr. 21, 2021, 21 pages. [cited by applicant]
Schroff et al., “FaceNet: A Unified Embedding for Face Recognition and Clustering”, arXiv:1503.03832v3, Jun. 17, 2015, 10 pages. [cited by applicant]
Shen et al., “Deep Semantic Face Deblurring”, arXiv:1803.03345v2, Mar. 16, 2018, 10 pages. [cited by applicant]
Simonyan et al., “Very Deep Convolutional Networks for Large-Scale Image Recognition”, arXiv:1409.1556v6, Apr. 10, 2015, 14 pages. [cited by applicant]
Szegedy et al., “Going Deeper with Convolutions”, arXiv:1409.4842v1, Sep. 17, 2014, 12 pages. [cited by applicant]
Wang et al., “ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks”, arXiv:1809.00219v2, Sep. 17, 2018, 23 pages. [cited by applicant]
Wang et al., “Towards Real-World Blind Face Restoration with Generative Facial Prior”, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021, pp. 9168-9178. [cited by applicant]
Yang et al., “GAN Prior Embedded Network for Blind Face Restoration in the Wild”, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021, pp. 672-681. [cited by applicant]
Yang et al., “HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment”, arXiv:2005.05005v2, May 22, 2021, 10 pages. [cited by applicant]
Yasarla et al., “Deblurring Face Images Using Uncertainty Guided Multi-Stream Semantic Networks”, arXiv:1907.13106.v2, Apr. 20, 2020, 13 pages. [cited by applicant]
Yu et al., “Generative Image Inpainting with Contextual Attention”, arXiv:1801.07892v2, Mar. 21, 2018, 15 pages. [cited by applicant]
Zhang et al., “FFDNet: Toward a Fast and Flexible Solution for CNN based Image Denoising”, arXiv:1710.04026v2, May 22, 2018, 15 pages. [cited by applicant]
Zhang et al., “The Unreasonable Effectiveness of Deep Features as a Perceptual Metric”, arXiv:1801.03924v2, Apr. 10, 2018, 14 pages. [cited by applicant]
Zhao et al., “Differentiable Augmentation for Data-Efficient GAN Training”, arXiv:2006.10738v4, Dec. 7, 2020, 23 pages. [cited by applicant]
Zhao et al., “Large Scale Image Completion via Co-Modulated Generative Adversarial Networks”, arXiv:2103.10428v1, Mar. 18, 2021, 25 pages. [cited by applicant]
Zhao et al., “Feature Quantization Improves GAN Training”, arXiv:2004.02088v2, Jul. 15, 2020, 22 pages. [cited by applicant]
Zheng et al., “Pluralistic Image Completion”, arXiv:1903.04227v2, Apr. 5, 2019, 21 pages. [cited by applicant]