diff --git a/val.py b/val.py index 48207a1130a6..006ade37d03e 100644 --- a/val.py +++ b/val.py @@ -275,6 +275,8 @@ def run( # Print results pf = '%20s' + '%11i' * 2 + '%11.3g' * 4 # print format LOGGER.info(pf % ('all', seen, nt.sum(), mp, mr, map50, map)) + if nt.sum() == 0: + LOGGER.warning(emojis(f'WARNING: no labels found in {task} set, can not compute metrics without labels ⚠️')) # Print results per class if (verbose or (nc < 50 and not training)) and nc > 1 and len(stats):