wf_psf.psf_models.psf_model_loader
PSF Model Loader.
This module provides helper functions for loading trained PSF models. It includes utilities to: - Load a model from disk using its configuration and weights. - Prepare inputs for inference or evaluation workflows.
Author: Jennifer Pollack <jennifer.pollack@cea.fr>
Functions
|
Build PSF model and load weights. |
- wf_psf.psf_models.psf_model_loader.load_trained_psf_model(training_conf, data_conf, weights_path_pattern)[source]
Build PSF model and load weights.
- Parameters:
training_conf (RecursiveNamespace) – Training configuration namespace
data_conf (RecursiveNamespace or dict) – Configuration RecursiveNamespace or dict containing data parameters (e.g. pixel data, positions, masks, etc).
weights_path_pattern (str) – Glob-style pattern used to locate the model weights file.
- Returns:
model – The PSF model instance with loaded weights.
- Return type:
tf.keras.Model or compatible
- Raises:
RuntimeError – If loading the model weights fails for any reason.