Menu

PyTorch toolbox to work with spherical surfaces.

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the gallery for the big picture.

class surfify.models.vgg.SphericalVGG(input_channels, cfg, n_classes, input_order=5, conv_mode='DiNe', dine_size=1, repa_size=5, repa_zoom=5, hidden_dim=4096, batch_norm=False, init_weights=True, standard_ico=False, cachedir=None)[source]

Spherical VGG architecture.

See also

SphericalGVGG

Notes

Debuging messages can be displayed by changing the log level using setup_logging(level='debug').

__init__(input_channels, cfg, n_classes, input_order=5, conv_mode='DiNe', dine_size=1, repa_size=5, repa_zoom=5, hidden_dim=4096, batch_norm=False, init_weights=True, standard_ico=False, cachedir=None)[source]

Init class.

Parameters

input_channels : int

the number of input channels.

cfg : list

the definition of layers where ‘M’ stands for max pooling.

num_classes : int

the number of class in the classification problem.

input_order : int, default 5

the input icosahedron order.

conv_mode : str, default ‘DiNe’

use either ‘RePa’ - Rectangular Patch convolution method or ‘DiNe’ - 1 ring Direct Neighbor convolution method.

dine_size : int, default 1

the size of the spherical convolution filter, ie. the number of neighbor rings to be considered.

repa_size : int, default 5

the size of the rectangular grid in the tangent space.

repa_zoom : int, default 5

a multiplicative factor applied to the rectangular grid in the tangent space.

hidden_dim : int, default 4096

the 2-layer classification MLP number of hidden dims.

batch_norm : bool, default False

wether or not to use batch normalization after a convolution layer.

init_weights : bool, default True

initialize network weights.

standard_ico : bool, default False

optionaly use surfify tesselation.

cachedir : str, default None

set this folder to use smart caching speedup.

forward(left_x, right_x)[source]

Forward method.

Parameters

left_x : Tensor (samples, <input_channels>, azimuth, elevation)

input left cortical texture.

right_x : Tensor (samples, <input_channels>, azimuth, elevation)

input right cortical texture.

Returns

out : torch.Tensor

Follow us

© 2021, surfify developers