IP Library › Granted Patent US 12,051,174
Granted Patent B2
US 12,051,174 · App. 17/478,776 · Granted Jul 30, 2024

Energy-based generative models via coarse-to-fine expanding and sampling

Inventors: Jianwen Xie (Santa Clara, CA); Yang Zhao (Buffalo, NY); Ping Li (Bellevue, WA)
Assignee: Baidu USA LLC
G06T3/4053G06F18/214G06F18/295
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,051,174
App. No.
17/478,776
Granted
Jul 30, 2024
Kind
B2
Abstract

Presented herein are embodiments of energy-based models (EBMs), which may be trained via embodiments of a multistage coarse-to-fine expanding and sampling strategy. Embodiments of the training methodology start with learning a coarse-level EBM from images at low resolution and then gradually transits to learn a finer-level EBM from images at higher resolution by expanding the energy function as the learning progresses. Embodiments are computationally efficient with smooth learning and sampling. Tested embodiments achieved the best performance on image generation amongst all EBMs and successfully synthesized high-fidelity images. Embodiments may also be used for image restoration and out-of-distribution detection. Framework embodiments may be further generalized for one-sided unsupervised image-to-image translation and beat baseline methods in terms of model size and training budget. Also presented herein are embodiments of a gradient-based generative saliency methodology to interpret the translation dynamics.

Claims (113)

1. A computer-implemented method for training an energy-based model comprising:

obtaining a set of images having a current stage resolution;

obtaining an initial set of current stage synthesized images having the current stage resolution;

obtaining a set of prior stage synthesized images, in which the prior stage synthesized images having a prior stage resolution that is a lower resolution than the current stage resolution;

generating, via Markov chain Monte Carlo (MCMC) sampling, a set of updated prior stage synthesized images given the set of prior stage synthesized images and a prior stage energy-based model that comprises an input at the prior stage resolution;

generating an updated initial set of current stage synthesized images having the current stage resolution by combining the initial set of current stage synthesized images with the set of updated prior stage synthesized images that have been upsampled to the current stage resolution;

generating, via Markov chain Monte Carlo (MCMC) sampling, a set of updated current stage synthesized images given the updated initial set of current stage synthesized images and a current stage energy-based model that has an input at the current stage resolution;

updating the current stage energy-based model using:

a first set of values obtained using a set of images and the current stage energy-based model; and

a second set of values obtained using the set of updated current stage synthesized images and the current stage energy-based model;

responsive to the current stage resolution not being a final resolution:

modifying the updated current stage energy-based model to generate an expanded energy-based model having a higher resolution than the current stage resolution;

setting the updated current stage energy-based model as the prior stage energy-based model for a next iteration and its resolution as the prior stage resolution for the next iteration;

setting the expanded energy-based model as the current stage energy-based model for the next iteration and its resolution as the current stage resolution for the next iteration; and

iterating by returning to the step of obtaining a set of images having the current stage resolution; and

responsive to the current stage resolution having a final resolution, outputting the updated current stage energy-based model as a trained energy-based model having the final resolution.

2. The computer-implemented method of claim 1 further comprising:

responsive to being a first iteration:

obtaining a set of images having a current stage resolution, which is a lowest resolution;

obtaining an initial set of current stage synthesized images having the current stage resolution;

generating, via Markov chain Monte Carlo (MCMC) sampling, a set of updated current stage synthesized images given the initial set of current stage synthesized images and a current stage energy-based model that has an input at the current stage resolution;

updating the current stage energy-based model using:

values obtained using the set of real images and the current stage energy-based model; and

values using the set of updated current stage synthesized images and the current stage energy-based model; and

proceeding to the step of responsive to the current stage resolution not being a final resolution.

3. The computer-implemented method of claim 1 wherein the step of obtaining an initial set of current stage synthesized images having the current stage resolution comprises:

initializing the initial set of current stage synthesized images from a uniform noise distribution.

4. The computer-implemented method of claim 1 wherein the step of obtaining a set of images having a current stage resolution comprises:

given a set of training images at the final resolution:

responsive to the current stage resolution not being the final resolution:

downsampling training images from the set of training images to the current stage resolution; and

