Interfaces#
- class sdeconv.psfs.interface.SPSFGenerator#
Interface for a psf generator
- class sdeconv.deconv.interface.SDeconvFilter#
Interface for a deconvolution filter
All the algorithm settings must be set in the __init__ method (PSF included) and the __call__ method is used to actually do the calculation
- class sdeconv.deconv.interface_nn.NNModule#
Deconvolution using the noise to void algorithm
- device() str #
Get the GPU if exists
- Returns:
The device name (cuda or CPU)
- abstract fit(train_directory: Path, val_directory: Path, n_channel_in: int = 1, n_channels_layer: list[int] = (32, 64, 128), patch_size: int = 32, n_epoch: int = 25, learning_rate: float = 0.001, out_dir: Path = None)#
Train a model on a dataset
- Parameters:
train_directory – Directory containing the images used for training. One file per image,
val_directory – Directory containing the images used for validation of the training. One file per image,
n_channel_in – Number of channels in the input images
n_channels_layer – Number of channels for each hidden layers of the model,
patch_size – Size of square patches used for training the model,
n_epoch – Number of epochs,
learning_rate – Adam optimizer learning rate
- load(filename: Path)#
Load pre-trained model from file
- Param:
Path of the model file
- save(filename: Path)#
Save the model into file
- Param:
Path of the model file