Skip to content

Commit 5412e85

Browse files
authored
[Fix] misspelling of 'flip' (#10746)
1 parent cd88ad1 commit 5412e85

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

mmdet/datasets/transforms/transforms.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,7 +2631,7 @@ def transform(self, results: dict) -> dict:
26312631
retrieve_img = retrieve_results['img']
26322632

26332633
jit_factor = random.uniform(*self.ratio_range)
2634-
is_filp = random.uniform(0, 1) > self.flip_ratio
2634+
is_flip = random.uniform(0, 1) > self.flip_ratio
26352635

26362636
if len(retrieve_img.shape) == 3:
26372637
out_img = np.ones(
@@ -2658,7 +2658,7 @@ def transform(self, results: dict) -> dict:
26582658
int(out_img.shape[0] * jit_factor)))
26592659

26602660
# 4. flip
2661-
if is_filp:
2661+
if is_flip:
26622662
out_img = out_img[:, ::-1, :]
26632663

26642664
# 5. random crop
@@ -2684,7 +2684,7 @@ def transform(self, results: dict) -> dict:
26842684
if self.bbox_clip_border:
26852685
retrieve_gt_bboxes.clip_([origin_h, origin_w])
26862686

2687-
if is_filp:
2687+
if is_flip:
26882688
retrieve_gt_bboxes.flip_([origin_h, origin_w],
26892689
direction='horizontal')
26902690

@@ -3728,7 +3728,7 @@ def transform(self, results: dict) -> dict:
37283728
with_mask = True if 'gt_masks' in results else False
37293729

37303730
jit_factor = random.uniform(*self.ratio_range)
3731-
is_filp = random.uniform(0, 1) > self.flip_ratio
3731+
is_flip = random.uniform(0, 1) > self.flip_ratio
37323732

37333733
if len(retrieve_img.shape) == 3:
37343734
out_img = np.ones(
@@ -3755,7 +3755,7 @@ def transform(self, results: dict) -> dict:
37553755
int(out_img.shape[0] * jit_factor)))
37563756

37573757
# 4. flip
3758-
if is_filp:
3758+
if is_flip:
37593759
out_img = out_img[:, ::-1, :]
37603760

37613761
# 5. random crop
@@ -3785,7 +3785,7 @@ def transform(self, results: dict) -> dict:
37853785
if self.bbox_clip_border:
37863786
retrieve_gt_bboxes.clip_([origin_h, origin_w])
37873787

3788-
if is_filp:
3788+
if is_flip:
37893789
retrieve_gt_bboxes.flip_([origin_h, origin_w],
37903790
direction='horizontal')
37913791
if with_mask:

mmdet/models/test_time_augs/merge_augs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def merge_aug_masks(aug_masks: List[Tensor],
198198
weight = weights[i]
199199
else:
200200
weight = 1
201-
flip = img_metas.get('filp', False)
201+
flip = img_metas.get('flip', False)
202202
if flip:
203203
flip_direction = img_metas['flip_direction']
204204
if flip_direction == 'horizontal':

0 commit comments

Comments
 (0)