sampling from the downsampled training images to obtain the set of images having the current stage resolution; and

responsive to the current stage resolution being the final resolution, sampling from the training images to obtain the set of images having the current stage resolution.

5. The computer-implemented method of claim 1 wherein the step of generating, via Markov chain Monte Carlo (MCMC) sampling, a set of updated current stage synthesized images given the updated initial set of current stage synthesized images and a current stage energy-based model that has an input at the current stage resolution comprises:

using short-run MCMC sampling with a fixed number of Langevin steps.

6. The computer-implemented method of claim 1 wherein the step of modifying the updated current stage energy-based model to generate an expanded energy-based model having a higher resolution than the current stage resolution comprises:

removing a red-green-blue (RGB) block that transforms a 3-channel RGB image to a z-channel feature map, where z is number of channels of each kernel at a bottom convolutional layer of the updated current stage energy-based model and that has the current stage resolution; and

adding an expanding block and a new RGB block that each have the higher resolution.

7. The computer-implemented method of claim 6 wherein the expanding block comprises:

a primal block comprising two convolutional layers, wherein a first convolutional layer of the primal block does not change a spatial size and a second convolutional layer of the primal block has a stride for down-sampling; and

a fading block comprising a convolution layer followed by an average pooling to link previous coarse-level layers.

8. The computer-implemented method of claim 1 further comprising:

using the trained energy-based model having the final resolution to generate a synthesized image at the final resolution.

9. A computer-implemented method for training an energy-based model comprising:

starting with a minimal resolution energy-based model and successively increasing model resolution capability through stages until a final resolution capability for the energy-based is reached, each stage comprising steps comprising:

updating a current stage energy-based model using:

(1) values obtained using a set of training images at a current stage resolution input into the current stage energy-based model; and

(2) values obtained using a set of synthesized images at the current stage resolution input into the current stage energy-based model;

responsive to the current stage energy-based model not having the final resolution capability:

adding one or more neural network layers to the updated current stage energy-based model to create a higher resolution energy-based model for a next stage;

setting the higher resolution energy-based model as the current stage energy-based model for a next iteration; and

returning to the step of updating a current stage energy-based model for the next iteration; and

responsive to the current stage energy-based model having the final resolution capability, outputting the updated current stage energy-based model as a trained energy-based model having the final resolution.

10. The computer-implemented method of claim 9 further comprising:

responsive being a first iteration:

obtaining the set of training images at the current stage resolution by sampling from a set of non-synthesized images; and

obtaining the set of synthesized images at the current stage resolution by performing steps comprising:

initializing the set of synthesized images having the current stage resolution by sampling from a distribution; and

updating, via Markov chain Monte Carlo (MCMC) sampling, the set of synthesized images using the current stage energy-based model.

11. The computer-implemented method of claim 9 further comprising:

obtaining the set of training images at the current stage resolution by sampling from a set of non-synthesized images; and

obtaining the set of synthesized images at the current stage resolution by performing steps comprising:

initializing a set of current stage synthesized images having the current stage resolution by sampling from a distribution;

initializing a set of prior stage synthesized images having a prior stage resolution by sampling from the distribution;

updating, via Markov chain Monte Carlo (MCMC) sampling, the set of prior stage synthesized images using a prior stage energy-based model;

generating a set of smoothed synthesized images at the current stage resolutions by combining the set of current stage synthesized images with the updated set of prior stage synthesized images that have been upsampled to the current stage resolution; and

updating, via Markov chain Monte Carlo (MCMC) sampling, the set of synthesized images given the set of smoothed synthesized images and the current stage energy-based model.

12. The computer-implemented method of claim 11 wherein the step of obtaining the set of training images at the current stage resolution by sampling from a set of non-synthesized images comprises:

given a set of training images at the final resolution:

responsive to the current stage resolution not being the final resolution:

downsampling training images from the set of training images to the current stage resolution; and

sampling from the downsampled training images to obtain the set of training images having the current stage resolution; and

responsive to the current stage resolution being the final resolution, sampling from the set of training images to obtain the set of training images having the current stage resolution.

13. The computer-implemented method of claim 9 wherein the step of adding one or more neural network layers to the updated current stage energy-based model to create a higher resolution energy-based model for a next stage comprises:

