liveBook · Manning

Image generation

As explained in Deep Learning with PyTorch, Second Edition

The task of creating new visual content from learned patterns, mentioned here as a preceding example task.

Image generation creates new visual content by learning the underlying distribution of image data and sampling new, plausible images from those learned patterns. Unlike text generation, it must model spatial dependencies among pixels and their arrangement across the whole image. section 10.0

A typical generative approach develops through these ideas:

  • VAEs and GANs established early successful architectures for generating images. section 10.0
  • Diffusion models gradually add scheduled noise to an image, then learn to reverse that process. section 10.10
  • A neural network predicts the noise added at each timestep, allowing sampling to subtract noise step by step. section 10.10

From pixels to plausible images

A diffusion model can start with a highly corrupted image or noise and repeatedly estimate what should be removed. Sinusoidal timestep embeddings help represent where the sample is in this process. This principle underlies systems such as DALL-E and Stable Diffusion. section 10.10

How Deep Learning with PyTorch, Second Edition covers it

How deep it goes
Progresses from architectural history to diffusion fundamentals, noise schedules, embeddings, training, sampling, and a from-scratch implementation.
Examples
Uses pixels, image noise, beta schedules, sinusoidal embeddings, DALL-E, and Stable Diffusion as concrete examples.
What it assumes
Assumes familiarity with deep learning and introduces image generation by contrasting it with previously studied text generation.
What you can do after
Build a basic diffusion model from scratch and understand how it generates images by reversing progressively added noise.
How it connects
Connects image generation with generative AI, text generation, VAEs, GANs, diffusion models, neural networks, and spatial dependencies.

Also explained in

Compare how 6 books explain image generation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with PyTorch, Second Edition. The section links point to the parts of the book it draws on.