Skip to content

Commit

Permalink
Fix missing labels after albumentations (ultralytics#4455)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Aug 18, 2021
1 parent 996a0a5 commit 22be136
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ def __getitem__(self, index):
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'])
Expand Down

0 comments on commit 22be136

Please sign in to comment.