updates
This commit is contained in:
parent
a18ad6025f
commit
88ba61505f
1
train.py
1
train.py
|
@ -32,6 +32,7 @@ hyp = {'giou': 1.582, # giou loss gain
|
|||
'momentum': 0.97, # SGD momentum
|
||||
'weight_decay': 0.0004569, # optimizer weight decay
|
||||
'fl_gamma': 0.5, # focal loss gamma
|
||||
'hsv_h': 0.0, # image HSV-Hue augmentation (fraction)
|
||||
'hsv_s': 0.5703, # image HSV-Saturation augmentation (fraction)
|
||||
'hsv_v': 0.3174, # image HSV-Value augmentation (fraction)
|
||||
'degrees': 1.113, # image rotation (+/- deg)
|
||||
|
|
|
@ -404,7 +404,6 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|||
|
||||
img_path = self.img_files[index]
|
||||
label_path = self.label_files[index]
|
||||
hyp = self.hyp
|
||||
|
||||
mosaic = True # load 4 images at a time into a mosaic
|
||||
if mosaic:
|
||||
|
@ -440,8 +439,10 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|||
labels[:, 4] = ratio[1] * h * (x[:, 2] + x[:, 4] / 2) + padh
|
||||
|
||||
if self.augment:
|
||||
hyp = self.hyp
|
||||
|
||||
# Augment colorspace
|
||||
augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=0.0)
|
||||
augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=hyp['hsv_v'])
|
||||
|
||||
# Augment imagespace
|
||||
g = 0.0 if mosaic else 1.0 # do not augment mosaics
|
||||
|
|
Loading…
Reference in New Issue