JCruan519 / VM-UNet

(ARXIV24) This is the official code repository for "VM-UNet: Vision Mamba UNet for Medical Image Segmentation".
Apache License 2.0
393 stars 12 forks source link

Image pre-processing about the synapse dateset #30

Open PURSUETHESUN opened 3 months ago

PURSUETHESUN commented 3 months ago

While reproducing your multi-organ segmentation work, I noticed that the number of channels after image preprocessing is 1, which does not match the number of input channels (3) set in the source code you provided. Why is this?

JCruan519 commented 3 months ago

Hello, you can check lines 28 to 29 in the vmunet.py file. When the number of input image channels is 1, it will perform a repeat operation.

    def forward(self, x):
        if x.size()[1] == 1:
            x = x.repeat(1,3,1,1)
        logits = self.vmunet(x)
        if self.num_classes == 1: return torch.sigmoid(logits)
        else: return logits