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.base.SphericalBase(input_order, n_layers, conv_mode='DiNe', dine_size=1, repa_size=5, repa_zoom=5, standard_ico=False, cachedir=None)[source]

Spherical network base information.

Use either RePa - Rectangular Patch convolution method or DiNe - Direct Neighbor convolution method.

Examples

>>> from surfify.models import SphericalBase
>>> ico_info = SphericalBase.build_ico_info(input_order=3, n_layers=2)
>>> print(ico_info.keys())
class Ico(order, vertices, triangles, neighbor_indices, down_indices, up_indices, conv_neighbor_indices)
property conv_neighbor_indices

Alias for field number 6

property down_indices

Alias for field number 4

property neighbor_indices

Alias for field number 3

property order

Alias for field number 0

property triangles

Alias for field number 2

property up_indices

Alias for field number 5

property vertices

Alias for field number 1

__init__(input_order, n_layers, conv_mode='DiNe', dine_size=1, repa_size=5, repa_zoom=5, standard_ico=False, cachedir=None)[source]

Init class.

Parameters

input_order : int

the input icosahedron order.

n_layers : int

the number of layers in the network.

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.

standard_ico : bool, default False

optionally uses a standard icosahedron tessalation. FreeSurfer tesselation is used by default.

cachedir : str, default None

set this folder to use smart caching speedup.

classmethod build_ico_info(input_order, n_layers, conv_mode='DiNe', dine_size=1, repa_size=5, repa_zoom=5, standard_ico=False, cachedir=None)[source]

Build an dictionnary containing icosehedron informations at each order of interest with the related upsampling and downsampling informations. This methods is useful to speed up processings by caching icosahedron onformations.

Parameters

input_order : int

the input icosahedron order.

n_layers : int

the number of layers in the network.

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.

standard_ico : bool, default False

optionally uses a standard icosahedron tessalation. FreeSurfer tesselation is used by default.

cachedir : str, default None

set this folder to use smart caching speedup.

Returns

ico : dict of Ico

the icosahedron informations at different orders.

Follow us

© 2021, surfify developers