Heads3D#
- class vision_architectures.blocks.heads_3d.ClassificationHead3D(in_channels, classes, pooling='avg', dropout=0.2, activation=None)[source]#
Bases:
Sequential
A general purpose classification head for 3D inputs.
# Inspiration: qubvel-org/segmentation_models.pytorch
- __init__(in_channels, classes, pooling='avg', dropout=0.2, activation=None)[source]#
Initializes the head.
- Parameters:
in_channels (
int
) – Number of input channels.classes (
int
) – Number of output classespooling (
str
) – Should be one of “avg” or “max”. Defaults to “avg”.dropout (
float
) – Amount of dropout to apply. Defaults to 0.2.activation (
Optional
[str
]) – Type of activation to perform. Defaults to None.
- Raises:
ValueError – Incorrect pooling type.
- class vision_architectures.blocks.heads_3d.SegmentationHead3D(in_channels, out_channels, kernel_size=3, activation=None, upsampling=1)[source]#
Bases:
Sequential
A general purpose segmentation head for 3D inputs.”
Inspiration: qubvel-org/segmentation_models.pytorch
- __init__(in_channels, out_channels, kernel_size=3, activation=None, upsampling=1)[source]#
Initializes the segmentation head
- Parameters:
in_channels (
int
) – Number of input channels.out_channels (
int
) – Number of output channels.kernel_size (
float
) – Size of the kernel. Defaults to 3.activation (
Optional
[str
]) – Type of activation to perform. Defaults to None.upsampling (
float
) – Scale factor. Defaults to 1.