removing a red-green-blue (RGB) block that transforms a 3-channel RGB image to a z-channel feature map, where z is number of channels of each kernel at a bottom convolutional layer of the updated current stage energy-based model and that has the current stage resolution; and

adding an expanding block and a new RGB block that each have the higher resolution.

14. The computer-implemented method of claim 9 further comprising:

using the trained energy-based model having the final resolution to generate a synthesized image at the final resolution.

15. A computer-implemented method for training an energy-based model comprising:

starting with a minimal resolution energy-based model and successively increasing model resolution capability through stages until a final resolution capability for the energy-based is reached, each stage comprising steps comprising:

updating a current stage energy-based model using:

(1) values obtained using a set of target domain images at a current stage resolution and the current stage energy-based model; and

(2) values obtained using a set of synthesized images at the current stage resolution and the current stage energy-based model;

responsive to the current stage energy-based model not having the final resolution capability:

adding one or more neural network layers to the updated current stage energy-based model to create a higher resolution energy-based model for a next stage;

setting the higher resolution energy-based model as the current stage energy-based model for a next iteration; and

returning to the step of updating a current stage energy-based model for the next iteration; and

responsive to the current stage energy-based model having the final resolution capability, outputting the updated current stage energy-based model as a trained energy-based model having the final resolution.

16. The computer-implemented method of claim 15 further comprising:

responsive to being a first iteration:

obtaining the set of target domain images having the current stage resolution by sampling from a set of images; and

obtaining the set of synthesized images at the current stage resolution by performing steps comprising:

initializing the set of synthesized images at the current stage resolution by sampling from a set of source domain images; and

updating, via Markov chain Monte Carlo (MCMC) sampling, the set of synthesized images using the current stage energy-based model.

17. The computer-implemented method of claim 15 further comprising:

obtaining the set of target domain images at the current stage resolution by sampling from a set of images in the target domain; and

obtaining the set of synthesized images at the current stage resolution by performing steps comprising:

initializing a set of current stage synthesized images having the current stage resolution by sampling from a set of training images in a source domain;

initializing a set of prior stage synthesized images having a prior stage resolution by sampling from a corresponding set of training images having the prior stage resolution which corresponds to the images sampled from a set of training images in the source domain that were used to initialize the set of current stage synthesized images;

updating, via Markov chain Monte Carlo (MCMC) sampling, the set of prior stage synthesized images using a prior stage energy-based model;

generating a set of smoothed synthesized images at the current stage resolution by combining the set of current stage synthesized images with the set of prior stage synthesized images that have been upsampled to the current stage resolution; and

updating, via Markov chain Monte Carlo (MCMC) sampling, the set of synthesized images given the set of smoothed synthesized images and the current stage energy-based model.

18. The computer-implemented method of claim 17 wherein the step of obtaining the set of target domain images having the current stage resolution by sampling from a set of images in the target domain comprises:

given a set of target domain training images at the final resolution:

responsive to the current stage resolution not being the final resolution:

downsampling training images from the set of target domain training images to the current stage resolution; and

sampling from the downsampled training images to obtain the set of target domain images having the current stage resolution; and

responsive to the current stage resolution being the final resolution, sampling from the set of target domain training images to obtain the set of target domain images.

19. The computer-implemented method of claim 15 wherein the step of adding one or more neural network layers to the updated current stage energy-based model to create a higher resolution energy-based model for a next stage comprises:

removing a red-green-blue (RGB) block that transforms a 3-channel RGB image to a z-channel feature map, where z is number of channels of each kernel at a bottom convolutional layer of the updated current stage energy-based model and that has the current stage resolution; and

adding an expanding block and a new RGB block that each have the higher resolution.

20. The computer-implemented method of claim 15 further comprising:

using the trained energy-based model having the final resolution to generate a synthesized image in the target domain.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 24, 2022
From: XIE, JIANWEN; ZHAO, YANG; LI, PING
To: BAIDU USA LLC
Reel/Frame 059383/0791 →
Continuity (2)
Provisional Application 63086496 · Oct 1, 2020
Related Publication 20220108426A1 · Apr 7, 2022
Cited By (2)
US 12,455,972 US 12,586,155