updates
This commit is contained in:
parent
67ee4f0c0d
commit
a27276f055
|
@ -105,7 +105,7 @@ class ListDataset(): # for training
|
||||||
if img is None:
|
if img is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
augment_hsv = False
|
augment_hsv = True
|
||||||
if augment_hsv:
|
if augment_hsv:
|
||||||
# SV augmentation by 50%
|
# SV augmentation by 50%
|
||||||
fraction = 0.50
|
fraction = 0.50
|
||||||
|
@ -144,7 +144,7 @@ class ListDataset(): # for training
|
||||||
labels = np.array([])
|
labels = np.array([])
|
||||||
|
|
||||||
# Augment image and labels
|
# Augment image and labels
|
||||||
# img, labels, M = random_affine(img, targets=labels, degrees=(-5, 5), translate=(0.1, 0.1), scale=(0.8, 1.2)) # RGB
|
img, labels, M = random_affine(img, targets=labels, degrees=(-10, 10), translate=(0.2, 0.2), scale=(0.8, 1.2)) # RGB
|
||||||
|
|
||||||
plotFlag = False
|
plotFlag = False
|
||||||
if plotFlag:
|
if plotFlag:
|
||||||
|
@ -158,7 +158,7 @@ class ListDataset(): # for training
|
||||||
labels[:, 1:5] = xyxy2xywh(labels[:, 1:5].copy()) / height
|
labels[:, 1:5] = xyxy2xywh(labels[:, 1:5].copy()) / height
|
||||||
|
|
||||||
# random left-right flip
|
# random left-right flip
|
||||||
lr_flip = False
|
lr_flip = True
|
||||||
if lr_flip & (random.random() > 0.5):
|
if lr_flip & (random.random() > 0.5):
|
||||||
img = np.fliplr(img)
|
img = np.fliplr(img)
|
||||||
if nL > 0:
|
if nL > 0:
|
||||||
|
|
Loading…
Reference in New Issue