LVAE
Package to house various prediction utilies.
convert_outputs_microsplit(predictions, dataset)
Convert microsplit Lightning trainer outputs using eval_utils stitching functions.
This function processes microsplit predictions that return (tile_prediction, tile_std) tuples and stitches them back together using the same logic as get_single_file_mmse.
Parameters:
-
predictions(list of tuple[NDArray, NDArray]) –Predictions from Lightning trainer for microsplit. Each element is a tuple of (tile_prediction, tile_std) where both are numpy arrays from predict_step.
-
dataset(Dataset) –The dataset object used for prediction, needed for stitching function selection and stitching process.
Returns:
-
tuple[NDArray, NDArray]–A tuple of (stitched_predictions, stitched_stds) representing the full stitched predictions and standard deviations.
stitch_prediction_vae(predictions, dset)
Stitch predictions back together using dataset's index manager.
Parameters:
-
predictions(ndarray) –Array of predictions with shape (n_tiles, channels, height, width).
-
dset(Dataset) –Dataset object with idx_manager containing tiling information.
Returns:
-
ndarray–Stitched predictions.