DPS2022 / diffusion-posterior-sampling

Official pytorch repository for "Diffusion Posterior Sampling for General Noisy Inverse Problems"
https://dps2022.github.io/diffusion-posterior-sampling-page/
425 stars 46 forks source link

Details about pretrained neural network #10

Closed sundeco closed 1 year ago

sundeco commented 1 year ago

I am trying to use the pretrained neural network with my own inputs. From my understanding, the output has 6 channels, the first 3 of which are the mean, and the last 3 of which are the variance. I believe the network is trained on T=1000 steps. Therefore, when the input is a clean image, at t=999, the output should be almost unchanged. But when I ran it, although the shape of the face and features are there, the coloring and contrast is completely different. So I am wondering what are the scales of the images for the input and output? The most realistic output I get is when I scale the input to be between 0 and 1, but even in that case, the output is mostly between -1 and 1.

sundeco commented 1 year ago

Misunderstood the network.

xiximelon commented 1 year ago

@sundeco hello,do you konw the pretrained network is trained on what parameters? this is an exmaple on imagenet64 MODEL_FLAGS="--image_size 64 --num_channels 128 --num_res_blocks 3 --learn_sigma True" DIFFUSION_FLAGS="--diffusion_steps 4000 --noise_schedule cosine" TRAIN_FLAGS="--lr 1e-4 --batch_size 128" look forward to your reply!