Skip to content

Commit 3941392

Browse files
PantelisPantelis
authored andcommitted
Fix inverted probability logic in RandomExpand.__call__
1 parent 0c1e833 commit 3941392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rfdetr/datasets/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def __init__(self, ratio=4., prob=0.5, fill_value=(127.5, 127.5, 127.5)):
391391
self.fill_value = fill_value
392392

393393
def __call__(self, img, target):
394-
if np.random.uniform(0., 1.) < self.prob:
394+
if np.random.uniform(0., 1.) >= self.prob:
395395
return img, target
396396

397397
height, width = img.shape[:2]

0 commit comments

Comments
 (0)