deepdraw.models.hed#
Functions
|
Builds HED by adding backbone and head together. |
Classes
Takes in five feature maps with one channel each, concatenates thems and applies a 1x1 convolution with 1 output channel. |
|
|
HED head module. |
- class deepdraw.models.hed.ConcatFuseBlock[source]#
Bases:
Module
Takes in five feature maps with one channel each, concatenates thems and applies a 1x1 convolution with 1 output channel.
- forward(x1, x2, x3, x4, x5)[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.
- class deepdraw.models.hed.HED(in_channels_list=None)[source]#
Bases:
Module
HED head module.
- Parameters:
in_channels_list (list) – number of channels for each feature map that is returned from backbone
- deepdraw.models.hed.hed(pretrained_backbone=True, progress=True)[source]#
Builds HED by adding backbone and head together.
- Parameters:
pretrained_backbone (
bool
, Optional) – If set toTrue
, 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 toTrue
, and you decided to use apretrained_backbone
, then, shows a progress bar of the backbone model downloading if download is necesssary.
- Returns:
module (
torch.nn.Module
) – Network model for HED