code: def main():
      """Create the model and start the evaluation process."""
  
      args = get_arguments()
  
      os.environ["CUDA_VISIBLE_DEVICES"] = args.gpu
      gpus = [int(i) for i in args.gpu.split(",")]
  
      print(args.gpu)
  
      h, w = map(int, args.input_size.split(","))
  
      input_size = (h, w)
  
      cudnn.benchmark = True
      cudnn.enabled = True
  
      model = dml_csr.DML_CSR(args.num_classes, InPlaceABN, False)
      normalize = transforms.Normalize(
          mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
      )
  
      transform = transforms.Compose(
          [
              transforms.ToTensor(),
              normalize,
          ]
      )
  
      dataset = datasets.FaceDataSet(
          args.data_dir,
          args.dataset,
          crop_size=input_size,
          transform=transform,
      )
      num_samples = len(dataset)
  
      valloader = torch.utils.data.DataLoader(
          dataset,
          batch_size=args.batch_size,
          shuffle=False,
          pin_memory=True,
      )
  
      restore_from = args.restore_from
      print(restore_from)
      state_dict = torch.load(restore_from, map_location="cuda:0")
      model.load_state_dict(state_dict)
  
      model.cuda()
      model.eval()
  
      save_path = os.path.join(args.out_dir, args.dataset, "parsing")
      if not os.path.exists(save_path):
          os.makedirs(save_path)
  
      parsing_preds, scales, centers = valid(
          model, valloader, input_size, num_samples, save_path
      )
      mIoU, f1 = miou.compute_mean_ioU(
          parsing_preds,
          scales,
          centers,
          args.num_classes,
          args.data_dir,
          input_size,
          args.dataset,
          reverse=True,
      )
  
      print(mIoU)
      print(f1)
  
file_path: insightface/parsing/dml_csr/test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import cv2
  import numpy
  import matplotlib.pyplot
  import os
  import torch
  import torch.backends.cudnn
  import torchvision.transforms
  from copy import deepcopy
  from inplace_abn import InPlaceABN
  from dataset import datasets
  from networks import dml_csr
  from utils import miou
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types