code: def rgb_lpips(np_gt, np_im, net_name, device):
      if net_name not in __LPIPS__:
          __LPIPS__[net_name] = init_lpips(net_name, device)
      gt = (
          torch.from_numpy(np_gt)
          .permute([2, 0, 1])
          .contiguous()
          .to(device)
      )
      im = (
          torch.from_numpy(np_im)
          .permute([2, 0, 1])
          .contiguous()
          .to(device)
      )
      return __LPIPS__[net_name](gt, im, normalize=True).item()
  
file_path: slimmerf/extra/compute_metrics.py
imports: import os, math
  import numpy
  import scipy.signal
  from typing import List, Optional
  from PIL import Image
  import os
  import torch
  import configargparse
label_desc: Use image node_id 2 for calling a global function with example usage: rgb_lpips(np_gt, np_im, net_name, device) and returns: __LPIPS__