test.py --task test updates
This commit is contained in:
1 parent
f1678ba8f4
commit
aa08b2bd6f
2 files changed
+5
-2
No files matched your search
@@ -165,7 +165,7 @@ def test(data,
|
||||
|
||||
# Compute statistics
|
||||
stats = [np.concatenate(x, 0) for x in zip(*stats)] # to numpy
|
||||
if len(stats):
|
||||
if len(stats) and stats[0].any():
|
||||
p, r, ap, f1, ap_class = ap_per_class(*stats)
|
||||
p, r, ap50, ap = p[:, 0], r[:, 0], ap[:, 0], ap.mean(1) # [P, R, AP@0.5, AP@0.5:0.95]
|
||||
mp, mr, map50, map = p.mean(), r.mean(), ap50.mean(), ap.mean()
|
||||
|
||||
Reference in new issue
Block a user