bob.ip.binseg.models.backbones.vgg

Functions

vgg16_bn_for_segmentation([pretrained, progress])

VGG 16-layer model (configuration “D”) with batch normalization “Very Deep Convolutional Networks For Large-Scale Image Recognition”

vgg16_for_segmentation([pretrained, progress])

VGG 16-layer model (configuration “D”) “Very Deep Convolutional Networks For Large-Scale Image Recognition”

Classes

VGG4Segmentation(*args, **kwargs)

Adaptation of base VGG functionality to U-Net style segmentation

class bob.ip.binseg.models.backbones.vgg.VGG4Segmentation(*args, **kwargs)[source]

Bases: torchvision.models.vgg.VGG

Adaptation of base VGG functionality to U-Net style segmentation

This version of VGG is slightly modified so it can be used through torchvision’s API. It outputs intermediate features which are normally not output by the base VGG implementation, but are required for segmentation operations.

Parameters

return_features (list, Optional) – A list of integers indicating the feature layers to be returned from the original module.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
bob.ip.binseg.models.backbones.vgg.vgg16_for_segmentation(pretrained=False, progress=True, **kwargs)[source]

VGG 16-layer model (configuration “D”) “Very Deep Convolutional Networks For Large-Scale Image Recognition”

Parameters
  • pretrained (bool) – If True, returns a model pre-trained on ImageNet

  • progress (bool) – If True, displays a progress bar of the download to stderr

bob.ip.binseg.models.backbones.vgg.vgg16_bn_for_segmentation(pretrained=False, progress=True, **kwargs)[source]

VGG 16-layer model (configuration “D”) with batch normalization “Very Deep Convolutional Networks For Large-Scale Image Recognition”

Parameters
  • pretrained (bool) – If True, returns a model pre-trained on ImageNet

  • progress (bool) – If True, displays a progress bar of the download to stderr