imageGenerationWithDiffusionModels

Documentation for imageGenerationWithDiffusionModels.

imageGenerationWithDiffusionModels.add_noise_to_imageFunction
add_noise_to_image(img::Vector{Float64}, noise_step::Int64, alpha_bar::Vector{Float64}; rng = Random.GLOBAL_RNG)

Applies Gaussian noise to an image.

Arguments

  • img::Matrix{Float32} : Input image
  • noise_step::Int64 : A noising step
  • alpha_bar::Vector{Float64} : Vector of noise parameters. Length must be at least "noise_step". Comupted by taking the Cumulative product of (1-"variance schedule")
  • rng::Random.TaskLocalRNG: Random number generator. Defaults to: Random.GLOBAL_RNG.

Returns

A noised version of image.

source
imageGenerationWithDiffusionModels.visualize_noising_of_imageFunction
visualize_noising_of_image(img, noise_step, alpha_bar, rng = Random.GLOBAL_RNG)

Visualizes the Gaussian noising process of an image.

Arguments

  • img::Matrix{Float32} : Input image
  • noise_step::StepRange{Int64, Int64} : Number of noising steps (in each step, noise is applied to the output of the previous step)
  • alpha_bar::Vector{Float64} : Vector of noise parameters. Length must be at least "noise_step". Comupted by taking the Cumulative product of (1-"variance schedule")
  • rng: Random number generator. Defaults to: Random.GLOBAL_RNG.

Returns

An image visualizing the Gaussian noising process of an image horizontally.

source