From b30021e781570d6137bfcfff9cdd6bf3f0cb012d Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Thu, 23 Jan 2025 20:20:43 +0800 Subject: [PATCH] Fix dataset category indexes check (#18840) --- ultralytics/data/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/data/utils.py b/ultralytics/data/utils.py index 50b597d8..3a75e5a1 100644 --- a/ultralytics/data/utils.py +++ b/ultralytics/data/utils.py @@ -136,7 +136,7 @@ def verify_image_label(args): # All labels max_cls = lb[:, 0].max() # max label count - assert max_cls <= num_cls, ( + assert max_cls < num_cls, ( f"Label class {int(max_cls)} exceeds dataset class count {num_cls}. " f"Possible class labels are 0-{num_cls - 1}" )