fallenshock / SinDDM

Official pytorch implementation of the paper: "SinDDM: A Single Image Denoising Diffusion Model"
https://matankleiner.github.io/sinddm/
MIT License
112 stars 14 forks source link

The interpolation used to upsample/downsample the image #3

Open KevinWang676 opened 1 year ago

KevinWang676 commented 1 year ago

Hi, I'm trying to understand the math part of your algorithm. And I wonder which interpolation you use in order to upsample/downsample the image. I saw both LANCZOS and BILINEAR interpolation in function.py, so I'm a little confused. Could you explain how you use these two interpolations? Thank you in advance.

image

fallenshock commented 1 year ago

Hi, we use LANCZOS to create the downsampled versions of the image, and BILINEAR to create their blurry upsampled versions for training. We use the same bilinear interpolation during upsampling in the sampling process.

KevinWang676 commented 1 year ago

Hi, thanks for you reply! It helps a lot. I have another question on the math part.

Because in your paper there is only the relationship between $x_{t}^{s}$ and $x_{t}^{s, \text{mix}}$ as shown below

$x_{t}^{s} = \sqrt{\bar{\alpha}_t} x_{t}^{s, \text{mix}} + \sqrt{1-\bar{\alpha}_t} \epsilon$