code: def evaluate_ava(
      preds,
      original_boxes,
      metadata,
      excluded_keys,
      class_whitelist,
      categories,
      groundtruth=None,
      video_idx_to_name=None,
      name="latest",
  ):
      """Run AVA evaluation given numpy arrays."""
  
      eval_start = time.time()
  
      detections = get_ava_eval_data(
          preds,
          original_boxes,
          metadata,
          class_whitelist,
          video_idx_to_name=video_idx_to_name,
      )
  
      logger.info(
          "Evaluating with %d unique GT frames." % len(groundtruth[0])
      )
      logger.info(
          "Evaluating with %d unique detection frames"
          % len(detections[0])
      )
  
      write_results(detections, "detections_%s.csv" % name)
      write_results(groundtruth, "groundtruth_%s.csv" % name)
  
      results = run_evaluation(
          categories, groundtruth, detections, excluded_keys
      )
  
      logger.info(
          "AVA eval done in %f seconds." % (time.time() - eval_start)
      )
      return results["PascalBoxes_Precision/mAP@0.5IOU"]
  
file_path: SlowFast/slowfast/utils/ava_eval_helper.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import csv
  import logging
  import pprint
  import time
  from collections import defaultdict
  import numpy
  import slowfast.utils.distributed
  from ava_evaluation import object_detection_evaluation, standard_fields
  from slowfast.utils.env import pathmgr
label_desc: Use image node_id 6 for calling a global function with example usage: evaluate_ava(preds, original_boxes, metadata, excluded_keys, class_whitelist, categories, groundtruth, video_idx_to_name, name) and returns: results