当前位置: 首页>>代码示例>>Python>>正文


Python generate_anchor.generate_anchors方法代码示例

本文整理汇总了Python中rpn.generate_anchor.generate_anchors方法的典型用法代码示例。如果您正苦于以下问题:Python generate_anchor.generate_anchors方法的具体用法?Python generate_anchor.generate_anchors怎么用?Python generate_anchor.generate_anchors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rpn.generate_anchor的用法示例。


在下文中一共展示了generate_anchor.generate_anchors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from rpn import generate_anchor [as 别名]
# 或者: from rpn.generate_anchor import generate_anchors [as 别名]
def __init__(self, feat_stride, scales, ratios, output_score,
                 rpn_pre_nms_top_n, rpn_post_nms_top_n, threshold, rpn_min_size):
        super(ProposalOperator, self).__init__()
        self._feat_stride = feat_stride
        self._scales = np.fromstring(scales[1:-1], dtype=float, sep=',')
        self._ratios = np.fromstring(ratios[1:-1], dtype=float, sep=',')
        self._anchors = generate_anchors(base_size=self._feat_stride, scales=self._scales, ratios=self._ratios)
        self._num_anchors = self._anchors.shape[0]
        self._output_score = output_score
        self._rpn_pre_nms_top_n = rpn_pre_nms_top_n
        self._rpn_post_nms_top_n = rpn_post_nms_top_n
        self._threshold = threshold
        self._rpn_min_size = rpn_min_size

        if DEBUG:
            print 'feat_stride: {}'.format(self._feat_stride)
            print 'anchors:'
            print self._anchors 
开发者ID:i-pan,项目名称:kaggle-rsna18,代码行数:20,代码来源:proposal.py

示例2: __init__

# 需要导入模块: from rpn import generate_anchor [as 别名]
# 或者: from rpn.generate_anchor import generate_anchors [as 别名]
def __init__(self, feat_stride, scales, ratios, output_score,
                 rpn_pre_nms_top_n, rpn_post_nms_top_n, threshold, rpn_min_size):
        super(ProposalQuadrangleOperator, self).__init__()
        self._feat_stride = feat_stride
        self._scales = np.fromstring(scales[1:-1], dtype=float, sep=',')
        self._ratios = np.fromstring(ratios[1:-1], dtype=float, sep=',')
        self._anchors = generate_anchors(base_size=self._feat_stride, scales=self._scales, ratios=self._ratios)
        self._num_anchors = self._anchors.shape[0]
        self._output_score = output_score
        self._rpn_pre_nms_top_n = rpn_pre_nms_top_n
        self._rpn_post_nms_top_n = rpn_post_nms_top_n
        self._threshold = threshold
        self._rpn_min_size = rpn_min_size

        if DEBUG:
            print 'feat_stride: {}'.format(self._feat_stride)
            print 'anchors:'
            print self._anchors 
开发者ID:jessemelpolio,项目名称:Faster_RCNN_for_DOTA,代码行数:20,代码来源:proposal_quadrangle.py


注:本文中的rpn.generate_anchor.generate_anchors方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。