liom_toolkit.segmentation.vseg.model module
- class liom_toolkit.segmentation.vseg.model.ConvBlock(in_c, out_c)
Bases:
ModuleConvolutional block for the U-Net architecture
- forward(inputs: Tensor) Tensor
Forward pass of the convolutional block
- Parameters:
inputs (torch.Tensor) – The input tensor
- Returns:
The output tensor
- Return type:
torch.Tensor
- class liom_toolkit.segmentation.vseg.model.DecoderBlock(in_c, out_c)
Bases:
ModuleDecoder block for the U-Net architecture
- forward(inputs: Tensor, skip: Tensor) Tensor
Forward pass of the decoder block
- Parameters:
inputs (torch.Tensor) – The input tensor
skip (torch.Tensor) – The skip tensor
- Returns:
The output tensor
- Return type:
torch.Tensor
- class liom_toolkit.segmentation.vseg.model.EncoderBlock(in_c, out_c)
Bases:
ModuleEncoder block for the U-Net architecture
- forward(inputs: ~torch.Tensor) -> (<class 'torch.Tensor'>, <class 'torch.Tensor'>)
Forward pass of the encoder block
- Parameters:
inputs (torch.Tensor) – The input tensor
- Returns:
The output tensor
- Return type:
torch.Tensor
- class liom_toolkit.segmentation.vseg.model.VsegModel(pretrained: bool = False, device: device = device(type='cpu'))
Bases:
ModuleU-Net model for vessel segmentation
- b
Decoder
- d4
Classifier
- e4
Bottleneck
- forward(inputs: Tensor) Tensor
Forward pass of the U-Net model
- Parameters:
inputs (torch.Tensor) – The input tensor
- Returns:
The output tensor
- Return type:
torch.Tensor