vessel_filling#
This module uses a convolutional neuronal network to fill empty tubes and vessels.
- fill_vessels(source, sink, resample=None, threshold=0.5, network=None, dtype='float16', cuda=None, processing_parameter=None, verbose=False)[source]#
Fill hollow tubes via a neural network.
Arguments
- sourcestr or Source
The binary data source to fill hollow tubes in.
- sinkstr or Source.
The binary sink to write data to. sink is created if it does not exists.
- resampleint or None
If int, downsample the data by this factor, apply network and upsample.
- thresholdfloat or None
Apply a threshold to the result of the cnn. If None, the probability of being foreground is returned.
- networkstr, Model or None
The network specification. If None, the default trained network is used.
- dtypestr
The dtype to use for the network. See
ClearMap.ImageProcessing.machine_learning.Torch.to()
for details.- cudabool or None
If True, use gpu processing. If None, automatically detect gpu.
- processing_parameterdict or None
Parameter to use for block processing.
- verbosebool
If True, print progress.
Returns
- networkModel
The neural network model.
- vessel_filling_network(network=None, dtype='float16', cuda=None)[source]#
Initialize vessel filling network.
Arguments
- networkstr, Model or None
The network specification. If None the default trained network is used.
- dtypestr
The dtype to use for the network. See
ClearMap.ImageProcessing.machine_learning.Torch.to()
for details.- cudabool or None
If True, use gpu processing. If None, automatically detect gpu.
Returns
- networkModel
The neural network model.
- network_binary_vessel_filling_filename = '/home/charly.rousseau/code/icm/ClearMap2/ClearMap/ImageProcessing/machine_learning/vessel_filling/resources/cnn_binary_vessel_filling.pth'#
Filename of the default neuronal network to use for binary hollow vessel filling.
- resources_path = '/home/charly.rousseau/code/icm/ClearMap2/ClearMap/ImageProcessing/machine_learning/vessel_filling/resources'#
Path to the trained neuronal networks.