Commit
•
1d65e81
1
Parent(s):
6dd7dd8
Fix missing labels after albumentations (#4455)
Browse files* 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>
- utils/datasets.py +1 -0
utils/datasets.py
CHANGED
@@ -568,6 +568,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|
568 |
if self.augment:
|
569 |
# Albumentations
|
570 |
img, labels = self.albumentations(img, labels)
|
|
|
571 |
|
572 |
# HSV color-space
|
573 |
augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=hyp['hsv_v'])
|
|
|
568 |
if self.augment:
|
569 |
# Albumentations
|
570 |
img, labels = self.albumentations(img, labels)
|
571 |
+
nl = len(labels) # update after albumentations
|
572 |
|
573 |
# HSV color-space
|
574 |
augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=hyp['hsv_v'])
|