Fix missing labels after albumentations (#4455)

* fix missing labels after augmentation

* Update datasets.py

Cleanup

Co-authored-by: Huu Quan <huuquan@HuuQuans-MacBook.local>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
authored and GitHub committed 2021-08-18 12:07:09 +02:00
1 parent 6dd7dd8dd3
commit 1d65e8194d
1 file changed
+1
+1
View File
@@ -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'])