Skip to content

Volume

architecture_dict = {'Vanilla': Vanilla, 'DenseNet121': DenseNet121, 'DenseNet169': DenseNet169, 'DenseNet201': DenseNet201, 'ResNet18': ResNet18, 'ResNet34': ResNet34, 'ResNet50': ResNet50, 'ResNet101': ResNet101, 'ResNet152': ResNet152, 'ResNeXt50': ResNeXt50, 'ResNeXt101': ResNeXt101, 'MobileNet': MobileNet, 'MobileNetV2': MobileNetV2, 'VGG16': VGG16, 'VGG19': VGG19, 'ConvNeXtTiny': ConvNeXtTiny, 'ConvNeXtSmall': ConvNeXtSmall, 'ConvNeXtBase': ConvNeXtBase, 'ConvNeXtLarge': ConvNeXtLarge} module-attribute ¤

Dictionary of implemented 3D Architectures Methods in AUCMEDI.

The base key (str) or an initialized Architecture can be passed to the NeuralNetwork class as architecture parameter.

Example
Recommended via NeuralNetwork class
my_model = NeuralNetwork(n_labels=4, channels=1, architecture="3D.ResNet50",
                          input_shape(128,128,128), activation_output="softmax")
Manual via architecture_dict import
from aucmedi.neural_network.architectures import Classifier, architecture_dict

classification_head = Classifier(n_labels=4, activation_output="softmax")
my_arch = architecture_dict["3D.ResNet50"](classification_head,
                                           channels=1, input_shape=(128,128,128))
my_model = NeuralNetwork(n_labels=None, channels=None, architecture=my_arch)
Manual via module import
from aucmedi.neural_network.architectures import Classifier
from aucmedi.neural_network.architectures.volume import ResNet50

classification_head = Classifier(n_labels=4, activation_output="softmax")
my_arch = ResNet50(classification_head,
                                channels=1, input_shape=(128,128,128))

my_model = NeuralNetwork(n_labels=None, channels=None, architecture=my_arch)
Warning

If passing an architecture key to the NeuralNetwork class, be aware that you have to add "3D." in front of it.

For example:

# for the volume architecture "ResNeXt101"
architecture="3D.ResNeXt101"

Architectures are based on the abstract base class aucmedi.neural_network.architectures.arch_base.Architecture_Base.

supported_standardize_mode = {'Vanilla': 'z-score', 'DenseNet121': 'torch', 'DenseNet169': 'torch', 'DenseNet201': 'torch', 'ResNet18': 'grayscale', 'ResNet34': 'grayscale', 'ResNet50': 'grayscale', 'ResNet101': 'grayscale', 'ResNet152': 'grayscale', 'ResNeXt50': 'grayscale', 'ResNeXt101': 'grayscale', 'MobileNet': 'tf', 'MobileNetV2': 'tf', 'VGG16': 'caffe', 'VGG19': 'caffe', 'ConvNeXtTiny': None, 'ConvNeXtSmall': None, 'ConvNeXtBase': None, 'ConvNeXtLarge': None} module-attribute ¤

Dictionary of recommended Standardize techniques for 3D Architectures Methods in AUCMEDI.

The base key (str) can be passed to the DataGenerator as standardize_mode parameter.

Info

If training a new model from scratch, any Standardize technique can be used at will.
However, if training via transfer learning, it is required to use the recommended Standardize technique!

Example
Recommended via the NeuralNetwork class
my_model = NeuralNetwork(n_labels=8, channels=3, architecture="3D.DenseNet121")

my_dg = DataGenerator(samples, "images_dir/", labels=None,
                      resize=my_model.meta_input,                  # (64, 64, 64)
                      standardize_mode=my_model.meta_standardize)  # "torch"
Manual via supported_standardize_mode import
from aucmedi.neural_network.architectures import supported_standardize_mode
sf_norm = supported_standardize_mode["3D.DenseNet121"]

my_dg = DataGenerator(samples, "images_dir/", labels=None,
                      resize=(64, 64, 64),                         # (64, 64, 64)
                      standardize_mode=sf_norm)                    # "torch"
Warning

If using an architecture key for the supported_standardize_mode dictionary, be aware that you have to add "3D." in front of it.

For example:

# for the volume architecture "ResNeXt101"
from aucmedi.neural_network.architectures import supported_standardize_mode
sf_norm = supported_standardize_mode["3D.ResNeXt101"]