add mosaic and warmup to hyperparameters (#931)
This commit is contained in:
1 parent
806e75f2b1
commit
f1c63e2784
4 files changed
+22
-9
No files matched your search
+3
-2
@@ -516,7 +516,8 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||
index = self.indices[index]
|
||||
|
||||
hyp = self.hyp
|
||||
if self.mosaic:
|
||||
mosaic = self.mosaic and random.random() < hyp['mosaic']
|
||||
if mosaic:
|
||||
# Load mosaic
|
||||
img, labels = load_mosaic(self, index)
|
||||
shapes = None
|
||||
@@ -550,7 +551,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||
|
||||
if self.augment:
|
||||
# Augment imagespace
|
||||
if not self.mosaic:
|
||||
if not mosaic:
|
||||
img, labels = random_perspective(img, labels,
|
||||
degrees=hyp['degrees'],
|
||||
translate=hyp['translate'],
|
||||
|
||||
Reference in new issue
Block a user