fix: wrong xy coordinates when pasting
Former-commit-id: 8d3f4982614fb9874aa26b5d682148b53d45231c [formerly 03f6799ff09de7314e1e420eb123de7a3523d8dd] Former-commit-id: 9a8a5c2d21e49a72dfcc8b5efdcce3a20f4f8de6
This commit is contained in:
parent
a876a741f0
commit
313d491143
|
@ -1 +1 @@
|
|||
c2144df415f2913c12a788aa8070ad538ce60480
|
||||
297b2baa92a60d4fc01739921af7bf9f0f364370
|
|
@ -147,11 +147,11 @@ class RandomPaste(A.DualTransform):
|
|||
scale = rd.uniform(*self.scale_range) * min_scale
|
||||
shape = np.array(paste_shape * scale, dtype=np.uint)
|
||||
|
||||
x = rd.randint(0, target_shape[0] - shape[0])
|
||||
y = rd.randint(0, target_shape[1] - shape[1])
|
||||
x = rd.randint(0, target_shape[1] - shape[1])
|
||||
y = rd.randint(0, target_shape[0] - shape[0])
|
||||
|
||||
# check for overlapping
|
||||
if RandomPaste.overlap(augmentations, x, y, shape[0], shape[1]):
|
||||
if RandomPaste.overlap(augmentations, x, y, shape[1], shape[0]):
|
||||
continue
|
||||
|
||||
shearx = rd.uniform(-2, 2)
|
||||
|
|
Loading…
Reference in a new issue