code: def evaluateImgLists(
      prediction_list: list,
      groundtruth_list: list,
      args: CArgs,
      backend_args: Optional[dict] = None,
      dump_matches: bool = False,
  ) -> dict:
      """A wrapper of obj:``cityscapesscripts.evaluation.
  
      evalInstanceLevelSemanticLabeling.evaluateImgLists``. Support loading
      groundtruth image from file backend.
      Args:
          prediction_list (list): A list of prediction txt file.
          groundtruth_list (list): A list of groundtruth image file.
          args (CArgs): A global object setting in
              obj:``cityscapesscripts.evaluation.
              evalInstanceLevelSemanticLabeling``
          backend_args (dict, optional): Arguments to instantiate the
              preifx of uri corresponding backend. Defaults to None.
          dump_matches (bool): whether dump matches.json. Defaults to False.
      Returns:
          dict: The computed metric.
      """
      if not HAS_CITYSCAPESAPI:
          raise RuntimeError(
              "Failed to import `cityscapesscripts`."
              "Please try to install official "
              "cityscapesscripts by "
              '"pip install cityscapesscripts"'
          )
      # determine labels of interest
      CSEval.setInstanceLabels(args)
      # get dictionary of all ground truth instances
      gt_instances = getGtInstances(
          groundtruth_list, args, backend_args=backend_args
      )
      # match predictions and ground truth
      matches = matchGtWithPreds(
          prediction_list,
          groundtruth_list,
          gt_instances,
          args,
          backend_args,
      )
      if dump_matches:
          CSEval.writeDict2JSON(matches, "matches.json")
      # evaluate matches
      apScores = CSEval.evaluateMatches(matches, args)
      # averages
      avgDict = CSEval.computeAverages(apScores, args)
      # result dict
      resDict = CSEval.prepareJSONDataForResults(
          avgDict, apScores, args
      )
      if args.JSONOutput:
          # create output folder if necessary
          path = os.path.dirname(args.exportFile)
          CSEval.ensurePath(path)
          # Write APs to JSON
          CSEval.writeDict2JSON(resDict, args.exportFile)
  
      CSEval.printResults(avgDict, args)
  
      return resDict
  
file_path: mmdetection/mmdet/evaluation/functional/cityscapes_utils.py
imports: import json
  import os
  import sys
  from pathlib import Path
  from typing import Optional, Union
  import mmcv
  import numpy
  from mmengine.fileio import get
label_desc: Use image node_id 1 for calling a global function with example usage: evaluateImgLists(prediction_list, groundtruth_list, args, backend_args, dump_matches) and returns: resDict