Browse Source

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>
modifyDataloader
Huu Quan, CAP GitHub 3 years ago
parent
commit
1d65e8194d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      utils/datasets.py

+ 1
- 0
utils/datasets.py View File

if self.augment: if self.augment:
# Albumentations # Albumentations
img, labels = self.albumentations(img, labels) img, labels = self.albumentations(img, labels)
nl = len(labels) # update after albumentations


# HSV color-space # HSV color-space
augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=hyp['hsv_v']) augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=hyp['hsv_v'])

Loading…
Cancel
Save