updates
This commit is contained in:
parent
81b4a7833f
commit
c5cb3c8a9e
2
train.py
2
train.py
|
@ -12,7 +12,7 @@ from utils.datasets import *
|
|||
from utils.utils import *
|
||||
|
||||
# Hyperparameters: train.py --evolve --epochs 2 --img-size 320, Metrics: 0.204 0.302 0.175 0.234 (square smart)
|
||||
hyp = {'xy': 0.2, # xy loss gain
|
||||
hyp = {'xy': 0.2, # xy loss gain (giou is about 0.02)
|
||||
'wh': 0.1, # wh loss gain
|
||||
'cls': 0.04, # cls loss gain
|
||||
'conf': 4.5, # conf loss gain
|
||||
|
|
|
@ -230,7 +230,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|||
augment_hsv = True
|
||||
if self.augment and augment_hsv:
|
||||
# SV augmentation by 50%
|
||||
fraction = 0.25 # must be < 1.0
|
||||
fraction = 0.50 # must be < 1.0
|
||||
img_hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # hue, sat, val
|
||||
S = img_hsv[:, :, 1].astype(np.float32) # saturation
|
||||
V = img_hsv[:, :, 2].astype(np.float32) # value
|
||||
|
@ -269,7 +269,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|||
|
||||
# Augment image and labels
|
||||
if self.augment:
|
||||
img, labels = random_affine(img, labels, degrees=(-5, 5), translate=(0.0, 0.0), scale=(1.0, 1.0))
|
||||
img, labels = random_affine(img, labels, degrees=(-5, 5), translate=(0.10, 0.10), scale=(0.90, 1.10))
|
||||
|
||||
nL = len(labels) # number of labels
|
||||
if nL:
|
||||
|
|
Loading…
Reference in New Issue