From 1d65e8194d183f4e1537cf64a7292f8ab57d1d55 Mon Sep 17 00:00:00 2001 From: "Huu Quan, CAP" Date: Wed, 18 Aug 2021 19:07:09 +0900 Subject: [PATCH] Fix missing labels after albumentations (#4455) * fix missing labels after augmentation * Update datasets.py Cleanup Co-authored-by: Huu Quan Co-authored-by: Glenn Jocher --- utils/datasets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/datasets.py b/utils/datasets.py index 52b0289..25a2ba6 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -568,6 +568,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing if self.augment: # Albumentations img, labels = self.albumentations(img, labels) + nl = len(labels) # update after albumentations # HSV color-space augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=hyp['hsv_v'])