Skip to content

AHNet parameters for 3D CT organ segmentation #1422

@dlabella29

Description

@dlabella29

I am trying to use AHNet in MONAI instead of Unet for 3D segmentation and cannot figure out the parameters to get the model training.

I'm using nifti CT's with nifti kidney segmentations.

https://docs.monai.io/en/latest/networks.html

Unet working...
model = monai.networks.nets.UNet(dimensions=3, in_channels=1, out_channels=2, channels=(32, 64, 128, 256,512),strides=(2, 2, 2, 2), num_res_units=2, norm=Norm.BATCH,dropout=0.1).to(device)

AHNet not working...
model = monai.networks.nets.AHNet(layers=(3,4,6,3),spatial_dims=3,in_channels=1, out_channels=1,psp_block_num=4,upsample_mode='transpose',pretrained=False,progress=True).to(device)

AHNet error log...
File "SegmentHNfinal.py", line 227, in
outputs = model(inputs)
File "/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/user/MONAIahnet/MONAI-master/monai/networks/nets/ahnet.py", line 497, in forward
sum0 = self.up0(fm4) + fm3
RuntimeError: The size of tensor a (2) must match the size of tensor b (3) at non-singleton dimension 4

Please let me know if you have any direction on how to get this working.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions