QMRITools`
QMRITools`
MakeUnet
MakeUnet[nClasses,dimIn]
Generates a UNET with one channel as input and nClasses as output.
MakeUnet[nChannels,nClasses,dimIn]
Generates a UNET with nChannels as input and nClasses as output. he number of parameter of the first convolution layer can be set with dep. The data dimensions can be 2D or 3D and each of the dimensions should be 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240 or 256. However dimensions can be different based on the network depth and the block type. The implemented block types are "Conv", "UNet", "ResNet", "DenseNet", "Inception", or "U2Net".
Details
- The following options can be given:
-
NetworkArchitecture "UNet" NeworkArchitecture is an option for MakeUnet. It defines the architecture of the network. It can be "UNet", "UNet+", or "UNet++". For "UNet+" or "UNet++" it can also be {arch, i} where i specifies how many of the top layers are connected to the mapping layer. BlockType "ResNet" BlockType is an option for MakeUnet. It specifies the type of block used in the network. It can be "Conv", "UNet", "ResNet", "DenseNet", "Inception", or "U2Net". ActivationType "GELU" ActivationType is an option for MakeUnet. It sepecifies which activation layer is used in the network. It can be "LeakyRELU" or any type allowed by a "name" definition in ElementwiseLayer. RescaleMethod "Conv" RescaleMethod is an option for MakeUnet. It specifies how the network rescales. It can be "Conv" or "Pool". NetworkDepth 5 NetworkDepth is an option for MakeUnet. It specifief how deep the UNET will be. DownsampleSchedule Automatic DownsampleSchedule is an option for MakeUnet. It defines how the data is downsampled for each of the deeper layers of the Unet. By default is is a factor two for each layer. A custum schedual for a 5 layer 3D Unet could be {{2,2,2},{1,2,2},{2,2,2},{1,2,2}, 1}. The deepest layer is always downsampled by 1 and therefore not needed to be specified. SettingSchedule Automatic SettingSchedule is an option for MakeUnet. It defines the settings for the Unet blocks. If one setting is given it applied to all layers. If a list of settings is given the settings can be different per layer. The following settings are the default settings. "Unet": convblock repetitions, 2, "ResNet" -> convblock repetitions, 2, "DenseNet" -> {dense depth, block repetitions}, {4,2}, "Inception" -> {inception width, block repetitions}, {4,2}, "U2Net"-> {Unet depth, downscale}, {5, True}. FeatureSchedule 32 FeatureSchedule is an option for MakeUnet. It defines how the number of features is upsampled for each of the deeper layers of the Unet. By default it increases the number of features by a factor 2 each layer, i.e. {1, 2, 4, 8, 16}. DropoutRate 0.2 DropoutRate is an option for MakeUnet. It specifies how musch dropout is used after each block. It is a value between 0 and 1, default is .2. MonitorCalc False MonitorCalc is an option for many processing functions. When true the proceses of the calculation is shown.