Skip to content

Commit 54143dd

Browse files
fix
1 parent 24d88d0 commit 54143dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Utils/CroppingAugm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,22 @@ def _FF(img):
6262
res['sobel'] = tf.reshape(sobel, [N, 6])
6363

6464
if withBlur:
65+
R = RArg = None
6566
if blurShared:
6667
idx = tf.random.uniform((1,), minval=0, maxval=blurN, dtype=tf.int32)
6768
R = tf.gather(blurRange, idx)
6869
R = tf.reshape(R, (1,))
70+
RArg = R
6971
R = tf.fill([N, 1], R[0])
7072
else:
7173
idx = tf.random.uniform((N,), minval=0, maxval=blurN, dtype=tf.int32)
7274
R = tf.gather(blurRange, idx)
7375
R = tf.reshape(R, (N, 1))
76+
RArg = R
7477
pass
7578

7679
tf.assert_equal(tf.shape(R), (N, 1))
77-
res['blured'] = blur(src, positions[0], R)
80+
res['blured'] = blur(src, positions[0], RArg)
7881
res['blur R'] = R - minR # ensure that R is starting from 0.0
7982
pass
8083
return res

0 commit comments

Comments
 (0)