SuperMedIntel / MedSegDiff

Medical Image Segmentation with Diffusion Model
MIT License
1.09k stars 166 forks source link

Meaning of the high_way parameter #187

Open chinmay5 opened 4 months ago

chinmay5 commented 4 months ago

Hi. Thanks for releasing the code. I have one doubt about the parameter high_way. When I try to run the code with an input with num_channels = 1, the code fails. I realized it happened because of the line:

self.hwm = Generic_UNet(self.in_channels - 1, features, 1, 5, anchor_out=True, upscale_logits=True)

When the input has a single channel, self.in_channels - 1 becomes 0, and thus, the code throws an error. I could not figure out why you are decreasing the number of channels here. Is it fine to use self.in_channels instead as the input (i.e., the U-Net has a single channel input)?

Best, Chinmay

unbroken2650 commented 1 month ago

Same question here