glenn-jocher commited on
Commit
8e9b3d0
·
unverified ·
1 Parent(s): ed85038

Precision-Recall Curve feature update #1206

Browse files
Files changed (1) hide show
  1. utils/general.py +1 -1
utils/general.py CHANGED
@@ -337,7 +337,7 @@ def compute_ap(recall, precision):
337
  # Integrate area under curve
338
  method = 'interp' # methods: 'continuous', 'interp'
339
  if method == 'interp':
340
- x = np.linspace(0, 1, 1001) # 101-point interp (COCO)
341
  ap = np.trapz(np.interp(x, mrec, mpre), x) # integrate
342
  else: # 'continuous'
343
  i = np.where(mrec[1:] != mrec[:-1])[0] # points where x axis (recall) changes
 
337
  # Integrate area under curve
338
  method = 'interp' # methods: 'continuous', 'interp'
339
  if method == 'interp':
340
+ x = np.linspace(0, 1, 101) # 101-point interp (COCO)
341
  ap = np.trapz(np.interp(x, mrec, mpre), x) # integrate
342
  else: # 'continuous'
343
  i = np.where(mrec[1:] != mrec[:-1])[0] # points where x axis (recall) changes