Skip to content

Commit

Permalink
Fix val.py zero-TP bug (#9431)
Browse files Browse the repository at this point in the history
Resolves #9400

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
glenn-jocher committed Sep 15, 2022
1 parent f9869f7 commit 58ad5ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion val.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def run(
names = dict(enumerate(names))
class_map = coco80_to_coco91_class() if is_coco else list(range(1000))
s = ('%22s' + '%11s' * 6) % ('Class', 'Images', 'Instances', 'P', 'R', 'mAP50', 'mAP50-95')
dt, p, r, f1, mp, mr, map50, map = (Profile(), Profile(), Profile()), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
tp, fp, p, r, f1, mp, mr, map50, ap50, map = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
dt = Profile(), Profile(), Profile() # profiling times
loss = torch.zeros(3, device=device)
jdict, stats, ap, ap_class = [], [], [], []
callbacks.run('on_val_start')
Expand Down

0 comments on commit 58ad5ca

Please sign in to comment.