code: def show_model_outputs(ground_truths, df, est_dirs, subj_ids, axes):
      """Plots the results for visualisation"""
      for est_dir in est_dirs.values():
          for i, sid in enumerate(subj_ids):
              a = imread([f for f in ground_truths if sid in f][0])
              b = (
                  nib.load(est_dir + "/" + sid + "_niftynet_out.nii.gz")
                  .get_data()
                  .squeeze()
              )
  
              axes[i].imshow(np.hstack([a, b, a - b]), cmap="gray")
              axes[i].set_axis_off()
  
              train_or_val = df[df["ids"] == sid]["fold"].values[0]
              axes[i].set_title(
                  "{} Fold: Ground truth, Estimate and Difference. Dice Score = {:.2f}".format(
                      train_or_val, dice_score(a, b)
                  )
              )
  
file_path: NiftyNet/demos/unet/unet_demo_utils.py
imports: import os
  import nibabel
  import pandas
  import numpy
  import matplotlib.pyplot
  from skimage.io import imread
  import re
label_desc: Use image node_id 6 for calling a global function with example usage: show_model_outputs(ground_truths, df, est_dirs, subj_ids, axes) without return types