MedSegDiff icon indicating copy to clipboard operation
MedSegDiff copied to clipboard

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

Open qxxfd opened this issue 1 year ago • 5 comments

我的任务是实现分割,输入的图片对是原图 分割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图,请教各位互联网朋友们,感谢!

qxxfd avatar Dec 01 '24 12:12 qxxfd

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!

Issues-translate-bot avatar Dec 01 '24 12:12 Issues-translate-bot

Same question with you , have you solve your problem?

hourlass avatar Feb 27 '25 01:02 hourlass

same question

invoker-qqwrv avatar May 21 '25 09:05 invoker-qqwrv

Same question with you , have you solve your problem?

XiaowangjiAaa avatar Jun 11 '25 05:06 XiaowangjiAaa

Same question with you , have you solve your problem?

ashevimostar avatar Jul 02 '25 08:07 ashevimostar