mednet.engine.segment.viewer¶
Functions
|
Create an segmentation map visualisation. |
- mednet.engine.segment.viewer.view(basedir, stem, threshold, show_errors, tp_color, fp_color, fn_color, alpha)[source]¶
Create an segmentation map visualisation.
- Parameters:
basedir (
Path) – Base directory where the prediction indicated bystemis stored.stem (
str) – Name of the HDF5 file containing the predictions, as output by thepredictCLI.threshold (
float) – The threshold to apply to the probability map loaded from the HDF5 file.show_errors (
bool) – If set toTrue, then colours false-positives (in red), and false negatives (in green).tp_color (
tuple[int,int,int]) – Tuple that indicates which color to use for displaying true-positives.fp_color (
tuple[int,int,int]) – Tuple that indicates which color to use for displaying false-positives.fn_color (
tuple[int,int,int]) – Tuple that indicates which color to use for displaying false-negatives.alpha (
float) – How transparent will the overlay be.
- Return type:
- Returns:
An image with an overlayed segmentation map that can be saved or displayed.