本文整理匯總了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