code: def get_stat(result_dir, group, prefix, idx):
      curr_dir = osp.join(result_dir, group, "%s_%d" % (prefix, idx))
      aps_file = osp.join(curr_dir, "aps")
      aps = []
      if osp.exists(aps_file):
          with open(aps_file, "r") as f:
              aps = [float(x) for x in f.readline().strip().split(",")]
      cfg_file = osp.join("configs", group, "%s_%d.py" % (prefix, idx))
      cfg = Config.fromfile(cfg_file)
      all_flops, backbone_flops, neck_flops, head_flops = get_flops(
          cfg, (3, 480, 640)
      )
  
      return aps, all_flops, backbone_flops, neck_flops, head_flops
  
file_path: insightface/detection/scrfd/search_tools/search_stat.py
imports: import os
  import json
  import os.path
  import io
  import torch
  import numpy
  from mmcv import Config
  from mmdet.models import build_detector
  from mmcv.cnn import get_model_complexity_info
label_desc: Use image node_id 2 for calling a global function with example usage: get_stat(result_dir, group, prefix, idx) and returns: aps,  all_flops,  backbone_flops,  neck_flops,  head_flops