updates
This commit is contained in:
parent
725762b937
commit
139161c522
|
@ -588,6 +588,7 @@ def load_mosaic(self, index):
|
||||||
labels[:, 4] = h * (x[:, 2] + x[:, 4] / 2) + padh
|
labels[:, 4] = h * (x[:, 2] + x[:, 4] / 2) + padh
|
||||||
|
|
||||||
labels4.append(labels)
|
labels4.append(labels)
|
||||||
|
if len(labels4):
|
||||||
labels4 = np.concatenate(labels4, 0)
|
labels4 = np.concatenate(labels4, 0)
|
||||||
|
|
||||||
# hyp = self.hyp
|
# hyp = self.hyp
|
||||||
|
@ -600,6 +601,7 @@ def load_mosaic(self, index):
|
||||||
# Center crop
|
# Center crop
|
||||||
a = s // 2
|
a = s // 2
|
||||||
img4 = img4[a:a + s, a:a + s]
|
img4 = img4[a:a + s, a:a + s]
|
||||||
|
if len(labels4):
|
||||||
labels4[:, 1:] -= a
|
labels4[:, 1:] -= a
|
||||||
|
|
||||||
return img4, labels4
|
return img4, labels4
|
||||||
|
|
Loading…
Reference in New Issue