mmv_im2im.models.nets package

Submodules

mmv_im2im.models.nets.BranchedERFNet_2d module

Author: Davy Neven Licensed under the CC BY-NC 4.0 license (https://creativecommons.org/licenses/by-nc/4.0/) https://github.com/davyneven/SpatialEmbeddings

class mmv_im2im.models.nets.BranchedERFNet_2d.BranchedERFNet_2d(num_classes, input_channels=1, encoder=None)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input, only_encode=False)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

init_output(n_sigma=1)[source]
training: bool

mmv_im2im.models.nets.BranchedERFNet_3d module

class mmv_im2im.models.nets.BranchedERFNet_3d.BranchedERFNet_3d(num_classes, input_channels=1, encoder=None)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input, only_encode=False)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

init_output(n_sigma=1)[source]
training: bool

mmv_im2im.models.nets.SA_2d module

class mmv_im2im.models.nets.SA_2d.Bottleneck(nc)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.SA_2d.Bottleneck_transition(in_channels, nc)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.SA_2d.SuggestiveAnnotationModel(in_channels=1, out_channels=2, num_feature=32)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool

mmv_im2im.models.nets.deeplabv3_2d module

class mmv_im2im.models.nets.deeplabv3_2d.Net(backbone, pretrained: bool = False, pretrained_backbone: bool = True, in_channels: int = 3, num_classes: int = 21, aux_loss: bool | None = None)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool

mmv_im2im.models.nets.erfnet module

class mmv_im2im.models.nets.erfnet.Decoder(num_classes)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet.DownsamplerBlock(ninput, noutput)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet.Encoder(num_classes, input_channels)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input, predict=False)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet.Net(num_classes, input_channels, encoder=None)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input, only_encode=False)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet.UpsamplerBlock(ninput, noutput)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet.non_bottleneck_1d(chann, dropprob, dilated)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool

mmv_im2im.models.nets.erfnet_3d module

class mmv_im2im.models.nets.erfnet_3d.Decoder(num_classes)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet_3d.DownsamplerBlock(ninput, noutput)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet_3d.Encoder(num_classes, input_channels)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input, predict=False)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet_3d.Net(num_classes, input_channels, encoder=None)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input, only_encode=False)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet_3d.UpsamplerBlock(ninput, noutput)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.erfnet_3d.non_bottleneck_1d(chann, dropprob, dilated)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool

mmv_im2im.models.nets.fnet_nn_2d module

class mmv_im2im.models.nets.fnet_nn_2d.Net(depth=4, mult_chan=32)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.fnet_nn_2d.SubNet2Conv(n_in, n_out)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool

mmv_im2im.models.nets.fnet_nn_3d module

class mmv_im2im.models.nets.fnet_nn_3d.Net(depth=4, mult_chan=32, in_channels=1, out_channels=1)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.fnet_nn_3d.SubNet2Conv(n_in, n_out)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool

mmv_im2im.models.nets.gans module

mmv_im2im.models.nets.gans.define_discriminator(model_info)[source]
mmv_im2im.models.nets.gans.define_generator(model_info)[source]
class mmv_im2im.models.nets.gans.generator_encoder_decoder(model_info)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.gans.multiscale_discriminator(num_discriminator, **kwargs)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.gans.patch_discriminator(spatial_dims, in_channels, nf, n_layers, norm_layer, return_features: bool = False)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class mmv_im2im.models.nets.gans.preset_generator_resent(spatial_dims, in_channels, out_channels, n_down_blocks, n_res_blocks, nf=64, norm_layer='INSTANCE', use_dropout=None)[source]

Bases: Module

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool

Module contents