niftynet.layer.crf module¶
-
permutohedral_compute
(data_vectors, barycentric, blurNeighbours1, blurNeighbours2, indices, name, reverse)[source]¶
-
class
CRFAsRNNLayer
(alpha=5.0, beta=5.0, gamma=5.0, T=5, aspect_ratio=(1.0, 1.0, 1.0), name='crf_as_rnn')[source]¶ Bases:
niftynet.layer.base_layer.TrainableLayer
This class defines a layer implementing CRFAsRNN described in [1] using a bilateral and a spatial kernel as in [2]. Essentially, this layer smooths its input based on a distance in a feature space comprising spatial and feature dimensions. [1] Zheng, Shuai, et al. “Conditional random names as recurrent neural networks.” CVPR 2015. [2] https://arxiv.org/pdf/1210.5644.pdf
-
__init__
(alpha=5.0, beta=5.0, gamma=5.0, T=5, aspect_ratio=(1.0, 1.0, 1.0), name='crf_as_rnn')[source]¶ Parameters: alpha: bandwidth for spatial coordinates in bilateral kernel.
Higher values cause more spatial blurring- beta: bandwidth for feature coordinates in bilateral kernel
- Higher values cause more feature blurring
- gamma: bandwidth for spatial coordinates in spatial kernel
- Higher values cause more spatial blurring
T: number of stacked layers in the RNN aspect_ratio: spacing of adjacent voxels (allows isotropic spatial smoothing when voxels are
not isotropic
-