ge-xing / Diff-UNet

Diff-UNet: A Diffusion Embedded Network for Volumetric Segmentation. (using diffusion for 3D medical image segmentation)
Apache License 2.0
155 stars 21 forks source link

window_infer #1

Closed GYDDHPY closed 1 year ago

GYDDHPY commented 1 year ago

Hi, thank you for your contributions.

I'm confused by the window_infer, which seems to be a MONAI function and is unable to handel the parameter pred_type="ddim_sample.

https://github.com/ge-xing/Diff-UNet/blob/14d55bd06bf59e9f4a06d8d08128d4422ba3b891/train.py#L80-L82

https://github.com/ge-xing/Diff-UNet/blob/14d55bd06bf59e9f4a06d8d08128d4422ba3b891/train.py#L123-L128

920232796 commented 1 year ago

Or you may need to install a new version of monai if you can't run the code successfully.

920232796 commented 1 year ago

The window_infer has a parameter **kwargs, So you can input any variables. The variables will be inputed in the forward function of the model (refer to the forward function of Diffusion Model).

Hi, thank you for your contributions.

I'm confused by the window_infer, which seems to be a MONAI function and is unable to handel the parameter pred_type="ddim_sample.

https://github.com/ge-xing/Diff-UNet/blob/14d55bd06bf59e9f4a06d8d08128d4422ba3b891/train.py#L80-L82

https://github.com/ge-xing/Diff-UNet/blob/14d55bd06bf59e9f4a06d8d08128d4422ba3b891/train.py#L123-L128

GYDDHPY commented 1 year ago

Thank you for your quick reply.