updates
This commit is contained in:
parent
674feb91f2
commit
c5ec86082d
|
@ -237,6 +237,8 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||||
if nL:
|
if nL:
|
||||||
# convert xyxy to xywh
|
# convert xyxy to xywh
|
||||||
labels[:, 1:5] = xyxy2xywh(labels[:, 1:5])
|
labels[:, 1:5] = xyxy2xywh(labels[:, 1:5])
|
||||||
|
|
||||||
|
# Normalize coordinates 0 - 1
|
||||||
labels[:, [2, 4]] /= img.shape[0] # height
|
labels[:, [2, 4]] /= img.shape[0] # height
|
||||||
labels[:, [1, 3]] /= img.shape[1] # width
|
labels[:, [1, 3]] /= img.shape[1] # width
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue