JuliaWolleb / Diffusion-based-Segmentation

This is the official Pytorch implementation of the paper "Diffusion Models for Implicit Image Segmentation Ensembles".
MIT License
271 stars 35 forks source link

About the output channel of the model #21

Closed CaviarLover closed 1 year ago

CaviarLover commented 1 year ago

In line 170 of script_util.py, the out_channel is set to 2 by default with the comment "3 if not learn_sigma else 6". Should it be set to 1 if not learned variance since the segmentation mask is generated slice by slice?

And for all the discarded slices (the lowest 80 slices and the uppermost 26 slices), do the corresponding predicted segmentation masks all zeros?

Thanks if the question can be answered~

JuliaWolleb commented 1 year ago

Yes exactly, if you set learn_sigma=False, then you need to set the out_channel to 1.

For the discarded slices we did not check whether they are 0 or not. The reason why we discarded them was that the tumors are mostly in the middle slices. Then the classification model would be biased to predict the upper and lower slices to be healthy based on the location rather than tumor.