Menu

Helper Module for Deep Learning.

The Pyramid Scene Parsing Network.

class pynet.models.pspnet.BasicBlock(inplanes, planes, stride=1, downsample=None, dilation=1, drop_rate=0)[source]
__init__(inplanes, planes, stride=1, downsample=None, dilation=1, drop_rate=0)[source]

Initialize self. See help(type(self)) for accurate signature.

expansion = 1
forward(x)[source]
class pynet.models.pspnet.Bottleneck(inplanes, planes, stride=1, downsample=None, dilation=1, drop_rate=0)[source]
__init__(inplanes, planes, stride=1, downsample=None, dilation=1, drop_rate=0)[source]

Initialize self. See help(type(self)) for accurate signature.

expansion = 4
forward(x)[source]
class pynet.models.pspnet.PSPModule(features, out_features=1024, sizes=(1, 2, 3, 6), drop_rate=0)[source]
__init__(features, out_features=1024, sizes=(1, 2, 3, 6), drop_rate=0)[source]

Initialize self. See help(type(self)) for accurate signature.

forward(feats)[source]
class pynet.models.pspnet.PSPNet(n_classes=2, sizes=(1, 2, 3, 6), psp_size=2048, deep_features_size=1024, backend='resnet34', drop_rate=0)[source]

Pyramid Scene Parsing Network.

Reference: https://arxiv.org/pdf/1612.01105.pdf Code: https://github.com/cv-lee/BraTs

__init__(n_classes=2, sizes=(1, 2, 3, 6), psp_size=2048, deep_features_size=1024, backend='resnet34', drop_rate=0)[source]

Init class.

Parameters

n_classes: int, default 2

the number of features in the output segmentation map.

debug(name, tensor)[source]

Print debug message.

Parameters

name: str

the tensor name in the displayed message.

tensor: Tensor

a pytorch tensor.

forward(x)[source]
class pynet.models.pspnet.PSPUpsample(in_channels, out_channels, drop_rate=0)[source]
__init__(in_channels, out_channels, drop_rate=0)[source]

Initialize self. See help(type(self)) for accurate signature.

forward(x)[source]
class pynet.models.pspnet.ResNet(block, layers=(3, 4, 23, 3), drop_rate=0)[source]

Implementation of dilated ResNet with deep supervision. Downsampling is changed to 8x.

__init__(block, layers=(3, 4, 23, 3), drop_rate=0)[source]

Initialize self. See help(type(self)) for accurate signature.

forward(x)[source]
pynet.models.pspnet.pspnet_res18(drop_rate=0)[source]
pynet.models.pspnet.pspnet_res34(drop_rate=0)[source]
pynet.models.pspnet.pspnet_res50(drop_rate=0)[source]
pynet.models.pspnet.resnet18(drop_rate=0)[source]
pynet.models.pspnet.resnet34(drop_rate=0)[source]
pynet.models.pspnet.resnet50(drop_rate=0)[source]

Follow us

© 2019, pynet developers .
Inspired by AZMIND template.