meddlr.modeling#

Meddlr ships with some popular models for image reconstruction and analysis tasks. These models can be configured using meddlr configuration files, which allows for faster iteration and hyperparameter management.

Meddlr also provides model blocks and layers, which are modularized components for different models. This affords the flexibility of creating new model architectures without having to re-implement useful blocks/layers.

meddlr.modeling.meta_arch#

Meddlr is composed of a series of meta-architectures, which can be leveraged in different applications. While some of these architectures are unique to particular applications (e.g. unrolled networks for image reconstruction), most networks are built for plug-and-play use for any application (e.g. U-Net). Some of these meta architectures are wrappers around more basic architectures. For example, VortexModel and N2RModel wrap around other architectures.

meddlr.modeling.meta_arch.CSModel

Compressed sensing reconstruction with l1 wavelet regularization.

meddlr.modeling.meta_arch.DenoisingModel

A denoising trainer.

meddlr.modeling.meta_arch.GeneralizedUNet

A general implementation of the U-Net architecture.

meddlr.modeling.meta_arch.GeneralizedUnrolledCNN

Unrolled compressed sensing model.

meddlr.modeling.meta_arch.N2RModel

Noise2Recon model.

meddlr.modeling.meta_arch.SSDUModel

Self-supervised learning via data undersampling.

meddlr.modeling.meta_arch.VortexModel

VORTEX model.

meddlr.modeling.layers#

Layers are the most elementary components of the model architecture. Meddlr provides a unified interface for building both default PyTorch and custom layers implemented in Meddlr.

Custom layers#

meddlr.modeling.layers.ConvWS2d

Conv2d with Weight Standardization.

meddlr.modeling.layers.ConvWS3d

Conv3d with Weight Standardization.

meddlr.modeling.layers.GaussianBlur

Creates an operator that blurs a tensor using a Gaussian filter.

Build utils#

meddlr.modeling.layers.get_layer_type

Returns the layer type based on the name and, in some cases, the dimension.

meddlr.modeling.layers.get_layer_kind

Returns the layer kind based on the layer type.

meddlr.modeling.blocks#

Layers can be assembled together to make blocks. The default blocks provided in meddlr can be constructed using sequences of strings and optional keyword arguments.

meddlr.modeling.blocks.SimpleConvBlockNd

A convolutional block supporting normalization, conv, activation, and dropout.

meddlr.modeling.blocks.SimpleConvBlock2d

2D implementation of SimpleConvBlockNd.

meddlr.modeling.blocks.SimpleConvBlock3d

3D implementation of SimpleConvBlockNd.

meddlr.modeling.blocks.ResBlockNd

Residual block.

meddlr.modeling.blocks.ResBlock2d

2D implementation of :cls:`ResBlockNd`.

meddlr.modeling.blocks.ResBlock3d

3D implementation of ResBlockNd.

meddlr.modeling.blocks.ConcatBlockNd

param in_channels

Number of channels in the input.

meddlr.modeling.blocks.ConcatBlock2d

2D implementation of ConcatBlockNd.

meddlr.modeling.blocks.ConcatBlock3d

3D implementation of ConcatBlockNd.