NN-FBP Reconstruction

This reconstruction method is now available since PyHST2 includes the implementation by Daniel Pelt, Joost Batenburg ( reference to be added) who gave us the source ( you can see them by cloning the git repository).

You can see a worked out example in the non regressions tests under case NNFBP.

The following documentation has been extracted automatically from the comments found in the source code. Discard Parameters. object variable.

class Parameters_module.Parameters

The input variables are read from the input file. The input file is written with python syntax. The Input file is interpreted as python after a preprocessing The preprocessing was introduced at the time of HST-> PYHST transition to maintaing compatibility with:

  • NO/YES meaning 0/1

  • items containing FILE in their name can be initialized without using the “” which are otherwise necessary for strings

The input file has to set (some of) the following variables. To setup easily an input file you are suggested to start from one of the examples given in the doc.

DENOISING_TYPE = 1
The kind of denoising used at each step of iterative correction :
  • DENOISING_TYPE=1 -> TV denoising (translated to gpu from Emmanuelle Gouillart https://github.com/emmanuelle/tomo-tv/)

    • related parameters : ITERATIVE_CORRECTIONS, DO_PRECONDITION=1, BETA_TV, N_ITERS_DENOISING, DUAL_GAP_STOP,

  • DENOISING_TYPE=4 -> Dictionary patching with Overlapping Patches using FISTA + L1 norm. Following http://arxiv.org/abs/1305.1256

    • related parameters : ITERATIVE_CORRECTIONS, BETA_TV, WEIGHT_OVERLAP, PATCHES_FILE, STEPFORPATCHES

  • DENOISING_TYPE=5 and ITERATIVE_CORRECTIONS>0 -> NN-FBP: Reconstruct using a trained NN-FBP network

    • related parameters : NNFBP_FILTERS_FILE, NNFBP_NLINEAR

  • DENOISING_TYPE=6 and ITERATIVE_CORRECTIONS>0 -> NN-FBP: Create a training set to train a NN-FBP network

    • related parameters : NNFBP_TRAINING_PIXELS_PER_SLICE, NNFBP_TRAINING_RECONSTRUCTION_FILE, NNFBP_NLINEAR,NNFBP_FILTERS_FILE , NNFBP_TRAINING_USEMASK, NNFBP_TRAINING_MASK_FILE , NNFBP_NHIDDEN_NODES

  • DENOISING_TYPE=8 -> Wavelet regularization

    • related parameters : W_WNAME, W_LEVELS, W_FISTA_PARAM, W_CYCLE_SPIN, W_SWT

ITERATIVE_CORRECTIONS = 0

The number of iterative correction loops. If zero no iterative correction (default).

NNFBP_FILTERS_FILE = 'neuralfilters.npz'

File with trained filter weights, as created during training

NNFBP_NLINEAR = 4

Number of linear steps to take before exponential binning. Higher values will result in higher quality reconstructions, but slower training. If DENOISING_TYPE=5, the value for NNFBP_NLINEAR should be equal to the one used when creating the training data with DENOISING_TYPE=6.

NNFBP_TRAINING_MASK_FILE = 'mask.vol'

Optional mask file to use during training. The mask file is a binary file of unsigned 8 bit integers, with one value for each pixel of a single slice. A value of 0 specifies that this pixel can not be picked during training, and a value>0 specifies that this pixel can be picked during training. The mask can be used to train NN-FBP on a specific region of the object, such that it will be able to provide better reconstructions for this region, at the cost of reconstruction quality outside the region.

NNFBP_TRAINING_PIXELS_PER_SLICE = 1000

Number of random pixels to pick per image. Higher values will result in higher quality reconstructions, but slower training. Typical values should result in around 10^5 to 10^6 total number of pixels, so if there are 1024 slices, this should be set between 100 and 1000.

NNFBP_TRAINING_RECONSTRUCTION_FILE = 'reconstruction.vol'

File with a high quality reconstruction of the object, used during training. The slices of this file should match the slices of the dataset. Note that only the .vol extension is supported at the moment, not the .edf extension.

NNFBP_TRAINING_USEMASK = 0

Whether to use an optional mask file (see NNFBP_TRAINING_MASK_FILE).