Fix scale factor in MaskTestMixin (#4366)

* FPN deprecated warning

* FPN deprecated warning

* Fix scale_factor is not same type as det_bboxes error
pull/4367/head
Haian Huang(深度眸) 4 years ago committed by GitHub
parent f49540738e
commit bb75ddde85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      mmdet/models/roi_heads/test_mixins.py

@ -148,6 +148,9 @@ class MaskTestMixin(object):
if det_bboxes.shape[0] == 0:
segm_result = [[] for _ in range(self.mask_head.num_classes)]
else:
if rescale and not isinstance(scale_factor,
(float, torch.Tensor)):
scale_factor = det_bboxes.new_tensor(scale_factor)
_bboxes = (
det_bboxes[:, :4] *
scale_factor if rescale else det_bboxes)

Loading…
Cancel
Save