From c5cb3c8a9e3bbbb1365dcbaac495ae2d1083ab1b Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 12 Jun 2019 14:35:10 +0200 Subject: [PATCH] updates --- train.py | 2 +- utils/datasets.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/train.py b/train.py index 0df92b0e..06ebbbe0 100644 --- a/train.py +++ b/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 diff --git a/utils/datasets.py b/utils/datasets.py index b5f8db6a..98d855e0 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -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: