franzi2505 commited on
Commit
965f74d
·
1 Parent(s): 098fa32

if class-specific, also log average/sum over all classes to make it easier to get an idea of metric

Browse files
Files changed (1) hide show
  1. det-metrics.py +6 -1
det-metrics.py CHANGED
@@ -457,10 +457,15 @@ class DetectionMetric(evaluate.Metric):
457
  (f"{(wandb_section + '/') if wandb_section else ''}{cls_name}/{area_range + '.' + m}") : v[cls_idx]
458
  }
459
  )
 
 
 
 
 
460
  else:
461
  run.log(
462
  {
463
- f"{(wandb_section + '/') if wandb_section is not None else ''}{m}" : v
464
  }
465
  )
466
  if wandb_runs is None:
 
457
  (f"{(wandb_section + '/') if wandb_section else ''}{cls_name}/{area_range + '.' + m}") : v[cls_idx]
458
  }
459
  )
460
+ run.log(
461
+ {
462
+ (f"{(wandb_section + '/') if wandb_section else ''}all/{area_range + '.' + m}") : v[v != -1].sum() if m in ["duplicates", "support"] else v[v != -1].mean()
463
+ }
464
+ )
465
  else:
466
  run.log(
467
  {
468
+ f"{(wandb_section + '/') if wandb_section is not None else ''}{area_range + '.' + m}" : v
469
  }
470
  )
471
  if wandb_runs is None: