updates
This commit is contained in:
parent
2769d79d05
commit
a660211733
|
@ -270,7 +270,7 @@ def random_affine(img, targets=None, degrees=(-10, 10), translate=(.1, .1), scal
|
||||||
h = xy[:, 3] - xy[:, 1]
|
h = xy[:, 3] - xy[:, 1]
|
||||||
area = w * h
|
area = w * h
|
||||||
ar = np.maximum(w / (h + 1e-16), h / (w + 1e-16))
|
ar = np.maximum(w / (h + 1e-16), h / (w + 1e-16))
|
||||||
i = (w > 4) & (h > 4) & (area / area0 > 0.1) & (ar < 10)
|
i = (w > 4) & (h > 4) & (area / (area0 + 1e-16) > 0.1) & (ar < 10)
|
||||||
|
|
||||||
targets = targets[i]
|
targets = targets[i]
|
||||||
targets[:, 1:5] = xy[i]
|
targets[:, 1:5] = xy[i]
|
||||||
|
|
Loading…
Reference in New Issue