本文整理汇总了Python中layer_utils.proposal_layer.proposal_layer方法的典型用法代码示例。如果您正苦于以下问题:Python proposal_layer.proposal_layer方法的具体用法?Python proposal_layer.proposal_layer怎么用?Python proposal_layer.proposal_layer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类layer_utils.proposal_layer
的用法示例。
在下文中一共展示了proposal_layer.proposal_layer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _proposal_layer
# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, target_name, name):
with tf.variable_scope(name) as scope:
if cfg.USE_E2E_TF:
rois, rpn_scores = proposal_layer_tf(
rpn_cls_prob,
rpn_bbox_pred,
self._im_info,
self._mode,
self._feat_stride[target_name],
self._anchors,
self._num_anchors[target_name]
)
else:
rois, rpn_scores = tf.py_func(proposal_layer,
[rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
self._feat_stride[target_name], self._anchors, self._num_anchors[target_name]],
[tf.float32, tf.float32], name="proposal")
rois.set_shape([None, 5])
rpn_scores.set_shape([None, 1])
return rois, rpn_scores
示例2: _proposal_layer
# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, name):
with tf.variable_scope(name) as scope:
if cfg.USE_E2E_TF:
rois, rpn_scores = proposal_layer_tf(
rpn_cls_prob,
rpn_bbox_pred,
self._im_info,
self._mode,
self._feat_stride,
self._anchors,
self._num_anchors
)
else:
rois, rpn_scores = tf.py_func(proposal_layer,
[rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
self._feat_stride, self._anchors, self._num_anchors],
[tf.float32, tf.float32], name="proposal")
rois.set_shape([None, 5])
rpn_scores.set_shape([None, 1])
return rois, rpn_scores
# Only use it if you have roi_pooling op written in tf.image
示例3: _proposal_layer
# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred):
rois, rpn_scores = proposal_layer(\
rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
self._feat_stride, self._anchors, self._num_anchors)
return rois, rpn_scores
开发者ID:Sunarker,项目名称:Collaborative-Learning-for-Weakly-Supervised-Object-Detection,代码行数:8,代码来源:network.py
示例4: _proposal_layer
# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, name):
"""
Do nms -> topN -> apply rpn_bbox_pred to anchors(bbox_transform_inv)
"""
with tf.variable_scope(name) as scope:
rois, rpn_scores = tf.py_func(proposal_layer,
[rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
self._anchors, self._num_anchors],
[tf.float32, tf.float32], name="proposal")
rois.set_shape([None, 5])
rpn_scores.set_shape([None, 1])
return rois, rpn_scores
示例5: _proposal_layer
# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, name):
with tf.variable_scope(name) as scope:
rois, rpn_scores = tf.py_func(proposal_layer,
[rpn_cls_prob, rpn_bbox_pred, self._im_info, self._mode,
self._feat_stride, self._anchors, self._num_anchors],
[tf.float32, tf.float32])
rois.set_shape([None, 5])
rpn_scores.set_shape([None, 1])
return rois, rpn_scores
# Only use it if you have roi_pooling op written in tf.image
示例6: _proposal_layer
# 需要导入模块: from layer_utils import proposal_layer [as 别名]
# 或者: from layer_utils.proposal_layer import proposal_layer [as 别名]
def _proposal_layer(self, rpn_cls_prob, rpn_bbox_pred, rpn_cls_score, mode, name):
with tf.variable_scope(name) as scope:
rois, roi_scores, rpn_scores = tf.py_func(proposal_layer,
[rpn_cls_prob, rpn_bbox_pred, rpn_cls_score, self._im_info, mode,
self._anchors, self._num_anchors],
[tf.float32, tf.float32, tf.float32], name="proposal")
rois.set_shape([None, 5])
roi_scores.set_shape([None, 1])
rpn_scores.set_shape([None, 2])
return rois, roi_scores, rpn_scores