prediction_outputs
Module containing functions to convert prediction outputs to desired form.
combine_batches(predictions, tiled)
#
If predictions are in batches, they will be combined.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
predictions | list | Predictions that are output from | required |
tiled | bool | Whether the predictions are tiled. | required |
Returns:
Type | Description |
---|---|
(list of numpy.ndarray) or tuple of (list of numpy.ndarray, list of TileInformation) | Combined batches. |
Source code in src/careamics/prediction_utils/prediction_outputs.py
convert_outputs(predictions, tiled)
#
Convert the Lightning trainer outputs to the desired form.
This method allows stitching back together tiled predictions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
predictions | list | Predictions that are output from | required |
tiled | bool | Whether the predictions are tiled. | required |
Returns:
Type | Description |
---|---|
list of numpy.ndarray or numpy.ndarray | list of arrays with the axes SC(Z)YX. If there is only 1 output it will not be in a list. |