bob.ip.binseg.models.resunet

Functions

resunet50([pretrained_backbone, progress])

Builds Residual-U-Net-50 by adding backbone and head together

Classes

ResUNet([in_channels_list, pixel_shuffle])

UNet head module for ResNet backbones

class bob.ip.binseg.models.resunet.ResUNet(in_channels_list=None, pixel_shuffle=False)[source]

Bases: Module

UNet head module for ResNet backbones

Parameters
  • in_channels_list (list, Optional) – number of channels for each feature map that is returned from backbone

  • pixel_shuffle (bool, Optional) – if should use pixel shuffling instead of pooling

forward(x)[source]
Parameters

x (list) – list of tensors as returned from the backbone network. First element: height and width of input image. Remaining elements: feature maps for each feature level.

bob.ip.binseg.models.resunet.resunet50(pretrained_backbone=True, progress=True)[source]

Builds Residual-U-Net-50 by adding backbone and head together

Parameters
  • pretrained_backbone (bool, Optional) – If set to True, then loads a pre-trained version of the backbone (not the head) for the DRIU network using VGG-16 trained for ImageNet classification.

  • progress (bool, Optional) – If set to True, and you decided to use a pretrained_backbone, then, shows a progress bar of the backbone model downloading if download is necesssary.

Returns

module – Network model for Residual U-Net 50

Return type

torch.nn.Module