This commit is contained in:
Glenn Jocher 2020-01-11 13:12:58 -08:00
parent 5cda317902
commit 9b84885775
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ def test(cfg,
stats.append((correct, pred[:, 4].cpu(), pred[:, 5].cpu(), tcls)) stats.append((correct, pred[:, 4].cpu(), pred[:, 5].cpu(), tcls))
# Compute statistics # Compute statistics
stats = [np.concatenate(x, 0) for x in list(zip(*stats))] # to numpy stats = [np.concatenate(x, 0) for x in zip(*stats)] # to numpy
if len(stats): if len(stats):
p, r, ap, f1, ap_class = ap_per_class(*stats) p, r, ap, f1, ap_class = ap_per_class(*stats)
if niou > 1: if niou > 1: