vis4d.op.base.dla

DLA base model.

Classes

BasicBlock(inplanes, planes[, stride, dilation])

BasicBlock.

Bottleneck(inplanes, planes[, stride, dilation])

Bottleneck.

BottleneckX(inplanes, planes[, stride, dilation])

BottleneckX.

DLA([name, levels, channels, block, ...])

DLA base model.

Root(in_channels, out_channels, kernel_size, ...)

Root.

Tree(levels, block, in_channels, out_channels)

Tree.

class BasicBlock(inplanes, planes, stride=1, dilation=1)[source]

BasicBlock.

Creates an instance of the class.

forward(input_x, residual=None)[source]

Forward.

Return type:

Tensor

class Bottleneck(inplanes, planes, stride=1, dilation=1)[source]

Bottleneck.

Creates an instance of the class.

forward(input_x, residual=None)[source]

Forward.

Return type:

Tensor

class BottleneckX(inplanes, planes, stride=1, dilation=1)[source]

BottleneckX.

Creates an instance of the class.

forward(input_x, residual=None)[source]

Forward.

Return type:

Tensor

class DLA(name=None, levels=(1, 1, 1, 2, 2, 1), channels=(16, 32, 64, 128, 256, 512), block='BasicBlock', residual_root=False, cardinality=32, weights=None, style='imagenet')[source]

DLA base model.

Creates an instance of the class.

forward(images)[source]

DLA forward.

Parameters:

images (Tensor[N, C, H, W]) – Image input to process. Expected to type float32 with values ranging 0..255.

Returns:

The output feature pyramid. The list index represents the level, which has a downsampling raio of 2^index. fp[0] is a feature map with the image resolution instead of the original image.

Return type:

fp (list[Tensor])

load_pretrained_model(weights)[source]

Load pretrained weights.

Return type:

None

property out_channels: list[int]

Get the numbers of channels for each level of feature pyramid.

Returns:

number of channels

Return type:

list[int]

class Root(in_channels, out_channels, kernel_size, residual)[source]

Root.

Creates an instance of the class.

forward(*input_x)[source]

Forward.

Return type:

Tensor

class Tree(levels, block, in_channels, out_channels, stride=1, level_root=False, root_dim=0, root_kernel_size=1, dilation=1, root_residual=False)[source]

Tree.

Creates an instance of the class.

forward(input_x, residual=None, children=None)[source]

Forward.

Return type:

Tensor