File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -499,8 +499,9 @@ def cummean(x):
499
499
500
500
for metric_name in {key : [] for key in self .metric_names }:
501
501
# If no box was predicted for this class, no raw metrics exist and we set secondary metrics to 1.
502
+ # Likewise if all predicted boxes are false positives.
502
503
metric_vals = raw_metrics [metric_name ]
503
- if len (metric_vals ) == 0 :
504
+ if len (metric_vals ) == 0 or all ( np . isnan ( metric_vals )) :
504
505
tp_metrics [metric_name ] = 1
505
506
continue
506
507
@@ -510,7 +511,6 @@ def cummean(x):
510
511
511
512
# Normalize and clip metric errors.
512
513
metric_bound = self .metric_bounds [metric_name ]
513
- assert np .nanmin (metric_vals ) >= 0
514
514
metric_vals = np .array (metric_vals ) / metric_bound # Normalize.
515
515
metric_vals = np .minimum (1 , metric_vals ) # Clip.
516
516
You can’t perform that action at this time.
0 commit comments