Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample得到预测的噪声后怎么去除噪声呢? #205

Open
qxxfd opened this issue Dec 1, 2024 · 1 comment
Open

sample得到预测的噪声后怎么去除噪声呢? #205

qxxfd opened this issue Dec 1, 2024 · 1 comment

Comments

@qxxfd
Copy link

qxxfd commented Dec 1, 2024

我的任务是实现分割,输入的图片对是原图 分割mask图,在使用readme的教程中训练的我的代码,结果发现 模型参数ModelMeanType.EPSILON: noise,也就是unet预测的noise么,调用segmentation_sample.py函数得到的
sample, x_noisy, org, cal, cal_out = sample_fn(
model,
(batch_size, channels, args.image_size, args.image_size), img,
step = args.diffusion_steps,
clip_denoised=args.clip_denoised,
model_kwargs=model_kwargs,
)
sample是noise么,之后怎么处理得到我要的target分割图呢
我在可视化sample后发现和我想要的mask相差甚远,看了模型参数发现预测的是noise 值,是否有朋友知道有输入图 noise 变量 怎么得到mask图,请教各位互联网朋友们,感谢!

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: sampleHow to remove the noise after getting the predicted noise?

My task is to achieve segmentation. The input image pair is the original image segmentation mask map. I trained my code in the tutorial using the readme. It turns out that the model parameter ModelMeanType.EPSILON: noise, which is the noise predicted by unet, calls segmentation_sample. .py function obtained
sample, x_noisy, org, cal, cal_out = sample_fn(
model,
(batch_size, channels, args.image_size, args.image_size), img,
step = args.diffusion_steps,
clip_denoised=args.clip_denoised,
model_kwargs=model_kwargs,
)
Is the sample noise? How can I get the target segmentation map I want?
After visualizing the sample, I found that the mask was far from what I wanted. After looking at the model parameters, I found that the predicted noise value was. Does anyone know how to get the mask map with the noise variable in the input map? I would like to ask all Internet friends, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants