本文整理匯總了Python中mmdet.core.mask_target方法的典型用法代碼示例。如果您正苦於以下問題:Python core.mask_target方法的具體用法?Python core.mask_target怎麽用?Python core.mask_target使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mmdet.core
的用法示例。
在下文中一共展示了core.mask_target方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_targets
# 需要導入模塊: from mmdet import core [as 別名]
# 或者: from mmdet.core import mask_target [as 別名]
def get_targets(self, sampling_results, gt_masks, rcnn_train_cfg):
pos_proposals = [res.pos_bboxes for res in sampling_results]
pos_assigned_gt_inds = [
res.pos_assigned_gt_inds for res in sampling_results
]
mask_targets = mask_target(pos_proposals, pos_assigned_gt_inds,
gt_masks, rcnn_train_cfg)
return mask_targets
示例2: get_target
# 需要導入模塊: from mmdet import core [as 別名]
# 或者: from mmdet.core import mask_target [as 別名]
def get_target(self, sampling_results, gt_masks, rcnn_train_cfg):
pos_proposals = [res.pos_bboxes for res in sampling_results]
pos_assigned_gt_inds = [
res.pos_assigned_gt_inds for res in sampling_results
]
mask_targets = mask_target(pos_proposals, pos_assigned_gt_inds,
gt_masks, rcnn_train_cfg)
return mask_targets