deepdraw.models.driu_od#

Functions

driu_od([pretrained_backbone, progress])

Builds DRIU for Optical Disc by adding backbone and head together.

Classes

DRIUOD([in_channels_list])

DRIU for optic disc segmentation head module.

class deepdraw.models.driu_od.DRIUOD(in_channels_list=None)[source]#

Bases: Module

DRIU for optic disc segmentation head module.

Parameters:

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

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.

Return type:

torch.Tensor

deepdraw.models.driu_od.driu_od(pretrained_backbone=True, progress=True)[source]#

Builds DRIU for Optical Disc 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 (torch.nn.Module) – Network model for DRIU (optic disc segmentation)