code: def eval_metrics(gts, preds):
      results = {"ssim": [], "psnr": [], "lpips": []}
      for gt, pred in zip(gts, preds):
          results["ssim"].append(ssim(pred, gt, multichannel=True))
          results["psnr"].append(
              skimage.metrics.peak_signal_noise_ratio(gt, pred)
          )
          results["lpips"].append(
              float(
                  loss_fn_alex(
                      utils.np_img_to_torch_img(pred[None]) / 127.5 - 1,
                      utils.np_img_to_torch_img(gt[None]) / 127.5 - 1,
                  )[0, 0, 0, 0].data
              )
          )
      for k, v in results.items():
          results[k] = np.mean(v)
      return results
  
file_path: ml-neuman/render_test_views.py
imports: import os
  import argparse
  import imageio
  import torch
  import numpy
  import skimage
  from skimage.metrics import structural_similarity
  import lpips
  from models import human_nerf
  from utils import render_utils, utils
  from data_io import neuman_helper
  from options import options
label_desc: Use image node_id 1 for calling a global function with example usage: eval_metrics(gts, preds) and returns: results