From c5ec86082d99a9618abab6ad20ebae51bad2ea01 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 26 Apr 2019 12:24:18 +0200 Subject: [PATCH] updates --- utils/datasets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/datasets.py b/utils/datasets.py index c1b31817..4c949c78 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -237,6 +237,8 @@ class LoadImagesAndLabels(Dataset): # for training/testing if nL: # convert xyxy to xywh labels[:, 1:5] = xyxy2xywh(labels[:, 1:5]) + + # Normalize coordinates 0 - 1 labels[:, [2, 4]] /= img.shape[0] # height labels[:, [1, 3]] /= img.shape[1] # width