KidsWithTokens / MedSegDiff

Medical Image Segmentation with Diffusion Model
MIT License
980 stars 147 forks source link

关于dpm_solver的使用问题 #100

Closed xupinggl closed 1 year ago

xupinggl commented 1 year ago

1、我用的作者给的ISIC数据集,其他的默认设置全部和作者一样,跑了10w step,但是sample的output基本是全黑的,或者是有一些随机噪声。有没有可能是我在train的时候将“--diffusion_steps 1000”改为了“--diffusion_steps 50 --dpm_solver True”,dpm_solver是只能在sampling的时候用吗?在train的时候用是不是不能用?

2、我在sampling的时候,也将“--diffusion_steps 1000”改为了“--diffusion_steps 50 --dpm_solver True”,推理时间是比较快,但是推理完两张后,就显示 cuda of memory

heikeyuhuajia commented 1 year ago

Ans1: dpm_solver 只在 sampling 上用。 对于 ISIC 数据集的问题等作者大大回复吧,我没用这个数据集; Ans2: dim-solver 只能在 PyTorch 1.8 上使用,作者还在解决。

xupinggl commented 1 year ago

@heikeyuhuajia thank you very much!

DWBSIC commented 1 year ago

Ans1: dpm_solver 只在 sampling 上用。 对于 ISIC 数据集的问题等作者大大回复吧,我没用这个数据集; Ans2: dim-solver 只能在 PyTorch 1.8 上使用,作者还在解决。

你好,我在Linux系统上使用dpm_solver是没有问题的,pytorch版本是1.9

xupinggl commented 1 year ago

@DWBSIC 好的,谢谢,我用的windows

DWBSIC commented 1 year ago

@DWBSIC 好的,谢谢,我用的windows

@xupinggl Traceback (most recent call last): File "D:\scripts\segmentation_sample.py", line 166, in main() File "D:\scripts\segmentation_sample.py", line 100, in main start = th.cuda.Event(enable_timing=True) File "D:\Program Files\Anaconda\envs\py39\lib\site-packages\torch\cuda\streams.py", line 164, in new return super(Event, cls).new( File "D:\Program Files\Anaconda\envs\py39\lib\site-packages\torch\cuda_utils.py", line 46, in err_fn raise RuntimeError( RuntimeError: Tried to instantiate dummy base class Event

您好,我在Linux系统中进行sample没有任何问题,但是我尝试在Windows系统下进行训练,所有的参数配置都是按照作者在readme中的参数设置,请问为什么会出现上述的错误。

Hello, I have no problem with sampling in Linux system, but I try to train in Windows system, and all parameters are set according to the author's parameter Settings in readme. May I ask why the above errors occur, please help to solve.

if you want to chat with me: WeChat: DWBSIC

jaceqin commented 1 year ago

Ans1: dpm_solver 只在 sampling 上用。 对于 ISIC 数据集的问题等作者大大回复吧,我没用这个数据集; Ans2: dim-solver 只能在 PyTorch 1.8 上使用,作者还在解决。

在pytorch 1.8上也有一样的BUG

Issues-translate-bot commented 1 year ago

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


Ans1: dpm_solver is only used for sampling. Please wait for the author to reply to the question about the ISIC dataset. I don’t use this dataset; Ans2: dim-solver can only be used on PyTorch 1.8, and the author is still working on it.

There is the same BUG on pytorch 1.8

xupinggl commented 1 year ago

Has the problem been solved? I switched to linux, pytorch=1.8.0, and still got the error “cuda of memory”

DWBSIC commented 1 year ago

Has the problem been solved? I switched to linux, pytorch=1.8.0, and still got the error “cuda of memory”

是不是因为显卡内存不够用,或者是batch_size太大了

Is it because the graphics card memory is not enough, or the batch_size is too large

WuJunde commented 1 year ago
  1. DPM is used for sampling and would cause performance compromise
  2. same issue here: https://github.com/WuJunde/MedSegDiff/issues/69
ipwjincheng commented 4 months ago

1、我我用的作者给的ISIC数据集,其他的默认设置全部和作者一样,跑了10w step,但是sample的output基本是全黑的,或者是随机的噪声。是否是我在train的时候会“--diffusion_steps 1000”改为“--diffusion_steps 50--dpm_solver True”,dpm_solver是只能在sampling时用吗?在train的时候用是不是不能用?>> 2、我在sampling时,也将“--diffusion_steps 1000”改为“--diffusion_steps 50--dpm_solver True”推理时间是比较快,但推理完两张后,就显示 cuda of memory hello, when I use dim_solver, the inference image become very bad, have you met this problem

xupinggl commented 4 months ago

    您好,您的邮件我已收到,我会尽快回复的,谢谢!

Issues-translate-bot commented 4 months ago

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


​ ​ Hello, I have received your email and I will reply as soon as possible, thank you!