code: def img_pr_info(thresh_num, pred_info, proposal_list, pred_recall):
      pr_info = np.zeros((thresh_num, 2)).astype("float")
      fp = np.zeros((pred_info.shape[0],), dtype=np.int)
      last_info = [-1, -1]
      for t in range(thresh_num):
          thresh = 1 - (t + 1) / thresh_num
          r_index = np.where(pred_info[:, 4] >= thresh)[0]
          if len(r_index) == 0:
              pr_info[t, 0] = 0
              pr_info[t, 1] = 0
          else:
              r_index = r_index[-1]
              p_index = np.where(proposal_list[: r_index + 1] == 1)[0]
              pr_info[t, 0] = len(p_index)  # valid pred number
              pr_info[t, 1] = pred_recall[r_index]  # valid gt number
  
              if (
                  t > 0
                  and pr_info[t, 0] > pr_info[t - 1, 0]
                  and pr_info[t, 1] == pr_info[t - 1, 1]
              ):
                  fp[r_index] = 1
                  # if thresh>=0.85:
                  #    print(thresh, t, pr_info[t])
      # print(pr_info[:10,0])
      # print(pr_info[:10,1])
      return pr_info, fp
  
imports: from __future__ import absolute_import
  import os
  import tqdm
  import pickle
  import datetime
  import argparse
  import numpy
  from scipy.io import loadmat
label_desc: Use image node_id 12 for calling a global function with example usage: img_pr_info(thresh_num, pred_info, proposal_list, pred_recall) and returns: pr_info,  fp