Skip to content

Commit

Permalink
Fix pointrend missing get_uncertainty function bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaAndroid committed Mar 28, 2022
1 parent 8c01ce6 commit dac0187
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions mmdet/models/roi_heads/mask_heads/mask_point_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from mmcv.runner import BaseModule

from mmdet.models.builder import HEADS, build_loss
from mmdet.models.utils import get_uncertain_point_coords_with_randomness
from mmdet.models.utils import (get_uncertain_point_coords_with_randomness,
get_uncertainty)


@HEADS.register_module()
Expand Down Expand Up @@ -230,7 +231,7 @@ def get_roi_rel_points_test(self, mask_pred, pred_label, cfg):
most uncertain points from the [mask_height, mask_width] grid .
"""
num_points = cfg.subdivision_num_points
uncertainty_map = self._get_uncertainty(mask_pred, pred_label)
uncertainty_map = get_uncertainty(mask_pred, pred_label)
num_rois, _, mask_height, mask_width = uncertainty_map.shape

# During ONNX exporting, the type of each elements of 'shape' is
Expand Down
5 changes: 3 additions & 2 deletions mmdet/models/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from .misc import interpolate_as, sigmoid_geometric_mean
from .normed_predictor import NormedConv2d, NormedLinear
from .panoptic_gt_processing import preprocess_panoptic_gt
from .point_sample import get_uncertain_point_coords_with_randomness
from .point_sample import (get_uncertain_point_coords_with_randomness,
get_uncertainty)
from .positional_encoding import (LearnedPositionalEncoding,
SinePositionalEncoding)
from .res_layer import ResLayer, SimplifiedBasicBlock
Expand All @@ -29,5 +30,5 @@
'adaptive_avg_pool2d', 'AdaptiveAvgPool2d', 'PatchEmbed', 'nchw_to_nlc',
'nlc_to_nchw', 'pvt_convert', 'sigmoid_geometric_mean',
'preprocess_panoptic_gt', 'DyReLU',
'get_uncertain_point_coords_with_randomness'
'get_uncertain_point_coords_with_randomness', 'get_uncertainty'
]

0 comments on commit dac0187

Please sign in to comment.