napari_cellseg3d.code_models.crf#
Implements the CRF post-processing step for WNet3D.
The CRF requires the following parameters:
images : Array of shape (N, C, H, W, D) containing the input images.
predictions: Array of shape (N, K, H, W, D) containing the predicted class probabilities for each pixel.
sa: alpha standard deviation, the scale of the spatial part of the appearance/bilateral kernel.
sb: beta standard deviation, the scale of the color part of the appearance/bilateral kernel.
sg: gamma standard deviation, the scale of the smoothness/gaussian kernel.
w1: weight of the appearance/bilateral kernel.
w2: weight of the smoothness/gaussian kernel.
Inspired by https://arxiv.org/abs/1606.00915 and https://arxiv.org/abs/1711.08506. Also uses research from: Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials Philipp Krähenbühl and Vladlen Koltun NIPS 2011
Implemented using the pydensecrf library available at lucasb-eyer/pydensecrf. However, this is not maintained, thus we maintain this pacakge at AdaptiveMotorControlLab/pydensecrf.
Functions
|
Corrects the shape of the image to be compatible with the CRF post-processing step. |
|
Implements the CRF post-processing step for the WNet3D. |
|
CRF post-processing step for the WNet3D, applied to a batch of images. |
|
Implements the CRF post-processing step for the WNet3D. |
Classes
|
Worker for the CRF post-processing step for the WNet3D. |