This commit is contained in:
Glenn Jocher 2019-04-26 12:24:18 +02:00
parent 674feb91f2
commit c5ec86082d
1 changed files with 2 additions and 0 deletions

View File

@ -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