code: def main(args):
      env_info = get_sys_env()
      place = (
          "gpu"
          if env_info["Paddle compiled with cuda"]
          and env_info["GPUs used"]
          else "cpu"
      )
  
      paddle.set_device(place)
      if not args.cfg:
          raise RuntimeError("No configuration file specified.")
  
      cfg = Config(args.cfg)
      val_dataset = cfg.val_dataset
      if val_dataset is None:
          raise RuntimeError(
              "The verification dataset is not specified in the configuration file."
          )
  
      msg = "\n---------------Config Information---------------\n"
      msg += str(cfg)
      msg += "------------------------------------------------"
      logger.info(msg)
  
      model = cfg.model
      utils.load_entire_model(model, args.model_path)
  
      logger.info("Loaded trained params of model successfully")
      logger.info("Aug_eval = {}".format(args.aug_eval))
      logger.info("Flip_horizontal = {}".format(args.flip_horizontal))
  
      evaluate(
          model,
          val_dataset,
          aug_eval=args.aug_eval,
          scales=args.scales,
          flip_horizontal=args.flip_horizontal,
          flip_vertical=args.flip_vertical,
          is_slide=args.is_slide,
          crop_size=args.crop_size,
          stride=args.stride,
          num_workers=args.num_workers,
      )
  
file_path: PaddleSeg/contrib/CityscapesSOTA/val.py
imports: import argparse
  import os
  import paddle
  from paddleseg.cvlibs import manager, Config
  from paddleseg.core import evaluate
  from paddleseg.utils import get_sys_env, logger, utils
  import datasets, models
label_desc: Use image node_id 2 for calling a global function with example usage: main(args) without return types