model package

Subpackages

model.utils module

model.utils.get_model(args, pretrain=False)[source]

Function to get the model based on the arguments. Actually the models available, only 3 dimensions, are:

  • UNETR

  • UNet

  • VNet

  • AttentionUNet

  • ResUNet

  • MedFormer

  • SegFormer

  • UNetPlusPlus

  • SwinUNETR

  • SAM3D

  • nnFormer: don’t work properly TODO

  • VTUNet: don’t work properly TODO

  • FCN_Net: don’t work properly TODO

TODO: Implement the other models, for example:
  • DeepLabV3

  • PSPNet

Parameters:
  • args (argparse.Namespace) – Arguments from the command line.

  • pretrain (bool, optional) – Set to true if you use a pretrained model. Defaults to False.

Raises:
  • ValueError – No pretrain model available

  • ValueError – Invalid dimension, should be ‘2d’ or ‘3d’

Returns:

The model object.

Return type:

Model

Module contents